@ceraph/react-native-mcp 0.3.2 → 0.4.5
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 +335 -68
- package/dist/babel-plugin/index.cjs +1 -0
- package/dist/babel-plugin/index.js +1 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +1 -47
- package/dist/index.d.ts +106 -1
- package/dist/index.js +2 -1651
- package/dist/shim/async-storage-ops.d.ts +26 -0
- package/dist/shim/async-storage-ops.js +1 -0
- package/dist/shim/boot.d.ts +9 -0
- package/dist/shim/boot.js +1 -141
- package/dist/shim/camera.js +1 -62
- package/dist/shim/command-poll.d.ts +18 -0
- package/dist/shim/command-poll.js +1 -0
- package/dist/shim/config.js +1 -56
- package/dist/shim/console-capture.d.ts +16 -0
- package/dist/shim/console-capture.js +1 -0
- package/dist/shim/deep-link.js +1 -25
- package/dist/shim/dev-guard.js +1 -3
- package/dist/shim/dev-host.d.ts +1 -0
- package/dist/shim/dev-host.js +1 -0
- package/dist/shim/error-handler.js +1 -66
- package/dist/shim/fetch-interceptor.js +1 -93
- package/dist/shim/index.d.ts +3 -0
- package/dist/shim/index.js +1 -6
- package/dist/shim/keep-awake.js +1 -118
- package/dist/shim/network-ownership.d.ts +4 -0
- package/dist/shim/network-ownership.js +1 -0
- package/dist/shim/optimistic-observer.d.ts +29 -0
- package/dist/shim/optimistic-observer.js +1 -0
- package/dist/shim/reload.js +1 -76
- package/dist/shim/reset.d.ts +30 -0
- package/dist/shim/reset.js +1 -0
- package/dist/shim/signal-capture.d.ts +8 -0
- package/dist/shim/signal-capture.js +1 -15
- package/dist/shim/signal-transport.d.ts +14 -1
- package/dist/shim/signal-transport.js +1 -43
- package/dist/shim/xhr-interceptor.d.ts +39 -0
- package/dist/shim/xhr-interceptor.js +1 -0
- package/package.json +41 -15
- package/dist/app-lifecycle.d.ts +0 -50
- package/dist/app-lifecycle.js +0 -487
- package/dist/camera-image-writer.d.ts +0 -43
- package/dist/camera-image-writer.js +0 -280
- package/dist/camera-registry-sync.d.ts +0 -18
- package/dist/camera-registry-sync.js +0 -117
- package/dist/device-autonomy.d.ts +0 -30
- package/dist/device-autonomy.js +0 -117
- package/dist/error-parser.d.ts +0 -51
- package/dist/error-parser.js +0 -275
- package/dist/expo-manager.d.ts +0 -62
- package/dist/expo-manager.js +0 -447
- package/dist/init/ast-camera.d.ts +0 -29
- package/dist/init/ast-camera.js +0 -267
- package/dist/init/ast-layout.d.ts +0 -15
- package/dist/init/ast-layout.js +0 -167
- package/dist/init/claude-hook-constants.d.ts +0 -9
- package/dist/init/claude-hook-constants.js +0 -91
- package/dist/init/lan-ip.d.ts +0 -11
- package/dist/init/lan-ip.js +0 -51
- package/dist/init/monorepo.d.ts +0 -13
- package/dist/init/monorepo.js +0 -185
- package/dist/init/oauth.d.ts +0 -52
- package/dist/init/oauth.js +0 -220
- package/dist/init/package-manager.d.ts +0 -11
- package/dist/init/package-manager.js +0 -60
- package/dist/init/prompt.d.ts +0 -12
- package/dist/init/prompt.js +0 -68
- package/dist/init/shell-profile.d.ts +0 -22
- package/dist/init/shell-profile.js +0 -85
- package/dist/init/steps.d.ts +0 -135
- package/dist/init/steps.js +0 -399
- package/dist/init/url-scheme.d.ts +0 -42
- package/dist/init/url-scheme.js +0 -187
- package/dist/init/walkthrough.d.ts +0 -76
- package/dist/init/walkthrough.js +0 -340
- package/dist/init.d.ts +0 -8
- package/dist/init.js +0 -395
- package/dist/iproxy-manager.d.ts +0 -32
- package/dist/iproxy-manager.js +0 -216
- package/dist/mac-caffeinate.d.ts +0 -10
- package/dist/mac-caffeinate.js +0 -56
- package/dist/permission-interceptor.d.ts +0 -29
- package/dist/permission-interceptor.js +0 -185
- package/dist/prebuild-detector.d.ts +0 -19
- package/dist/prebuild-detector.js +0 -174
- package/dist/preflight.d.ts +0 -34
- package/dist/preflight.js +0 -847
- package/dist/screen.d.ts +0 -184
- package/dist/screen.js +0 -931
- package/dist/signal-listener.d.ts +0 -27
- package/dist/signal-listener.js +0 -135
- package/dist/simulator-boot.d.ts +0 -52
- package/dist/simulator-boot.js +0 -227
- package/dist/target.d.ts +0 -48
- package/dist/target.js +0 -267
- package/dist/uninstall/cli-runner.d.ts +0 -32
- package/dist/uninstall/cli-runner.js +0 -223
- package/dist/uninstall/footprint.d.ts +0 -40
- package/dist/uninstall/footprint.js +0 -288
- package/dist/uninstall/mcp-tools.d.ts +0 -14
- package/dist/uninstall/mcp-tools.js +0 -175
- package/dist/uninstall/revert-auth.d.ts +0 -22
- package/dist/uninstall/revert-auth.js +0 -31
- package/dist/uninstall/revert-boot.d.ts +0 -24
- package/dist/uninstall/revert-boot.js +0 -242
- package/dist/uninstall/revert-camera.d.ts +0 -12
- package/dist/uninstall/revert-camera.js +0 -199
- package/dist/uninstall/revert-ceraph-dir.d.ts +0 -27
- package/dist/uninstall/revert-ceraph-dir.js +0 -38
- package/dist/uninstall/revert-claude-hooks.d.ts +0 -19
- package/dist/uninstall/revert-claude-hooks.js +0 -191
- package/dist/uninstall/revert-gitignore.d.ts +0 -17
- package/dist/uninstall/revert-gitignore.js +0 -43
- package/dist/uninstall/revert-mcp-clients.d.ts +0 -57
- package/dist/uninstall/revert-mcp-clients.js +0 -194
- package/dist/uninstall/revert-package.d.ts +0 -34
- package/dist/uninstall/revert-package.js +0 -98
- package/dist/uninstall/revert-scheme.d.ts +0 -36
- package/dist/uninstall/revert-scheme.js +0 -139
- package/dist/uninstall/revert-signal-host-env.d.ts +0 -31
- package/dist/uninstall/revert-signal-host-env.js +0 -61
- package/dist/uninstall/walkthrough.d.ts +0 -80
- package/dist/uninstall/walkthrough.js +0 -1244
- package/dist/utils/atomic-write.d.ts +0 -1
- package/dist/utils/atomic-write.js +0 -30
- package/dist/wait-for-device.d.ts +0 -68
- package/dist/wait-for-device.js +0 -368
- package/dist/wda-manager.d.ts +0 -38
- package/dist/wda-manager.js +0 -186
- package/dist/wda-simulator.d.ts +0 -28
- package/dist/wda-simulator.js +0 -257
package/dist/index.js
CHANGED
|
@@ -1,1652 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
import { RNManager } from "./expo-manager.js";
|
|
7
|
-
import { ScreenManager } from "./screen.js";
|
|
8
|
-
import { PrebuildDetector } from "./prebuild-detector.js";
|
|
9
|
-
import { AppLifecycle } from "./app-lifecycle.js";
|
|
10
|
-
import { DeviceAutonomy } from "./device-autonomy.js";
|
|
11
|
-
import { IproxyManager } from "./iproxy-manager.js";
|
|
12
|
-
import { runPreflight } from "./preflight.js";
|
|
13
|
-
import { TargetResolver } from "./target.js";
|
|
14
|
-
import { WdaManager } from "./wda-manager.js";
|
|
15
|
-
import { bootSimulator } from "./simulator-boot.js";
|
|
16
|
-
import { waitForDevice } from "./wait-for-device.js";
|
|
17
|
-
import { syncCameraRegistry, relativeRegistryPath, } from "./camera-registry-sync.js";
|
|
18
|
-
import { addCameraImage, AddCameraImageError, } from "./camera-image-writer.js";
|
|
19
|
-
import { SignalListener } from "./signal-listener.js";
|
|
20
|
-
import { PermissionInterceptor, modeFromEnv, } from "./permission-interceptor.js";
|
|
21
|
-
import { detectMonorepoStatus, getInitStatus, injectBoot, installCeraphPackage, pollAuthFlow, preflightForMcp, registerScheme, replaceCameraView, scanCameraUsages, setupImagesDir, setupMcpClients, startAuthFlow, } from "./init/steps.js";
|
|
22
|
-
import { detectMacLanIp } from "./init/lan-ip.js";
|
|
23
|
-
import { registerUninstallTools } from "./uninstall/mcp-tools.js";
|
|
24
|
-
const PROJECT_DIR = process.cwd();
|
|
25
|
-
const CACHE_DIR = join(PROJECT_DIR, ".rn-mcp-cache");
|
|
26
|
-
const rnManager = new RNManager(PROJECT_DIR);
|
|
27
|
-
const targetResolver = new TargetResolver();
|
|
28
|
-
const screenManager = new ScreenManager({ targetResolver });
|
|
29
|
-
const prebuildDetector = new PrebuildDetector(PROJECT_DIR, CACHE_DIR);
|
|
30
|
-
const appLifecycle = new AppLifecycle(screenManager, targetResolver);
|
|
31
|
-
targetResolver.setAppLifecycle(appLifecycle);
|
|
32
|
-
const deviceAutonomy = new DeviceAutonomy(screenManager);
|
|
33
|
-
const wdaManager = new WdaManager(targetResolver, CACHE_DIR, PROJECT_DIR);
|
|
34
|
-
const iproxyManager = new IproxyManager();
|
|
35
|
-
const permissionInterceptor = new PermissionInterceptor({
|
|
36
|
-
screen: screenManager,
|
|
37
|
-
mode: modeFromEnv(process.env.CERAPH_AUTO_ACCEPT_PERMISSIONS),
|
|
38
|
-
});
|
|
39
|
-
const signalListenerPort = process.env.CERAPH_SIGNAL_PORT
|
|
40
|
-
? Number(process.env.CERAPH_SIGNAL_PORT)
|
|
41
|
-
: undefined;
|
|
42
|
-
const signalListener = new SignalListener(rnManager, {
|
|
43
|
-
port: Number.isFinite(signalListenerPort) ? signalListenerPort : undefined,
|
|
44
|
-
});
|
|
45
|
-
const server = new McpServer({
|
|
46
|
-
name: "react-native-mcp",
|
|
47
|
-
version: "0.3.2",
|
|
48
|
-
}, {
|
|
49
|
-
capabilities: {
|
|
50
|
-
tools: {},
|
|
51
|
-
},
|
|
52
|
-
instructions: "React Native / Expo development workflow tools. Auto-detects project type.\n\n" +
|
|
53
|
-
"HOW TO DRIVE THE APP:\n" +
|
|
54
|
-
"Compose screen_* and app_* primitives to exercise the app on a real iOS " +
|
|
55
|
-
"device or simulator. You plan the steps yourself; this MCP just drives " +
|
|
56
|
-
"WebDriverAgent. Use screen_screenshot and screen_get_source between " +
|
|
57
|
-
"actions to observe state and decide the next step. Typical scenarios: " +
|
|
58
|
-
"'tap the Premium plan and verify checkout opens', 'sign in as user X and " +
|
|
59
|
-
"confirm the dashboard loads', 'reproduce the bug where tapping save " +
|
|
60
|
-
"crashes the app'.\n\n" +
|
|
61
|
-
"STARTUP FLOW WHEN NO TARGET IS AVAILABLE:\n" +
|
|
62
|
-
" - User wants a quick start with no device attached → rn_boot_simulator " +
|
|
63
|
-
"(auto-picks newest iPhone), then rn_wda_start, then retry the original tool.\n" +
|
|
64
|
-
" - User wants to test on their phone (or CERAPH_TARGET=device is set) → " +
|
|
65
|
-
"tell the user to plug in their iPhone, then rn_wait_for_device (event-driven " +
|
|
66
|
-
"via usbmuxd, no timeout) — the original tool can be re-run as soon as that " +
|
|
67
|
-
"returns success.\n" +
|
|
68
|
-
" - Ambiguous first-time setup: prefer the simulator path unless the user " +
|
|
69
|
-
"has signalled device intent (mentioned their phone, set CERAPH_TARGET=device, " +
|
|
70
|
-
"etc). Simulator avoids cable/trust friction for the first happy path.\n\n" +
|
|
71
|
-
"WDA-direct primitives (you orchestrate): app_launch/terminate/activate, " +
|
|
72
|
-
"screen_tap, screen_find_and_tap, screen_swipe, screen_scroll_to, " +
|
|
73
|
-
"screen_long_press, screen_type, screen_clear_text, screen_press_key, " +
|
|
74
|
-
"screen_screenshot, screen_get_source, screen_wait_for, screen_assert_visible.\n\n" +
|
|
75
|
-
"Build with rn_build_ios, run Metro with rn_start, inspect errors with " +
|
|
76
|
-
"rn_get_errors, check rn_check_prebuild when native deps change (Expo only). " +
|
|
77
|
-
"Camera testing: test images for the React Native camera live in " +
|
|
78
|
-
"`.ceraph/camera-images/` in the user's repo. When the user provides " +
|
|
79
|
-
"an image for camera testing, paste it into that folder with a " +
|
|
80
|
-
"descriptive lowercase filename (e.g. `profile.jpg`, `id-card.png`, " +
|
|
81
|
-
"`product.jpg`). The filename without extension is the imageKey. " +
|
|
82
|
-
"In source code, replace `<CameraView>` (from expo-camera) with " +
|
|
83
|
-
"`<CeraphCamera imageKey=\"profile\" />` from " +
|
|
84
|
-
"`@ceraph/react-native-mcp/shim`, choosing the imageKey based on " +
|
|
85
|
-
"what the camera screen captures conceptually. Then call " +
|
|
86
|
-
"`rn_sync_camera_registry` to regenerate the registry. The " +
|
|
87
|
-
"`rn_preflight` tool will warn about any unwrapped `<CameraView>`, " +
|
|
88
|
-
"missing imageKey props, or orphan imageKey references.",
|
|
89
|
-
});
|
|
90
|
-
server.tool("rn_build_ios", "Build and run the React Native app on an iOS device or simulator. " +
|
|
91
|
-
"Auto-detects Expo vs bare React Native and uses the correct command. " +
|
|
92
|
-
"Captures Xcode build output and returns structured error information. " +
|
|
93
|
-
"If clean is true, runs `npx expo prebuild --clean` first (Expo only).", {
|
|
94
|
-
clean: z
|
|
95
|
-
.boolean()
|
|
96
|
-
.optional()
|
|
97
|
-
.describe("Run prebuild --clean before building (Expo only)"),
|
|
98
|
-
device: z
|
|
99
|
-
.string()
|
|
100
|
-
.optional()
|
|
101
|
-
.describe("Device UDID to target (e.g., 00008140-001958943A78801C)"),
|
|
102
|
-
}, async ({ clean, device }) => {
|
|
103
|
-
try {
|
|
104
|
-
const result = await rnManager.runBuild({ clean, device });
|
|
105
|
-
if (result.success) {
|
|
106
|
-
await prebuildDetector.saveSnapshot().catch(() => {
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
content: [
|
|
111
|
-
{
|
|
112
|
-
type: "text",
|
|
113
|
-
text: JSON.stringify(result, null, 2),
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
isError: !result.success,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
120
|
-
return {
|
|
121
|
-
content: [
|
|
122
|
-
{
|
|
123
|
-
type: "text",
|
|
124
|
-
text: `rn_build_ios failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
isError: true,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
server.tool("rn_start", "Start the Metro dev server. Auto-detects Expo vs bare React Native. " +
|
|
132
|
-
"Monitors console output for runtime errors and warnings.", {
|
|
133
|
-
port: z
|
|
134
|
-
.number()
|
|
135
|
-
.optional()
|
|
136
|
-
.describe("Port for Metro bundler (default: 8081)"),
|
|
137
|
-
clear: z
|
|
138
|
-
.boolean()
|
|
139
|
-
.optional()
|
|
140
|
-
.describe("Clear Metro bundler cache on start"),
|
|
141
|
-
}, async ({ port, clear }) => {
|
|
142
|
-
try {
|
|
143
|
-
const result = await rnManager.startMetro({ port, clear });
|
|
144
|
-
return {
|
|
145
|
-
content: [
|
|
146
|
-
{
|
|
147
|
-
type: "text",
|
|
148
|
-
text: JSON.stringify(result, null, 2),
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
isError: !result.success,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
return {
|
|
156
|
-
content: [
|
|
157
|
-
{
|
|
158
|
-
type: "text",
|
|
159
|
-
text: `rn_start failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
isError: true,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
server.tool("rn_get_errors", "Return all captured errors from build and runtime. " +
|
|
167
|
-
"Includes structured build errors (file, line, column, message), " +
|
|
168
|
-
"runtime JS errors (message, stack trace), and warnings.", {}, async () => {
|
|
169
|
-
try {
|
|
170
|
-
const errors = rnManager.getErrors();
|
|
171
|
-
return {
|
|
172
|
-
content: [
|
|
173
|
-
{
|
|
174
|
-
type: "text",
|
|
175
|
-
text: JSON.stringify(errors, null, 2),
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
catch (err) {
|
|
181
|
-
return {
|
|
182
|
-
content: [
|
|
183
|
-
{
|
|
184
|
-
type: "text",
|
|
185
|
-
text: `rn_get_errors failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
isError: true,
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
server.tool("rn_get_console", "Return recent console output from Metro dev server, " +
|
|
193
|
-
"optionally filtered by log level.", {
|
|
194
|
-
lines: z
|
|
195
|
-
.number()
|
|
196
|
-
.optional()
|
|
197
|
-
.describe("Number of recent lines to return (default: 50)"),
|
|
198
|
-
level: z
|
|
199
|
-
.enum(["all", "error", "warn", "log"])
|
|
200
|
-
.optional()
|
|
201
|
-
.describe("Filter by log level (default: all)"),
|
|
202
|
-
}, async ({ lines, level }) => {
|
|
203
|
-
try {
|
|
204
|
-
const output = rnManager.getConsole({ lines, level });
|
|
205
|
-
if (output.length === 0) {
|
|
206
|
-
return {
|
|
207
|
-
content: [
|
|
208
|
-
{
|
|
209
|
-
type: "text",
|
|
210
|
-
text: "No console output captured. Is Metro running? Use rn_start to launch it.",
|
|
211
|
-
},
|
|
212
|
-
],
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
return {
|
|
216
|
-
content: [
|
|
217
|
-
{
|
|
218
|
-
type: "text",
|
|
219
|
-
text: output.join("\n"),
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
catch (err) {
|
|
225
|
-
return {
|
|
226
|
-
content: [
|
|
227
|
-
{
|
|
228
|
-
type: "text",
|
|
229
|
-
text: `rn_get_console failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
230
|
-
},
|
|
231
|
-
],
|
|
232
|
-
isError: true,
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
server.tool("rn_check_prebuild", "Check if a clean Expo prebuild is needed (Expo projects only). " +
|
|
237
|
-
"Compares current package.json dependencies, app.json config, and " +
|
|
238
|
-
"ios/Podfile.lock against a cached snapshot from the last successful build.", {}, async () => {
|
|
239
|
-
try {
|
|
240
|
-
const isExpo = await rnManager.detectProjectType();
|
|
241
|
-
if (!isExpo) {
|
|
242
|
-
return {
|
|
243
|
-
content: [
|
|
244
|
-
{
|
|
245
|
-
type: "text",
|
|
246
|
-
text: JSON.stringify({
|
|
247
|
-
needsClean: false,
|
|
248
|
-
reasons: ["Not an Expo project. Prebuild detection is Expo-only."],
|
|
249
|
-
}),
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
const result = await prebuildDetector.check();
|
|
255
|
-
return {
|
|
256
|
-
content: [
|
|
257
|
-
{
|
|
258
|
-
type: "text",
|
|
259
|
-
text: JSON.stringify(result, null, 2),
|
|
260
|
-
},
|
|
261
|
-
],
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
catch (err) {
|
|
265
|
-
return {
|
|
266
|
-
content: [
|
|
267
|
-
{
|
|
268
|
-
type: "text",
|
|
269
|
-
text: `rn_check_prebuild failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
isError: true,
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
server.tool("screen_tap", "Tap at specific coordinates on the iOS device screen via WebDriverAgent. " +
|
|
277
|
-
"Automatically corrects for pixel ratio mismatch when coordinates come " +
|
|
278
|
-
"from a screenshot (divides by device pixel ratio). " +
|
|
279
|
-
"Requires WebDriverAgent running on localhost:8100.", {
|
|
280
|
-
x: z.number().describe("X coordinate to tap"),
|
|
281
|
-
y: z.number().describe("Y coordinate to tap"),
|
|
282
|
-
coordinateSource: z
|
|
283
|
-
.enum(["screenshot", "device"])
|
|
284
|
-
.optional()
|
|
285
|
-
.describe("Source of coordinates: 'screenshot' (default) auto-corrects " +
|
|
286
|
-
"for pixel ratio; 'device' uses coordinates as-is"),
|
|
287
|
-
}, async ({ x, y, coordinateSource }) => {
|
|
288
|
-
try {
|
|
289
|
-
const available = await screenManager.isAvailable();
|
|
290
|
-
if (!available) {
|
|
291
|
-
return {
|
|
292
|
-
content: [
|
|
293
|
-
{
|
|
294
|
-
type: "text",
|
|
295
|
-
text: JSON.stringify({
|
|
296
|
-
success: false,
|
|
297
|
-
error: "WebDriverAgent is not reachable at localhost:8100. " +
|
|
298
|
-
"Ensure it is running on the device.",
|
|
299
|
-
tappedAt: { x, y },
|
|
300
|
-
pixelRatio: 0,
|
|
301
|
-
correction: "N/A",
|
|
302
|
-
}),
|
|
303
|
-
},
|
|
304
|
-
],
|
|
305
|
-
isError: true,
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
const fromScreenshot = (coordinateSource ?? "screenshot") === "screenshot";
|
|
309
|
-
const result = await screenManager.tap(x, y, fromScreenshot);
|
|
310
|
-
return {
|
|
311
|
-
content: [
|
|
312
|
-
{
|
|
313
|
-
type: "text",
|
|
314
|
-
text: JSON.stringify(result, null, 2),
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
isError: !result.success,
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
catch (err) {
|
|
321
|
-
return {
|
|
322
|
-
content: [
|
|
323
|
-
{
|
|
324
|
-
type: "text",
|
|
325
|
-
text: `screen_tap failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
326
|
-
},
|
|
327
|
-
],
|
|
328
|
-
isError: true,
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
server.tool("screen_find_and_tap", "Find a UI element on the iOS device screen by text, accessibility label, " +
|
|
333
|
-
"or element type, then tap its center. Uses the WebDriverAgent element tree. " +
|
|
334
|
-
"If no match is found, returns a summary of visible elements for debugging. " +
|
|
335
|
-
"Requires WebDriverAgent running on localhost:8100.", {
|
|
336
|
-
text: z
|
|
337
|
-
.string()
|
|
338
|
-
.optional()
|
|
339
|
-
.describe("Text content to search for (case-insensitive substring match)"),
|
|
340
|
-
accessibilityLabel: z
|
|
341
|
-
.string()
|
|
342
|
-
.optional()
|
|
343
|
-
.describe("Accessibility label to search for (case-insensitive substring match)"),
|
|
344
|
-
type: z
|
|
345
|
-
.string()
|
|
346
|
-
.optional()
|
|
347
|
-
.describe("Element type to filter by (e.g., XCUIElementTypeButton, XCUIElementTypeStaticText)"),
|
|
348
|
-
index: z
|
|
349
|
-
.number()
|
|
350
|
-
.optional()
|
|
351
|
-
.describe("If multiple matches, tap the nth match (0-indexed, default: 0)"),
|
|
352
|
-
}, async ({ text, accessibilityLabel, type, index }) => {
|
|
353
|
-
try {
|
|
354
|
-
const available = await screenManager.isAvailable();
|
|
355
|
-
if (!available) {
|
|
356
|
-
return {
|
|
357
|
-
content: [
|
|
358
|
-
{
|
|
359
|
-
type: "text",
|
|
360
|
-
text: JSON.stringify({
|
|
361
|
-
success: false,
|
|
362
|
-
error: "WebDriverAgent is not reachable at localhost:8100. " +
|
|
363
|
-
"Ensure it is running on the device.",
|
|
364
|
-
}),
|
|
365
|
-
},
|
|
366
|
-
],
|
|
367
|
-
isError: true,
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
if (!text && !accessibilityLabel && !type) {
|
|
371
|
-
return {
|
|
372
|
-
content: [
|
|
373
|
-
{
|
|
374
|
-
type: "text",
|
|
375
|
-
text: JSON.stringify({
|
|
376
|
-
success: false,
|
|
377
|
-
error: "At least one of text, accessibilityLabel, or type must be provided.",
|
|
378
|
-
}),
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
isError: true,
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
const result = await screenManager.findAndTap({
|
|
385
|
-
text,
|
|
386
|
-
accessibilityLabel,
|
|
387
|
-
type,
|
|
388
|
-
index,
|
|
389
|
-
});
|
|
390
|
-
return {
|
|
391
|
-
content: [
|
|
392
|
-
{
|
|
393
|
-
type: "text",
|
|
394
|
-
text: JSON.stringify(result, null, 2),
|
|
395
|
-
},
|
|
396
|
-
],
|
|
397
|
-
isError: !result.success,
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
catch (err) {
|
|
401
|
-
return {
|
|
402
|
-
content: [
|
|
403
|
-
{
|
|
404
|
-
type: "text",
|
|
405
|
-
text: `screen_find_and_tap failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
406
|
-
},
|
|
407
|
-
],
|
|
408
|
-
isError: true,
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
async function requireWDA() {
|
|
413
|
-
const available = await screenManager.isAvailable();
|
|
414
|
-
if (available)
|
|
415
|
-
return { ok: true };
|
|
416
|
-
return {
|
|
417
|
-
ok: false,
|
|
418
|
-
payload: {
|
|
419
|
-
success: false,
|
|
420
|
-
error: "WebDriverAgent is not reachable at localhost:8100. " +
|
|
421
|
-
"Ensure it is running on the device.",
|
|
422
|
-
},
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
function jsonText(value) {
|
|
426
|
-
return {
|
|
427
|
-
content: [
|
|
428
|
-
{
|
|
429
|
-
type: "text",
|
|
430
|
-
text: JSON.stringify(value, null, 2),
|
|
431
|
-
},
|
|
432
|
-
],
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function toolErrorContent(toolName, err) {
|
|
436
|
-
return {
|
|
437
|
-
content: [
|
|
438
|
-
{
|
|
439
|
-
type: "text",
|
|
440
|
-
text: `${toolName} failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
441
|
-
},
|
|
442
|
-
],
|
|
443
|
-
isError: true,
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
server.tool("screen_swipe", "Swipe on the iOS device screen. Direction is up/down/left/right; " +
|
|
447
|
-
"optional from-point and distance default to a center-screen swipe of " +
|
|
448
|
-
"~60% of the relevant axis. Coordinates are device-space by default; " +
|
|
449
|
-
"pass coordinateSource: 'screenshot' if `from` came from a screenshot.", {
|
|
450
|
-
direction: z.enum(["up", "down", "left", "right"]),
|
|
451
|
-
from: z
|
|
452
|
-
.object({ x: z.number(), y: z.number() })
|
|
453
|
-
.optional()
|
|
454
|
-
.describe("Optional swipe start point. Defaults to screen center."),
|
|
455
|
-
distancePx: z.number().optional().describe("Swipe distance in points."),
|
|
456
|
-
durationMs: z.number().optional().describe("Swipe duration in ms."),
|
|
457
|
-
coordinateSource: z.enum(["screenshot", "device"]).optional(),
|
|
458
|
-
}, async (args) => {
|
|
459
|
-
try {
|
|
460
|
-
const guard = await requireWDA();
|
|
461
|
-
if (!guard.ok)
|
|
462
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
463
|
-
const res = await screenManager.swipe({
|
|
464
|
-
direction: args.direction,
|
|
465
|
-
from: args.from,
|
|
466
|
-
distancePx: args.distancePx,
|
|
467
|
-
durationMs: args.durationMs,
|
|
468
|
-
coordinateSource: args.coordinateSource,
|
|
469
|
-
});
|
|
470
|
-
return { ...jsonText(res), isError: !res.success };
|
|
471
|
-
}
|
|
472
|
-
catch (err) {
|
|
473
|
-
return {
|
|
474
|
-
content: [
|
|
475
|
-
{
|
|
476
|
-
type: "text",
|
|
477
|
-
text: `screen_swipe failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
478
|
-
},
|
|
479
|
-
],
|
|
480
|
-
isError: true,
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
server.tool("screen_scroll_to", "Repeatedly swipe until an element matching text/accessibilityLabel " +
|
|
485
|
-
"appears in the accessibility tree. Returns without tapping. Default " +
|
|
486
|
-
"direction is 'down' (swipe up), max 10 swipes.", {
|
|
487
|
-
text: z.string().optional(),
|
|
488
|
-
accessibilityLabel: z.string().optional(),
|
|
489
|
-
maxSwipes: z.number().optional(),
|
|
490
|
-
direction: z.enum(["up", "down"]).optional(),
|
|
491
|
-
}, async (args) => {
|
|
492
|
-
try {
|
|
493
|
-
const guard = await requireWDA();
|
|
494
|
-
if (!guard.ok)
|
|
495
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
496
|
-
if (!args.text && !args.accessibilityLabel) {
|
|
497
|
-
return {
|
|
498
|
-
...jsonText({
|
|
499
|
-
success: false,
|
|
500
|
-
error: "text or accessibilityLabel is required.",
|
|
501
|
-
}),
|
|
502
|
-
isError: true,
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
const res = await screenManager.scrollToElement({
|
|
506
|
-
text: args.text,
|
|
507
|
-
accessibilityLabel: args.accessibilityLabel,
|
|
508
|
-
}, { maxSwipes: args.maxSwipes, direction: args.direction });
|
|
509
|
-
return { ...jsonText(res), isError: !res.success };
|
|
510
|
-
}
|
|
511
|
-
catch (err) {
|
|
512
|
-
return {
|
|
513
|
-
content: [
|
|
514
|
-
{
|
|
515
|
-
type: "text",
|
|
516
|
-
text: `screen_scroll_to failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
517
|
-
},
|
|
518
|
-
],
|
|
519
|
-
isError: true,
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
server.tool("screen_long_press", "Long-press an element matched by text/accessibilityLabel. " +
|
|
524
|
-
"Default duration is 1000ms.", {
|
|
525
|
-
text: z.string().optional(),
|
|
526
|
-
accessibilityLabel: z.string().optional(),
|
|
527
|
-
durationMs: z.number().optional(),
|
|
528
|
-
}, async (args) => {
|
|
529
|
-
try {
|
|
530
|
-
const guard = await requireWDA();
|
|
531
|
-
if (!guard.ok)
|
|
532
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
533
|
-
if (!args.text && !args.accessibilityLabel) {
|
|
534
|
-
return {
|
|
535
|
-
...jsonText({
|
|
536
|
-
success: false,
|
|
537
|
-
error: "text or accessibilityLabel is required.",
|
|
538
|
-
}),
|
|
539
|
-
isError: true,
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
const res = await screenManager.longPressElement({
|
|
543
|
-
text: args.text,
|
|
544
|
-
accessibilityLabel: args.accessibilityLabel,
|
|
545
|
-
}, args.durationMs ?? 1000);
|
|
546
|
-
return { ...jsonText(res), isError: !res.success };
|
|
547
|
-
}
|
|
548
|
-
catch (err) {
|
|
549
|
-
return {
|
|
550
|
-
content: [
|
|
551
|
-
{
|
|
552
|
-
type: "text",
|
|
553
|
-
text: `screen_long_press failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
554
|
-
},
|
|
555
|
-
],
|
|
556
|
-
isError: true,
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
server.tool("screen_type", "Type text into the currently focused element. If hideKeyboardAfter is " +
|
|
561
|
-
"true, sends a newline after to dismiss the keyboard. Use screen_find_and_tap " +
|
|
562
|
-
"to focus an input field first if needed.", {
|
|
563
|
-
text: z.string(),
|
|
564
|
-
hideKeyboardAfter: z.boolean().optional(),
|
|
565
|
-
}, async ({ text, hideKeyboardAfter }) => {
|
|
566
|
-
try {
|
|
567
|
-
const guard = await requireWDA();
|
|
568
|
-
if (!guard.ok)
|
|
569
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
570
|
-
const res = await screenManager.type(text, { hideKeyboardAfter });
|
|
571
|
-
return { ...jsonText(res), isError: !res.success };
|
|
572
|
-
}
|
|
573
|
-
catch (err) {
|
|
574
|
-
return {
|
|
575
|
-
content: [
|
|
576
|
-
{
|
|
577
|
-
type: "text",
|
|
578
|
-
text: `screen_type failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
579
|
-
},
|
|
580
|
-
],
|
|
581
|
-
isError: true,
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
|
-
server.tool("screen_clear_text", "Focus an input field and send backspaces equal to its current value length.", {
|
|
586
|
-
text: z.string().optional(),
|
|
587
|
-
accessibilityLabel: z.string().optional(),
|
|
588
|
-
}, async (args) => {
|
|
589
|
-
try {
|
|
590
|
-
const guard = await requireWDA();
|
|
591
|
-
if (!guard.ok)
|
|
592
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
593
|
-
if (!args.text && !args.accessibilityLabel) {
|
|
594
|
-
return {
|
|
595
|
-
...jsonText({
|
|
596
|
-
success: false,
|
|
597
|
-
error: "text or accessibilityLabel is required.",
|
|
598
|
-
}),
|
|
599
|
-
isError: true,
|
|
600
|
-
};
|
|
601
|
-
}
|
|
602
|
-
const res = await screenManager.clearText({
|
|
603
|
-
text: args.text,
|
|
604
|
-
accessibilityLabel: args.accessibilityLabel,
|
|
605
|
-
});
|
|
606
|
-
return { ...jsonText(res), isError: !res.success };
|
|
607
|
-
}
|
|
608
|
-
catch (err) {
|
|
609
|
-
return {
|
|
610
|
-
content: [
|
|
611
|
-
{
|
|
612
|
-
type: "text",
|
|
613
|
-
text: `screen_clear_text failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
614
|
-
},
|
|
615
|
-
],
|
|
616
|
-
isError: true,
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
server.tool("screen_press_key", "Press a hardware/system button: home, volumeUp, volumeDown, or lock.", {
|
|
621
|
-
key: z.enum(["home", "volumeUp", "volumeDown", "lock"]),
|
|
622
|
-
}, async ({ key }) => {
|
|
623
|
-
try {
|
|
624
|
-
const guard = await requireWDA();
|
|
625
|
-
if (!guard.ok)
|
|
626
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
627
|
-
const res = await screenManager.pressKey(key);
|
|
628
|
-
return { ...jsonText(res), isError: !res.success };
|
|
629
|
-
}
|
|
630
|
-
catch (err) {
|
|
631
|
-
return {
|
|
632
|
-
content: [
|
|
633
|
-
{
|
|
634
|
-
type: "text",
|
|
635
|
-
text: `screen_press_key failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
636
|
-
},
|
|
637
|
-
],
|
|
638
|
-
isError: true,
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
server.tool("screen_screenshot", "Capture a base64 PNG screenshot of the current iOS screen via WebDriverAgent.", {}, async () => {
|
|
643
|
-
try {
|
|
644
|
-
const guard = await requireWDA();
|
|
645
|
-
if (!guard.ok)
|
|
646
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
647
|
-
const res = await screenManager.screenshot();
|
|
648
|
-
return { ...jsonText(res), isError: !res.success };
|
|
649
|
-
}
|
|
650
|
-
catch (err) {
|
|
651
|
-
return {
|
|
652
|
-
content: [
|
|
653
|
-
{
|
|
654
|
-
type: "text",
|
|
655
|
-
text: `screen_screenshot failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
656
|
-
},
|
|
657
|
-
],
|
|
658
|
-
isError: true,
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
server.tool("screen_get_source", "Return the full WebDriverAgent accessibility tree as JSON. " +
|
|
663
|
-
"Useful for discovering element identifiers when no screenshot is available.", {}, async () => {
|
|
664
|
-
try {
|
|
665
|
-
const guard = await requireWDA();
|
|
666
|
-
if (!guard.ok)
|
|
667
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
668
|
-
const res = await screenManager.getSource();
|
|
669
|
-
return { ...jsonText(res), isError: !res.success };
|
|
670
|
-
}
|
|
671
|
-
catch (err) {
|
|
672
|
-
return {
|
|
673
|
-
content: [
|
|
674
|
-
{
|
|
675
|
-
type: "text",
|
|
676
|
-
text: `screen_get_source failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
677
|
-
},
|
|
678
|
-
],
|
|
679
|
-
isError: true,
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
server.tool("screen_wait_for", "Poll the WDA source tree until an element matching the query is visible " +
|
|
684
|
-
"(or, if disappear is true, until it vanishes). Default timeout is 5s.", {
|
|
685
|
-
text: z.string().optional(),
|
|
686
|
-
accessibilityLabel: z.string().optional(),
|
|
687
|
-
type: z.string().optional(),
|
|
688
|
-
timeoutMs: z.number().optional(),
|
|
689
|
-
pollIntervalMs: z.number().optional(),
|
|
690
|
-
disappear: z.boolean().optional(),
|
|
691
|
-
}, async (args) => {
|
|
692
|
-
try {
|
|
693
|
-
const guard = await requireWDA();
|
|
694
|
-
if (!guard.ok)
|
|
695
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
696
|
-
if (!args.text && !args.accessibilityLabel && !args.type) {
|
|
697
|
-
return {
|
|
698
|
-
...jsonText({
|
|
699
|
-
success: false,
|
|
700
|
-
error: "text, accessibilityLabel, or type is required.",
|
|
701
|
-
}),
|
|
702
|
-
isError: true,
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
const res = await screenManager.waitFor({
|
|
706
|
-
text: args.text,
|
|
707
|
-
accessibilityLabel: args.accessibilityLabel,
|
|
708
|
-
type: args.type,
|
|
709
|
-
}, {
|
|
710
|
-
timeoutMs: args.timeoutMs,
|
|
711
|
-
pollIntervalMs: args.pollIntervalMs,
|
|
712
|
-
disappear: args.disappear,
|
|
713
|
-
});
|
|
714
|
-
return { ...jsonText(res), isError: !res.success };
|
|
715
|
-
}
|
|
716
|
-
catch (err) {
|
|
717
|
-
return {
|
|
718
|
-
content: [
|
|
719
|
-
{
|
|
720
|
-
type: "text",
|
|
721
|
-
text: `screen_wait_for failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
722
|
-
},
|
|
723
|
-
],
|
|
724
|
-
isError: true,
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
});
|
|
728
|
-
server.tool("screen_assert_visible", "Single-shot check: is the element currently visible? Pass invert: true " +
|
|
729
|
-
"to assert it is NOT visible.", {
|
|
730
|
-
text: z.string().optional(),
|
|
731
|
-
accessibilityLabel: z.string().optional(),
|
|
732
|
-
type: z.string().optional(),
|
|
733
|
-
invert: z.boolean().optional(),
|
|
734
|
-
}, async (args) => {
|
|
735
|
-
try {
|
|
736
|
-
const guard = await requireWDA();
|
|
737
|
-
if (!guard.ok)
|
|
738
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
739
|
-
if (!args.text && !args.accessibilityLabel && !args.type) {
|
|
740
|
-
return {
|
|
741
|
-
...jsonText({
|
|
742
|
-
success: false,
|
|
743
|
-
error: "text, accessibilityLabel, or type is required.",
|
|
744
|
-
}),
|
|
745
|
-
isError: true,
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
const query = {
|
|
749
|
-
text: args.text,
|
|
750
|
-
accessibilityLabel: args.accessibilityLabel,
|
|
751
|
-
type: args.type,
|
|
752
|
-
};
|
|
753
|
-
if (args.invert) {
|
|
754
|
-
const res = await screenManager.assertNotVisible(query);
|
|
755
|
-
return { ...jsonText(res), isError: !res.success || res.visible };
|
|
756
|
-
}
|
|
757
|
-
const res = await screenManager.assertVisible(query);
|
|
758
|
-
return { ...jsonText(res), isError: !res.success || !res.visible };
|
|
759
|
-
}
|
|
760
|
-
catch (err) {
|
|
761
|
-
return {
|
|
762
|
-
content: [
|
|
763
|
-
{
|
|
764
|
-
type: "text",
|
|
765
|
-
text: `screen_assert_visible failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
766
|
-
},
|
|
767
|
-
],
|
|
768
|
-
isError: true,
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
server.tool("app_launch", "Launch an iOS app by bundle ID on a connected real device (preferred) or " +
|
|
773
|
-
"the booted simulator (fallback). Terminates any existing instance first " +
|
|
774
|
-
"via devicectl --terminate-existing.", {
|
|
775
|
-
bundleId: z.string().describe("e.g., com.acme.myapp"),
|
|
776
|
-
}, async ({ bundleId }) => {
|
|
777
|
-
try {
|
|
778
|
-
const res = await appLifecycle.launchApp(bundleId);
|
|
779
|
-
return { ...jsonText(res), isError: !res.success };
|
|
780
|
-
}
|
|
781
|
-
catch (err) {
|
|
782
|
-
return {
|
|
783
|
-
content: [
|
|
784
|
-
{
|
|
785
|
-
type: "text",
|
|
786
|
-
text: `app_launch failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
787
|
-
},
|
|
788
|
-
],
|
|
789
|
-
isError: true,
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
});
|
|
793
|
-
server.tool("app_terminate", "Terminate an iOS app by bundle ID.", {
|
|
794
|
-
bundleId: z.string(),
|
|
795
|
-
}, async ({ bundleId }) => {
|
|
796
|
-
try {
|
|
797
|
-
const res = await appLifecycle.terminateApp(bundleId);
|
|
798
|
-
return { ...jsonText(res), isError: !res.success };
|
|
799
|
-
}
|
|
800
|
-
catch (err) {
|
|
801
|
-
return {
|
|
802
|
-
content: [
|
|
803
|
-
{
|
|
804
|
-
type: "text",
|
|
805
|
-
text: `app_terminate failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
806
|
-
},
|
|
807
|
-
],
|
|
808
|
-
isError: true,
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
server.tool("app_activate", "Bring an app to the foreground without a cold restart. Uses WDA's " +
|
|
813
|
-
"/wda/apps/launch, falls back to a fresh launch if WDA is unreachable.", {
|
|
814
|
-
bundleId: z.string(),
|
|
815
|
-
}, async ({ bundleId }) => {
|
|
816
|
-
try {
|
|
817
|
-
const res = await appLifecycle.activateApp(bundleId);
|
|
818
|
-
return { ...jsonText(res), isError: !res.success };
|
|
819
|
-
}
|
|
820
|
-
catch (err) {
|
|
821
|
-
return {
|
|
822
|
-
content: [
|
|
823
|
-
{
|
|
824
|
-
type: "text",
|
|
825
|
-
text: `app_activate failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
826
|
-
},
|
|
827
|
-
],
|
|
828
|
-
isError: true,
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
});
|
|
832
|
-
server.tool("app_list_installed", "List apps installed on the connected real device via " +
|
|
833
|
-
"`xcrun devicectl device info apps`. Cached for 30s.", {}, async () => {
|
|
834
|
-
try {
|
|
835
|
-
const res = await appLifecycle.listInstalledApps();
|
|
836
|
-
return { ...jsonText(res), isError: !res.success };
|
|
837
|
-
}
|
|
838
|
-
catch (err) {
|
|
839
|
-
return {
|
|
840
|
-
content: [
|
|
841
|
-
{
|
|
842
|
-
type: "text",
|
|
843
|
-
text: `app_list_installed failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
844
|
-
},
|
|
845
|
-
],
|
|
846
|
-
isError: true,
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
});
|
|
850
|
-
server.tool("app_active", "Return info about the foreground app via WDA's /wda/activeAppInfo " +
|
|
851
|
-
"(bundleId, pid, name).", {}, async () => {
|
|
852
|
-
try {
|
|
853
|
-
const res = await appLifecycle.getActiveApp();
|
|
854
|
-
return { ...jsonText(res), isError: !res.success };
|
|
855
|
-
}
|
|
856
|
-
catch (err) {
|
|
857
|
-
return {
|
|
858
|
-
content: [
|
|
859
|
-
{
|
|
860
|
-
type: "text",
|
|
861
|
-
text: `app_active failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
862
|
-
},
|
|
863
|
-
],
|
|
864
|
-
isError: true,
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
server.tool("device_ensure_awake", "Ensure the iOS device is awake and unlocked. Returns a structured " +
|
|
869
|
-
"result with remediation guidance when the device is locked.", {}, async () => {
|
|
870
|
-
try {
|
|
871
|
-
const res = await deviceAutonomy.ensureAwake();
|
|
872
|
-
return { ...jsonText(res), isError: !res.awake };
|
|
873
|
-
}
|
|
874
|
-
catch (err) {
|
|
875
|
-
return {
|
|
876
|
-
content: [
|
|
877
|
-
{
|
|
878
|
-
type: "text",
|
|
879
|
-
text: `device_ensure_awake failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
880
|
-
},
|
|
881
|
-
],
|
|
882
|
-
isError: true,
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
});
|
|
886
|
-
server.tool("device_lock_state", "Report the current device lock state: unlocked, locked, screen-off, or unknown.", {}, async () => {
|
|
887
|
-
try {
|
|
888
|
-
const state = await deviceAutonomy.getLockState();
|
|
889
|
-
return jsonText({ lockState: state });
|
|
890
|
-
}
|
|
891
|
-
catch (err) {
|
|
892
|
-
return {
|
|
893
|
-
content: [
|
|
894
|
-
{
|
|
895
|
-
type: "text",
|
|
896
|
-
text: `device_lock_state failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
897
|
-
},
|
|
898
|
-
],
|
|
899
|
-
isError: true,
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
});
|
|
903
|
-
server.tool("device_set_orientation", "Set the device orientation to portrait or landscape via WDA.", {
|
|
904
|
-
orientation: z.enum(["portrait", "landscape"]),
|
|
905
|
-
}, async ({ orientation }) => {
|
|
906
|
-
try {
|
|
907
|
-
const res = await deviceAutonomy.setOrientation(orientation);
|
|
908
|
-
return { ...jsonText(res), isError: !res.success };
|
|
909
|
-
}
|
|
910
|
-
catch (err) {
|
|
911
|
-
return {
|
|
912
|
-
content: [
|
|
913
|
-
{
|
|
914
|
-
type: "text",
|
|
915
|
-
text: `device_set_orientation failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
916
|
-
},
|
|
917
|
-
],
|
|
918
|
-
isError: true,
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
});
|
|
922
|
-
server.tool("rn_preflight", "Run every setup check we can before flows execute: WDA reachable, " +
|
|
923
|
-
"device connected, device awake, app installed, required env vars " +
|
|
924
|
-
"present, laptop WiFi. Returns a structured PreflightResult — when " +
|
|
925
|
-
"ok: false, surface the failing checks' remediation verbatim and " +
|
|
926
|
-
"DO NOT attempt to fix environment issues by editing source code. " +
|
|
927
|
-
"Call this once before a batch of rn_test_* runs.", {
|
|
928
|
-
bundleId: z
|
|
929
|
-
.string()
|
|
930
|
-
.optional()
|
|
931
|
-
.describe("Bundle ID of the app under test (e.g., com.acme.myapp). " +
|
|
932
|
-
"Required for the app-installed check."),
|
|
933
|
-
requiredEnv: z
|
|
934
|
-
.array(z.string())
|
|
935
|
-
.optional()
|
|
936
|
-
.describe("Env var names the planned flows reference. " +
|
|
937
|
-
"Each must be set + non-empty."),
|
|
938
|
-
expectedNetwork: z
|
|
939
|
-
.string()
|
|
940
|
-
.optional()
|
|
941
|
-
.describe("Optional WiFi SSID the user expects the laptop (and phone) " +
|
|
942
|
-
"to be on. Mismatch is a warning, not an error."),
|
|
943
|
-
}, async ({ bundleId, requiredEnv, expectedNetwork }) => {
|
|
944
|
-
try {
|
|
945
|
-
const result = await runPreflight({
|
|
946
|
-
screen: screenManager,
|
|
947
|
-
apps: appLifecycle,
|
|
948
|
-
autonomy: deviceAutonomy,
|
|
949
|
-
iproxyManager,
|
|
950
|
-
bundleId,
|
|
951
|
-
requiredEnv,
|
|
952
|
-
expectedNetwork,
|
|
953
|
-
projectDir: PROJECT_DIR,
|
|
954
|
-
target: targetResolver,
|
|
955
|
-
});
|
|
956
|
-
return { ...jsonText(result), isError: !result.ok };
|
|
957
|
-
}
|
|
958
|
-
catch (err) {
|
|
959
|
-
return {
|
|
960
|
-
content: [
|
|
961
|
-
{
|
|
962
|
-
type: "text",
|
|
963
|
-
text: `rn_preflight failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
964
|
-
},
|
|
965
|
-
],
|
|
966
|
-
isError: true,
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
server.tool("rn_sync_camera_registry", "Scan .ceraph/camera-images/ for test images and (re)generate the " +
|
|
971
|
-
"static `_registry.ts` the app imports at boot. The filename without " +
|
|
972
|
-
"extension becomes the imageKey passed to <CeraphCamera imageKey>. " +
|
|
973
|
-
"Call this after adding or removing image files manually (Finder, " +
|
|
974
|
-
"git pull). `ceraph_add_camera_image` already auto-syncs after each " +
|
|
975
|
-
"write — only call this tool for manual drops. Idempotent — does " +
|
|
976
|
-
"not rewrite the registry when it already matches the discovered set.", {}, async () => {
|
|
977
|
-
try {
|
|
978
|
-
const result = await syncCameraRegistry(PROJECT_DIR);
|
|
979
|
-
if (result.writtenOrUnchanged === "missing-dir") {
|
|
980
|
-
return {
|
|
981
|
-
...jsonText({
|
|
982
|
-
registered: [],
|
|
983
|
-
registryPath: relativeRegistryPath(PROJECT_DIR, result.registryPath),
|
|
984
|
-
state: result.writtenOrUnchanged,
|
|
985
|
-
message: "Create `.ceraph/camera-images/` and add at least one image. " +
|
|
986
|
-
"Run this tool again to generate the registry.",
|
|
987
|
-
}),
|
|
988
|
-
isError: true,
|
|
989
|
-
};
|
|
990
|
-
}
|
|
991
|
-
return jsonText({
|
|
992
|
-
registered: result.registered.map((r) => r.key),
|
|
993
|
-
registryPath: relativeRegistryPath(PROJECT_DIR, result.registryPath),
|
|
994
|
-
state: result.writtenOrUnchanged,
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
catch (err) {
|
|
998
|
-
return {
|
|
999
|
-
content: [
|
|
1000
|
-
{
|
|
1001
|
-
type: "text",
|
|
1002
|
-
text: `rn_sync_camera_registry failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1003
|
-
},
|
|
1004
|
-
],
|
|
1005
|
-
isError: true,
|
|
1006
|
-
};
|
|
1007
|
-
}
|
|
1008
|
-
});
|
|
1009
|
-
server.tool("ceraph_add_camera_image", "Drop a camera test image into `.ceraph/camera-images/` without the dev " +
|
|
1010
|
-
"having to copy files by hand. Pass `imageBase64` (the bytes — no " +
|
|
1011
|
-
"`data:` prefix needed) plus a lowercase hyphen-separated `imageKey` " +
|
|
1012
|
-
"(e.g. `handwriting-sample-1`). `contentType` is a hint only — the " +
|
|
1013
|
-
"extension is chosen from magic bytes (JPEG/PNG/WebP/HEIC). A " +
|
|
1014
|
-
"collision with an existing imageKey is rejected unless `overwrite: " +
|
|
1015
|
-
"true` is set. After writing, the static `_registry.ts` is " +
|
|
1016
|
-
"regenerated automatically (same step as `rn_sync_camera_registry`).", {
|
|
1017
|
-
imageKey: z
|
|
1018
|
-
.string()
|
|
1019
|
-
.describe("Lowercase + hyphen-separated stem (e.g. `profile`, `id-card`, " +
|
|
1020
|
-
"`handwriting-sample-1`). Becomes both the filename stem AND " +
|
|
1021
|
-
"the value devs pass to `<CeraphCamera imageKey>`."),
|
|
1022
|
-
imageBase64: z
|
|
1023
|
-
.string()
|
|
1024
|
-
.describe("Base64-encoded image payload. A `data:image/...;base64,...` " +
|
|
1025
|
-
"URI prefix is accepted and stripped automatically."),
|
|
1026
|
-
contentType: z
|
|
1027
|
-
.string()
|
|
1028
|
-
.optional()
|
|
1029
|
-
.describe("Optional MIME hint (e.g. `image/jpeg`). The actual extension is " +
|
|
1030
|
-
"chosen from magic-byte detection; if the hint mismatches, the " +
|
|
1031
|
-
"tool returns a warning but still writes using the detected type."),
|
|
1032
|
-
overwrite: z
|
|
1033
|
-
.boolean()
|
|
1034
|
-
.optional()
|
|
1035
|
-
.describe("Allow replacing an existing imageKey (across different " +
|
|
1036
|
-
"extensions). Defaults to false."),
|
|
1037
|
-
subDir: z
|
|
1038
|
-
.string()
|
|
1039
|
-
.optional()
|
|
1040
|
-
.describe("Optional single-segment subdirectory under " +
|
|
1041
|
-
"`.ceraph/camera-images/`. Most callers omit this. Must be " +
|
|
1042
|
-
"lowercase + hyphen-separated; no slashes, no `..`."),
|
|
1043
|
-
}, async ({ imageKey, imageBase64, contentType, overwrite, subDir }) => {
|
|
1044
|
-
try {
|
|
1045
|
-
const result = await addCameraImage(PROJECT_DIR, {
|
|
1046
|
-
imageKey,
|
|
1047
|
-
imageBase64,
|
|
1048
|
-
contentType,
|
|
1049
|
-
overwrite,
|
|
1050
|
-
subDir,
|
|
1051
|
-
});
|
|
1052
|
-
return jsonText({
|
|
1053
|
-
written: result.written,
|
|
1054
|
-
registry: result.registry,
|
|
1055
|
-
registered: result.registered,
|
|
1056
|
-
detectedContentType: result.detectedContentType,
|
|
1057
|
-
detectedExt: result.detectedExt,
|
|
1058
|
-
replaced: result.replaced,
|
|
1059
|
-
removedSiblingPath: result.removedSiblingPath,
|
|
1060
|
-
bytes: result.bytes,
|
|
1061
|
-
registryState: result.registryState,
|
|
1062
|
-
warnings: result.warnings,
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
catch (err) {
|
|
1066
|
-
if (err instanceof AddCameraImageError) {
|
|
1067
|
-
return {
|
|
1068
|
-
...jsonText({
|
|
1069
|
-
error: err.code,
|
|
1070
|
-
message: err.message,
|
|
1071
|
-
remediation: err.remediation,
|
|
1072
|
-
}),
|
|
1073
|
-
isError: true,
|
|
1074
|
-
};
|
|
1075
|
-
}
|
|
1076
|
-
return {
|
|
1077
|
-
content: [
|
|
1078
|
-
{
|
|
1079
|
-
type: "text",
|
|
1080
|
-
text: `ceraph_add_camera_image failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1081
|
-
},
|
|
1082
|
-
],
|
|
1083
|
-
isError: true,
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
server.tool("rn_permission_auto_accept", "Toggle the iOS system-permission dialog interceptor for the running " +
|
|
1088
|
-
"MCP process. 'auto-accept' (default) taps the permissive button on " +
|
|
1089
|
-
"any known system dialog before each flow step; 'ask' invokes the " +
|
|
1090
|
-
"configured callback (defaults to accept); 'off' is a no-op. " +
|
|
1091
|
-
"Mode persists for the lifetime of this MCP process. To set the " +
|
|
1092
|
-
"default for new processes, export CERAPH_AUTO_ACCEPT_PERMISSIONS.", {
|
|
1093
|
-
mode: z.enum(["auto-accept", "ask", "off"]),
|
|
1094
|
-
}, async ({ mode }) => {
|
|
1095
|
-
try {
|
|
1096
|
-
const next = mode;
|
|
1097
|
-
permissionInterceptor.setMode(next);
|
|
1098
|
-
return {
|
|
1099
|
-
...jsonText({
|
|
1100
|
-
mode: next,
|
|
1101
|
-
message: `Permission interceptor mode set to '${next}'.`,
|
|
1102
|
-
}),
|
|
1103
|
-
};
|
|
1104
|
-
}
|
|
1105
|
-
catch (err) {
|
|
1106
|
-
return {
|
|
1107
|
-
content: [
|
|
1108
|
-
{
|
|
1109
|
-
type: "text",
|
|
1110
|
-
text: `rn_permission_auto_accept failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1111
|
-
},
|
|
1112
|
-
],
|
|
1113
|
-
isError: true,
|
|
1114
|
-
};
|
|
1115
|
-
}
|
|
1116
|
-
});
|
|
1117
|
-
server.tool("rn_reload", "Request a JS bundle reload on the running RN app by dispatching the " +
|
|
1118
|
-
"`ceraph://reload` deep link through WDA. Requires the app to have " +
|
|
1119
|
-
"called `installSignalCapture()` (or otherwise registered the " +
|
|
1120
|
-
"reload deep-link listener) at boot. Waits up to `timeoutMs` for " +
|
|
1121
|
-
"WDA to become responsive again, then captures a screenshot. " +
|
|
1122
|
-
"Dev-only; does nothing in a production build.", {
|
|
1123
|
-
timeoutMs: z
|
|
1124
|
-
.number()
|
|
1125
|
-
.optional()
|
|
1126
|
-
.describe("Max time in ms to wait for the app to come back after the " +
|
|
1127
|
-
"reload (default 10000)."),
|
|
1128
|
-
}, async ({ timeoutMs }) => {
|
|
1129
|
-
try {
|
|
1130
|
-
const guard = await requireWDA();
|
|
1131
|
-
if (!guard.ok)
|
|
1132
|
-
return { ...jsonText(guard.payload), isError: true };
|
|
1133
|
-
const dispatch = await screenManager.openUrl("ceraph://reload");
|
|
1134
|
-
if (!dispatch.success) {
|
|
1135
|
-
return {
|
|
1136
|
-
...jsonText({
|
|
1137
|
-
success: false,
|
|
1138
|
-
error: dispatch.error ?? "openUrl failed",
|
|
1139
|
-
}),
|
|
1140
|
-
isError: true,
|
|
1141
|
-
};
|
|
1142
|
-
}
|
|
1143
|
-
const limit = timeoutMs ?? 10_000;
|
|
1144
|
-
const start = Date.now();
|
|
1145
|
-
let backUp = false;
|
|
1146
|
-
while (Date.now() - start < limit) {
|
|
1147
|
-
const ok = await screenManager.pingStatus().catch(() => false);
|
|
1148
|
-
if (ok) {
|
|
1149
|
-
backUp = true;
|
|
1150
|
-
break;
|
|
1151
|
-
}
|
|
1152
|
-
await new Promise((r) => setTimeout(r, 200));
|
|
1153
|
-
}
|
|
1154
|
-
const shot = await screenManager.screenshot().catch(() => undefined);
|
|
1155
|
-
return {
|
|
1156
|
-
...jsonText({
|
|
1157
|
-
success: backUp,
|
|
1158
|
-
elapsedMs: Date.now() - start,
|
|
1159
|
-
screenshotBase64: shot?.base64,
|
|
1160
|
-
error: backUp ? undefined : `WDA did not return within ${limit}ms`,
|
|
1161
|
-
}),
|
|
1162
|
-
isError: !backUp,
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
|
-
catch (err) {
|
|
1166
|
-
return {
|
|
1167
|
-
content: [
|
|
1168
|
-
{
|
|
1169
|
-
type: "text",
|
|
1170
|
-
text: `rn_reload failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1171
|
-
},
|
|
1172
|
-
],
|
|
1173
|
-
isError: true,
|
|
1174
|
-
};
|
|
1175
|
-
}
|
|
1176
|
-
});
|
|
1177
|
-
server.tool("rn_stop", "Stop all managed React Native processes (Metro dev server and/or build process).", {}, async () => {
|
|
1178
|
-
try {
|
|
1179
|
-
const stopped = await rnManager.stopAll();
|
|
1180
|
-
if (stopped.length === 0) {
|
|
1181
|
-
return {
|
|
1182
|
-
content: [
|
|
1183
|
-
{
|
|
1184
|
-
type: "text",
|
|
1185
|
-
text: JSON.stringify({
|
|
1186
|
-
stopped: [],
|
|
1187
|
-
message: "No managed processes were running.",
|
|
1188
|
-
}),
|
|
1189
|
-
},
|
|
1190
|
-
],
|
|
1191
|
-
};
|
|
1192
|
-
}
|
|
1193
|
-
return {
|
|
1194
|
-
content: [
|
|
1195
|
-
{
|
|
1196
|
-
type: "text",
|
|
1197
|
-
text: JSON.stringify({ stopped }, null, 2),
|
|
1198
|
-
},
|
|
1199
|
-
],
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
catch (err) {
|
|
1203
|
-
return {
|
|
1204
|
-
content: [
|
|
1205
|
-
{
|
|
1206
|
-
type: "text",
|
|
1207
|
-
text: `rn_stop failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1208
|
-
},
|
|
1209
|
-
],
|
|
1210
|
-
isError: true,
|
|
1211
|
-
};
|
|
1212
|
-
}
|
|
1213
|
-
});
|
|
1214
|
-
server.tool("rn_target_status", "Report which iOS target is currently selected (device vs simulator), " +
|
|
1215
|
-
"the resolved WDA base URL, whether a simulator WDA session is " +
|
|
1216
|
-
"running, and the CERAPH_TARGET env preference. Call this when the " +
|
|
1217
|
-
"developer asks `am I testing on device or simulator?` or before " +
|
|
1218
|
-
"starting a flow if uncertain which transport is active.", {}, async () => {
|
|
1219
|
-
try {
|
|
1220
|
-
targetResolver.invalidate();
|
|
1221
|
-
const info = await targetResolver.resolve();
|
|
1222
|
-
const session = wdaManager.getSession();
|
|
1223
|
-
return jsonText({
|
|
1224
|
-
target: info.target,
|
|
1225
|
-
udid: info.udid,
|
|
1226
|
-
baseUrl: info.baseUrl,
|
|
1227
|
-
reason: info.reason,
|
|
1228
|
-
preferenceEnv: process.env.CERAPH_TARGET ?? null,
|
|
1229
|
-
simulatorWdaSession: session
|
|
1230
|
-
? { port: session.port, udid: session.udid, projectPath: session.projectPath }
|
|
1231
|
-
: null,
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
catch (err) {
|
|
1235
|
-
return {
|
|
1236
|
-
content: [
|
|
1237
|
-
{
|
|
1238
|
-
type: "text",
|
|
1239
|
-
text: `rn_target_status failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1240
|
-
},
|
|
1241
|
-
],
|
|
1242
|
-
isError: true,
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
});
|
|
1246
|
-
server.tool("rn_wda_start", "Build and launch WebDriverAgent against a booted iOS simulator. " +
|
|
1247
|
-
"Required ONCE per MCP session when testing on the simulator (real " +
|
|
1248
|
-
"devices don't need this). Reads `appium-webdriveragent` from " +
|
|
1249
|
-
"node_modules (optional dep — install with `npm i -D " +
|
|
1250
|
-
"appium-webdriveragent` if missing). Captures the WDA port from " +
|
|
1251
|
-
"xcodebuild's output and routes all screen_*/app_* tools to the " +
|
|
1252
|
-
"simulator automatically. First-time build can take 60-120s and " +
|
|
1253
|
-
"may require an Xcode signing prompt. Idempotent — re-calling " +
|
|
1254
|
-
"returns the existing session.", {
|
|
1255
|
-
udid: z
|
|
1256
|
-
.string()
|
|
1257
|
-
.optional()
|
|
1258
|
-
.describe("Booted simulator UDID. When omitted, the first booted " +
|
|
1259
|
-
"simulator is used. Run `xcrun simctl list devices booted` " +
|
|
1260
|
-
"to see options."),
|
|
1261
|
-
startupTimeoutMs: z
|
|
1262
|
-
.number()
|
|
1263
|
-
.int()
|
|
1264
|
-
.positive()
|
|
1265
|
-
.optional()
|
|
1266
|
-
.describe("Max wait for the `ServerURLHere->...<-ServerURLHere` marker " +
|
|
1267
|
-
"in xcodebuild's stdout. Default 120000ms (cold-build safe)."),
|
|
1268
|
-
}, async ({ udid, startupTimeoutMs }) => {
|
|
1269
|
-
try {
|
|
1270
|
-
const result = await wdaManager.start({ udid, startupTimeoutMs });
|
|
1271
|
-
return { ...jsonText(result), isError: !result.ok };
|
|
1272
|
-
}
|
|
1273
|
-
catch (err) {
|
|
1274
|
-
return {
|
|
1275
|
-
content: [
|
|
1276
|
-
{
|
|
1277
|
-
type: "text",
|
|
1278
|
-
text: `rn_wda_start failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1279
|
-
},
|
|
1280
|
-
],
|
|
1281
|
-
isError: true,
|
|
1282
|
-
};
|
|
1283
|
-
}
|
|
1284
|
-
});
|
|
1285
|
-
server.tool("rn_wda_stop", "Stop the simulator WebDriverAgent session started by rn_wda_start. " +
|
|
1286
|
-
"Idempotent — returns `{ stopped: false }` when no session is " +
|
|
1287
|
-
"active. Real-device WDA is unaffected (it's managed by Xcode, " +
|
|
1288
|
-
"not this MCP).", {}, async () => {
|
|
1289
|
-
try {
|
|
1290
|
-
const result = await wdaManager.stop();
|
|
1291
|
-
return jsonText(result);
|
|
1292
|
-
}
|
|
1293
|
-
catch (err) {
|
|
1294
|
-
return {
|
|
1295
|
-
content: [
|
|
1296
|
-
{
|
|
1297
|
-
type: "text",
|
|
1298
|
-
text: `rn_wda_stop failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1299
|
-
},
|
|
1300
|
-
],
|
|
1301
|
-
isError: true,
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
server.tool("rn_boot_simulator", "Boot an iOS simulator from cold via `xcrun simctl`. Use this when " +
|
|
1306
|
-
"the developer doesn't have a real device plugged in and no " +
|
|
1307
|
-
"simulator is already booted — preflight will surface that state. " +
|
|
1308
|
-
"Auto-picks the newest available iPhone (preferring the plain " +
|
|
1309
|
-
"model like `iPhone 15` over `iPhone 15 Pro Max`) unless `udid` " +
|
|
1310
|
-
"or `deviceType` narrows the choice. Idempotent — returns " +
|
|
1311
|
-
"`{ alreadyBooted: true }` when the chosen sim is already running. " +
|
|
1312
|
-
"After this succeeds, call rn_wda_start to ready WebDriverAgent, " +
|
|
1313
|
-
"then retry the original test tool.", {
|
|
1314
|
-
udid: z
|
|
1315
|
-
.string()
|
|
1316
|
-
.optional()
|
|
1317
|
-
.describe("Boot a specific simulator by UDID. When set, discovery is " +
|
|
1318
|
-
"skipped (deviceType is ignored). Run `xcrun simctl list " +
|
|
1319
|
-
"devices` to see options."),
|
|
1320
|
-
deviceType: z
|
|
1321
|
-
.string()
|
|
1322
|
-
.optional()
|
|
1323
|
-
.describe("Substring match against simulator names (case-insensitive, " +
|
|
1324
|
-
"e.g. `iPhone 15`, `iPhone 14 Pro`). Picks the newest iOS " +
|
|
1325
|
-
"runtime among matches. Ignored when `udid` is set."),
|
|
1326
|
-
bootTimeoutMs: z
|
|
1327
|
-
.number()
|
|
1328
|
-
.int()
|
|
1329
|
-
.positive()
|
|
1330
|
-
.optional()
|
|
1331
|
-
.describe("Max wait for `simctl bootstatus -b` to confirm the simulator " +
|
|
1332
|
-
"has settled. Default 120000ms (first boots of a fresh " +
|
|
1333
|
-
"runtime can take 60-90s)."),
|
|
1334
|
-
}, async ({ udid, deviceType, bootTimeoutMs }) => {
|
|
1335
|
-
try {
|
|
1336
|
-
const result = await bootSimulator({ udid, deviceType, bootTimeoutMs });
|
|
1337
|
-
targetResolver.invalidate();
|
|
1338
|
-
return jsonText(result);
|
|
1339
|
-
}
|
|
1340
|
-
catch (err) {
|
|
1341
|
-
return toolErrorContent("rn_boot_simulator", err);
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
server.tool("rn_wait_for_device", "Wait for an iPhone to be connected via USB-C. Uses macOS's " +
|
|
1345
|
-
"usbmuxd daemon for sub-second event-driven detection (no " +
|
|
1346
|
-
"polling). Waits indefinitely until either a device connects or " +
|
|
1347
|
-
"the agent aborts the call. Use this after telling the user " +
|
|
1348
|
-
"'please plug in your iPhone' — the call resolves immediately " +
|
|
1349
|
-
"when they do, with zero detection lag.", {
|
|
1350
|
-
timeoutMs: z
|
|
1351
|
-
.number()
|
|
1352
|
-
.int()
|
|
1353
|
-
.positive()
|
|
1354
|
-
.optional()
|
|
1355
|
-
.describe("Optional explicit deadline in milliseconds. Default: none — " +
|
|
1356
|
-
"the call waits forever and relies on the MCP abort signal " +
|
|
1357
|
-
"for cancellation. Set this only when you want a hard cap."),
|
|
1358
|
-
}, async ({ timeoutMs }, extra) => {
|
|
1359
|
-
try {
|
|
1360
|
-
const result = await waitForDevice({
|
|
1361
|
-
timeoutMs,
|
|
1362
|
-
signal: extra.signal,
|
|
1363
|
-
});
|
|
1364
|
-
targetResolver.invalidate();
|
|
1365
|
-
return jsonText(result);
|
|
1366
|
-
}
|
|
1367
|
-
catch (err) {
|
|
1368
|
-
return toolErrorContent("rn_wait_for_device", err);
|
|
1369
|
-
}
|
|
1370
|
-
});
|
|
1371
|
-
function initToolResult(payload) {
|
|
1372
|
-
return {
|
|
1373
|
-
content: [
|
|
1374
|
-
{ type: "text", text: JSON.stringify(payload, null, 2) },
|
|
1375
|
-
],
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
|
-
function initToolError(toolName, err) {
|
|
1379
|
-
return {
|
|
1380
|
-
content: [
|
|
1381
|
-
{
|
|
1382
|
-
type: "text",
|
|
1383
|
-
text: `${toolName} failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1384
|
-
},
|
|
1385
|
-
],
|
|
1386
|
-
isError: true,
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
server.tool("ceraph_init_status", "Snapshot the current init state of the project: which steps are " +
|
|
1390
|
-
"complete (package installed, GitHub auth cached, ceraph:// scheme " +
|
|
1391
|
-
"registered, installCeraph() injected, CameraView usages found) and " +
|
|
1392
|
-
"which MCP-client config files exist. Use this FIRST to decide which " +
|
|
1393
|
-
"individual init tools still need to run.", {
|
|
1394
|
-
projectDir: z
|
|
1395
|
-
.string()
|
|
1396
|
-
.optional()
|
|
1397
|
-
.describe("Directory to inspect. Defaults to the MCP server's cwd " +
|
|
1398
|
-
"(usually the user's project root)."),
|
|
1399
|
-
}, async ({ projectDir }) => {
|
|
1400
|
-
try {
|
|
1401
|
-
const result = await getInitStatus(projectDir ?? PROJECT_DIR);
|
|
1402
|
-
return initToolResult(result);
|
|
1403
|
-
}
|
|
1404
|
-
catch (err) {
|
|
1405
|
-
return initToolError("ceraph_init_status", err);
|
|
1406
|
-
}
|
|
1407
|
-
});
|
|
1408
|
-
server.tool("ceraph_init_install_package", "Detect the project's package manager (pnpm/yarn/bun/npm via lockfile) " +
|
|
1409
|
-
"and install @ceraph/react-native-mcp into dependencies. Idempotent — " +
|
|
1410
|
-
"returns `{ already: true }` if the package is already in package.json.", {
|
|
1411
|
-
projectDir: z.string().optional(),
|
|
1412
|
-
}, async ({ projectDir }) => {
|
|
1413
|
-
try {
|
|
1414
|
-
const result = await installCeraphPackage(projectDir ?? PROJECT_DIR);
|
|
1415
|
-
return initToolResult(result);
|
|
1416
|
-
}
|
|
1417
|
-
catch (err) {
|
|
1418
|
-
return initToolError("ceraph_init_install_package", err);
|
|
1419
|
-
}
|
|
1420
|
-
});
|
|
1421
|
-
server.tool("ceraph_init_auth_start", "Begin the GitHub OAuth device flow. Returns { verificationUri, " +
|
|
1422
|
-
"userCode, pollUrl } — surface verificationUri + userCode to the user " +
|
|
1423
|
-
"VERBATIM (don't paraphrase), then call ceraph_init_auth_poll with " +
|
|
1424
|
-
"pollUrl in a short loop (every ~5 seconds) until status is 'complete' " +
|
|
1425
|
-
"or 'failed'.", {}, async () => {
|
|
1426
|
-
try {
|
|
1427
|
-
const result = await startAuthFlow();
|
|
1428
|
-
return initToolResult(result);
|
|
1429
|
-
}
|
|
1430
|
-
catch (err) {
|
|
1431
|
-
return initToolError("ceraph_init_auth_start", err);
|
|
1432
|
-
}
|
|
1433
|
-
});
|
|
1434
|
-
server.tool("ceraph_init_auth_poll", "Poll the in-progress device flow once. Returns one of: " +
|
|
1435
|
-
"{ status: 'pending' }, { status: 'slow_down', intervalSeconds }, " +
|
|
1436
|
-
"{ status: 'complete', login }, or { status: 'failed', reason }. " +
|
|
1437
|
-
"Wait `intervalSeconds` before the next call on slow_down. Stop when " +
|
|
1438
|
-
"status === 'complete' or 'failed'. On 'failed', restart with " +
|
|
1439
|
-
"ceraph_init_auth_start (NOT a retry of the same pollUrl).", {
|
|
1440
|
-
pollUrl: z
|
|
1441
|
-
.string()
|
|
1442
|
-
.describe("Opaque handle returned by ceraph_init_auth_start."),
|
|
1443
|
-
}, async ({ pollUrl }) => {
|
|
1444
|
-
try {
|
|
1445
|
-
const result = await pollAuthFlow(pollUrl);
|
|
1446
|
-
return initToolResult(result);
|
|
1447
|
-
}
|
|
1448
|
-
catch (err) {
|
|
1449
|
-
return initToolError("ceraph_init_auth_poll", err);
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
server.tool("ceraph_init_scan_camera", "AST-scan the project for <CameraView> usages (from expo-camera). " +
|
|
1453
|
-
"Returns each usage with its file path, line, suggested imageKey " +
|
|
1454
|
-
"(heuristic), and ~30 lines of surrounding code so the AI can " +
|
|
1455
|
-
"reason about what to put in imageKey. The AI should override the " +
|
|
1456
|
-
"suggestion based on context (e.g. a `project.type === 'uppercase'` " +
|
|
1457
|
-
"branch nearby implies imageKey='letter-uppercase').", {
|
|
1458
|
-
projectDir: z.string().optional(),
|
|
1459
|
-
}, async ({ projectDir }) => {
|
|
1460
|
-
try {
|
|
1461
|
-
const result = await scanCameraUsages(projectDir ?? PROJECT_DIR);
|
|
1462
|
-
return initToolResult(result);
|
|
1463
|
-
}
|
|
1464
|
-
catch (err) {
|
|
1465
|
-
return initToolError("ceraph_init_scan_camera", err);
|
|
1466
|
-
}
|
|
1467
|
-
});
|
|
1468
|
-
server.tool("ceraph_init_replace_camera", "Apply ONE <CameraView> → <CeraphCamera imageKey=\"...\"> AST " +
|
|
1469
|
-
"replacement. The AI provides the imageKey based on the context it " +
|
|
1470
|
-
"saw in scan_camera's surroundingCode. Also adds the shim import " +
|
|
1471
|
-
"and trims `CameraView` from the expo-camera import when no JSX " +
|
|
1472
|
-
"uses it anymore. Idempotent — returns `{ already: true }` when " +
|
|
1473
|
-
"the line is already CeraphCamera.", {
|
|
1474
|
-
filePath: z.string().describe("Absolute path of the source file."),
|
|
1475
|
-
line: z
|
|
1476
|
-
.number()
|
|
1477
|
-
.int()
|
|
1478
|
-
.positive()
|
|
1479
|
-
.describe("1-based line of the opening <CameraView> tag."),
|
|
1480
|
-
imageKey: z
|
|
1481
|
-
.string()
|
|
1482
|
-
.min(1)
|
|
1483
|
-
.describe("The imageKey to use. Should be lowercase-with-dashes."),
|
|
1484
|
-
projectDir: z.string().optional(),
|
|
1485
|
-
}, async ({ filePath, line, imageKey, projectDir }) => {
|
|
1486
|
-
try {
|
|
1487
|
-
const result = await replaceCameraView(projectDir ?? PROJECT_DIR, {
|
|
1488
|
-
filePath,
|
|
1489
|
-
line,
|
|
1490
|
-
imageKey,
|
|
1491
|
-
});
|
|
1492
|
-
return initToolResult(result);
|
|
1493
|
-
}
|
|
1494
|
-
catch (err) {
|
|
1495
|
-
return initToolError("ceraph_init_replace_camera", err);
|
|
1496
|
-
}
|
|
1497
|
-
});
|
|
1498
|
-
server.tool("ceraph_init_inject_boot", "AST-inject `useEffect(() => { installCeraph(); }, [])` plus the " +
|
|
1499
|
-
"shim + react imports into the root layout (app/_layout.tsx for " +
|
|
1500
|
-
"Expo Router, App.tsx for bare RN). Idempotent — returns " +
|
|
1501
|
-
"`{ already: true }` when installCeraph() is already present.", {
|
|
1502
|
-
projectDir: z.string().optional(),
|
|
1503
|
-
}, async ({ projectDir }) => {
|
|
1504
|
-
try {
|
|
1505
|
-
const result = await injectBoot(projectDir ?? PROJECT_DIR);
|
|
1506
|
-
return initToolResult(result);
|
|
1507
|
-
}
|
|
1508
|
-
catch (err) {
|
|
1509
|
-
return initToolError("ceraph_init_inject_boot", err);
|
|
1510
|
-
}
|
|
1511
|
-
});
|
|
1512
|
-
server.tool("ceraph_init_register_scheme", "Register `ceraph` as a custom URL scheme so deep links " +
|
|
1513
|
-
"(ceraph://test-image, ceraph://reload, ceraph://reset) reach the " +
|
|
1514
|
-
"running app. Auto-edits static expo.scheme in app.json; for " +
|
|
1515
|
-
"dynamic app.config.{js,ts} or bare RN, returns the exact " +
|
|
1516
|
-
"instructions to surface to the user.", {
|
|
1517
|
-
projectDir: z.string().optional(),
|
|
1518
|
-
}, async ({ projectDir }) => {
|
|
1519
|
-
try {
|
|
1520
|
-
const result = await registerScheme(projectDir ?? PROJECT_DIR);
|
|
1521
|
-
return initToolResult(result);
|
|
1522
|
-
}
|
|
1523
|
-
catch (err) {
|
|
1524
|
-
return initToolError("ceraph_init_register_scheme", err);
|
|
1525
|
-
}
|
|
1526
|
-
});
|
|
1527
|
-
server.tool("ceraph_init_setup_images_dir", "Create the `.ceraph/camera-images/` directory with a README that " +
|
|
1528
|
-
"documents the imageKey naming convention, and append " +
|
|
1529
|
-
"`.rn-errors.json`, `.rn-flow-progress.json`, `.rn-mcp-cache/` to " +
|
|
1530
|
-
".gitignore. Idempotent — second invocation reports no changes.", {
|
|
1531
|
-
projectDir: z.string().optional(),
|
|
1532
|
-
}, async ({ projectDir }) => {
|
|
1533
|
-
try {
|
|
1534
|
-
const result = await setupImagesDir(projectDir ?? PROJECT_DIR);
|
|
1535
|
-
return initToolResult(result);
|
|
1536
|
-
}
|
|
1537
|
-
catch (err) {
|
|
1538
|
-
return initToolError("ceraph_init_setup_images_dir", err);
|
|
1539
|
-
}
|
|
1540
|
-
});
|
|
1541
|
-
server.tool("ceraph_init_setup_mcp_clients", "Write MCP server config blocks to every supported editor's local " +
|
|
1542
|
-
"config file: .mcp.json (Claude Code), .cursor/mcp.json (Cursor), " +
|
|
1543
|
-
".codex/config.toml (Codex), .vscode/mcp.json (VS Code). Returns " +
|
|
1544
|
-
"{ written: string[], skipped: string[] }. Skip = already had the " +
|
|
1545
|
-
"react-native-mcp entry.", {
|
|
1546
|
-
projectDir: z.string().optional(),
|
|
1547
|
-
}, async ({ projectDir }) => {
|
|
1548
|
-
try {
|
|
1549
|
-
const result = await setupMcpClients(projectDir ?? PROJECT_DIR);
|
|
1550
|
-
return initToolResult(result);
|
|
1551
|
-
}
|
|
1552
|
-
catch (err) {
|
|
1553
|
-
return initToolError("ceraph_init_setup_mcp_clients", err);
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
server.tool("ceraph_init_preflight", "Run the full preflight check suite (Xcode, WDA, device, app, " +
|
|
1557
|
-
"camera-images sync, etc.) and return the structured result. Use " +
|
|
1558
|
-
"this AFTER the other init tools to verify the project is ready " +
|
|
1559
|
-
"to run flows.", {
|
|
1560
|
-
projectDir: z.string().optional(),
|
|
1561
|
-
}, async ({ projectDir }) => {
|
|
1562
|
-
try {
|
|
1563
|
-
const result = await preflightForMcp(projectDir ?? PROJECT_DIR, {
|
|
1564
|
-
screen: screenManager,
|
|
1565
|
-
apps: appLifecycle,
|
|
1566
|
-
autonomy: deviceAutonomy,
|
|
1567
|
-
target: targetResolver,
|
|
1568
|
-
iproxyManager,
|
|
1569
|
-
});
|
|
1570
|
-
return initToolResult(result);
|
|
1571
|
-
}
|
|
1572
|
-
catch (err) {
|
|
1573
|
-
return initToolError("ceraph_init_preflight", err);
|
|
1574
|
-
}
|
|
1575
|
-
});
|
|
1576
|
-
server.tool("ceraph_init_monorepo_status", "Inspect the project root for monorepo signals (package.json " +
|
|
1577
|
-
"workspaces, pnpm-workspace.yaml, lerna.json) and return any RN/Expo " +
|
|
1578
|
-
"subpackages found. If the cwd is itself an RN app, " +
|
|
1579
|
-
"`rootIsRnApp: true` and `matches: []`. Use this before calling other " +
|
|
1580
|
-
"init tools — when matches.length === 1, pass that absPath as " +
|
|
1581
|
-
"projectDir to every subsequent ceraph_init_* call.", {
|
|
1582
|
-
projectDir: z.string().optional(),
|
|
1583
|
-
}, async ({ projectDir }) => {
|
|
1584
|
-
try {
|
|
1585
|
-
const result = await detectMonorepoStatus(projectDir ?? PROJECT_DIR);
|
|
1586
|
-
return initToolResult(result);
|
|
1587
|
-
}
|
|
1588
|
-
catch (err) {
|
|
1589
|
-
return initToolError("ceraph_init_monorepo_status", err);
|
|
1590
|
-
}
|
|
1591
|
-
});
|
|
1592
|
-
registerUninstallTools(server);
|
|
1593
|
-
async function main() {
|
|
1594
|
-
const transport = new StdioServerTransport();
|
|
1595
|
-
await server.connect(transport);
|
|
1596
|
-
console.error("[react-native-mcp] Server started on stdio transport");
|
|
1597
|
-
if (!process.env.CERAPH_SIGNAL_HOST) {
|
|
1598
|
-
try {
|
|
1599
|
-
const detected = detectMacLanIp();
|
|
1600
|
-
if (detected) {
|
|
1601
|
-
process.env.CERAPH_SIGNAL_HOST = detected.address;
|
|
1602
|
-
console.error(`[react-native-mcp] CERAPH_SIGNAL_HOST auto-detected: ${detected.address} ` +
|
|
1603
|
-
`(${detected.interfaceName}, ${detected.kind}). To persist across shells, ` +
|
|
1604
|
-
`run \`npx @ceraph/react-native-mcp init\` — it adds the export to ~/.zshrc.`);
|
|
1605
|
-
}
|
|
1606
|
-
else {
|
|
1607
|
-
console.error("[react-native-mcp] CERAPH_SIGNAL_HOST is unset and no LAN IP was " +
|
|
1608
|
-
"auto-detectable. Real-device shim signals will default to " +
|
|
1609
|
-
"localhost (which the device cannot reach back to the Mac). " +
|
|
1610
|
-
"Set it manually: export CERAPH_SIGNAL_HOST=<your-mac-ip>");
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
catch (err) {
|
|
1614
|
-
console.error(`[react-native-mcp] CERAPH_SIGNAL_HOST auto-detection failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
else {
|
|
1618
|
-
console.error(`[react-native-mcp] CERAPH_SIGNAL_HOST=${process.env.CERAPH_SIGNAL_HOST}`);
|
|
1619
|
-
}
|
|
1620
|
-
const listenResult = await signalListener.start();
|
|
1621
|
-
if (listenResult.ok) {
|
|
1622
|
-
console.error(`[react-native-mcp] Signal listener bound on 127.0.0.1:${listenResult.port}`);
|
|
1623
|
-
}
|
|
1624
|
-
else if (listenResult.errorCode === "EADDRINUSE") {
|
|
1625
|
-
console.error(`[react-native-mcp] ERROR: Port ${listenResult.port} is already in use.\n` +
|
|
1626
|
-
"Another Ceraph MCP server is already running on this machine.\n" +
|
|
1627
|
-
"Stop the existing process before starting a new one.\n" +
|
|
1628
|
-
"(WDA port 8100 is owned by WDA itself and is a separate concern.)");
|
|
1629
|
-
process.exit(1);
|
|
1630
|
-
}
|
|
1631
|
-
else {
|
|
1632
|
-
console.error(`[react-native-mcp] Signal listener failed to bind on port ${listenResult.port}: ${listenResult.error}. ` +
|
|
1633
|
-
"Shim-side signals (JS errors, unhandled rejections, network failures) will be dropped.");
|
|
1634
|
-
}
|
|
1635
|
-
const shutdown = async () => {
|
|
1636
|
-
await Promise.all([
|
|
1637
|
-
signalListener.stop().catch(() => undefined),
|
|
1638
|
-
iproxyManager.stop().catch(() => undefined),
|
|
1639
|
-
]);
|
|
1640
|
-
await wdaManager.stop().catch(() => undefined);
|
|
1641
|
-
};
|
|
1642
|
-
process.on("SIGINT", () => {
|
|
1643
|
-
void shutdown().then(() => process.exit(0));
|
|
1644
|
-
});
|
|
1645
|
-
process.on("SIGTERM", () => {
|
|
1646
|
-
void shutdown().then(() => process.exit(0));
|
|
1647
|
-
});
|
|
1648
|
-
}
|
|
1649
|
-
main().catch((err) => {
|
|
1650
|
-
console.error("[react-native-mcp] Fatal error:", err);
|
|
1651
|
-
process.exit(1);
|
|
1652
|
-
});
|
|
2
|
+
|
|
3
|
+
const _0xf8ecb6=_0xc050;(function(_0xc87e70,_0x39c5dc){const _0x233903=_0xc050,_0x4105bc=_0xc87e70();while(!![]){try{const _0x22039d=-parseInt(_0x233903(0x650))/0x1*(parseInt(_0x233903(0x424))/0x2)+parseInt(_0x233903(0x728))/0x3*(-parseInt(_0x233903(0x935))/0x4)+-parseInt(_0x233903(0x664))/0x5*(parseInt(_0x233903(0xb0e))/0x6)+-parseInt(_0x233903(0x798))/0x7*(-parseInt(_0x233903(0x6ba))/0x8)+-parseInt(_0x233903(0x304))/0x9+parseInt(_0x233903(0x923))/0xa*(-parseInt(_0x233903(0x7e2))/0xb)+parseInt(_0x233903(0x675))/0xc;if(_0x22039d===_0x39c5dc)break;else _0x4105bc['push'](_0x4105bc['shift']());}catch(_0xa6d2b6){_0x4105bc['push'](_0x4105bc['shift']());}}}(_0x3e88,0x26ba7));import{createRequire as _0x57c4ae}from'module';import{join as _0x232ea9}from'path';import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{z as _0x344f4d}from'zod';import{spawn}from'child_process';import{writeFile,access}from'fs/promises';import{join}from'path';var _0x5ec8f6=/^(.+?):(\d+):(\d+):\s*(error|warning|note):\s*(.+)$/,_0x6dae94=[_0xf8ecb6(0x69d),'**\x20BUILD\x20FAILED\x20**','xcodebuild:\x20error:','❌'],_0x55f049=/^(ld|clang):\s*(error|warning):\s*(.+)$/,_0x5ccdde=/^Undefined symbols? for architecture .+:\s*"(.+)"/,_0x5b335e=/^\[!\]\s*(.+)$/,_0x2094e8=/^(Error|TypeError|ReferenceError|SyntaxError|RangeError):\s*(.+)$/,_0x132cc2=/Unable to resolve module ['"](.+?)['"]/,_0x11406f=/Metro has encountered an error/,_0x24d68b=/^(ERROR|console\.error)\s*(.+)$/i,_0x21b248=/Invariant Violation:\s*(.+)/,_0x2d1d38=/Unhandled JS Exception:\s*(.+)/,_0x129dbd=/ExceptionsManager\.js/;function _0x3d0135(_0x5cdd35){const _0x6c956c=_0xf8ecb6,_0x244f83=_0x5cdd35[_0x6c956c(0x2f3)](_0x5ec8f6);if(_0x244f83)return _0x6c956c(0x5c7)===_0x6c956c(0x54d)?null:{'file':_0x244f83[0x1],'line':parseInt(_0x244f83[0x2],0xa),'column':parseInt(_0x244f83[0x3],0xa),'message':_0x244f83[0x5],'severity':_0x244f83[0x4],'type':_0x6c956c(0xb1a)};return null;}function _0xebb564(_0x3c16b3){const _0x3fd6e3=_0xf8ecb6,_0x1cf666=_0x3c16b3[_0x3fd6e3(0x2f3)](_0x55f049);if(_0x1cf666)return{'file':'','line':0x0,'column':0x0,'message':_0x1cf666[0x3],'severity':_0x1cf666[0x2],'type':'link'};const _0x19795d=_0x3c16b3['match'](_0x5ccdde);if(_0x19795d)return{'file':'','line':0x0,'column':0x0,'message':_0x3fd6e3(0x830)+_0x19795d[0x1],'severity':_0x3fd6e3(0x3dd),'type':'link'};return null;}var _0x49cafc=/\b(cdn|trunk|repo update|overrides the|setting defined in|deprecated|recommends|should)\b/i;function _0x5c38b7(_0x1cd2ed){const _0x4211e9=_0xf8ecb6,_0x2166bb=_0x1cd2ed['match'](_0x5b335e);if(!_0x2166bb)return null;const _0xc83c66=_0x2166bb[0x1],_0x590d6d=_0x49cafc[_0x4211e9(0x8aa)](_0xc83c66);return{'file':_0x4211e9(0xb09),'line':0x0,'column':0x0,'message':_0xc83c66,'severity':_0x590d6d?_0x4211e9(0x696):_0x4211e9(0x3dd),'type':'pod'};}function _0x330670(_0x54eaf6){const _0x43073b=_0xf8ecb6,_0x101de1=[],_0x1cccd9=[];let _0x52d04f=![],_0x398a75=null,_0x446070=0x0;const _0x5ba565=0x3;for(const _0x5462b9 of _0x54eaf6){const _0x403638=_0x5462b9['trim']();if(!_0x403638){_0x398a75=null,_0x446070=0x0;continue;}_0x6dae94[_0x43073b(0x275)](_0x324d04=>_0x403638[_0x43073b(0x27e)](_0x324d04))&&(_0x52d04f=!![]);const _0x2cb0aa=_0x3d0135(_0x403638);if(_0x2cb0aa){_0x2cb0aa['severity']===_0x43073b(0x3dd)?(_0x101de1[_0x43073b(0x4d1)](_0x2cb0aa),_0x398a75=_0x2cb0aa,_0x446070=0x0):_0x1cccd9[_0x43073b(0x4d1)]({'message':_0x2cb0aa['message'],'source':_0x2cb0aa[_0x43073b(0x448)]+':'+_0x2cb0aa[_0x43073b(0x397)]+':'+_0x2cb0aa['column']});continue;}const _0x21bc46=_0xebb564(_0x403638);if(_0x21bc46){_0x21bc46[_0x43073b(0x762)]===_0x43073b(0x696)?_0x1cccd9['push']({'message':_0x21bc46[_0x43073b(0x531)],'source':'linker'}):_0x101de1[_0x43073b(0x4d1)](_0x21bc46);_0x398a75=_0x21bc46,_0x446070=0x0;continue;}const _0x1841a6=_0x5c38b7(_0x403638);if(_0x1841a6){if('PDagQ'!==_0x43073b(0x43a))this['asyncStorageReadBuffer']['shift']();else{_0x1841a6[_0x43073b(0x762)]===_0x43073b(0x696)?_0x1cccd9['push']({'message':_0x1841a6[_0x43073b(0x531)],'source':'CocoaPods'}):(_0x101de1['push'](_0x1841a6),_0x398a75=_0x1841a6,_0x446070=0x0);continue;}}_0x398a75&&_0x446070<_0x5ba565&&(_0x398a75['message']+='\x0a'+_0x403638,_0x446070++);}return{'errors':_0x101de1,'warnings':_0x1cccd9,'buildFailed':_0x52d04f};}var _0xbd54e0=class{['currentStack']=[];['currentErrorMessage']='';['inStackTrace']=![];['currentKind']='metro-error';[_0xf8ecb6(0x981)](_0xbcacda){const _0x384b77=_0xf8ecb6,_0xcbf6b1=[],_0x5cb34e=[],_0x425ac0=_0x1ed32e=>{const _0x1af862=_0xc050;this['currentErrorMessage']&&(_0x1ed32e[_0x1af862(0x4d1)]({'message':this[_0x1af862(0x709)],'stack':this[_0x1af862(0x4f2)][_0x1af862(0x4ec)]('\x0a'),'timestamp':new Date()['toISOString'](),'kind':this['currentKind']}),this[_0x1af862(0x709)]='',this[_0x1af862(0x4f2)]=[],this['inStackTrace']=![],this['currentKind']=_0x1af862(0x87f));};for(const _0x32af46 of _0xbcacda){const _0x2ad5a5=_0x32af46[_0x384b77(0x668)](),_0x2e1253=_0x2ad5a5[_0x384b77(0x2f3)](_0x132cc2);if(_0x2e1253){_0x425ac0(_0xcbf6b1),_0xcbf6b1['push']({'message':'Unable\x20to\x20resolve\x20module\x20\x27'+_0x2e1253[0x1]+'\x27','stack':_0x2ad5a5,'timestamp':new Date()['toISOString'](),'kind':'metro-error'});continue;}if(_0x11406f['test'](_0x2ad5a5)){_0x425ac0(_0xcbf6b1),this['currentErrorMessage']='Metro\x20has\x20encountered\x20an\x20error',this['inStackTrace']=!![];continue;}const _0x4a355a=_0x2ad5a5[_0x384b77(0x2f3)](_0x21b248);if(_0x4a355a){_0x425ac0(_0xcbf6b1),this[_0x384b77(0x709)]=_0x384b77(0x619)+_0x4a355a[0x1],this[_0x384b77(0xabc)]=!![];continue;}const _0x4e993e=_0x2ad5a5[_0x384b77(0x2f3)](_0x2d1d38);if(_0x4e993e){_0x425ac0(_0xcbf6b1),this['currentErrorMessage']='Unhandled\x20JS\x20Exception:\x20'+_0x4e993e[0x1],this[_0x384b77(0xabc)]=!![];continue;}const _0x3c9a2e=_0x2ad5a5['match'](_0x2094e8);if(_0x3c9a2e){_0x425ac0(_0xcbf6b1),this['currentErrorMessage']=_0x3c9a2e[0x1]+':\x20'+_0x3c9a2e[0x2],this[_0x384b77(0xabc)]=!![];continue;}const _0x3c0832=_0x2ad5a5[_0x384b77(0x2f3)](_0x24d68b);if(_0x3c0832){_0x425ac0(_0xcbf6b1),this['currentErrorMessage']=_0x3c0832[0x2],this[_0x384b77(0x75f)]=_0x384b77(0x858),this[_0x384b77(0xabc)]=!![];continue;}_0x129dbd[_0x384b77(0x8aa)](_0x2ad5a5)&&(!this[_0x384b77(0x709)]&&(this[_0x384b77(0x709)]=_0x384b77(0x25f)),this['inStackTrace']=!![]);if(this['inStackTrace']){if(_0x2ad5a5[_0x384b77(0x746)]('at\x20')||_0x2ad5a5[_0x384b77(0x746)]('in\x20')||/^\s+at\s/[_0x384b77(0x8aa)](_0x32af46)||/^\d+\s*\|/[_0x384b77(0x8aa)](_0x2ad5a5)){this[_0x384b77(0x4f2)]['push'](_0x2ad5a5);continue;}else{if(_0x2ad5a5===''){_0x425ac0(_0xcbf6b1);continue;}else{this[_0x384b77(0x4f2)][_0x384b77(0x4d1)](_0x2ad5a5);continue;}}}(/^warn\s/i[_0x384b77(0x8aa)](_0x2ad5a5)||/\(WARN\)/['test'](_0x2ad5a5))&&_0x5cb34e['push']({'message':_0x2ad5a5[_0x384b77(0x42e)](/^warn\s*/i,'')['replace'](/\(WARN\)\s*/,''),'source':_0x384b77(0x6f4)});}return{'runtimeErrors':_0xcbf6b1,'warnings':_0x5cb34e};}[_0xf8ecb6(0x45d)](){const _0x1f734b=_0xf8ecb6,_0x5e8ece=[];return this[_0x1f734b(0x709)]&&(_0x5e8ece[_0x1f734b(0x4d1)]({'message':this[_0x1f734b(0x709)],'stack':this['currentStack']['join']('\x0a'),'timestamp':new Date()['toISOString'](),'kind':this['currentKind']}),this['currentErrorMessage']='',this['currentStack']=[],this[_0x1f734b(0xabc)]=![],this[_0x1f734b(0x75f)]=_0x1f734b(0x87f)),{'runtimeErrors':_0x5e8ece,'warnings':[]};}};function _0x58bf9c(_0x2c0808){const _0x23b365=_0xf8ecb6,_0x32c7f6=new _0xbd54e0(),_0x298aaf=_0x32c7f6[_0x23b365(0x981)](_0x2c0808),_0x52008f=_0x32c7f6[_0x23b365(0x45d)]();return{'runtimeErrors':[..._0x298aaf[_0x23b365(0x349)],..._0x52008f['runtimeErrors']],'warnings':[..._0x298aaf[_0x23b365(0x7a8)],..._0x52008f[_0x23b365(0x7a8)]]};}function _0xb4a0ad(_0x4b5f11){const _0x4ff7db=_0xf8ecb6,_0x3f3209=_0x4b5f11['trim']()[_0x4ff7db(0x5b5)]();if(_0x3f3209['startsWith']('error')||_0x3f3209['includes']('console.error')||_0x3f3209[_0x4ff7db(0x746)]('❌')||/^\s*error\s*:/i['test'](_0x4b5f11))return _0x4ff7db(0x3dd);if(_0x3f3209[_0x4ff7db(0x746)](_0x4ff7db(0xb20))||_0x3f3209['includes'](_0x4ff7db(0x9d6))||_0x3f3209['includes'](_0x4ff7db(0x5ce))||/^\s*warning\s*:/i['test'](_0x4b5f11))return _0x4ff7db(0xb20);return'log';}var _0x989afa=class{['buildProcess']=null;[_0xf8ecb6(0x659)]=null;[_0xf8ecb6(0x956)]=![];['metroKilled']=![];[_0xf8ecb6(0x81a)]=[];['metroOutput']=[];[_0xf8ecb6(0xa08)]=[];[_0xf8ecb6(0x349)]=[];['buildWarnings']=[];['metroWarnings']=[];[_0xf8ecb6(0x2db)]=new _0xbd54e0();['MAX_BUILD_LINES']=0x3e8;['MAX_METRO_LINES']=0x1f4;[_0xf8ecb6(0x903)]=0x64;[_0xf8ecb6(0x7f5)];[_0xf8ecb6(0x7c6)];constructor(_0x59a13a){const _0x1e25e6=_0xf8ecb6;this['cwd']=_0x59a13a,this[_0x1e25e6(0x7c6)]=join(_0x59a13a,_0x1e25e6(0x383));}async['detectProjectType'](){const _0x12d9c9=_0xf8ecb6;try{const _0x4e7749=join(this['cwd'],_0x12d9c9(0x8fb));await access(_0x4e7749);const _0x599f18=JSON['parse'](await(await import('fs/promises'))['readFile'](_0x4e7749,_0x12d9c9(0x827)));if(_0x599f18['expo'])return _0x12d9c9(0xadf)!==_0x12d9c9(0x7bc)?!![]:{'ok':![],'error':'VideoRecorder\x20already\x20stopped;\x20construct\x20a\x20fresh\x20recorder.'};}catch{}try{const _0x188875=join(this[_0x12d9c9(0x7f5)],'package.json'),_0x5dfa47=JSON[_0x12d9c9(0x981)](await(await import(_0x12d9c9(0x330)))[_0x12d9c9(0x4e4)](_0x188875,'utf-8'));if(_0x5dfa47['dependencies']?.[_0x12d9c9(0x982)])return!![];}catch{}return![];}async[_0xf8ecb6(0x5e3)](_0x4fac10){const _0x3a100e=_0xf8ecb6;try{await writeFile(this['errorFilePath'],JSON['stringify']({'timestamp':new Date()['toISOString'](),'errors':_0x4fac10[_0x3a100e(0x86b)](_0x14b562=>({'message':_0x14b562['message'],'stack':_0x14b562['stack'],'timestamp':_0x14b562[_0x3a100e(0x684)],'kind':_0x14b562[_0x3a100e(0xb14)]??_0x3a100e(0x87f),..._0x14b562[_0x3a100e(0x269)]!==void 0x0?{'url':_0x14b562['url']}:{},..._0x14b562[_0x3a100e(0x428)]!==void 0x0?{'status':_0x14b562['status']}:{},..._0x14b562['method']!==void 0x0?{'method':_0x14b562[_0x3a100e(0x33a)]}:{},..._0x14b562[_0x3a100e(0x270)]!==void 0x0?{'durationMs':_0x14b562['durationMs']}:{},..._0x14b562[_0x3a100e(0xa9a)]!==void 0x0?{'elementKey':_0x14b562['elementKey']}:{},..._0x14b562['prevText']!==void 0x0?{'prevText':_0x14b562[_0x3a100e(0x9a5)]}:{},..._0x14b562['nextText']!==void 0x0?{'nextText':_0x14b562[_0x3a100e(0x92a)]}:{}}))},null,0x2),_0x3a100e(0x827));}catch{}}async[_0xf8ecb6(0x564)](_0x48774d){const _0x3db681=_0xf8ecb6;this['runtimeErrors'][_0x3db681(0x4d1)](_0x48774d),this['capErrors'](this['runtimeErrors']),await this['writeErrorFile'](this[_0x3db681(0x349)]);}async[_0xf8ecb6(0x3a9)](){const _0x166bd5=_0xf8ecb6;try{await writeFile(this['errorFilePath'],JSON['stringify']({'timestamp':new Date()['toISOString'](),'errors':[]}),_0x166bd5(0x827));}catch{}}[_0xf8ecb6(0x2e0)](_0x3ecb6e,_0x1a4acc,_0x5cacd1){const _0x178a10=_0xf8ecb6;_0x3ecb6e['push'](_0x1a4acc),_0x3ecb6e[_0x178a10(0x3b7)]>_0x5cacd1&&_0x3ecb6e['splice'](0x0,_0x3ecb6e[_0x178a10(0x3b7)]-_0x5cacd1);}['capErrors'](_0x58853f){const _0x23ecdb=_0xf8ecb6;_0x58853f[_0x23ecdb(0x3b7)]>this[_0x23ecdb(0x903)]&&_0x58853f['splice'](0x0,_0x58853f['length']-this[_0x23ecdb(0x903)]);}async['killProcess'](_0x586fac){return new Promise(_0x619d58=>{const _0x58f1e8=_0xc050;if(!_0x586fac['pid']||_0x586fac['exitCode']!==null){_0x619d58();return;}let _0x58c999=null;const _0x2fa18c=setTimeout(()=>{const _0xf8b922=_0xc050;try{_0x586fac[_0xf8b922(0x6ee)](_0xf8b922(0x58f));}catch{}_0x58c999=setTimeout(()=>{_0x586fac['off']('exit',_0x18b6b9),_0x619d58();},0x7d0);},0x1388),_0x18b6b9=()=>{clearTimeout(_0x2fa18c);if(_0x58c999)clearTimeout(_0x58c999);_0x619d58();};_0x586fac[_0x58f1e8(0x6b8)]('exit',_0x18b6b9);try{_0x586fac[_0x58f1e8(0x6ee)]('SIGTERM');}catch{_0x586fac[_0x58f1e8(0x411)]('exit',_0x18b6b9),clearTimeout(_0x2fa18c),_0x619d58();return;}_0x586fac['exitCode']!==null&&(_0x586fac[_0x58f1e8(0x411)](_0x58f1e8(0x68c),_0x18b6b9),clearTimeout(_0x2fa18c),_0x619d58());});}[_0xf8ecb6(0x6c4)](){return new Promise(_0x11c1f6=>{const _0x531e16=_0xc050,_0x3a4f9f=[],_0xbf31a7=spawn(_0x531e16(0x484),[_0x531e16(0x982),_0x531e16(0x45a),'--clean'],{'cwd':this[_0x531e16(0x7f5)],'stdio':[_0x531e16(0x9fa),'pipe',_0x531e16(0x9e1)]}),_0x47d580=_0x39735c=>{const _0x5ea323=_0x531e16,_0x5a559f=_0x39735c['toString']();for(const _0x45d788 of _0x5a559f['split']('\x0a')){if(_0x45d788[_0x5ea323(0x668)]())_0x3a4f9f[_0x5ea323(0x4d1)](_0x45d788);}};_0xbf31a7[_0x531e16(0x790)]?.['on'](_0x531e16(0x78f),_0x47d580),_0xbf31a7[_0x531e16(0x910)]?.['on'](_0x531e16(0x78f),_0x47d580);let _0xdd418=![];_0xbf31a7['on']('error',_0x40c8ed=>{const _0x5291df=_0x531e16;if(_0xdd418)return;_0xdd418=!![],_0x11c1f6({'success':![],'output':_0x5291df(0xa76)+_0x40c8ed['message']});}),_0xbf31a7['on']('exit',_0x11eb78=>{const _0x28e5a9=_0x531e16;if(_0xdd418)return;_0xdd418=!![],_0x11c1f6({'success':_0x11eb78===0x0,'output':_0x3a4f9f[_0x28e5a9(0x4ec)]('\x0a')});});});}async['runBuild'](_0x1b8d12={}){const _0x5e9cba=_0xf8ecb6,_0x1254f0=await this[_0x5e9cba(0x72f)]();this[_0x5e9cba(0x402)]&&(this[_0x5e9cba(0x956)]=!![],await this[_0x5e9cba(0x2e1)](this[_0x5e9cba(0x402)]),this[_0x5e9cba(0x402)]=null);this[_0x5e9cba(0x956)]=![],this[_0x5e9cba(0x81a)]=[],this[_0x5e9cba(0xa08)]=[],this['buildWarnings']=[];if(_0x1b8d12[_0x5e9cba(0xa2d)]){if(!_0x1254f0)return{'success':![],'errors':[{'file':'','line':0x0,'message':'prebuild\x20--clean\x20is\x20only\x20available\x20for\x20Expo\x20projects.','type':'build'}],'warnings':[],'output':''};const _0x597589=await this[_0x5e9cba(0x6c4)]();if(!_0x597589['success']){if('qMevG'!=='SeLqA')return{'success':![],'errors':[{'file':'','line':0x0,'message':_0x5e9cba(0x949)+_0x597589['output'],'type':'build'}],'warnings':[],'output':_0x597589['output']};else{_0x395a67=_0x618365;const _0x4fc221=_0x5b70b4(_0x326c5b);if(_0x5eb255(_0x5dbd7a,_0x4fc221,_0x5268d4[_0x5e9cba(0x360)]))return null;}}for(const _0x4c9f56 of _0x597589[_0x5e9cba(0x9e9)][_0x5e9cba(0x51a)]('\x0a')){this['pushLine'](this[_0x5e9cba(0x81a)],_0x4c9f56,this['MAX_BUILD_LINES']);}}const _0x12bd0f=_0x1254f0?[_0x5e9cba(0x982),_0x5e9cba(0xb23)]:[_0x5e9cba(0x9f5),_0x5e9cba(0xa94)];return _0x1b8d12['device']&&_0x12bd0f[_0x5e9cba(0x4d1)](_0x1254f0?_0x5e9cba(0x68f):_0x5e9cba(0x6d9),_0x1b8d12[_0x5e9cba(0xad2)]),new Promise(_0x5c3e40=>{const _0xe6fb22=_0x5e9cba,_0x3536f1=spawn('npx',_0x12bd0f,{'cwd':this[_0xe6fb22(0x7f5)],'stdio':['ignore','pipe',_0xe6fb22(0x9e1)]});this[_0xe6fb22(0x402)]=_0x3536f1;const _0x1a9443=_0x1434ba=>{const _0x3e1d18=_0xe6fb22,_0x1e94b7=_0x1434ba[_0x3e1d18(0xafa)]();for(const _0x127b4d of _0x1e94b7[_0x3e1d18(0x51a)]('\x0a')){_0x127b4d['trim']()&&this['pushLine'](this[_0x3e1d18(0x81a)],_0x127b4d,this['MAX_BUILD_LINES']);}};_0x3536f1['stdout']?.['on']('data',_0x1a9443),_0x3536f1['stderr']?.['on'](_0xe6fb22(0x78f),_0x1a9443);let _0x30a095=![];_0x3536f1['on'](_0xe6fb22(0x3dd),_0x121eab=>{const _0xdadd20=_0xe6fb22;if(_0x30a095)return;_0x30a095=!![],this[_0xdadd20(0x402)]=null,_0x5c3e40({'success':![],'errors':[{'file':'','line':0x0,'message':'Failed\x20to\x20spawn\x20'+(_0x1254f0?'expo\x20run:ios':'react-native\x20run-ios')+':\x20'+_0x121eab['message'],'type':_0xdadd20(0xb1a)}],'warnings':[],'output':this['buildOutput']['join']('\x0a')});}),_0x3536f1['on']('exit',_0x543041=>{const _0x4c7179=_0xe6fb22;if(_0x30a095)return;_0x30a095=!![],this[_0x4c7179(0x402)]=null;if(this['buildKilled']){if('XCFmz'!=='XCFmz')void this[_0x4c7179(0xad4)][_0x4c7179(0x95e)]()['catch'](()=>void 0x0);else{_0x5c3e40({'success':![],'errors':[],'warnings':[],'output':'Build\x20was\x20cancelled.'});return;}}const _0x52dc9b=_0x330670(this[_0x4c7179(0x81a)]);this[_0x4c7179(0xa08)]=_0x52dc9b['errors'],this['buildWarnings']=_0x52dc9b[_0x4c7179(0x7a8)],this[_0x4c7179(0x541)](this[_0x4c7179(0xa08)]);const _0xc2b7cc=_0x543041===0x0&&!_0x52dc9b['buildFailed'];_0x5c3e40({'success':_0xc2b7cc,'errors':_0x52dc9b['errors']['map'](_0x517cb2=>({'file':_0x517cb2['file'],'line':_0x517cb2['line'],'message':_0x517cb2['message'],'type':_0x517cb2[_0x4c7179(0x45e)]})),'warnings':_0x52dc9b['warnings'],'output':this[_0x4c7179(0x81a)]['slice'](-0x64)[_0x4c7179(0x4ec)]('\x0a')});});});}async[_0xf8ecb6(0x1fd)](_0x4f8c39={}){const _0x3d38dd=_0xf8ecb6,_0x1cad27=await this[_0x3d38dd(0x72f)]();this[_0x3d38dd(0x659)]&&(this['metroKilled']=!![],await this[_0x3d38dd(0x2e1)](this[_0x3d38dd(0x659)]),this['metroProcess']=null);this[_0x3d38dd(0x92e)]=![],this['metroOutput']=[],this['runtimeErrors']=[],this['metroWarnings']=[],this['metroParser']=new _0xbd54e0();const _0x249954=_0x1cad27?['expo',_0x3d38dd(0x5cf),_0x3d38dd(0xb11)]:[_0x3d38dd(0x9f5),'start'];if(_0x4f8c39[_0x3d38dd(0x21a)]){if(_0x3d38dd(0x543)!=='YqoID')_0x249954[_0x3d38dd(0x4d1)]('--port',String(_0x4f8c39['port']));else return{'ok':![],'reason':'wda-not-ready','error':_0x3d38dd(0x653)+_0x5ce60d['summary']+'.','remediation':_0x39e362[_0x3d38dd(0x638)]};}return _0x4f8c39['clear']&&_0x249954[_0x3d38dd(0x4d1)](_0x1cad27?'--clear':'--reset-cache'),await this['clearErrorFile'](),new Promise(_0xbcc853=>{const _0xbc45db=_0x3d38dd,_0x30ccf0=spawn(_0xbc45db(0x484),_0x249954,{'cwd':this[_0xbc45db(0x7f5)],'stdio':[_0xbc45db(0x9fa),'pipe','pipe']});this['metroProcess']=_0x30ccf0;let _0x26fa95=![];const _0x21fed6=_0x2f91ad=>{const _0x3e534b=_0xbc45db,_0x3b40eb=_0x2f91ad[_0x3e534b(0xafa)](),_0x7a4456=[];for(const _0x1aac6f of _0x3b40eb['split']('\x0a')){_0x1aac6f['trim']()&&(this['pushLine'](this[_0x3e534b(0x6a5)],_0x1aac6f,this[_0x3e534b(0xadb)]),_0x7a4456['push'](_0x1aac6f));}if(_0x7a4456[_0x3e534b(0x3b7)]>0x0){const _0x21b21b=this[_0x3e534b(0x2db)][_0x3e534b(0x981)](_0x7a4456);if(_0x21b21b[_0x3e534b(0x349)]['length']>0x0){if(_0x3e534b(0x81e)==='FrAZl')this['runtimeErrors']['push'](..._0x21b21b[_0x3e534b(0x349)]),this[_0x3e534b(0x541)](this[_0x3e534b(0x349)]),this['writeErrorFile'](this[_0x3e534b(0x349)]);else try{_0x1aab61=this['bootSource'][_0x3e534b(0x5c4)]();}catch{_0x38fb7d=void 0x0;}}_0x21b21b[_0x3e534b(0x7a8)]['length']>0x0&&this[_0x3e534b(0x3ec)]['push'](..._0x21b21b['warnings']);}!_0x26fa95&&_0x3b40eb['includes'](_0x3e534b(0x515))&&(_0x26fa95=!![],_0xbcc853({'success':!![],'message':'Metro\x20dev\x20server\x20started\x20successfully.'}));};_0x30ccf0['stdout']?.['on'](_0xbc45db(0x78f),_0x21fed6),_0x30ccf0['stderr']?.['on']('data',_0x21fed6),_0x30ccf0['on'](_0xbc45db(0x3dd),_0x7abec3=>{const _0x87da3c=_0xbc45db;this['metroProcess']=null,!_0x26fa95&&(_0x26fa95=!![],_0xbcc853({'success':![],'message':_0x87da3c(0x9f1)+_0x7abec3[_0x87da3c(0x531)]}));}),_0x30ccf0['on']('exit',_0xf8a31d=>{const _0x116b22=_0xbc45db;this[_0x116b22(0x659)]=null;const _0xa30349=this['metroParser']['flush']();_0xa30349[_0x116b22(0x349)][_0x116b22(0x3b7)]>0x0&&(this['runtimeErrors'][_0x116b22(0x4d1)](..._0xa30349['runtimeErrors']),this['capErrors'](this[_0x116b22(0x349)]),this[_0x116b22(0x5e3)](this[_0x116b22(0x349)]));if(this['metroKilled']){!_0x26fa95&&(_0x26fa95=!![],_0xbcc853({'success':![],'message':'Metro\x20was\x20cancelled.'}));return;}!_0x26fa95&&(_0x26fa95=!![],_0xbcc853({'success':![],'message':'Metro\x20exited\x20unexpectedly\x20with\x20code\x20'+_0xf8a31d+'.'}));}),setTimeout(()=>{!_0x26fa95&&(_0x26fa95=!![],_0xbcc853({'success':!![],'message':'Metro\x20process\x20started\x20but\x20has\x20not\x20confirmed\x20readiness\x20yet.\x20It\x20may\x20still\x20be\x20initializing.\x20Use\x20rn_get_console\x20to\x20check.'}));},0x7530);});}['getErrors'](){const _0x5b381a=_0xf8ecb6,_0x2d4b0d=this[_0x5b381a(0x659)]===null?_0x58bf9c(this[_0x5b381a(0x6a5)]):{'runtimeErrors':[],'warnings':[]};return{'buildErrors':this['buildErrors']['map'](_0x1468a1=>({'file':_0x1468a1['file'],'line':_0x1468a1[_0x5b381a(0x397)],'column':_0x1468a1[_0x5b381a(0x5ab)],'message':_0x1468a1[_0x5b381a(0x531)],'severity':_0x1468a1[_0x5b381a(0x762)],'type':_0x1468a1['type']})),'runtimeErrors':this['runtimeErrors'][_0x5b381a(0x3b7)]>0x0?this['runtimeErrors']:_0x2d4b0d[_0x5b381a(0x349)],'warnings':[...this['buildWarnings'],...this[_0x5b381a(0x3ec)]]};}[_0xf8ecb6(0x7c5)](_0x50d561={}){const _0x3f5a92=_0xf8ecb6,{lines:lines=0x32,level:level='all'}=_0x50d561;let _0x9a5466=this[_0x3f5a92(0x6a5)];return level!=='all'&&(_0x9a5466=_0x9a5466[_0x3f5a92(0x529)](_0x45faa7=>{const _0x2732f3=_0xb4a0ad(_0x45faa7);return _0x2732f3===level;})),_0x9a5466[_0x3f5a92(0x795)](-lines);}async[_0xf8ecb6(0x95f)](){const _0x5552bf=_0xf8ecb6,_0x3c6b76=[];return this[_0x5552bf(0x402)]&&(this['buildKilled']=!![],await this[_0x5552bf(0x2e1)](this['buildProcess']),this[_0x5552bf(0x402)]=null,_0x3c6b76[_0x5552bf(0x4d1)]('build')),this[_0x5552bf(0x659)]&&(this[_0x5552bf(0x92e)]=!![],await this['killProcess'](this[_0x5552bf(0x659)]),this[_0x5552bf(0x659)]=null,_0x3c6b76['push']('metro')),_0x3c6b76;}['getBuildOutput'](){return[...this['buildOutput']];}['getMetroOutput'](){const _0x4e3306=_0xf8ecb6;return[...this[_0x4e3306(0x6a5)]];}};import{spawn as _0x465825}from'child_process';import{access as _0x480e06,readdir,readFile}from'fs/promises';import{join as _0x20ed6e}from'path';async function _0x10f2b2(_0x2d7e16){try{return await readFile(_0x2d7e16,'utf-8');}catch{return null;}}async function _0x2f0e95(_0x16cd92){const _0x390d8a=_0xf8ecb6,_0x2ff41a=_0x20ed6e(_0x16cd92,_0x390d8a(0x714),_0x390d8a(0x94f),'expo');try{await _0x480e06(_0x2ff41a);}catch{return null;}return new Promise(_0x492f56=>{const _0x4e1f4c=_0x390d8a;let _0x49a276='',_0x1d47e8;try{if(_0x4e1f4c(0x841)!==_0x4e1f4c(0x550))_0x1d47e8=_0x465825(_0x2ff41a,[_0x4e1f4c(0x2f7),'--json'],{'cwd':_0x16cd92,'stdio':[_0x4e1f4c(0x9fa),_0x4e1f4c(0x9e1),'pipe']});else{if(!_0x55907c||_0x1f3cfb[_0x4e1f4c(0x3b7)]===0x0)return _0x542d92;const _0x3ec1f9=_0x11781b(_0x428b95)?_0x21a822:_0x1aa06d(_0x2d1373,_0x5b5e0f),_0x24903d=_0x2269b1(_0xa40ea4,_0x3ec1f9),_0x199fa5=_0x24903d===''||_0x24903d!=='..'&&!_0x24903d[_0x4e1f4c(0x746)]('..'+_0x10137e)&&!_0x23f8fd(_0x24903d);return _0x199fa5?_0x224b73:_0x3ec1f9;}}catch{_0x492f56(null);return;}let _0x4f33df=![];const _0x30f5bf=_0x262b8e=>{if(_0x4f33df)return;_0x4f33df=!![],clearTimeout(_0x39e131),_0x492f56(_0x262b8e);},_0x39e131=setTimeout(()=>{const _0x225753=_0x4e1f4c;try{_0x1d47e8[_0x225753(0x6ee)]('SIGKILL');}catch{}_0x30f5bf(null);},0x3a98);_0x1d47e8[_0x4e1f4c(0x790)]?.['on'](_0x4e1f4c(0x78f),_0x4a47ea=>{const _0x523306=_0x4e1f4c;if(_0x523306(0xa20)===_0x523306(0xa20))_0x49a276+=_0x4a47ea['toString']();else return!![];}),_0x1d47e8['on'](_0x4e1f4c(0x3dd),()=>_0x30f5bf(null)),_0x1d47e8['on']('exit',_0x11e07f=>_0x30f5bf(_0x11e07f===0x0?_0x49a276:null));});}async function _0x54a67b(_0x4b00be){const _0x23ef71=_0xf8ecb6;let _0x21066c=null;try{const _0x37de6d=_0x20ed6e(_0x4b00be,_0x23ef71(0x6c9)),_0x23e10c=await readdir(_0x37de6d),_0x305d5a=_0x23e10c['find'](_0x42ff0b=>_0x42ff0b[_0x23ef71(0xaa5)]('.xcodeproj'));if(_0x305d5a)_0x21066c=_0x20ed6e(_0x37de6d,_0x305d5a);}catch{return null;}if(!_0x21066c)return null;return new Promise(_0x5049e3=>{const _0x3c26e6=_0x23ef71;let _0x47abea='',_0x445a03;try{_0x445a03=_0x465825('xcodebuild',['-showBuildSettings',_0x3c26e6(0x9b2),_0x3c26e6(0x919),_0x21066c],{'cwd':_0x4b00be,'stdio':[_0x3c26e6(0x9fa),'pipe','ignore']});}catch{_0x5049e3(null);return;}let _0x3ea21a=![];const _0x1a2590=_0x403323=>{if(_0x3ea21a)return;_0x3ea21a=!![],clearTimeout(_0xab7d0c),_0x5049e3(_0x403323);},_0xab7d0c=setTimeout(()=>{try{_0x445a03['kill']('SIGKILL');}catch{}_0x1a2590(null);},0x7530);_0x445a03['stdout']?.['on']('data',_0x4dc930=>{_0x47abea+=_0x4dc930['toString']();}),_0x445a03['on'](_0x3c26e6(0x3dd),()=>_0x1a2590(null)),_0x445a03['on']('exit',()=>{const _0x37b066=_0x3c26e6;_0x37b066(0x7f9)==='uBnBG'?_0x1a2590(_0x47abea[_0x37b066(0x668)]()['length']>0x0?_0x47abea:null):_0x249d1d[_0x37b066(0x93e)](_0x172b04[_0x37b066(0x930)],_0xb0aab3(_0x59cdb7,_0x4cf3fb));});});}var _0x4d4d3d={'readFileUtf8':_0x10f2b2,'runExpoConfig':_0x2f0e95,'runXcodeBuildSettings':_0x54a67b};function _0x21cbc9(_0x4e6bdc){const _0x408dc6=_0xf8ecb6;if(typeof _0x4e6bdc!=='string')return null;const _0x5f3c70=_0x4e6bdc['trim']();return _0x5f3c70[_0x408dc6(0x3b7)]>0x0?_0x5f3c70:null;}function _0x448516(_0x1796b0){const _0x11006f=_0xf8ecb6;if(_0x1796b0===null||typeof _0x1796b0!==_0x11006f(0x9e3))return null;const _0x3483cc=_0x1796b0,_0x3bacb0=_0x3483cc[_0x11006f(0x982)]&&typeof _0x3483cc[_0x11006f(0x982)]===_0x11006f(0x9e3)?_0x3483cc['expo']:void 0x0,_0x3e3f5a=_0x3bacb0&&_0x3bacb0['ios']&&typeof _0x3bacb0['ios']===_0x11006f(0x9e3)?_0x3bacb0[_0x11006f(0x6c9)]:void 0x0,_0x384d28=_0x21cbc9(_0x3e3f5a?.[_0x11006f(0x476)]);if(_0x384d28)return _0x384d28;const _0x1b8e50=_0x3483cc[_0x11006f(0x6c9)]&&typeof _0x3483cc['ios']==='object'?_0x3483cc['ios']:void 0x0;return _0x21cbc9(_0x1b8e50?.[_0x11006f(0x476)]);}function _0x3854c3(_0x57249d){const _0x321599=_0xf8ecb6;if(!Array['isArray'](_0x57249d))return null;const _0x1816c9=_0x57249d['map'](_0x49141f=>_0x49141f&&typeof _0x49141f==='object'?_0x49141f[_0x321599(0x4d6)]:null)[_0x321599(0x529)](_0xd65bda=>!!_0xd65bda&&typeof _0xd65bda==='object'&&!Array['isArray'](_0xd65bda)),_0x19a970=_0x1816c9[_0x321599(0x415)](_0x43b462=>_0x43b462[_0x321599(0x5b8)]===_0x321599(0x7b4)||_0x43b462[_0x321599(0x945)]==='com.apple.product-type.application');if(_0x19a970){const _0x4b1853=_0x21cbc9(_0x19a970[_0x321599(0x7bb)]);if(_0x4b1853)return _0x4b1853;}for(const _0xde2c4c of _0x1816c9){if(_0xde2c4c[_0x321599(0x5b8)]==='appex'||String(_0xde2c4c[_0x321599(0x945)]??'')['includes']('app-extension'))continue;const _0x38cd85=_0x21cbc9(_0xde2c4c[_0x321599(0x7bb)]);if(_0x38cd85&&!/\.(tests?|uitests?)$/i[_0x321599(0x8aa)](_0x38cd85))return _0x38cd85;}return null;}function _0x37c376(_0x2f9922){if(_0x2f9922===null)return null;try{return JSON['parse'](_0x2f9922);}catch{return null;}}async function _0x1d9f13(_0x506bc6,_0x2d0721){const _0x2202d6=_0xf8ecb6,_0x531f6d=_0x2d0721?.['readFileUtf8']??_0x4d4d3d['readFileUtf8'],_0x4498f2=_0x2d0721?.['runExpoConfig']??_0x4d4d3d['runExpoConfig'],_0x47cf7b=_0x2d0721?.['runXcodeBuildSettings']??_0x4d4d3d['runXcodeBuildSettings'];for(const _0x59cc7b of[_0x2202d6(0x8fb),'app.config.json']){try{const _0xe5c254=await _0x531f6d(_0x20ed6e(_0x506bc6,_0x59cc7b)),_0x3b75a3=_0x448516(_0x37c376(_0xe5c254));if(_0x3b75a3)return _0x3b75a3;}catch{}}try{const _0x57c9f7=await _0x4498f2(_0x506bc6),_0x4f21d8=_0x448516(_0x37c376(_0x57c9f7));if(_0x4f21d8)return _0x4f21d8;}catch{}try{const _0xcf32bd=await _0x47cf7b(_0x506bc6),_0x56c3d5=_0x3854c3(_0x37c376(_0xcf32bd));if(_0x56c3d5)return _0x56c3d5;}catch{}return null;}import{spawn as _0x3d47ce}from'child_process';function _0x3dce08(_0xc600eb,_0x597439,_0x2e21c5={}){return new Promise(_0x32b984=>{const _0x23caac=_0xc050;let _0x411726='',_0xe2daa1='',_0x44a15c;try{_0x44a15c=_0x3d47ce(_0xc600eb,_0x597439,{'stdio':['ignore','pipe','pipe']});}catch(_0x27c290){_0x32b984({'code':0x7f,'stdout':'','stderr':_0x27c290 instanceof Error?_0x27c290['message']:String(_0x27c290)});return;}const _0x5793c7=setTimeout(()=>{const _0x438435=_0xc050;if(_0x438435(0x5e5)===_0x438435(0x5e5))try{_0x438435(0x8ce)==='dXFjK'?_0x44a15c['kill'](_0x438435(0x58f)):(_0x40f5c0=_0x1b430a>=0x0?_0x413630:_0xdf8234,_0x237096=!![]);}catch{}else{if(_0x45b080 instanceof _0x33854b)return _0x3ccc91[_0x438435(0x531)];return _0x133d00(_0x911395);}},_0x2e21c5[_0x23caac(0x2f9)]??0x1f40);_0x44a15c['stdout']?.['on']('data',_0x104b50=>{_0x411726+=_0x104b50['toString']();}),_0x44a15c['stderr']?.['on']('data',_0x1a3df9=>{_0xe2daa1+=_0x1a3df9['toString']();});let _0x23728b=![];_0x44a15c['on']('error',_0x386672=>{if(_0x23728b)return;_0x23728b=!![],clearTimeout(_0x5793c7),_0x32b984({'code':0x7f,'stdout':_0x411726,'stderr':_0xe2daa1+(_0x386672['message']??String(_0x386672))});}),_0x44a15c['on']('exit',_0x557e13=>{if(_0x23728b)return;_0x23728b=!![],clearTimeout(_0x5793c7),_0x32b984({'code':_0x557e13??0x1,'stdout':_0x411726,'stderr':_0xe2daa1});});});}function _0x36c9a6(_0x5f32f4){const _0x25a421=_0xf8ecb6,_0x3647a0=(_0x5f32f4??'')['trim']()['toLowerCase']();if(_0x3647a0==='device')return _0x25a421(0xad2);if(_0x3647a0===_0x25a421(0x25a)||_0x3647a0===_0x25a421(0x377))return'simulator';return _0x25a421(0x279);}async function _0x3eac78(){const _0x1a29d3=_0xf8ecb6,_0x4e0595=await _0x3dce08('xcrun',['simctl','list',_0x1a29d3(0x6e2),'booted','-j']);if(_0x4e0595['code']!==0x0)return[];try{const _0x4deec3=JSON[_0x1a29d3(0x981)](_0x4e0595[_0x1a29d3(0x790)]),_0x295f6e=[],_0x42301a=_0x4deec3[_0x1a29d3(0x6e2)]??{};for(const [_0x47b126,_0x1ee6ef]of Object[_0x1a29d3(0x42a)](_0x42301a)){const _0x2c3d41=_0x47b126['toLowerCase']()['includes'](_0x1a29d3(0x6c9))||_0x47b126[_0x1a29d3(0x5b5)]()['includes'](_0x1a29d3(0x8d2));if(!_0x2c3d41)continue;if(!Array['isArray'](_0x1ee6ef))continue;for(const _0x3f3ce1 of _0x1ee6ef){if(!_0x3f3ce1['udid'])continue;if((_0x3f3ce1[_0x1a29d3(0x4bb)]??'')[_0x1a29d3(0x5b5)]()!==_0x1a29d3(0x232))continue;_0x295f6e[_0x1a29d3(0x4d1)]({'udid':_0x3f3ce1['udid'],'name':_0x3f3ce1[_0x1a29d3(0x9e5)]??_0x3f3ce1[_0x1a29d3(0x5a2)],'runtime':_0x3f3ce1['runtime']??_0x47b126});}}return _0x295f6e;}catch{return[];}}function _0x2efbb5(_0x3df98e){const _0x593272=/ServerURLHere->https?:\/\/[^:/\s]+:(\d{2,5})<-ServerURLHere/,_0x5df921=_0x593272['exec'](_0x3df98e);if(!_0x5df921)return null;const _0x3bf049=Number(_0x5df921[0x1]);if(!Number['isFinite'](_0x3bf049)||_0x3bf049<0x1||_0x3bf049>0xffff)return null;return _0x3bf049;}var _0x149113='http://localhost:8100';function _0x96f49d(_0x19d78b){const _0x5ad484=_0xf8ecb6;return _0x5ad484(0x9f4)+_0x19d78b;}var _0x3cf6c9=class{['apps'];['readPreference'];[_0xf8ecb6(0x4bf)]=null;[_0xf8ecb6(0x793)]=0x0;[_0xf8ecb6(0x536)];[_0xf8ecb6(0x91f)]=null;[_0xf8ecb6(0x61f)]=0x0;['simulatorWdaPort']=null;[_0xf8ecb6(0x83f)]=null;[_0xf8ecb6(0x2ec)]=null;[_0xf8ecb6(0x3af)]=new Set();[_0xf8ecb6(0xa62)]=new Map();[_0xf8ecb6(0x606)];constructor(_0x100e16={}){const _0x44b11d=_0xf8ecb6;this[_0x44b11d(0x508)]=_0x100e16['apps']??null,this['readPreference']=_0x100e16[_0x44b11d(0x2fc)]??(()=>_0x36c9a6(process.env.CERAPH_TARGET)),this['cacheTtlMs']=_0x100e16[_0x44b11d(0x536)]??0x1388,this['listBooted']=_0x100e16[_0x44b11d(0x606)]??_0x3eac78;}['setAppLifecycle'](_0xad9d1b){const _0x675a89=_0xf8ecb6;this[_0x675a89(0x508)]=_0xad9d1b,this['cached']=null,this['stateVersion']++;}['setSimulatorWdaPort'](_0x3d0f7f,_0x2880bb){const _0x54dd93=_0xf8ecb6;this['simulatorWdaPort']=_0x3d0f7f,this['simulatorWdaUdid']=_0x2880bb,this[_0x54dd93(0x4bf)]=null,this['stateVersion']++;}['clearSimulatorWdaPort'](){const _0x517d96=_0xf8ecb6;this['simulatorWdaPort']=null,this['simulatorWdaUdid']=null,this[_0x517d96(0x4bf)]=null,this['stateVersion']++;}[_0xf8ecb6(0x6cd)](){const _0x2ecf69=_0xf8ecb6;return this[_0x2ecf69(0x452)];}['getSimulatorWdaUdid'](){return this['simulatorWdaUdid'];}[_0xf8ecb6(0x3e7)](){this['cached']=null,this['stateVersion']++;}[_0xf8ecb6(0x600)](_0x4218f3){this['realDeviceHook']=_0x4218f3;}async['getBaseUrl'](){const _0x493426=_0xf8ecb6,_0x4b73f0=await this[_0x493426(0x62d)]();return _0x4b73f0[_0x493426(0xa51)];}async['getTarget'](){const _0x1efebe=_0xf8ecb6,_0x4636d8=await this[_0x1efebe(0x62d)]();return _0x4636d8[_0x1efebe(0xb00)];}async['resolve'](){const _0x443812=_0xf8ecb6;if(this[_0x443812(0x4bf)]&&this[_0x443812(0x536)]>0x0&&Date['now']()-this[_0x443812(0x793)]<this[_0x443812(0x536)])return this[_0x443812(0x4bf)];if(this['inflight'])return this['inflight'];const _0x4fab08=this['stateVersion'],_0xc4aef3=((async()=>{const _0x144725=_0x443812,_0x73e634=this[_0x144725(0x2fc)]();if(_0x73e634==='device'){const _0x2335d1=await this['apps']?.['getUdid']()??null;return{'target':_0x144725(0xad2),'udid':_0x2335d1,'baseUrl':_0x149113,'wdaReady':!![],'reason':'env-override-device'};}if(_0x73e634===_0x144725(0x25a)){const _0x2dfb03=await this['listBooted'](),_0x5396f9=this['simulatorWdaUdid']?_0x2dfb03['find'](_0x34e296=>_0x34e296[_0x144725(0x5a2)]===this['simulatorWdaUdid'])??_0x2dfb03[0x0]:_0x2dfb03[0x0],_0x7dc68c=_0x5396f9?.[_0x144725(0x5a2)]??this[_0x144725(0x83f)]??null,_0x3ece64=this[_0x144725(0x83f)]!==null&&_0x2dfb03[_0x144725(0x275)](_0x52c366=>_0x52c366['udid']===this['simulatorWdaUdid']),_0x59fac8=this['simulatorWdaPort']!==null&&this['simulatorWdaUdid']!==null&&_0x3ece64&&_0x7dc68c===this['simulatorWdaUdid'];return{'target':'simulator','udid':_0x7dc68c,'baseUrl':_0x59fac8?_0x96f49d(this['simulatorWdaPort']):_0x149113,'wdaReady':_0x59fac8,'reason':_0x144725(0x6fb)};}const [_0x4eb16b,_0x1b476f]=await Promise[_0x144725(0x2d4)]([this[_0x144725(0x508)]?.['getUdid']()??Promise['resolve'](null),this[_0x144725(0x606)]()]);if(_0x4eb16b)return _0x144725(0x7e7)==='dVBRd'?_0xc6245f(_0x144725(0x6f0),_0x6df8ea):{'target':'device','udid':_0x4eb16b,'baseUrl':_0x149113,'wdaReady':!![],'reason':'auto-prefer-device'};if(_0x1b476f[_0x144725(0x3b7)]>0x0){if('AzygZ'===_0x144725(0x872))return{'path':_0x4ccc3a(_0x40143e,_0x144725(0x5dc)),'shell':'bash'};else{const _0x357e5a=this['simulatorWdaUdid']?_0x1b476f['find'](_0x2e9a8f=>_0x2e9a8f[_0x144725(0x5a2)]===this['simulatorWdaUdid'])??_0x1b476f[0x0]:_0x1b476f[0x0],_0x41c0d2=this['simulatorWdaUdid']!==null&&_0x1b476f['some'](_0x59fc05=>_0x59fc05['udid']===this[_0x144725(0x83f)]),_0x5cec39=this['simulatorWdaPort']!==null&&this['simulatorWdaUdid']!==null&&_0x41c0d2&&_0x357e5a['udid']===this['simulatorWdaUdid'];return{'target':_0x144725(0x25a),'udid':_0x357e5a['udid'],'baseUrl':_0x5cec39?_0x96f49d(this['simulatorWdaPort']):_0x149113,'wdaReady':_0x5cec39,'reason':'auto-only-simulator'};}}return{'target':'device','udid':null,'baseUrl':_0x149113,'wdaReady':!![],'reason':'auto-no-target-found'};})());this[_0x443812(0x91f)]=_0xc4aef3;try{const _0x54bc75=await _0xc4aef3;this[_0x443812(0x61f)]===_0x4fab08&&(this[_0x443812(0x4bf)]=_0x54bc75,this[_0x443812(0x793)]=Date[_0x443812(0x2f8)]());if(this['realDeviceHook']&&_0x54bc75[_0x443812(0xb00)]==='device'&&_0x54bc75['udid']&&!this[_0x443812(0x3af)][_0x443812(0x979)](_0x54bc75[_0x443812(0x5a2)])&&!this[_0x443812(0xa62)]['has'](_0x54bc75[_0x443812(0x5a2)])){const _0xf1eccc=_0x54bc75[_0x443812(0x5a2)];this[_0x443812(0x3af)]['add'](_0xf1eccc);const _0x33a979=Promise[_0x443812(0x62d)]()[_0x443812(0x9c5)](()=>this[_0x443812(0x2ec)]?.(_0x54bc75))['catch'](()=>{})[_0x443812(0x7e8)](()=>{const _0x225043=_0x443812;'dbgZm'!==_0x225043(0x72d)?this[_0x225043(0xa62)]['delete'](_0xf1eccc):_0x406eb4[_0x225043(0x4d1)](_0xdf7f4f);});this[_0x443812(0xa62)]['set'](_0xf1eccc,_0x33a979);}return _0x54bc75;}finally{this[_0x443812(0x91f)]=null;}}async[_0xf8ecb6(0x46a)](_0x2f131e){const _0x5523ff=_0xf8ecb6,_0x2131a6=this[_0x5523ff(0xa62)][_0x5523ff(0x3fd)](_0x2f131e);if(_0x2131a6)await _0x2131a6;}['reset'](){const _0x3b664d=_0xf8ecb6;this[_0x3b664d(0x4bf)]=null,this[_0x3b664d(0x91f)]=null,this[_0x3b664d(0x452)]=null,this['simulatorWdaUdid']=null,this['realDeviceHookFiredFor'][_0x3b664d(0xa3e)](),this['realDeviceHookInflight']['clear'](),this[_0x3b664d(0x61f)]++;}},_0x53f410=0x1388,_0x70c5ce=class{['sessionId']=null;['pixelRatio']=null;['targetResolver'];[_0xf8ecb6(0xa13)]=null;['tapTransport']=null;constructor(_0x1a897c={}){const _0x2dfc95=_0xf8ecb6;this[_0x2dfc95(0x5c1)]=_0x1a897c['targetResolver']??new _0x3cf6c9();}async[_0xf8ecb6(0x3f3)](_0x7ba16d,_0x4db90c,_0x40b9ac){const _0x239392=_0xf8ecb6;if(this['tapTransport']!==_0x239392(0x2fa)){const _0x206c37=await this[_0x239392(0x995)](_0x7ba16d,[{'type':'pointer','id':_0x239392(0x911),'parameters':{'pointerType':'touch'},'actions':this['buildTapPointerActions'](_0x4db90c,_0x40b9ac)}]);if(_0x206c37){if('zNlYs'!=='hcxPd')return this['tapTransport']='actions',{'ok':!![]};else _0x2cb517['addEventListener'](_0x239392(0x95c),_0x551d5a,{'once':!![]});}if(this['tapTransport']===_0x239392(0x37a))return{'ok':![],'error':'WDA\x20actions\x20tap\x20failed'};}const _0x54f1c3=await this[_0x239392(0x9b0)](_0x239392(0x2aa)+_0x7ba16d+_0x239392(0x663),{'method':'POST','body':JSON[_0x239392(0x312)]({'x':_0x4db90c,'y':_0x40b9ac})});if(_0x54f1c3['ok'])return this['tapTransport']='legacy',{'ok':!![]};const _0x346bd3=await _0x54f1c3['text']()['catch'](()=>'unknown');return{'ok':![],'error':'WDA\x20tap\x20failed:\x20/actions\x20rejected\x20the\x20tap\x20and\x20legacy\x20/wda/tap/0\x20returned\x20'+_0x54f1c3[_0x239392(0x428)]+'\x20'+_0x346bd3};}async['snapshotTarget'](){const _0x3dafc3=_0xf8ecb6;try{const _0x1a6787=await this[_0x3dafc3(0x5c1)][_0x3dafc3(0x62d)]();return{'baseUrl':_0x1a6787[_0x3dafc3(0xa51)],'ready':_0x1a6787['wdaReady']};}catch{return{'baseUrl':_0x149113,'ready':!![]};}}async['wdaFetchAt'](_0x5b24ff,_0x2039cf,_0x414e72={},_0x12346c=_0x53f410){const _0x4f1dba=_0xf8ecb6,_0x7663d2=''+_0x5b24ff+_0x2039cf,_0x207a8a=new AbortController(),_0x2b4f26=setTimeout(()=>_0x207a8a[_0x4f1dba(0x95c)](),_0x12346c);try{const _0x314f07=await fetch(_0x7663d2,{..._0x414e72,'signal':_0x207a8a['signal'],'headers':{'Content-Type':'application/json',..._0x414e72['headers']}});return _0x314f07;}finally{clearTimeout(_0x2b4f26);}}async[_0xf8ecb6(0x9b0)](_0x4ca8f5,_0x474d31={},_0x2b55f4=_0x53f410){const _0x2b3705=await this['snapshotTarget']();if(!_0x2b3705['ready'])throw new Error('WDA\x20unavailable\x20—\x20call\x20rn_wda_start\x20first\x20if\x20testing\x20on\x20a\x20simulator.');const _0x53f2bd=this['sessionBaseUrl']??_0x2b3705['baseUrl'];return this['wdaFetchAt'](_0x53f2bd,_0x4ca8f5,_0x474d31,_0x2b55f4);}async['currentBaseUrl'](){const _0x570139=_0xf8ecb6;if(this['sessionBaseUrl'])return this[_0x570139(0xa13)];const _0x51ad78=await this['snapshotTarget']();return _0x51ad78[_0x570139(0xa51)];}async['isAvailable'](){const _0x206711=_0xf8ecb6,_0x5a3ac4=await this['snapshotTarget']();if(!_0x5a3ac4['ready'])return![];try{const _0x141003=await this['wdaFetchAt'](_0x5a3ac4[_0x206711(0xa51)],'/status');return _0x141003['ok'];}catch{return![];}}async['ensureSession'](){const _0x12588d=_0xf8ecb6,_0x122223=await this[_0x12588d(0x224)]();if(!_0x122223[_0x12588d(0x335)])throw new Error(_0x12588d(0x45f));const _0x31e03c=_0x122223['baseUrl'];this['sessionBaseUrl']&&this['sessionBaseUrl']!==_0x31e03c&&(this['sessionId']=null,this[_0x12588d(0x547)]=null);this[_0x12588d(0xa13)]=_0x31e03c;if(this['sessionId']){try{const _0x152a53=await this['wdaFetchAt'](_0x31e03c,'/session/'+this[_0x12588d(0x7dc)]);if(_0x152a53['ok'])return this['sessionId'];}catch{}this['sessionId']=null;}try{const _0x2a3a38=await this[_0x12588d(0x4c6)](_0x31e03c,'/status');if(_0x2a3a38['ok']){const _0x22bbd7=await _0x2a3a38['json'](),_0x3b80db=_0x22bbd7['sessionId']||_0x22bbd7[_0x12588d(0x39d)]?.[_0x12588d(0x7dc)];if(_0x3b80db)return'PuGyn'!==_0x12588d(0x60e)?(this[_0x12588d(0x7dc)]=_0x3b80db,_0x3b80db):_0x11901e(_0x12588d(0x7a1),_0x344ad3);}}catch{}const _0x1c7578=await this[_0x12588d(0x4c6)](_0x31e03c,_0x12588d(0xa64),{'method':'POST','body':JSON[_0x12588d(0x312)]({'capabilities':{'alwaysMatch':{}}})});if(!_0x1c7578['ok']){const _0x1fe312=await _0x1c7578['text']()['catch'](()=>_0x12588d(0x8b7));throw new Error(_0x12588d(0x3cb)+_0x1c7578['status']+'\x20'+_0x1fe312);}const _0x396b29=await _0x1c7578['json'](),_0x4a5f00=_0x396b29[_0x12588d(0x7dc)]||_0x396b29['value']?.['sessionId'];if(!_0x4a5f00)throw new Error(_0x12588d(0x2a6));return this['sessionId']=_0x4a5f00,_0x4a5f00;}async['getPixelRatio'](){const _0x222c1d=_0xf8ecb6;if(this['pixelRatio'])return this[_0x222c1d(0x547)];const _0x36d8f3=await this['ensureSession'](),_0x3faff6=await this[_0x222c1d(0x9b0)](_0x222c1d(0x2aa)+_0x36d8f3+'/window/size');if(!_0x3faff6['ok'])throw new Error(_0x222c1d(0x507)+_0x3faff6[_0x222c1d(0x428)]);const _0x33fe24=await _0x3faff6[_0x222c1d(0x2ea)](),_0x3e5285=_0x33fe24['value'][_0x222c1d(0xaa8)],_0x6b8a69=await this['wdaFetch'](_0x222c1d(0x2aa)+_0x36d8f3+_0x222c1d(0xad7));if(!_0x6b8a69['ok'])return this[_0x222c1d(0x547)]=0x3,this[_0x222c1d(0x547)];const _0x1e9c72=await _0x6b8a69['json'](),_0xb7841b=_0x1e9c72[_0x222c1d(0x39d)],_0x186664=Buffer['from'](_0xb7841b,_0x222c1d(0x343));if(_0x186664['length']<0x18)return this['pixelRatio']=0x3,this[_0x222c1d(0x547)];const _0x5228e4=_0x186664['readUInt32BE'](0x10);this['pixelRatio']=Math[_0x222c1d(0x281)](_0x5228e4/_0x3e5285);if(this[_0x222c1d(0x547)]<0x1||this['pixelRatio']>0x4){if(_0x222c1d(0x844)!==_0x222c1d(0x809))this['pixelRatio']=0x3;else{const _0x2fe2d5=_0x4ab1cd[_0x222c1d(0x212)];_0x2fe2d5&&(_0x218c47['videoRecorder']=null,void _0x2fe2d5['stop']()['catch'](_0x17a1bf=>{const _0x286d9c=_0x222c1d;_0x1274ab[_0x286d9c(0x910)]['write']('[ceraph]\x20video\x20recorder\x20eviction\x20stop\x20failed:\x20'+(_0x17a1bf instanceof _0x564f83?_0x17a1bf[_0x286d9c(0x531)]:_0xd7a551(_0x17a1bf))+'\x0a');})),this['runs'][_0x222c1d(0x265)](_0x15bec3);}}return this['pixelRatio'];}async[_0xf8ecb6(0x22d)](){const _0x2adf81=_0xf8ecb6,_0x2b2854=await this[_0x2adf81(0x8f0)](),_0x4bbf93=await this[_0x2adf81(0x9b0)]('/session/'+_0x2b2854+'/window/size');if(!_0x4bbf93['ok'])throw new Error(_0x2adf81(0x507)+_0x4bbf93[_0x2adf81(0x428)]);const _0x529320=await _0x4bbf93['json']();return _0x529320[_0x2adf81(0x39d)];}async[_0xf8ecb6(0x2cd)](_0x8936d,_0x4dc1a1,_0x234a50=!![]){const _0x5a2707=_0xf8ecb6;try{const _0x3641d0=await this[_0x5a2707(0x8f0)](),_0x22dd1c=await this['getPixelRatio'](),_0x1b56e1=_0x234a50?_0x8936d/_0x22dd1c:_0x8936d,_0x17e1c5=_0x234a50?_0x4dc1a1/_0x22dd1c:_0x4dc1a1,_0x4f1720=await this[_0x5a2707(0x3f3)](_0x3641d0,_0x1b56e1,_0x17e1c5);if(!_0x4f1720['ok'])return{'success':![],'tappedAt':{'x':_0x1b56e1,'y':_0x17e1c5},'pixelRatio':_0x22dd1c,'correction':_0x234a50?_0x5a2707(0x77f)+_0x22dd1c+'x:\x20('+_0x8936d+','+_0x4dc1a1+_0x5a2707(0x9f9)+_0x1b56e1[_0x5a2707(0x5c0)](0x1)+','+_0x17e1c5[_0x5a2707(0x5c0)](0x1)+')':_0x5a2707(0x75a),'error':_0x4f1720['error']??'WDA\x20tap\x20failed'};return{'success':!![],'tappedAt':{'x':_0x1b56e1,'y':_0x17e1c5},'pixelRatio':_0x22dd1c,'correction':_0x234a50?_0x5a2707(0x77f)+_0x22dd1c+'x:\x20('+_0x8936d+','+_0x4dc1a1+')\x20->\x20('+_0x1b56e1[_0x5a2707(0x5c0)](0x1)+','+_0x17e1c5['toFixed'](0x1)+')':'No\x20correction\x20(device\x20coordinates)'};}catch(_0x31e04a){return{'success':![],'tappedAt':{'x':_0x8936d,'y':_0x4dc1a1},'pixelRatio':this[_0x5a2707(0x547)]??0x0,'correction':'Failed\x20before\x20correction\x20could\x20be\x20applied','error':_0x31e04a instanceof Error?_0x31e04a['message']:_0x5a2707(0x64c)};}}async[_0xf8ecb6(0x31f)](_0x32ca31){const _0x37f631=_0xf8ecb6;try{const _0x459688=await this[_0x37f631(0x8f0)](),_0x4f7e48=await this[_0x37f631(0x9b0)](_0x37f631(0x2aa)+_0x459688+_0x37f631(0x959));if(!_0x4f7e48['ok'])return'YvgtB'!=='aBBwr'?{'success':![],'error':'Failed\x20to\x20get\x20element\x20tree:\x20'+_0x4f7e48['status']}:(_0x45877f={'result':_0x800668,'at':_0x1aff8c['now']()},_0x2c198d=null,_0x4a1a5b);const _0x13d259=await _0x4f7e48[_0x37f631(0x2ea)](),_0x6be875=_0x13d259[_0x37f631(0x39d)],_0x5e4b5e=this['searchElements'](_0x6be875,_0x32ca31);if(_0x5e4b5e['length']===0x0){const _0xc8d0ca=this['collectVisibleElements'](_0x6be875,0x32);return{'success':![],'matchCount':0x0,'availableElements':_0xc8d0ca,'error':_0x37f631(0x993)+JSON[_0x37f631(0x312)](_0x32ca31)};}const _0x459a75=_0x32ca31['index']??0x0;if(_0x459a75>=_0x5e4b5e['length'])return{'success':![],'matchCount':_0x5e4b5e[_0x37f631(0x3b7)],'error':'Index\x20'+_0x459a75+'\x20out\x20of\x20range.\x20Found\x20'+_0x5e4b5e[_0x37f631(0x3b7)]+_0x37f631(0x875),'availableElements':_0x5e4b5e['map'](_0x4d1a35=>({'type':_0x4d1a35[_0x37f631(0x45e)]??_0x37f631(0x6b2),'label':_0x4d1a35['label']??'','text':String(_0x4d1a35['value']??_0x4d1a35[_0x37f631(0x960)]??'')}))};const _0x582e3e=_0x5e4b5e[_0x459a75],_0x3889fb=_0x582e3e['rect'];if(!_0x3889fb)return{'success':![],'matchCount':_0x5e4b5e[_0x37f631(0x3b7)],'error':_0x37f631(0x35e)};const _0xf8ada7=_0x3889fb['x']+_0x3889fb['width']/0x2,_0x486a71=_0x3889fb['y']+_0x3889fb['height']/0x2,_0x188687=await this['tapAtPoint'](_0x459688,_0xf8ada7,_0x486a71);if(!_0x188687['ok'])return{'success':![],'matchCount':_0x5e4b5e[_0x37f631(0x3b7)],'error':_0x188687['error']??'WDA\x20tap\x20failed','element':{'type':_0x582e3e['type']??'unknown','label':_0x582e3e['label']??_0x582e3e['name']??'','bounds':_0x3889fb},'tappedAt':{'x':_0xf8ada7,'y':_0x486a71}};return{'success':!![],'matchCount':_0x5e4b5e['length'],'element':{'type':_0x582e3e['type']??_0x37f631(0x6b2),'label':_0x582e3e['label']??_0x582e3e['name']??'','bounds':_0x3889fb},'tappedAt':{'x':_0xf8ada7,'y':_0x486a71}};}catch(_0x175968){return{'success':![],'error':_0x175968 instanceof Error?_0x175968['message']:_0x37f631(0x33f)};}}async[_0xf8ecb6(0xa68)](_0x263451){const _0x2f9985=_0xf8ecb6;try{const _0x400adc=await this[_0x2f9985(0x8f0)](),_0x1e3da5=await this['wdaFetch']('/session/'+_0x400adc+_0x2f9985(0x959));if(!_0x1e3da5['ok'])return{'success':![],'error':_0x2f9985(0x73d)+_0x1e3da5[_0x2f9985(0x428)]};const _0x2f59e8=await _0x1e3da5['json'](),_0x586f32=this[_0x2f9985(0x82e)](_0x2f59e8['value'],_0x263451);if(_0x586f32['length']===0x0)return{'success':![],'matchCount':0x0};const _0x313d2e=_0x263451[_0x2f9985(0x977)]??0x0;if(_0x313d2e>=_0x586f32['length'])return{'success':![],'matchCount':_0x586f32['length']};return{'success':!![],'element':_0x586f32[_0x313d2e],'matchCount':_0x586f32['length']};}catch(_0x57e486){return{'success':![],'error':_0x57e486 instanceof Error?_0x57e486['message']:_0x2f9985(0x48f)};}}async[_0xf8ecb6(0x8b2)](_0x2207ab){const _0xc5de9a=_0xf8ecb6;try{const _0x5aef97=await this[_0xc5de9a(0x8f0)](),_0x47cd7b=await this['getWindowSize'](),_0x8e5c99=await this[_0xc5de9a(0xa03)](),_0x4f19b0=(_0x2207ab[_0xc5de9a(0x8f1)]??_0xc5de9a(0xad2))===_0xc5de9a(0x439);let _0x4a3594=_0x2207ab['from']?.['x']??_0x47cd7b['width']/0x2,_0x15e169=_0x2207ab['from']?.['y']??_0x47cd7b['height']/0x2;_0x4f19b0&&(_0x4a3594=_0x4a3594/_0x8e5c99,_0x15e169=_0x15e169/_0x8e5c99);const _0x24f5c1=_0x2207ab['direction']==='up'||_0x2207ab[_0xc5de9a(0x204)]==='down'?_0x47cd7b[_0xc5de9a(0x31d)]:_0x47cd7b[_0xc5de9a(0xaa8)],_0x4caac1=_0x2207ab['distancePx']??Math[_0xc5de9a(0x60f)](_0x24f5c1*0.6);let _0xbbacce=_0x4a3594,_0x43558d=_0x15e169;switch(_0x2207ab['direction']){case'up':_0x43558d=_0x15e169-_0x4caac1;break;case _0xc5de9a(0x44f):_0x43558d=_0x15e169+_0x4caac1;break;case _0xc5de9a(0x4a4):_0xbbacce=_0x4a3594-_0x4caac1;break;case _0xc5de9a(0x8cd):_0xbbacce=_0x4a3594+_0x4caac1;break;}_0xbbacce=Math['max'](0x0,Math['min'](_0x47cd7b['width']-0x1,_0xbbacce)),_0x43558d=Math[_0xc5de9a(0x553)](0x0,Math['min'](_0x47cd7b[_0xc5de9a(0x31d)]-0x1,_0x43558d)),_0x4a3594=Math['max'](0x0,Math['min'](_0x47cd7b[_0xc5de9a(0xaa8)]-0x1,_0x4a3594)),_0x15e169=Math['max'](0x0,Math[_0xc5de9a(0x488)](_0x47cd7b[_0xc5de9a(0x31d)]-0x1,_0x15e169));const _0x44f49b=_0x2207ab['durationMs']??0x12c,_0x300846=await this[_0xc5de9a(0x9b0)]('/session/'+_0x5aef97+_0xc5de9a(0xaa0),{'method':'POST','body':JSON['stringify']({'fromX':_0x4a3594,'fromY':_0x15e169,'toX':_0xbbacce,'toY':_0x43558d,'duration':_0x44f49b/0x3e8})});if(!_0x300846['ok']){if('SRYlj'!==_0xc5de9a(0x90f))return{'ok':![],'detail':'No\x20booted\x20simulator.','remediation':'Boot\x20a\x20simulator\x20(open\x20-a\x20Simulator),\x20or\x20connect\x20an\x20iPhone\x20via\x20USB-C,\x20then\x20retry.'};else{const _0x4ddcb1=await _0x300846['text']()['catch'](()=>_0xc5de9a(0x6b2));return{'success':![],'from':{'x':_0x4a3594,'y':_0x15e169},'to':{'x':_0xbbacce,'y':_0x43558d},'durationMs':_0x44f49b,'error':'WDA\x20swipe\x20failed:\x20'+_0x300846['status']+'\x20'+_0x4ddcb1};}}return{'success':!![],'from':{'x':_0x4a3594,'y':_0x15e169},'to':{'x':_0xbbacce,'y':_0x43558d},'durationMs':_0x44f49b};}catch(_0x1c4a00){return{'success':![],'from':{'x':0x0,'y':0x0},'to':{'x':0x0,'y':0x0},'durationMs':_0x2207ab['durationMs']??0x12c,'error':_0x1c4a00 instanceof Error?_0x1c4a00[_0xc5de9a(0x531)]:_0xc5de9a(0x342)};}}async['scrollToElement'](_0xebca5e,_0x465ca6={}){const _0x10a526=_0xf8ecb6,_0x479831=_0x465ca6[_0x10a526(0x589)]??0xa,_0x2a8d09=_0x465ca6[_0x10a526(0x204)]??'up';let _0x5e0e48=void 0x0;for(let _0x58224f=0x0;_0x58224f<=_0x479831;_0x58224f++){const _0x23993b=await this[_0x10a526(0xa68)](_0xebca5e);if(_0x23993b[_0x10a526(0x6d0)]&&_0x23993b['element']?.['rect'])return{'success':!![],'swipes':_0x58224f,'element':{'type':_0x23993b[_0x10a526(0x820)][_0x10a526(0x45e)]??'unknown','label':_0x23993b['element'][_0x10a526(0x960)]??_0x23993b['element']['name']??'','bounds':_0x23993b['element'][_0x10a526(0x24c)]}};_0x23993b['matchCount']!==void 0x0&&(_0x5e0e48=_0x5e0e48===void 0x0?_0x23993b['matchCount']:Math[_0x10a526(0x553)](_0x5e0e48,_0x23993b[_0x10a526(0x78d)]));if(_0x58224f===_0x479831)break;const _0x1ccc30=await this['swipe']({'direction':_0x2a8d09,'distancePx':_0x465ca6[_0x10a526(0xa28)]});if(!_0x1ccc30[_0x10a526(0x6d0)])return{'success':![],'swipes':_0x58224f,'error':_0x1ccc30[_0x10a526(0x3dd)]??_0x10a526(0x573)};}return{'success':![],'swipes':_0x479831,'matchCount':_0x5e0e48,'error':'Element\x20not\x20found\x20after\x20'+_0x479831+'\x20swipes:\x20'+JSON[_0x10a526(0x312)](_0xebca5e)};}async[_0xf8ecb6(0x45c)](_0x13864b,_0x6f4c5c,_0x3790c0=0x3e8,_0x5df0f1=![]){const _0x318ee4=_0xf8ecb6;try{const _0x5ada85=await this[_0x318ee4(0x8f0)]();let _0x4ce9f9=_0x13864b,_0x39ab2b=_0x6f4c5c;if(_0x5df0f1){const _0x4f4def=await this[_0x318ee4(0xa03)]();_0x4ce9f9=_0x13864b/_0x4f4def,_0x39ab2b=_0x6f4c5c/_0x4f4def;}const _0x2b4a14=await this['wdaFetch'](_0x318ee4(0x2aa)+_0x5ada85+_0x318ee4(0x4f0),{'method':_0x318ee4(0x513),'body':JSON['stringify']({'x':_0x4ce9f9,'y':_0x39ab2b,'duration':_0x3790c0/0x3e8})});if(!_0x2b4a14['ok']){const _0x108195=await _0x2b4a14['text']()[_0x318ee4(0x48b)](()=>_0x318ee4(0x6b2));return{'success':![],'error':'WDA\x20touchAndHold\x20failed:\x20'+_0x2b4a14[_0x318ee4(0x428)]+'\x20'+_0x108195};}return{'success':!![],'details':{'x':_0x4ce9f9,'y':_0x39ab2b,'durationMs':_0x3790c0}};}catch(_0x2decb8){return{'success':![],'error':_0x2decb8 instanceof Error?_0x2decb8['message']:'Unknown\x20error\x20during\x20longPress'};}}async['longPressElement'](_0xdfbe0d,_0x47eab2=0x3e8){const _0xa15ee8=_0xf8ecb6,_0x350ea0=await this[_0xa15ee8(0xa68)](_0xdfbe0d);if(!_0x350ea0[_0xa15ee8(0x6d0)]||!_0x350ea0[_0xa15ee8(0x820)]?.['rect'])return{'success':![],'matchCount':_0x350ea0['matchCount'],'error':_0x350ea0[_0xa15ee8(0x3dd)]??_0xa15ee8(0x4af)+JSON['stringify'](_0xdfbe0d)};const _0x304d07=_0x350ea0['element']['rect'],_0x1ea2d7=_0x304d07['x']+_0x304d07[_0xa15ee8(0xaa8)]/0x2,_0x16a821=_0x304d07['y']+_0x304d07['height']/0x2,_0x2a9639=await this['longPress'](_0x1ea2d7,_0x16a821,_0x47eab2,![]);return{..._0x2a9639,'matchCount':_0x350ea0[_0xa15ee8(0x78d)],'element':{'type':_0x350ea0['element'][_0xa15ee8(0x45e)]??_0xa15ee8(0x6b2),'label':_0x350ea0['element']['label']??_0x350ea0[_0xa15ee8(0x820)][_0xa15ee8(0x9e5)]??'','bounds':_0x304d07}};}async['type'](_0x520c04,_0x3138ab={}){const _0x4c0938=_0xf8ecb6;try{const _0x479861=await this['ensureSession'](),_0x39d84f=Array['from'](_0x520c04),_0x2fc953=await this['wdaFetch']('/session/'+_0x479861+_0x4c0938(0x644),{'method':_0x4c0938(0x513),'body':JSON[_0x4c0938(0x312)]({'value':_0x39d84f})});if(!_0x2fc953['ok']){const _0x3fd7e7=await _0x2fc953[_0x4c0938(0x3e0)]()[_0x4c0938(0x48b)](()=>'unknown');return{'success':![],'error':_0x4c0938(0x961)+_0x2fc953['status']+'\x20'+_0x3fd7e7};}return _0x3138ab[_0x4c0938(0x446)]&&await this[_0x4c0938(0x9b0)]('/session/'+_0x479861+'/wda/keys',{'method':_0x4c0938(0x513),'body':JSON['stringify']({'value':['\x0a']})})['catch'](()=>void 0x0),{'success':!![]};}catch(_0x5d186d){return{'success':![],'error':_0x5d186d instanceof Error?_0x5d186d['message']:'Unknown\x20error\x20during\x20type'};}}async['clearText'](_0x30e7fd){const _0x1de805=_0xf8ecb6;try{const _0xeeaffa=await this['findElement'](_0x30e7fd);if(!_0xeeaffa['success']||!_0xeeaffa['element']?.['rect'])return{'success':![],'error':_0xeeaffa['error']??'No\x20element\x20found\x20matching\x20'+JSON[_0x1de805(0x312)](_0x30e7fd)};const _0x3fc132=_0xeeaffa['element'][_0x1de805(0x24c)],_0x52c075=String(_0xeeaffa[_0x1de805(0x820)]['value']??'');if(_0x52c075[_0x1de805(0x3b7)]===0x0)return{'success':!![]};const _0x6f8b82=await this[_0x1de805(0x2cd)](_0x3fc132['x']+_0x3fc132[_0x1de805(0xaa8)]/0x2,_0x3fc132['y']+_0x3fc132[_0x1de805(0x31d)]/0x2,![]);if(!_0x6f8b82['success'])return{'success':![],'error':_0x6f8b82['error']??_0x1de805(0x954)};const _0x5154a3=new Array(_0x52c075['length'])['fill'](''),_0x57783f=await this['ensureSession'](),_0x1d18a2=await this['wdaFetch'](_0x1de805(0x2aa)+_0x57783f+'/wda/keys',{'method':_0x1de805(0x513),'body':JSON[_0x1de805(0x312)]({'value':_0x5154a3})});if(!_0x1d18a2['ok']){const _0x3fdd80=await _0x1d18a2[_0x1de805(0x3e0)]()[_0x1de805(0x48b)](()=>'unknown');return{'success':![],'error':_0x1de805(0x6f9)+_0x1d18a2[_0x1de805(0x428)]+'\x20'+_0x3fdd80};}return{'success':!![],'details':{'cleared':_0x52c075[_0x1de805(0x3b7)]}};}catch(_0x447629){return{'success':![],'error':_0x447629 instanceof Error?_0x447629['message']:'Unknown\x20error\x20during\x20clearText'};}}async[_0xf8ecb6(0x783)](_0xcbb4f5){const _0x42980a=_0xf8ecb6;try{const _0x16844a=await this['ensureSession']();if(_0xcbb4f5===_0x42980a(0x54a)){if('tVtZl'!=='pADWr'){const _0x59918f=await this['wdaFetch'](_0x42980a(0x2aa)+_0x16844a+_0x42980a(0x370),{'method':'POST','body':JSON['stringify']({})});if(!_0x59918f['ok']){const _0x285411=await _0x59918f[_0x42980a(0x3e0)]()[_0x42980a(0x48b)](()=>'unknown');return{'success':![],'error':'WDA\x20lock\x20failed:\x20'+_0x59918f[_0x42980a(0x428)]+'\x20'+_0x285411};}return{'success':!![]};}else{const _0x5de015=_0x2580be;return{'ok':!![],'session':_0x20a99c({'port':_0x5de015,'udid':_0x54c23e['udid'],'projectPath':_0x132d1b,'child':_0x3f2613,'output':_0x15b2d7})};}}if(_0xcbb4f5===_0x42980a(0xb1f))return await this[_0x42980a(0x539)]();if(_0xcbb4f5!==_0x42980a(0xa4a)&&_0xcbb4f5!=='volumeUp'&&_0xcbb4f5!=='volumeDown'){if(_0x42980a(0x391)==='wwNsR')return{'success':![],'error':'Unsupported\x20pressKey:\x20'+String(_0xcbb4f5)};else{const _0x5a2d8d=_0x2a1538(_0x1169cc[_0x42980a(0xb0d)][_0x552df6]);if(_0x5a2d8d)return{..._0x32b52d({'success':![],'error':'queries['+_0x22b750+_0x42980a(0x4f4)+_0x5a2d8d}),'isError':!![]};}}const _0x1c2816=_0xcbb4f5==='home'?_0x42980a(0xa4a):_0xcbb4f5==='volumeUp'?_0x42980a(0x63a):_0x42980a(0x9ba),_0xf274e2=await this['wdaFetch'](_0x42980a(0x2aa)+_0x16844a+'/wda/pressButton',{'method':_0x42980a(0x513),'body':JSON['stringify']({'name':_0x1c2816})});if(!_0xf274e2['ok']){if('epzbO'!==_0x42980a(0x648)){const _0x5c30fb=await _0xf274e2[_0x42980a(0x3e0)]()[_0x42980a(0x48b)](()=>_0x42980a(0x6b2));return{'success':![],'error':_0x42980a(0x620)+_0xf274e2[_0x42980a(0x428)]+'\x20'+_0x5c30fb};}else{_0x5e8c57['axCache'][_0x42980a(0x93e)](_0x32acc7,_0x32c16b[_0x42980a(0x997)][_0x42980a(0x76f)]());const _0x1a3392=this['screen']['findElementFromTree'](_0x558122,_0x429261),_0x3ddc45=_0x1a3392[0x0];if(_0x3ddc45?.[_0x42980a(0x24c)])return{'success':!![],'details':{'element':{'type':_0x3ddc45[_0x42980a(0x45e)]??'unknown','label':_0x3ddc45['label']??_0x3ddc45['name']??'','bounds':_0x3ddc45['rect']}}};return{'success':![],'error':'assertVisible:\x20element\x20not\x20visible:\x20'+_0x5b6272[_0x42980a(0x312)](_0xbfff91)};}}return{'success':!![]};}catch(_0x2d15b1){return{'success':![],'error':_0x2d15b1 instanceof Error?_0x2d15b1['message']:_0x42980a(0x7aa)};}}async['_systemBack'](){const _0x526143=_0xf8ecb6,_0x3a1b87=await this[_0x526143(0x8cc)]();if(_0x3a1b87){const _0x2c5630=_0x3a1b87['x']+_0x3a1b87['width']/0x2,_0x264d69=_0x3a1b87['y']+_0x3a1b87[_0x526143(0x31d)]/0x2,_0x2bf157=await this[_0x526143(0x8f0)](),_0x36a90e=await this[_0x526143(0x3f3)](_0x2bf157,_0x2c5630,_0x264d69);if(_0x36a90e['ok'])return{'success':!![],'details':{'method':_0x526143(0x217),'tappedAt':{'x':_0x2c5630,'y':_0x264d69}}};}const _0x1679e5=await this[_0x526143(0x22d)](),_0x343a7b=await this['swipe']({'direction':_0x526143(0x8cd),'from':{'x':0x0,'y':Math[_0x526143(0x60f)](_0x1679e5[_0x526143(0x31d)]/0x2)},'coordinateSource':_0x526143(0xad2)});return{'success':_0x343a7b['success'],'error':_0x343a7b['error'],'details':{'method':'edge-swipe','from':_0x343a7b[_0x526143(0x56c)],'to':_0x343a7b['to']}};}async[_0xf8ecb6(0x8cc)](){const _0x4e57a2=_0xf8ecb6,_0x7e7a3c=await this[_0x4e57a2(0x67e)]();if(!_0x7e7a3c[_0x4e57a2(0x6d0)]||!_0x7e7a3c[_0x4e57a2(0x40e)])return null;const _0x1138ef=await this[_0x4e57a2(0x22d)](),_0x391474=_0x1138ef[_0x4e57a2(0xaa8)]/0x2,_0x245524=0x8c,_0x132d43=[],_0x48bfbd=_0x593164=>{const _0x533b0d=_0x4e57a2,_0x33a15c=String(_0x593164['type']??''),_0x5368e5=_0x593164['rect'],_0x4974ce=_0x33a15c[_0x533b0d(0x5b5)]()['includes'](_0x533b0d(0x86e));if(_0x4974ce&&_0x5368e5&&typeof _0x5368e5['x']==='number'){const _0x8a5c56=_0x5368e5['x']<_0x391474&&_0x5368e5['y']<_0x245524;if(_0x8a5c56&&_0x5368e5['width']>0x0&&_0x5368e5[_0x533b0d(0x31d)]>0x0){const _0x2b4415=String(_0x593164[_0x533b0d(0x960)]??_0x593164['name']??'')['toLowerCase']();_0x132d43[_0x533b0d(0x4d1)]({'rect':_0x5368e5,'labelledBack':_0x2b4415['includes'](_0x533b0d(0xb1f))});}}const _0x81e20c=_0x593164[_0x533b0d(0x4e3)];if(Array['isArray'](_0x81e20c)){for(const _0x1421b6 of _0x81e20c)_0x48bfbd(_0x1421b6);}};_0x48bfbd(_0x7e7a3c[_0x4e57a2(0x40e)]);if(_0x132d43[_0x4e57a2(0x3b7)]===0x0)return null;return _0x132d43['sort']((_0x14ab6d,_0x4fd7cc)=>{const _0x1dd96e=_0x4e57a2;if(_0x14ab6d['labelledBack']!==_0x4fd7cc['labelledBack'])return _0x14ab6d['labelledBack']?-0x1:0x1;if(_0x14ab6d[_0x1dd96e(0x24c)]['x']!==_0x4fd7cc['rect']['x'])return _0x14ab6d[_0x1dd96e(0x24c)]['x']-_0x4fd7cc['rect']['x'];return _0x14ab6d['rect']['y']-_0x4fd7cc['rect']['y'];}),_0x132d43[0x0]['rect'];}async[_0xf8ecb6(0x6bb)](){const _0x2c0b96=_0xf8ecb6;try{const _0x2b827d=await this['ensureSession'](),_0x274a6e=await this[_0x2c0b96(0x9b0)]('/session/'+_0x2b827d+_0x2c0b96(0x6c1),{'method':_0x2c0b96(0x513),'body':JSON['stringify']({})});if(!_0x274a6e['ok']){const _0x30da0a=await _0x274a6e[_0x2c0b96(0x3e0)]()[_0x2c0b96(0x48b)](()=>_0x2c0b96(0x6b2));return{'success':![],'error':'WDA\x20unlock\x20failed:\x20'+_0x274a6e['status']+'\x20'+_0x30da0a};}return{'success':!![]};}catch(_0x53afce){if('Eslgl'==='fCgyy')_0x12cbc2['kill']('SIGTERM');else return{'success':![],'error':_0x53afce instanceof Error?_0x53afce[_0x2c0b96(0x531)]:_0x2c0b96(0x742)};}}async[_0xf8ecb6(0xaa6)](){const _0x398910=_0xf8ecb6;try{const _0x3d5d5a=await this[_0x398910(0x8f0)](),_0x525048=await this[_0x398910(0x9b0)](_0x398910(0x2aa)+_0x3d5d5a+'/wda/locked');if(!_0x525048['ok'])return null;const _0x488e98=await _0x525048[_0x398910(0x2ea)]();return typeof _0x488e98['value']==='boolean'?_0x488e98[_0x398910(0x39d)]:null;}catch{return null;}}async[_0xf8ecb6(0x439)](){const _0x81fe=_0xf8ecb6;try{const _0x40e184=await this[_0x81fe(0x8f0)](),_0x1fe8ca=await this['wdaFetch'](_0x81fe(0x2aa)+_0x40e184+_0x81fe(0xad7));if(!_0x1fe8ca['ok']){const _0xad2e15=await _0x1fe8ca['text']()[_0x81fe(0x48b)](()=>_0x81fe(0x6b2));return{'success':![],'error':'WDA\x20screenshot\x20failed:\x20'+_0x1fe8ca['status']+'\x20'+_0xad2e15};}const _0x685aeb=await _0x1fe8ca[_0x81fe(0x2ea)]();return{'success':!![],'base64':_0x685aeb['value']};}catch(_0x6b6c96){return{'success':![],'error':_0x6b6c96 instanceof Error?_0x6b6c96['message']:_0x81fe(0x735)};}}async[_0xf8ecb6(0x67e)](){const _0x1321c4=_0xf8ecb6;try{const _0x211770=await this['ensureSession'](),_0x40b578=await this[_0x1321c4(0x9b0)]('/session/'+_0x211770+'/source?format=json');if(!_0x40b578['ok']){const _0x2081d3=await _0x40b578['text']()['catch'](()=>'unknown');return{'success':![],'error':'WDA\x20source\x20failed:\x20'+_0x40b578[_0x1321c4(0x428)]+'\x20'+_0x2081d3};}const _0xf1a14a=await _0x40b578['json']();return{'success':!![],'source':_0xf1a14a['value']};}catch(_0x7a8ccf){return{'success':![],'error':_0x7a8ccf instanceof Error?_0x7a8ccf[_0x1321c4(0x531)]:'Unknown\x20error\x20during\x20getSource'};}}async['waitFor'](_0x37d2e9,_0x405067={}){const _0x3ebdc7=_0xf8ecb6,_0x4329f0=_0x405067['timeoutMs']??0x1388,_0x31a20e=_0x405067['pollIntervalMs']??0x96,_0x504583=_0x405067[_0x3ebdc7(0x440)]??![],_0x58305f=Date[_0x3ebdc7(0x2f8)]();while(Date[_0x3ebdc7(0x2f8)]()-_0x58305f<_0x4329f0){const _0x157ec9=await this['findElement'](_0x37d2e9),_0x3d3320=_0x157ec9[_0x3ebdc7(0x6d0)]&&!!_0x157ec9[_0x3ebdc7(0x820)];if(!_0x504583&&_0x3d3320){const _0x573b28=_0x157ec9['element'][_0x3ebdc7(0x24c)];return{'success':!![],'found':!![],'elapsedMs':Date['now']()-_0x58305f,'element':_0x573b28?{'type':_0x157ec9['element']['type']??_0x3ebdc7(0x6b2),'label':_0x157ec9[_0x3ebdc7(0x820)]['label']??_0x157ec9[_0x3ebdc7(0x820)][_0x3ebdc7(0x9e5)]??'','bounds':_0x573b28}:void 0x0};}if(_0x504583&&!_0x3d3320)return{'success':!![],'found':![],'elapsedMs':Date['now']()-_0x58305f};await new Promise(_0x39d32f=>setTimeout(_0x39d32f,_0x31a20e));}return{'success':![],'found':!_0x504583,'elapsedMs':Date[_0x3ebdc7(0x2f8)]()-_0x58305f,'error':_0x504583?'Element\x20still\x20visible\x20after\x20'+_0x4329f0+_0x3ebdc7(0x627)+JSON['stringify'](_0x37d2e9):_0x3ebdc7(0x7fb)+_0x4329f0+'ms:\x20'+JSON['stringify'](_0x37d2e9)};}async[_0xf8ecb6(0xa0b)](_0x2ee336){const _0x321cd0=_0xf8ecb6,_0x2df8e0=await this[_0x321cd0(0xa68)](_0x2ee336);if(_0x2df8e0[_0x321cd0(0x3dd)])return{'success':![],'visible':![],'error':_0x2df8e0['error']};if(_0x2df8e0[_0x321cd0(0x6d0)]&&_0x2df8e0['element']?.['rect'])return{'success':!![],'visible':!![],'element':{'type':_0x2df8e0[_0x321cd0(0x820)]['type']??'unknown','label':_0x2df8e0['element'][_0x321cd0(0x960)]??_0x2df8e0[_0x321cd0(0x820)][_0x321cd0(0x9e5)]??'','bounds':_0x2df8e0['element']['rect']}};return{'success':!![],'visible':![]};}async[_0xf8ecb6(0x88c)](_0x2f78e9){const _0x5285c4=_0xf8ecb6,_0x1c4c9a=await this['findElement'](_0x2f78e9);if(_0x1c4c9a[_0x5285c4(0x3dd)])return{'success':![],'visible':![],'error':_0x1c4c9a['error']};const _0x49f281=_0x1c4c9a['success']&&!!_0x1c4c9a['element'];return{'success':!![],'visible':_0x49f281};}async[_0xf8ecb6(0x491)](_0xdbc31c){const _0x2271c9=_0xf8ecb6;try{const _0x3519f7=_0xdbc31c??await this['ensureSession'](),_0x20224f=await this['wdaFetch']('/session/'+_0x3519f7+_0x2271c9(0x959));if(!_0x20224f['ok']){if('tPkzw'==='tPkzw'){if(!_0xdbc31c){this[_0x2271c9(0x7dc)]=null;const _0x413134=await this['ensureSession'](),_0x29a4ba=await this[_0x2271c9(0x9b0)]('/session/'+_0x413134+_0x2271c9(0x959));if(!_0x29a4ba['ok'])return null;const _0xd79fdd=await _0x29a4ba[_0x2271c9(0x2ea)]();return _0xd79fdd['value']??null;}return null;}else{const {response:_0x53f454,..._0x1afc2b}=_0x15a66d;return void _0x53f454,{'entry':_0x1afc2b,'matched':![],'bodyBytes':0x0};}}const _0x480789=await _0x20224f[_0x2271c9(0x2ea)]();return _0x480789[_0x2271c9(0x39d)]??null;}catch{return null;}}[_0xf8ecb6(0x4da)](_0x12af73,_0x30884b){return this['searchElements'](_0x12af73,_0x30884b);}async['findAndTapReturningTree'](_0x154304){const _0x38bf34=_0xf8ecb6;try{const _0x18d9f0=await this[_0x38bf34(0x8f0)](),_0x352dab=await this['fetchSourceTree'](_0x18d9f0);if(!_0x352dab)return{'result':{'success':![],'error':_0x38bf34(0x9b9)},'tree':null};const _0x321053=this[_0x38bf34(0x82e)](_0x352dab,_0x154304);if(_0x321053[_0x38bf34(0x3b7)]===0x0){const _0x343814=this[_0x38bf34(0xab8)](_0x352dab,0x32);return{'result':{'success':![],'matchCount':0x0,'availableElements':_0x343814,'error':'No\x20element\x20found\x20matching\x20query:\x20'+JSON['stringify'](_0x154304)},'tree':_0x352dab};}const _0x14fe7d=_0x154304['index']??0x0;if(_0x14fe7d>=_0x321053[_0x38bf34(0x3b7)])return{'result':{'success':![],'matchCount':_0x321053['length'],'error':'Index\x20'+_0x14fe7d+_0x38bf34(0x500)+_0x321053[_0x38bf34(0x3b7)]+_0x38bf34(0x875),'availableElements':_0x321053[_0x38bf34(0x86b)](_0x38b0ca=>({'type':_0x38b0ca[_0x38bf34(0x45e)]??'unknown','label':_0x38b0ca['label']??'','text':String(_0x38b0ca['value']??_0x38b0ca['label']??'')}))},'tree':_0x352dab};const _0x3e25f2=_0x321053[_0x14fe7d],_0x3e371e=_0x3e25f2[_0x38bf34(0x24c)];if(!_0x3e371e)return{'result':{'success':![],'matchCount':_0x321053[_0x38bf34(0x3b7)],'error':'Matched\x20element\x20has\x20no\x20bounds/rect\x20information.'},'tree':_0x352dab};const _0x4a60c5=_0x3e371e['x']+_0x3e371e[_0x38bf34(0xaa8)]/0x2,_0x471326=_0x3e371e['y']+_0x3e371e['height']/0x2,_0x585e33=await this['tapAtPoint'](_0x18d9f0,_0x4a60c5,_0x471326);if(!_0x585e33['ok'])return{'result':{'success':![],'matchCount':_0x321053['length'],'error':_0x585e33[_0x38bf34(0x3dd)]??'WDA\x20tap\x20failed','element':{'type':_0x3e25f2['type']??_0x38bf34(0x6b2),'label':_0x3e25f2['label']??_0x3e25f2['name']??'','bounds':_0x3e371e},'tappedAt':{'x':_0x4a60c5,'y':_0x471326}},'tree':_0x352dab};return{'result':{'success':!![],'matchCount':_0x321053[_0x38bf34(0x3b7)],'element':{'type':_0x3e25f2[_0x38bf34(0x45e)]??_0x38bf34(0x6b2),'label':_0x3e25f2[_0x38bf34(0x960)]??_0x3e25f2['name']??'','bounds':_0x3e371e},'tappedAt':{'x':_0x4a60c5,'y':_0x471326}},'tree':_0x352dab};}catch(_0x3e87e1){return{'result':{'success':![],'error':_0x3e87e1 instanceof Error?_0x3e87e1[_0x38bf34(0x531)]:'Unknown\x20error\x20during\x20findAndTapReturningTree'},'tree':null};}}async['sendW3CActions'](_0x534636,_0x1de3f1){const _0x5ac5f1=_0xf8ecb6;try{const _0x39f41e=await this['wdaFetch'](_0x5ac5f1(0x2aa)+_0x534636+'/actions',{'method':'POST','body':JSON['stringify']({'actions':_0x1de3f1})});return _0x39f41e['ok'];}catch{return![];}}[_0xf8ecb6(0x381)](_0xe5b316,_0x373432){const _0x3a6c02=_0xf8ecb6;return[{'type':'pointerMove','duration':0x0,'x':_0xe5b316,'y':_0x373432},{'type':'pointerDown','button':0x0},{'type':'pause','duration':0x32},{'type':_0x3a6c02(0x498),'button':0x0}];}async['tapAndVerify'](_0x460441,_0x31d519={}){const _0x1edd87=_0xf8ecb6;try{const _0x506c61=_0x31d519['sessionId']??await this[_0x1edd87(0x8f0)](),_0x2b9cff=await this[_0x1edd87(0x491)](_0x506c61);if(!_0x2b9cff)return{'success':![],'error':_0x1edd87(0x9b9),'batched':![]};const _0x1b26a7=this[_0x1edd87(0x82e)](_0x2b9cff,_0x460441);if(_0x1b26a7['length']===0x0)return{'success':![],'error':'No\x20element\x20found\x20matching\x20query:\x20'+JSON['stringify'](_0x460441),'batched':![]};const _0x2b31b2=_0x460441[_0x1edd87(0x977)]??0x0,_0xe7abbd=_0x1b26a7[_0x2b31b2];if(!_0xe7abbd||!_0xe7abbd[_0x1edd87(0x24c)])return{'success':![],'error':_0x2b31b2>=_0x1b26a7[_0x1edd87(0x3b7)]?_0x1edd87(0x41c)+_0x2b31b2+_0x1edd87(0x500)+_0x1b26a7[_0x1edd87(0x3b7)]+'\x20matching\x20element(s).':_0x1edd87(0x35e),'batched':![]};const _0x2d6f8d=_0xe7abbd['rect'],_0x14d918=_0x2d6f8d['x']+_0x2d6f8d['width']/0x2,_0x221f50=_0x2d6f8d['y']+_0x2d6f8d[_0x1edd87(0x31d)]/0x2,_0x133557={'type':_0xe7abbd['type']??_0x1edd87(0x6b2),'label':_0xe7abbd[_0x1edd87(0x960)]??_0xe7abbd['name']??'','bounds':_0x2d6f8d},_0x5969ca=await this[_0x1edd87(0x995)](_0x506c61,[{'type':_0x1edd87(0x230),'id':_0x1edd87(0x911),'parameters':{'pointerType':_0x1edd87(0x36f)},'actions':this['buildTapPointerActions'](_0x14d918,_0x221f50)}]);let _0x28972a=_0x5969ca;if(!_0x5969ca){const _0x4c3b16=await this[_0x1edd87(0x2cd)](_0x14d918,_0x221f50,![]);if(!_0x4c3b16[_0x1edd87(0x6d0)])return{'success':![],'error':_0x4c3b16['error']??_0x1edd87(0x23c),'element':_0x133557,'tappedAt':{'x':_0x14d918,'y':_0x221f50},'batched':![]};_0x28972a=![];}let _0x2faa1d,_0x2f62ab,_0x5d5026=!![];if(_0x31d519[_0x1edd87(0x291)]){let _0xc94756,_0x2a4728;if(_0x31d519['sessionId']){const _0x17b0e3=Date['now']()+0xbb8;for(;;){const _0x3d4c31=await this['fetchSourceTree'](_0x31d519[_0x1edd87(0x7dc)]);if(_0x3d4c31){const _0x49f954=this[_0x1edd87(0x82e)](_0x3d4c31,_0x31d519['verifySelector']);if(_0x49f954[_0x1edd87(0x3b7)]>0x0&&_0x49f954[0x0]){_0xc94756=_0x49f954[0x0];break;}}if(Date[_0x1edd87(0x2f8)]()>=_0x17b0e3){_0x2a4728=_0x3d4c31?'Element\x20not\x20visible\x20after\x203000ms:\x20'+JSON['stringify'](_0x31d519['verifySelector']):'Failed\x20to\x20get\x20element\x20tree\x20on\x20the\x20pinned\x20session';break;}await new Promise(_0x438135=>setTimeout(_0x438135,0x1f4));}_0x2faa1d={'visible':!!_0xc94756,'element':_0xc94756&&_0xc94756['rect']?{'type':_0xc94756['type']??_0x1edd87(0x6b2),'label':_0xc94756['label']??_0xc94756[_0x1edd87(0x9e5)]??'','bounds':_0xc94756['rect']}:void 0x0},_0x5d5026=!!_0xc94756,!_0x5d5026&&(_0x2f62ab='tap\x20succeeded\x20but\x20post-tap\x20verify\x20failed:\x20'+_0x2a4728);}else{const _0x34b897=await this[_0x1edd87(0x588)](_0x31d519[_0x1edd87(0x291)],{'timeoutMs':0xbb8});_0x2faa1d={'visible':_0x34b897['found']&&_0x34b897[_0x1edd87(0x6d0)],'element':_0x34b897[_0x1edd87(0x820)]},_0x5d5026=_0x34b897[_0x1edd87(0x6d0)]&&_0x34b897['found'],!_0x5d5026&&(_0x2f62ab=_0x1edd87(0xa15)+(_0x34b897[_0x1edd87(0x3dd)]??'expected\x20element\x20'+JSON['stringify'](_0x31d519['verifySelector'])+_0x1edd87(0x69c)));}}return{'success':_0x5d5026,'element':_0x133557,'tappedAt':{'x':_0x14d918,'y':_0x221f50},'verifyResult':_0x2faa1d,'batched':_0x28972a,..._0x2f62ab?{'error':_0x2f62ab}:{}};}catch(_0x3d50a1){return{'success':![],'error':_0x3d50a1 instanceof Error?_0x3d50a1['message']:'Unknown\x20error\x20during\x20tapAndVerify','batched':![]};}}async[_0xf8ecb6(0x38c)](_0x124174,_0x11e7db,_0x57b8cd={}){const _0xeb9b5e=_0xf8ecb6;try{const _0x542714=await this[_0xeb9b5e(0x8f0)](),_0x3be9d6=await this[_0xeb9b5e(0x491)](_0x542714);if(!_0x3be9d6)return{'success':![],'error':'Failed\x20to\x20get\x20element\x20tree','batched':![]};const _0x5bfd53=this['searchElements'](_0x3be9d6,_0x124174);if(_0x5bfd53['length']===0x0)return{'success':![],'matchCount':0x0,'error':_0xeb9b5e(0x3a7)+JSON[_0xeb9b5e(0x312)](_0x124174),'batched':![]};const _0x1ad334=_0x124174[_0xeb9b5e(0x977)]??0x0,_0x1ffcc9=_0x5bfd53[_0x1ad334];if(!_0x1ffcc9||!_0x1ffcc9['rect'])return{'success':![],'matchCount':_0x5bfd53['length'],'error':_0x1ad334>=_0x5bfd53['length']?'Index\x20'+_0x1ad334+_0xeb9b5e(0x500)+_0x5bfd53['length']+'\x20matching\x20element(s).':_0xeb9b5e(0x35e),'batched':![]};const _0x3402d1=_0x1ffcc9[_0xeb9b5e(0x24c)],_0x429f45=_0x3402d1['x']+_0x3402d1[_0xeb9b5e(0xaa8)]/0x2,_0x55dc2d=_0x3402d1['y']+_0x3402d1[_0xeb9b5e(0x31d)]/0x2,_0x5acdc3={'type':_0x1ffcc9[_0xeb9b5e(0x45e)]??_0xeb9b5e(0x6b2),'label':_0x1ffcc9[_0xeb9b5e(0x960)]??_0x1ffcc9['name']??'','bounds':_0x3402d1};if(_0x57b8cd[_0xeb9b5e(0x9f8)]){const _0x388a63=await this['clearText'](_0x124174);if(!_0x388a63[_0xeb9b5e(0x6d0)])return{'success':![],'matchCount':_0x5bfd53['length'],'element':_0x5acdc3,'error':_0x388a63[_0xeb9b5e(0x3dd)]??_0xeb9b5e(0x931),'batched':![]};}const _0x2e6430=Array['from'](_0x11e7db),_0x5d3569=[],_0x352be2=0x4;for(let _0x5c76a2=0x0;_0x5c76a2<_0x352be2;_0x5c76a2++){_0x5d3569['push']({'type':'pause','duration':0x0});}_0x5d3569[_0xeb9b5e(0x4d1)]({'type':'pause','duration':0x12c});for(const _0x6316d9 of _0x2e6430){_0x5d3569[_0xeb9b5e(0x4d1)]({'type':_0xeb9b5e(0x848),'value':_0x6316d9}),_0x5d3569['push']({'type':_0xeb9b5e(0x254),'value':_0x6316d9});}const _0x13a48a=await this[_0xeb9b5e(0x995)](_0x542714,[{'type':_0xeb9b5e(0x230),'id':'finger1','parameters':{'pointerType':_0xeb9b5e(0x36f)},'actions':this[_0xeb9b5e(0x381)](_0x429f45,_0x55dc2d)},{'type':'key','id':_0xeb9b5e(0xa1d),'actions':_0x5d3569}]);if(_0x13a48a)return{'success':!![],'matchCount':_0x5bfd53[_0xeb9b5e(0x3b7)],'element':_0x5acdc3,'batched':!![]};const _0x50593f=await this[_0xeb9b5e(0x31f)](_0x124174);if(!_0x50593f[_0xeb9b5e(0x6d0)])return{'success':![],'matchCount':_0x5bfd53[_0xeb9b5e(0x3b7)],'element':_0x5acdc3,'error':_0x50593f['error']??'Failed\x20to\x20focus\x20field\x20(serial\x20fallback)','batched':![]};const _0x1703a9=await this['type'](_0x11e7db);if(!_0x1703a9['success'])return _0xeb9b5e(0x6e3)==='unEWq'?{'success':![],'matchCount':_0x5bfd53['length'],'element':_0x5acdc3,'error':_0x1703a9[_0xeb9b5e(0x3dd)]??'Failed\x20to\x20type\x20text\x20(serial\x20fallback)','batched':![]}:_0x3ccbb2['toLowerCase']()[_0xeb9b5e(0x42e)](/[^a-z0-9]+/g,'-')['replace'](/^-+|-+$/g,'')[_0xeb9b5e(0x795)](0x0,0x50)||'flow';return{'success':!![],'matchCount':_0x5bfd53['length'],'element':_0x5acdc3,'batched':![]};}catch(_0x3439a3){if('mwkxp'!==_0xeb9b5e(0x91e))return{'success':![],'error':_0x3439a3 instanceof Error?_0x3439a3[_0xeb9b5e(0x531)]:_0xeb9b5e(0xa8b),'batched':![]};else{const _0x326437=_0x275c18(_0x9f0b6f);return _0x326437[0x0]??null;}}}async['tapChain'](_0x1a76cd){const _0x5860dc=_0xf8ecb6;if(_0x1a76cd['length']===0x0)return{'success':![],'results':[],'batched':![],'error':'tapChain\x20called\x20with\x20empty\x20queries\x20array'};try{const _0x15b694=await this[_0x5860dc(0x8f0)](),_0x3c8345=await this['fetchSourceTree'](_0x15b694);if(!_0x3c8345)return{'success':![],'results':[],'batched':![],'error':_0x5860dc(0x9b9)};const _0x3b446e=[];for(const _0x160276 of _0x1a76cd){const _0x593e48=this[_0x5860dc(0x82e)](_0x3c8345,_0x160276);if(_0x593e48['length']===0x0)return{'success':![],'results':[..._0x3b446e['map'](_0x19e4bc=>({'query':_0x19e4bc[_0x5860dc(0x48c)],'element':_0x19e4bc['element'],'tappedAt':_0x19e4bc[_0x5860dc(0x386)]})),{'query':_0x160276,'error':'No\x20element\x20found\x20matching\x20query:\x20'+JSON['stringify'](_0x160276)}],'batched':![],'error':_0x5860dc(0x6b4)+_0x3b446e[_0x5860dc(0x3b7)]};const _0x539b4e=_0x160276[_0x5860dc(0x977)]??0x0,_0x5bbe52=_0x593e48[_0x539b4e];if(!_0x5bbe52||!_0x5bbe52['rect'])return{'success':![],'results':[..._0x3b446e[_0x5860dc(0x86b)](_0x10488b=>({'query':_0x10488b[_0x5860dc(0x48c)],'element':_0x10488b['element'],'tappedAt':_0x10488b[_0x5860dc(0x386)]})),{'query':_0x160276,'error':_0x539b4e>=_0x593e48[_0x5860dc(0x3b7)]?_0x5860dc(0x41c)+_0x539b4e+_0x5860dc(0x500)+_0x593e48['length']+_0x5860dc(0x875):_0x5860dc(0x35e)}],'batched':![],'error':'Resolution\x20failed\x20for\x20query\x20at\x20index\x20'+_0x3b446e[_0x5860dc(0x3b7)]};_0x3b446e['push']({'query':_0x160276,'element':{'type':_0x5bbe52[_0x5860dc(0x45e)]??'unknown','label':_0x5bbe52['label']??_0x5bbe52['name']??'','bounds':_0x5bbe52[_0x5860dc(0x24c)]},'center':{'x':_0x5bbe52['rect']['x']+_0x5bbe52['rect'][_0x5860dc(0xaa8)]/0x2,'y':_0x5bbe52['rect']['y']+_0x5bbe52['rect']['height']/0x2}});}const _0x1f5d0b=[];for(let _0x484232=0x0;_0x484232<_0x3b446e[_0x5860dc(0x3b7)];_0x484232++){if(_0x5860dc(0x608)===_0x5860dc(0x91b))return;else{const _0x2bd2e6=_0x3b446e[_0x484232];_0x1f5d0b[_0x5860dc(0x4d1)](...this[_0x5860dc(0x381)](_0x2bd2e6[_0x5860dc(0x386)]['x'],_0x2bd2e6['center']['y'])),_0x484232<_0x3b446e['length']-0x1&&_0x1f5d0b['push']({'type':'pause','duration':0x64});}}const _0x932282=await this['sendW3CActions'](_0x15b694,[{'type':_0x5860dc(0x230),'id':'finger1','parameters':{'pointerType':_0x5860dc(0x36f)},'actions':_0x1f5d0b}]);if(_0x932282)return{'success':!![],'results':_0x3b446e['map'](_0x469d41=>({'query':_0x469d41[_0x5860dc(0x48c)],'element':_0x469d41['element'],'tappedAt':_0x469d41[_0x5860dc(0x386)]})),'batched':!![]};const _0x4658fd=[];for(const _0x5a873e of _0x3b446e){const _0xa1d49c=await this['tap'](_0x5a873e['center']['x'],_0x5a873e[_0x5860dc(0x386)]['y'],![]);if(!_0xa1d49c['success'])return _0x4658fd[_0x5860dc(0x4d1)]({'query':_0x5a873e['query'],'element':_0x5a873e['element'],'tappedAt':_0x5a873e['center'],'error':_0xa1d49c[_0x5860dc(0x3dd)]??_0x5860dc(0x449)}),{'success':![],'results':_0x4658fd,'batched':![],'error':'Serial\x20fallback\x20tap\x20failed\x20at\x20index\x20'+(_0x4658fd['length']-0x1)};_0x4658fd['push']({'query':_0x5a873e[_0x5860dc(0x48c)],'element':_0x5a873e[_0x5860dc(0x820)],'tappedAt':_0x5a873e[_0x5860dc(0x386)]});}return{'success':!![],'results':_0x4658fd,'batched':![]};}catch(_0x5c2893){return{'success':![],'results':[],'batched':![],'error':_0x5c2893 instanceof Error?_0x5c2893['message']:'Unknown\x20error\x20during\x20tapChain'};}}async[_0xf8ecb6(0x496)](){const _0x3d4b4b=_0xf8ecb6;try{const _0x18d17c=await this['ensureSession'](),_0x2e2ab8=await this[_0x3d4b4b(0x9b0)]('/session/'+_0x18d17c+_0x3d4b4b(0x603));if(!_0x2e2ab8['ok'])return null;const _0x2da63f=await _0x2e2ab8['json']();return _0x2da63f['value']??null;}catch{return null;}}async['setOrientation'](_0x4b1b84){const _0x21ad24=_0xf8ecb6;try{const _0x4695fb=await this['ensureSession'](),_0xb6eb90=await this[_0x21ad24(0x9b0)](_0x21ad24(0x2aa)+_0x4695fb+_0x21ad24(0x603),{'method':_0x21ad24(0x513),'body':JSON['stringify']({'orientation':_0x4b1b84['toUpperCase']()})});if(!_0xb6eb90['ok']){const _0x2fa444=await _0xb6eb90['text']()['catch'](()=>_0x21ad24(0x6b2));return{'success':![],'error':_0x21ad24(0x455)+_0xb6eb90[_0x21ad24(0x428)]+'\x20'+_0x2fa444};}return{'success':!![]};}catch(_0x386aaa){return{'success':![],'error':_0x386aaa instanceof Error?_0x386aaa[_0x21ad24(0x531)]:'Unknown\x20error\x20during\x20setOrientation'};}}async[_0xf8ecb6(0xac6)](){const _0x3e24e0=_0xf8ecb6;try{const _0x34fbda=await this['ensureSession'](),_0x95c4c7=await this[_0x3e24e0(0x9b0)](_0x3e24e0(0x2aa)+_0x34fbda+_0x3e24e0(0x574));if(!_0x95c4c7['ok']){const _0xf41884=await _0x95c4c7[_0x3e24e0(0x3e0)]()[_0x3e24e0(0x48b)](()=>'unknown');return{'success':![],'error':_0x3e24e0(0x6c0)+_0x95c4c7['status']+'\x20'+_0xf41884};}const _0xfdddb4=await _0x95c4c7[_0x3e24e0(0x2ea)]();return{'success':!![],'bundleId':_0xfdddb4['value']?.[_0x3e24e0(0x369)],'pid':_0xfdddb4[_0x3e24e0(0x39d)]?.[_0x3e24e0(0x8e3)],'name':_0xfdddb4['value']?.[_0x3e24e0(0x9e5)]};}catch(_0x59f7db){return{'success':![],'error':_0x59f7db instanceof Error?_0x59f7db['message']:_0x3e24e0(0x460)};}}async['activateApp'](_0x42ea94){const _0x861c27=_0xf8ecb6;try{const _0x3dc60a=await this[_0x861c27(0x8f0)](),_0x1d8a7f=await this['wdaFetch'](_0x861c27(0x2aa)+_0x3dc60a+'/wda/apps/launch',{'method':_0x861c27(0x513),'body':JSON[_0x861c27(0x312)]({'bundleId':_0x42ea94})});if(!_0x1d8a7f['ok']){const _0x5cc448=await _0x1d8a7f['text']()['catch'](()=>'unknown');return{'success':![],'error':'WDA\x20apps/launch\x20failed:\x20'+_0x1d8a7f['status']+'\x20'+_0x5cc448};}return{'success':!![]};}catch(_0x356475){return{'success':![],'error':_0x356475 instanceof Error?_0x356475['message']:'Unknown\x20error\x20during\x20activateApp'};}}async[_0xf8ecb6(0x423)](_0x2352d0){const _0x47cf93=_0xf8ecb6;try{const _0x4faacc=await this[_0x47cf93(0x8f0)](),_0x5e696c=await this['wdaFetch'](_0x47cf93(0x2aa)+_0x4faacc+'/url',{'method':'POST','body':JSON['stringify']({'url':_0x2352d0})});if(!_0x5e696c['ok']){const _0xd580f3=await _0x5e696c['text']()[_0x47cf93(0x48b)](()=>_0x47cf93(0x6b2)),_0x3a3276=_0xd580f3[_0x47cf93(0x27e)]('LSApplicationWorkspaceErrorDomain')&&_0xd580f3[_0x47cf93(0x27e)](_0x47cf93(0x509));if(_0x3a3276&&_0x2352d0['startsWith'](_0x47cf93(0x5e0)))return{'success':![],'error':'The\x20`ceraph://`\x20URL\x20scheme\x20isn\x27t\x20registered\x20in\x20the\x20app\x20under\x20test,\x20so\x20this\x20deep\x20link\x20couldn\x27t\x20be\x20delivered.\x20`init`\x20adds\x20the\x20scheme\x20to\x20app.json,\x20but\x20it\x20only\x20lands\x20in\x20the\x20native\x20Info.plist\x20after\x20a\x20rebuild\x20—\x20run\x20`npx\x20expo\x20prebuild`\x20then\x20rebuild/reinstall\x20the\x20dev\x20client\x20(or\x20your\x20EAS/Xcode\x20build),\x20and\x20retry.\x20Tools\x20affected:\x20rn_reset_state,\x20rn_reload,\x20and\x20camera/auth-bypass\x20deep\x20links.'};return{'success':![],'error':_0x47cf93(0xaaa)+_0x5e696c[_0x47cf93(0x428)]+'\x20'+_0xd580f3};}return{'success':!![]};}catch(_0x1a1e74){return{'success':![],'error':_0x1a1e74 instanceof Error?_0x1a1e74[_0x47cf93(0x531)]:_0x47cf93(0x92c)};}}async[_0xf8ecb6(0x287)](_0x38214d){const _0x1a44d3=_0xf8ecb6;try{if('KKiMT'===_0x1a44d3(0xb10)){const _0x449cdb=await this['ensureSession'](),_0x5cd0f0=await this['wdaFetch']('/session/'+_0x449cdb+'/wda/apps/terminate',{'method':'POST','body':JSON['stringify']({'bundleId':_0x38214d})});if(!_0x5cd0f0['ok']){const _0x23a134=await _0x5cd0f0[_0x1a44d3(0x3e0)]()['catch'](()=>'unknown');return{'success':![],'error':_0x1a44d3(0x50b)+_0x5cd0f0['status']+'\x20'+_0x23a134};}return this[_0x1a44d3(0x7dc)]=null,{'success':!![]};}else{const _0x2d0a66=_0x29fc38['call']['getFirstAncestorByKind'](_0x19ec87[_0x1a44d3(0xa78)]);_0x2d0a66&&(_0x2d0a66['remove'](),_0x557b6b=!![]);}}catch(_0x22475b){return{'success':![],'error':_0x22475b instanceof Error?_0x22475b['message']:'Unknown\x20error\x20during\x20terminateAppViaWDA'};}}async['pingStatus'](){const _0x346779=_0xf8ecb6;try{const _0x3743a1=await this[_0x346779(0x9b0)](_0x346779(0xa5d),{},0x7d0);return _0x3743a1['ok'];}catch{return![];}}['searchElements'](_0x507af3,_0x387a61){const _0x5785eb=_0xf8ecb6,_0x59bb1b=[];if(this['elementMatches'](_0x507af3,_0x387a61)){if('hjjID'!==_0x5785eb(0x873))return{'status':_0x5785eb(0x576),'message':_0x163e2d};else _0x59bb1b['push'](_0x507af3);}const _0x3a8a11=_0x507af3['children'];if(Array['isArray'](_0x3a8a11))for(const _0x4b7579 of _0x3a8a11){_0x59bb1b[_0x5785eb(0x4d1)](...this[_0x5785eb(0x82e)](_0x4b7579,_0x387a61));}return _0x59bb1b;}[_0xf8ecb6(0x89f)](_0x19640b,_0x401266){const _0x537506=_0xf8ecb6;if(_0x401266['text']!==void 0x0){const _0x46a39c=_0x401266[_0x537506(0x3e0)][_0x537506(0x5b5)](),_0x1be87f=[_0x19640b['value'],_0x19640b[_0x537506(0x960)],_0x19640b[_0x537506(0x9e5)]]['filter'](Boolean)[_0x537506(0x86b)](_0x9f464e=>String(_0x9f464e)['toLowerCase']());if(!_0x1be87f[_0x537506(0x275)](_0x75c795=>_0x75c795[_0x537506(0x27e)](_0x46a39c)))return![];}if(_0x401266[_0x537506(0x444)]!==void 0x0){const _0x3c77f4=String(_0x19640b['label']??_0x19640b['name']??'');if(!_0x3c77f4[_0x537506(0x5b5)]()['includes'](_0x401266[_0x537506(0x444)]['toLowerCase']()))return![];}if(_0x401266[_0x537506(0x45e)]!==void 0x0){const _0x319e05=String(_0x19640b['type']??'');if(!_0x319e05['toLowerCase']()['includes'](_0x401266['type'][_0x537506(0x5b5)]()))return![];}return _0x401266[_0x537506(0x3e0)]!==void 0x0||_0x401266[_0x537506(0x444)]!==void 0x0||_0x401266['type']!==void 0x0||_0x401266['index']!==void 0x0;}[_0xf8ecb6(0xab8)](_0x7775f1,_0x5d27dd){const _0x804399=_0xf8ecb6,_0x5aa85d=[];if(_0x5d27dd<=0x0)return _0x5aa85d;const _0x5497ef=String(_0x7775f1['label']??_0x7775f1[_0x804399(0x9e5)]??''),_0x51ae66=String(_0x7775f1['value']??''),_0x55b0e6=String(_0x7775f1['type']??'');(_0x5497ef||_0x51ae66)&&_0x5aa85d[_0x804399(0x4d1)]({'type':_0x55b0e6,'label':_0x5497ef,'text':_0x51ae66});const _0x8c72a4=_0x7775f1['children'];if(Array['isArray'](_0x8c72a4))for(const _0xc9362e of _0x8c72a4){const _0x1be6cd=_0x5d27dd-_0x5aa85d['length'];if(_0x1be6cd<=0x0)break;_0x5aa85d[_0x804399(0x4d1)](...this[_0x804399(0xab8)](_0xc9362e,_0x1be6cd));}return _0x5aa85d;}['reset'](){const _0x2d3fe8=_0xf8ecb6;this['sessionId']=null,this['pixelRatio']=null,this[_0x2d3fe8(0xa13)]=null;}};function _0x1f14f2(_0x1c0219){const _0x58e09e=_0xf8ecb6;if(!_0x1c0219['success']||!_0x1c0219['base64'])return{'content':[{'type':_0x58e09e(0x3e0),'text':JSON['stringify'](_0x1c0219,null,0x2)}],'isError':!![]};return{'content':[{'type':'image','data':_0x1c0219['base64'],'mimeType':'image/png'}]};}import{readFile as _0x1151c4,writeFile as _0x43224c,mkdir,access as _0x28c0b8}from'fs/promises';import{join as _0x16d4b4}from'path';var _0x5eae4b=class{['cacheDir'];[_0xf8ecb6(0x9aa)];['snapshotPath'];constructor(_0xdcfa99,_0xda338c){const _0x49c40b=_0xf8ecb6;this['projectDir']=_0xdcfa99,this['cacheDir']=_0xda338c,this[_0x49c40b(0x3a6)]=_0x16d4b4(_0xda338c,'last-build-snapshot.json');}async[_0xf8ecb6(0x753)](_0x846693){const _0x450999=_0xf8ecb6;try{return _0x450999(0x940)!==_0x450999(0x940)?this[_0x450999(0x302)](_0x1083f3):(await _0x28c0b8(_0x846693),!![]);}catch{return![];}}async['readJson'](_0x409b91){const _0x2b2534=_0xf8ecb6;try{const _0x1e3386=await _0x1151c4(_0x409b91,_0x2b2534(0x827));return JSON['parse'](_0x1e3386);}catch{return null;}}async['hashFile'](_0x4ce850){const _0x3d3794=_0xf8ecb6;try{const _0x341645=await _0x1151c4(_0x4ce850,'utf-8');let _0x4c36f6=0x0;for(let _0x443ec5=0x0;_0x443ec5<_0x341645[_0x3d3794(0x3b7)];_0x443ec5++){const _0x563f80=_0x341645['charCodeAt'](_0x443ec5);_0x4c36f6=(_0x4c36f6<<0x5)-_0x4c36f6+_0x563f80,_0x4c36f6|=0x0;}return _0x4c36f6[_0x3d3794(0xafa)](0x24);}catch{return'missing';}}async[_0xf8ecb6(0x552)](){const _0x51bb04=_0xf8ecb6,_0x8b6815=await this['readJson'](_0x16d4b4(this[_0x51bb04(0x9aa)],_0x51bb04(0x2a8)));let _0x2dd2b3=await this[_0x51bb04(0x2ab)](_0x16d4b4(this[_0x51bb04(0x9aa)],_0x51bb04(0x8fb)));if(!_0x2dd2b3){const _0x144598=await this[_0x51bb04(0x782)](_0x16d4b4(this['projectDir'],_0x51bb04(0x3d4))),_0x1c93ec=await this['hashFile'](_0x16d4b4(this['projectDir'],_0x51bb04(0x892)));_0x2dd2b3={'_fileHash':_0x144598,'_tsFileHash':_0x1c93ec};}const _0x11c421=await this[_0x51bb04(0x782)](_0x16d4b4(this[_0x51bb04(0x9aa)],_0x51bb04(0x6c9),'Podfile.lock'));return{'dependencies':_0x8b6815?.[_0x51bb04(0x8b4)]??{},'devDependencies':_0x8b6815?.['devDependencies']??{},'appConfig':_0x2dd2b3??{},'podfileLockHash':_0x11c421,'timestamp':new Date()[_0x51bb04(0x471)]()};}async[_0xf8ecb6(0x78e)](){const _0x44b014=_0xf8ecb6;try{const _0x1f097d=await _0x1151c4(this['snapshotPath'],_0x44b014(0x827));return JSON[_0x44b014(0x981)](_0x1f097d);}catch{return null;}}async['saveSnapshot'](){const _0x28bef3=_0xf8ecb6,_0x30340f=await this[_0x28bef3(0x552)]();await mkdir(this['cacheDir'],{'recursive':!![]}),await _0x43224c(this[_0x28bef3(0x3a6)],JSON['stringify'](_0x30340f,null,0x2),'utf-8');}[_0xf8ecb6(0xa3f)](_0x142f63,_0x3d30f4){const _0x887aaf=_0xf8ecb6,_0x80078d=[],_0x65a9ea=[],_0x2ac3a3=[],_0x3847b6=new Set([...Object[_0x887aaf(0x8c1)](_0x142f63),...Object['keys'](_0x3d30f4)]);for(const _0xfb4aca of _0x3847b6){if(!(_0xfb4aca in _0x142f63))_0x80078d['push'](_0xfb4aca);else{if(!(_0xfb4aca in _0x3d30f4))_0x65a9ea[_0x887aaf(0x4d1)](_0xfb4aca);else _0x142f63[_0xfb4aca]!==_0x3d30f4[_0xfb4aca]&&_0x2ac3a3['push'](_0xfb4aca);}}return{'added':_0x80078d,'removed':_0x65a9ea,'changed':_0x2ac3a3};}async['check'](){const _0x543617=_0xf8ecb6,_0x3d7379=[],_0x494639=await this[_0x543617(0x753)](_0x16d4b4(this[_0x543617(0x9aa)],_0x543617(0x6c9)));if(!_0x494639)return{'needsClean':!![],'reasons':[_0x543617(0x519)]};const _0x5a41b9=await this[_0x543617(0x78e)]();if(!_0x5a41b9)return{'needsClean':!![],'reasons':[_0x543617(0x640)]};const _0x8f722f=await this['getCurrentState'](),_0x2cd54e=this[_0x543617(0xa3f)](_0x5a41b9['dependencies'],_0x8f722f['dependencies']);_0x2cd54e[_0x543617(0x7ed)]['length']>0x0&&_0x3d7379[_0x543617(0x4d1)]('New\x20dependencies\x20added:\x20'+_0x2cd54e['added'][_0x543617(0x4ec)](',\x20')+'.\x20Native\x20modules\x20may\x20need\x20linking.');_0x2cd54e[_0x543617(0x62c)][_0x543617(0x3b7)]>0x0&&_0x3d7379[_0x543617(0x4d1)](_0x543617(0x395)+_0x2cd54e[_0x543617(0x62c)]['join'](',\x20')+'.\x20Stale\x20native\x20modules\x20may\x20cause\x20build\x20errors.');if(_0x2cd54e['changed'][_0x543617(0x3b7)]>0x0){const _0x31f8b5=['react-native','expo',_0x543617(0x6cc),_0x543617(0x27c)],_0x4bd245=_0x2cd54e[_0x543617(0x9a4)]['filter'](_0x48926f=>_0x31f8b5[_0x543617(0x275)](_0x3e7b4c=>_0x48926f[_0x543617(0x27e)](_0x3e7b4c)));_0x4bd245[_0x543617(0x3b7)]>0x0&&_0x3d7379['push']('Native\x20dependency\x20versions\x20changed:\x20'+_0x4bd245[_0x543617(0x4ec)](',\x20')+'.\x20Clean\x20prebuild\x20recommended.');}const _0x1dd3be=this[_0x543617(0xa3f)](_0x5a41b9['devDependencies'],_0x8f722f['devDependencies']);if(_0x1dd3be[_0x543617(0x7ed)]['length']>0x0||_0x1dd3be['removed']['length']>0x0){const _0x55a158=[..._0x1dd3be['added'],..._0x1dd3be[_0x543617(0x62c)]][_0x543617(0x529)](_0x5cde57=>_0x5cde57['includes'](_0x543617(0x9f5))||_0x5cde57['includes']('expo')||_0x5cde57['includes'](_0x543617(0x6cc)));_0x55a158['length']>0x0&&_0x3d7379[_0x543617(0x4d1)](_0x543617(0x475)+_0x55a158['join'](',\x20')+'.');}const _0x210a85=JSON[_0x543617(0x312)](_0x5a41b9[_0x543617(0x9c4)])!==JSON[_0x543617(0x312)](_0x8f722f[_0x543617(0x9c4)]);if(_0x210a85){if(_0x543617(0x9b4)!==_0x543617(0x9b4))return _0x454631(_0x543617(0x33e),_0x3e4b19);else _0x3d7379['push'](_0x543617(0x409));}if(_0x8f722f[_0x543617(0x5ae)]===_0x543617(0x934))_0x3d7379['push']('ios/Podfile.lock\x20is\x20missing.\x20Pods\x20may\x20need\x20to\x20be\x20installed.');else _0x5a41b9['podfileLockHash']!==_0x8f722f['podfileLockHash']&&_0x3d7379[_0x543617(0x4d1)](_0x543617(0x637));return{'needsClean':_0x3d7379[_0x543617(0x3b7)]>0x0,'reasons':_0x3d7379};}};import{spawn as _0x534afa}from'child_process';function _0x27981f(_0x4e3406,_0x2ca9b4,_0xe02fd6={}){return new Promise(_0x5ad2ba=>{const _0x5ccfd8=_0xc050;let _0x33e9df='',_0x58dc25='',_0x152038;try{_0x152038=_0x534afa(_0x4e3406,_0x2ca9b4,{'stdio':[_0x5ccfd8(0x9fa),_0x5ccfd8(0x9e1),'pipe']});}catch(_0x3d92b1){_0x5ad2ba({'code':0x7f,'stdout':'','stderr':_0x3d92b1 instanceof Error?_0x3d92b1['message']:String(_0x3d92b1)});return;}const _0x5140d2=setTimeout(()=>{const _0x1e160b=_0x5ccfd8;try{_0x152038[_0x1e160b(0x6ee)]('SIGKILL');}catch{}},_0xe02fd6[_0x5ccfd8(0x2f9)]??0x3a98);_0x152038[_0x5ccfd8(0x790)]?.['on'](_0x5ccfd8(0x78f),_0x2bbf72=>{const _0x29e73c=_0x5ccfd8;_0x33e9df+=_0x2bbf72[_0x29e73c(0xafa)]();}),_0x152038[_0x5ccfd8(0x910)]?.['on']('data',_0x25f410=>{_0x58dc25+=_0x25f410['toString']();});let _0x2e4080=![];_0x152038['on'](_0x5ccfd8(0x3dd),_0x2f5076=>{if(_0x2e4080)return;_0x2e4080=!![],clearTimeout(_0x5140d2),_0x5ad2ba({'code':0x7f,'stdout':_0x33e9df,'stderr':_0x58dc25+(_0x2f5076['message']??String(_0x2f5076))});}),_0x152038['on'](_0x5ccfd8(0x68c),_0x4210d5=>{if(_0x2e4080)return;_0x2e4080=!![],clearTimeout(_0x5140d2),_0x5ad2ba({'code':_0x4210d5??0x1,'stdout':_0x33e9df,'stderr':_0x58dc25});});});}async function _0x193e7c(_0x5c49cd){const _0x1f5fd3=_0xf8ecb6,_0x491596=await _0x27981f('which',[_0x5c49cd],{'timeoutMs':0x7d0});return _0x491596[_0x1f5fd3(0x3aa)]===0x0&&_0x491596['stdout']['trim']()[_0x1f5fd3(0x3b7)]>0x0;}function _0x3aff3e(_0x2f730d){const _0x571547=_0xf8ecb6,_0x2d8836=[];let _0x402ecc=0x0,_0xf802b6=![],_0x5abfaf=null,_0xe48425=null,_0x513f3d=null,_0x59d6a2=null,_0xfef0d2=null,_0x29edd1=null;const _0x4fe19f=_0x2e3773=>{const _0x29e925=_0xc050;let _0x195886=_0x2e3773[_0x29e925(0x668)]();if(_0x195886['endsWith'](';'))_0x195886=_0x195886[_0x29e925(0x795)](0x0,-0x1)['trim']();return(_0x195886['startsWith']('\x22')&&_0x195886['endsWith']('\x22')||_0x195886['startsWith']('\x27')&&_0x195886['endsWith']('\x27'))&&(_0x195886=_0x195886[_0x29e925(0x795)](0x1,-0x1)),_0x195886;};for(const _0x28e0db of _0x2f730d[_0x571547(0x51a)]('\x0a')){const _0x535eab=_0x28e0db[_0x571547(0x668)]();if(_0x535eab['length']===0x0)continue;if(_0x402ecc===0x1&&!_0xf802b6&&_0x535eab['endsWith']('{')){const _0x13a527=_0x535eab['indexOf']('=');if(_0x13a527>0x0){const _0x36ee45=_0x4fe19f(_0x535eab['slice'](0x0,_0x13a527));_0x5abfaf=_0x36ee45,_0xe48425=_0x36ee45,_0x513f3d=null,_0x59d6a2=null,_0xfef0d2=null,_0x29edd1=null,_0xf802b6=!![];}_0x402ecc+=0x1;continue;}if(_0x535eab[_0x571547(0xaa5)]('{')){_0x402ecc+=0x1;continue;}if(_0x535eab==='};'||_0x535eab==='}'){if(_0xf802b6&&_0x402ecc===0x2){const _0x376d0e=_0xe48425??_0x5abfaf;_0x376d0e&&_0x2d8836[_0x571547(0x4d1)]({'bundleId':_0x376d0e,'name':_0x59d6a2??_0x513f3d??_0x376d0e,'version':_0xfef0d2??_0x29edd1??void 0x0}),_0xf802b6=![],_0x5abfaf=null,_0xe48425=null,_0x513f3d=null,_0x59d6a2=null,_0xfef0d2=null,_0x29edd1=null;}_0x402ecc=Math[_0x571547(0x553)](0x0,_0x402ecc-0x1);continue;}if(_0xf802b6&&_0x402ecc===0x2){const _0x3d184d=_0x535eab[_0x571547(0x4ca)]('=');if(_0x3d184d<0x0)continue;const _0x5e6ce1=_0x535eab[_0x571547(0x795)](0x0,_0x3d184d)[_0x571547(0x668)](),_0x196cee=_0x4fe19f(_0x535eab['slice'](_0x3d184d+0x1));switch(_0x5e6ce1){case'CFBundleIdentifier':_0xe48425=_0x196cee;break;case'CFBundleName':_0x513f3d=_0x196cee;break;case _0x571547(0x3a2):_0x59d6a2=_0x196cee;break;case'CFBundleShortVersionString':_0xfef0d2=_0x196cee;break;case'CFBundleVersion':_0x29edd1=_0x196cee;break;default:break;}}}return _0x2d8836;}var _0x43c6e0=class _0x3fb00a{constructor(_0x55f6b3,_0x15e9f8){const _0xc8fc58=_0xf8ecb6;this[_0xc8fc58(0x5be)]=_0x55f6b3,this['targetResolver']=_0x15e9f8;}[_0xf8ecb6(0x5a2)]=null;['udidResolved']=![];[_0xf8ecb6(0x7db)]=0x0;static [_0xf8ecb6(0x40d)]=0x1388;['udidInflight']=null;[_0xf8ecb6(0x35a)]=null;['idbAvailable']=null;['installedAppsCache']=null;['INSTALLED_CACHE_MS']=0x7530;[_0xf8ecb6(0x56e)](_0x29799d){this['targetResolver']=_0x29799d;}async[_0xf8ecb6(0x963)](){const _0x13aaf1=_0xf8ecb6;if(!this[_0x13aaf1(0x5c1)])return{'preferSimulator':![],'simulatorUdid':_0x13aaf1(0x232)};const _0x33c39a=await this['targetResolver'][_0x13aaf1(0x62d)](),_0x263135=_0x33c39a['target']===_0x13aaf1(0x25a),_0xa87e57=_0x33c39a[_0x13aaf1(0xb00)]==='simulator'&&_0x33c39a[_0x13aaf1(0x5a2)]?_0x33c39a['udid']:'booted';return{'preferSimulator':_0x263135,'simulatorUdid':_0xa87e57};}async['getUdid'](){const _0x3dc1aa=_0xf8ecb6;if(this[_0x3dc1aa(0x30b)]&&this['udid']&&Date[_0x3dc1aa(0x2f8)]()-this['udidResolvedAt']<_0x3fb00a[_0x3dc1aa(0x40d)])return this[_0x3dc1aa(0x5a2)];if(this['udidInflight'])return this['udidInflight'];const _0x1b19bb=((async()=>{const _0x5b8253=_0x3dc1aa;if(_0x5b8253(0x463)!==_0x5b8253(0x463))return{'mutated':![],'next':_0x444001};else{try{const _0x4c76a7=await _0x193e7c('xcrun');if(!_0x4c76a7)return null;const _0x4eeb44=await _0x27981f(_0x5b8253(0x244),[_0x5b8253(0x85b),'list',_0x5b8253(0x6e2),'--json-output','-'],{'timeoutMs':0x1f40});if(_0x4eeb44[_0x5b8253(0x3aa)]!==0x0)return null;const _0x1fc3af=JSON['parse'](_0x4eeb44[_0x5b8253(0x790)]),_0x3675b1=_0x1fc3af['result']?.[_0x5b8253(0x6e2)]??[],_0x2d586f=_0x3675b1['find'](_0x39b013=>{const _0x5e9c86=_0x5b8253,_0x382501=_0x39b013[_0x5e9c86(0x47b)]?.['platform']?.['toLowerCase']()??'',_0x1a4287=_0x39b013['connectionProperties']?.['tunnelState']?.[_0x5e9c86(0x5b5)]()??'';return _0x382501['includes'](_0x5e9c86(0x6c9))&&_0x1a4287===_0x5e9c86(0x289);});if(_0x2d586f?.['identifier'])return this[_0x5b8253(0x5a2)]=_0x2d586f[_0x5b8253(0x9c9)],this[_0x5b8253(0x30b)]=!![],this['udidResolvedAt']=Date[_0x5b8253(0x2f8)](),this[_0x5b8253(0x5a2)];const _0x4a3150=_0x3675b1[_0x5b8253(0x415)](_0x4a1b35=>(_0x4a1b35['hardwareProperties']?.[_0x5b8253(0x729)]?.[_0x5b8253(0x5b5)]()??'')[_0x5b8253(0x27e)](_0x5b8253(0x6c9)));if(_0x4a3150?.[_0x5b8253(0x9c9)])return this['udid']=_0x4a3150[_0x5b8253(0x9c9)],this['udidResolved']=!![],this[_0x5b8253(0x7db)]=Date['now'](),this[_0x5b8253(0x5a2)];}catch{}return null;}})());this[_0x3dc1aa(0x250)]=_0x1b19bb;try{return await _0x1b19bb;}finally{this[_0x3dc1aa(0x250)]=null;}}async['checkDevicectl'](){const _0x505193=_0xf8ecb6;if(this[_0x505193(0x35a)]!==null)return this['devicectlAvailable'];const _0x15a038=await _0x193e7c('xcrun');if(!_0x15a038)return this[_0x505193(0x35a)]=![],![];const _0x574c77=await _0x27981f(_0x505193(0x244),[_0x505193(0x85b),'--help'],{'timeoutMs':0xfa0});return this['devicectlAvailable']=_0x574c77[_0x505193(0x3aa)]===0x0,this[_0x505193(0x35a)];}async['checkIdb'](){const _0x8ccb20=_0xf8ecb6;if(this['idbAvailable']!==null)return this[_0x8ccb20(0xa09)];return this[_0x8ccb20(0xa09)]=await _0x193e7c(_0x8ccb20(0x3ee)),this['idbAvailable'];}async[_0xf8ecb6(0xadd)](_0x834904){const _0x2a5afa=_0xf8ecb6,_0x1539e4=await this['pickTransport']();if(_0x1539e4['preferSimulator']){const _0x329897=_0x1539e4['simulatorUdid'],_0xda3851=await _0x27981f(_0x2a5afa(0x244),[_0x2a5afa(0x825),_0x2a5afa(0x51b),_0x329897,_0x834904],{'timeoutMs':0x3a98});if(_0xda3851[_0x2a5afa(0x3aa)]===0x0)return{'success':!![],'transport':'simctl','details':{'udid':_0x329897}};return{'success':![],'transport':'simctl','error':_0x2a5afa(0x6bc)+(_0xda3851['stderr']||_0xda3851[_0x2a5afa(0x790)])['trim'](),'details':{'udid':_0x329897}};}const _0x357133=await this['getUdid']();if(_0x357133&&await this['checkDevicectl']()){const _0x49e6bb=await _0x27981f('xcrun',['devicectl','device',_0x2a5afa(0x21b),_0x2a5afa(0x51b),'--device',_0x357133,'--terminate-existing',_0x834904],{'timeoutMs':0x7530});if(_0x49e6bb['code']===0x0)return{'success':!![],'transport':'devicectl','details':{'udid':_0x357133}};const _0x46eeb0=_0x49e6bb[_0x2a5afa(0x910)]||_0x49e6bb['stdout'];if(!await this['checkIdb']())return{'success':![],'transport':_0x2a5afa(0x85b),'error':'devicectl\x20launch\x20failed:\x20'+_0x46eeb0['trim']()};}if(await this[_0x2a5afa(0x7f4)]()){const _0x241c7f=[_0x2a5afa(0x51b),_0x834904];if(_0x357133)_0x241c7f[_0x2a5afa(0x4d1)]('--udid',_0x357133);const _0x2e428d=await _0x27981f(_0x2a5afa(0x3ee),_0x241c7f,{'timeoutMs':0x7530});if(_0x2e428d[_0x2a5afa(0x3aa)]===0x0)return{'success':!![],'transport':_0x2a5afa(0x3ee),'details':{'udid':_0x357133}};if(!_0x357133){}else return{'success':![],'transport':'idb','error':_0x2a5afa(0x71b)+(_0x2e428d['stderr']||_0x2e428d['stdout'])[_0x2a5afa(0x668)]()};}if(!_0x357133){const _0x5df342=await _0x27981f('xcrun',['simctl','launch','booted',_0x834904],{'timeoutMs':0x3a98});if(_0x5df342[_0x2a5afa(0x3aa)]===0x0)return{'success':!![],'transport':'simctl'};return{'success':![],'transport':'simctl','error':'simctl\x20launch\x20failed:\x20'+(_0x5df342['stderr']||_0x5df342[_0x2a5afa(0x790)])['trim']()};}return{'success':![],'transport':_0x2a5afa(0x41a),'error':_0x2a5afa(0xb25)};}async['terminateApp'](_0x255a35){const _0x1c0181=_0xf8ecb6,_0x245544=await this['pickTransport']();if(_0x245544[_0x1c0181(0x292)]){if(_0x1c0181(0xaa3)===_0x1c0181(0x964))_0x555730[_0x1c0181(0x845)]=_0x429798;else{const _0x33c6d2=_0x245544[_0x1c0181(0xa86)],_0x229dd6=await _0x27981f('xcrun',[_0x1c0181(0x825),'terminate',_0x33c6d2,_0x255a35],{'timeoutMs':0x2710});if(_0x229dd6['code']===0x0)return{'success':!![],'transport':'simctl','details':{'udid':_0x33c6d2}};return{'success':![],'transport':'simctl','error':_0x1c0181(0x980)+(_0x229dd6['stderr']||_0x229dd6[_0x1c0181(0x790)])['trim'](),'details':{'udid':_0x33c6d2}};}}if(this['screen']){const _0x50aade=await this['screen'][_0x1c0181(0x3a4)]();if(_0x50aade){const _0x8babae=await this[_0x1c0181(0x5be)]['terminateAppViaWDA'](_0x255a35);if(_0x8babae['success'])return{'success':!![],'transport':_0x1c0181(0x860)};}}const _0xa94c69=await this[_0x1c0181(0x392)]();if(_0xa94c69&&await this['checkDevicectl']()){const _0x1ce23e=await this['findDeviceAppPid'](_0xa94c69,_0x255a35);if(_0x1ce23e!==null){const _0xae5de0=await _0x27981f('xcrun',['devicectl','device',_0x1c0181(0x21b),'terminate',_0x1c0181(0x68f),_0xa94c69,'--pid',String(_0x1ce23e)],{'timeoutMs':0x3a98});if(_0xae5de0[_0x1c0181(0x3aa)]===0x0)return{'success':!![],'transport':'devicectl','details':{'pid':_0x1ce23e}};}}if(await this[_0x1c0181(0x7f4)]()){const _0x2777a7=['terminate',_0x255a35];if(_0xa94c69)_0x2777a7['push'](_0x1c0181(0x6d9),_0xa94c69);const _0x1cedef=await _0x27981f(_0x1c0181(0x3ee),_0x2777a7,{'timeoutMs':0x3a98});if(_0x1cedef['code']===0x0)return{'success':!![],'transport':'idb'};}if(!_0xa94c69){const _0x4bacb4=await _0x27981f('xcrun',[_0x1c0181(0x825),_0x1c0181(0x3f7),'booted',_0x255a35],{'timeoutMs':0x2710});if(_0x4bacb4['code']===0x0)return{'success':!![],'transport':_0x1c0181(0x825)};return{'success':![],'transport':'simctl','error':'simctl\x20terminate\x20failed:\x20'+(_0x4bacb4[_0x1c0181(0x910)]||_0x4bacb4['stdout'])[_0x1c0181(0x668)]()};}return{'success':![],'transport':_0x1c0181(0x41a),'error':_0x1c0181(0x999)};}async[_0xf8ecb6(0x4a6)](_0x1097ab,_0x5c4aa4){const _0x3641a7=_0xf8ecb6,_0x35b29d=await _0x27981f('xcrun',[_0x3641a7(0x85b),_0x3641a7(0xad2),'info',_0x3641a7(0x508),_0x3641a7(0x68f),_0x1097ab,'--json-output','-'],{'timeoutMs':0x4e20});if(_0x35b29d[_0x3641a7(0x3aa)]!==0x0)return null;let _0x407eca=null;try{const _0x23572b=JSON['parse'](_0x35b29d['stdout']);_0x407eca=(_0x23572b['result']?.[_0x3641a7(0x508)]??[])[_0x3641a7(0x415)](_0x459d57=>_0x459d57[_0x3641a7(0x476)]===_0x5c4aa4)?.['url']??null;}catch{return null;}if(!_0x407eca)return null;const _0x1bd9af=_0x407eca['endsWith']('/')?_0x407eca:_0x407eca+'/',_0x3e80f6=await _0x27981f('xcrun',['devicectl','device','info',_0x3641a7(0x702),'--device',_0x1097ab,'--json-output','-'],{'timeoutMs':0x4e20});if(_0x3e80f6['code']!==0x0)return null;try{if(_0x3641a7(0x4b8)===_0x3641a7(0x4b8)){const _0x3f40ea=JSON[_0x3641a7(0x981)](_0x3e80f6[_0x3641a7(0x790)]),_0x2b09e1=(_0x3f40ea[_0x3641a7(0x899)]?.['runningProcesses']??[])['filter'](_0x2ec83b=>typeof _0x2ec83b[_0x3641a7(0x5f6)]==='number'&&(_0x2ec83b['executable']??'')[_0x3641a7(0x746)](_0x1bd9af));if(_0x2b09e1[_0x3641a7(0x3b7)]===0x0)return null;const _0x2418bb=_0x2b09e1['find'](_0x2275af=>!_0x2275af['executable'][_0x3641a7(0x795)](_0x1bd9af['length'])['includes']('/'));return(_0x2418bb??_0x2b09e1[0x0])['processIdentifier'];}else _0x2697bf=_0x551dcb,_0x56316c=_0x147b39;}catch{return null;}}async[_0xf8ecb6(0xa41)](_0x503ba3){const _0x1dcedc=_0xf8ecb6;if(this[_0x1dcedc(0x5be)]){const _0x1675d5=await this['screen'][_0x1dcedc(0x3a4)]();if(_0x1675d5){const _0x457367=await this['screen']['activateApp'](_0x503ba3);if(_0x457367[_0x1dcedc(0x6d0)])return{'success':!![],'transport':'wda'};}}return this['launchApp'](_0x503ba3);}async[_0xf8ecb6(0x84b)](){const _0x16bb85=_0xf8ecb6,_0x8be3e3=await this[_0x16bb85(0x963)](),_0x27e672=_0x8be3e3['preferSimulator']?null:await this['getUdid'](),_0x283e0f=_0x8be3e3[_0x16bb85(0x292)]?'sim:'+_0x8be3e3[_0x16bb85(0xa86)]:_0x16bb85(0xa05)+(_0x27e672??'none');if(this['installedAppsCache']&&this['installedAppsCache']['key']===_0x283e0f&&Date[_0x16bb85(0x2f8)]()-this['installedAppsCache']['at']<this['INSTALLED_CACHE_MS'])return{'success':!![],'apps':this['installedAppsCache'][_0x16bb85(0x508)]};if(_0x8be3e3['preferSimulator'])return this[_0x16bb85(0x373)](_0x8be3e3['simulatorUdid'],_0x283e0f);const _0x284711=_0x27e672;if(!_0x284711)return{'success':![],'apps':[],'error':_0x16bb85(0x625)};if(!await this['checkDevicectl']())return{'success':![],'apps':[],'error':'xcrun\x20devicectl\x20not\x20available\x20—\x20install\x20Xcode\x2015\x20or\x20newer.'};const _0x216227=await _0x27981f(_0x16bb85(0x244),[_0x16bb85(0x85b),'device',_0x16bb85(0x799),'apps',_0x16bb85(0x68f),_0x284711,'--json-output','-'],{'timeoutMs':0x4e20});if(_0x216227['code']!==0x0)return{'success':![],'apps':[],'error':_0x16bb85(0x67c)+(_0x216227[_0x16bb85(0x910)]||_0x216227[_0x16bb85(0x790)])[_0x16bb85(0x668)]()};try{const _0x4dadfc=JSON[_0x16bb85(0x981)](_0x216227[_0x16bb85(0x790)]),_0x1fad73=(_0x4dadfc['result']?.[_0x16bb85(0x508)]??[])['filter'](_0x81e239=>!!_0x81e239['bundleIdentifier'])['map'](_0x3c805e=>({'bundleId':_0x3c805e['bundleIdentifier'],'name':_0x3c805e['name']??_0x3c805e['bundleIdentifier'],'version':_0x3c805e['shortVersionString']??_0x3c805e[_0x16bb85(0x332)]}));return this[_0x16bb85(0x890)]={'at':Date['now'](),'key':_0x283e0f,'apps':_0x1fad73},{'success':!![],'apps':_0x1fad73};}catch(_0x413041){return{'success':![],'apps':[],'error':'Failed\x20to\x20parse\x20devicectl\x20output:\x20'+(_0x413041 instanceof Error?_0x413041[_0x16bb85(0x531)]:String(_0x413041))};}}async[_0xf8ecb6(0x373)](_0xf0eb26,_0x162e87){const _0x462f4a=_0xf8ecb6,_0x1926c4=await _0x27981f(_0x462f4a(0x244),[_0x462f4a(0x825),_0x462f4a(0xa80),_0xf0eb26],{'timeoutMs':0x3a98});if(_0x1926c4['code']!==0x0)return{'success':![],'apps':[],'error':'simctl\x20listapps\x20failed:\x20'+(_0x1926c4[_0x462f4a(0x910)]||_0x1926c4['stdout'])[_0x462f4a(0x668)]()};const _0xdfdc1a=_0x3aff3e(_0x1926c4['stdout']);return this['installedAppsCache']={'at':Date['now'](),'key':_0x162e87,'apps':_0xdfdc1a},{'success':!![],'apps':_0xdfdc1a};}async[_0xf8ecb6(0xa2a)](){if(!this['screen'])return{'success':![],'error':'ScreenManager\x20not\x20provided\x20—\x20cannot\x20query\x20active\x20app\x20via\x20WDA.'};return this['screen']['getActiveAppInfo']();}['reset'](){const _0x4068b5=_0xf8ecb6;this[_0x4068b5(0x5a2)]=null,this[_0x4068b5(0x30b)]=![],this[_0x4068b5(0x7db)]=0x0,this['devicectlAvailable']=null,this['idbAvailable']=null,this[_0x4068b5(0x890)]=null;}},_0x2cc05b=class{constructor(_0x13693a){this['screen']=_0x13693a;}async['ensureAwake'](){const _0x2bc6eb=_0xf8ecb6,_0x69d5ca=await this['screen']['isAvailable']();if(!_0x69d5ca){const _0x42370e=await this[_0x2bc6eb(0x5be)][_0x2bc6eb(0x629)]()['catch'](()=>'http://localhost:8100'),_0x11d68a=_0x42370e['replace'](/^https?:\/\//,'');return{'awake':![],'lockState':'unknown','remediation':'WebDriverAgent\x20is\x20not\x20reachable\x20at\x20'+_0x11d68a+_0x2bc6eb(0x6bf)};}const _0x7d2cb6=await this[_0x2bc6eb(0x7fa)]();if(_0x7d2cb6==='unlocked')return{'awake':!![],'lockState':_0x2bc6eb(0xb19)};if(_0x7d2cb6===_0x2bc6eb(0x240)||_0x7d2cb6==='screen-off'){const _0x488e28=await this[_0x2bc6eb(0x5be)][_0x2bc6eb(0x6bb)]();if(_0x488e28[_0x2bc6eb(0x6d0)]){if('ISsSi'!=='bTqfK'){const _0x33ddde=await this[_0x2bc6eb(0x7fa)]();if(_0x33ddde===_0x2bc6eb(0xb19))return{'awake':!![],'lockState':'unlocked'};}else _0xc4da3(_0x443cea),_0x316709(_0x548b08);}await this['screen'][_0x2bc6eb(0x783)](_0x2bc6eb(0xa4a))['catch'](()=>void 0x0);const _0x13c547=await this['getLockState']();if(_0x13c547==='unlocked')return{'awake':!![],'lockState':'unlocked'};return{'awake':![],'lockState':_0x13c547,'remediation':_0x2bc6eb(0x239)};}return{'awake':![],'lockState':_0x7d2cb6,'remediation':_0x2bc6eb(0x528)};}['keepAliveHeartbeat'](_0xd87f76={}){const _0xcd94a4=_0xf8ecb6,_0x172c9e=_0xd87f76[_0xcd94a4(0x466)]??0x5dc,_0x12a5d3=setInterval(()=>{this['screen']['pingStatus']()['catch'](()=>void 0x0);},_0x172c9e);if(typeof _0x12a5d3[_0xcd94a4(0x2d6)]==='function')_0x12a5d3['unref']();let _0x3c7c88=![];return{'intervalMs':_0x172c9e,'stop':()=>{if(_0x3c7c88)return;_0x3c7c88=!![],clearInterval(_0x12a5d3);}};}async[_0xf8ecb6(0x7fa)](){const _0x313b62=_0xf8ecb6,_0x3a30a3=await this['screen'][_0x313b62(0xaa6)]();if(_0x3a30a3===!![])return _0x313b62(0x240);if(_0x3a30a3===![]){const _0x2b8523=await this['hasCoverSheet']();return _0x2b8523?'locked':_0x313b62(0xb19);}const _0x58163f=await this['hasCoverSheet']();if(_0x58163f===null)return'unknown';return _0x58163f?'locked':'unlocked';}async[_0xf8ecb6(0x73a)](){const _0x56ff9c=_0xf8ecb6,_0x3347a7=await this['screen']['getSource']();if(!_0x3347a7['success']||!_0x3347a7[_0x56ff9c(0x40e)])return null;const _0x223ee6=['sbcoversheet',_0x56ff9c(0x378),'lockscreen'];let _0x2b47ea=![];const _0x402c6f=_0x268392=>{const _0x46b43d=_0x56ff9c;if(_0x2b47ea)return;const _0x236d73=[_0x268392[_0x46b43d(0x9e5)],_0x268392[_0x46b43d(0x960)],_0x268392['type']][_0x46b43d(0x529)](Boolean)[_0x46b43d(0x4ec)]('\x20')[_0x46b43d(0x5b5)]();if(_0x223ee6[_0x46b43d(0x275)](_0x471a32=>_0x236d73[_0x46b43d(0x27e)](_0x471a32))){_0x2b47ea=!![];return;}const _0x1ce187=_0x268392['children'];if(Array['isArray'](_0x1ce187)){for(const _0x2ef5d0 of _0x1ce187)_0x402c6f(_0x2ef5d0);}};return _0x402c6f(_0x3347a7['source']),_0x2b47ea;}async['setOrientation'](_0x4be2b3){const _0x36df12=_0xf8ecb6;return this[_0x36df12(0x5be)][_0x36df12(0x614)](_0x4be2b3);}[_0xf8ecb6(0x582)](){return{'success':![],'message':'iOS\x20does\x20not\x20expose\x20an\x20API\x20for\x20disabling\x20Auto-Lock.\x20Open\x20Settings\x20→\x20Display\x20&\x20Brightness\x20→\x20Auto-Lock\x20→\x20Never\x20on\x20the\x20device\x20before\x20running\x20long\x20flows.\x20The\x20flow\x20runner\x20keeps\x20WDA\x27s\x20session\x20warm\x20with\x20a\x20heartbeat,\x20but\x20it\x20cannot\x20prevent\x20Auto-Lock\x20by\x20itself.'};}};import{readFile as _0x4d5fc9}from'fs/promises';import{join as _0x2fe4ad}from'path';var _0x28392f='cer_';function _0x2ad63a(_0x3dd28e){const _0x22db52=_0xf8ecb6;return _0x3dd28e[_0x22db52(0x746)](_0x28392f);}function _0x346c6b(_0xeab07f){const _0x518e84=_0xf8ecb6;if(!_0x2ad63a(_0xeab07f))return null;const _0x4c5f8e=_0xeab07f[_0x518e84(0x795)](_0x28392f['length']),_0x512d6c=_0x4c5f8e[_0x518e84(0x2f3)](/^(.+)_(\d+)_(\d+)_([0-9a-f]{10})$/);if(!_0x512d6c)return null;return{'pathSlug':_0x512d6c[0x1],'line':Number(_0x512d6c[0x2]),'col':Number(_0x512d6c[0x3]),'hash':_0x512d6c[0x4]};}import{readFileSync}from'fs';import{join as _0x3d12ec}from'path';var _0x4aad5a={'react-native':{'Modal':{'gatingProp':'visible','kind':_0xf8ecb6(0x893)}}},_0xfc3dbf={'firebase/auth':{'onAuthStateChanged':{'tier':'subscription','subscribesTo':'auth-state','subscribeMethod':'onAuthStateChanged'},'signOut':{'tier':'mutation','mutates':_0xf8ecb6(0x286),'mutationMethod':'signOut','delta':{'aspect':'authState','transition':'→\x20anonymous','confidence':_0xf8ecb6(0x8f5)}},'signInWithEmailAndPassword':{'tier':'mutation','mutates':'auth-profile','mutationMethod':_0xf8ecb6(0x2a5),'delta':{'aspect':'authState','transition':'anonymous\x20→\x20authenticated','confidence':_0xf8ecb6(0x8f5)}}}},_0x360d02=null,_0x2994d8=null;function _0x3b6c12(_0x31ecc0){const _0x2115c3=_0xf8ecb6;if(_0x31ecc0===null){_0x360d02=null;return;}_0x360d02=Object[_0x2115c3(0x718)](Object[_0x2115c3(0x5e9)](Object['entries'](_0x31ecc0)[_0x2115c3(0x86b)](([_0x142145,_0x6f9af4])=>[_0x142145,Object['freeze']({..._0x6f9af4})])));}function _0x50a1b6(_0x29f944){const _0x12f9b0=_0xf8ecb6;if(_0x29f944===null){_0x2994d8=null;return;}_0x2994d8=Object['freeze'](Object['fromEntries'](Object[_0x12f9b0(0x42a)](_0x29f944)['map'](([_0x502d21,_0x902cb1])=>[_0x502d21,Object[_0x12f9b0(0x718)]({..._0x902cb1})])));}var _0x293095=Object[_0xf8ecb6(0x718)](Object['fromEntries'](Object['entries'](_0x4aad5a)[_0xf8ecb6(0x86b)](([_0x3e3d4c,_0x2883a2])=>[_0x3e3d4c,Object[_0xf8ecb6(0x718)]({..._0x2883a2})]))),_0x24402e=Object[_0xf8ecb6(0x718)](Object['fromEntries'](Object['entries'](_0xfc3dbf)[_0xf8ecb6(0x86b)](([_0x356543,_0x229588])=>[_0x356543,Object['freeze']({..._0x229588})])));function _0x3ae7de(_0x5a0027,_0x5eed3e=()=>{}){const _0x2e4b1e=_0xf8ecb6;if(!_0x5a0027||typeof _0x5a0027!=='object'||Array[_0x2e4b1e(0x200)](_0x5a0027))return _0x5eed3e('componentControl:\x20entry\x20is\x20not\x20an\x20object'),null;const _0x41e129=_0x5a0027;if(_0x41e129[_0x2e4b1e(0x69a)]!=='componentControl')return _0x5eed3e(_0x2e4b1e(0x2dd)),null;if(typeof _0x41e129[_0x2e4b1e(0x717)]!=='string'||_0x41e129['componentName']['length']===0x0)return _0x5eed3e('componentControl:\x20componentName\x20must\x20be\x20a\x20non-empty\x20string'),null;const _0x290ca5=_0x41e129['controlShape'];if(_0x290ca5!==_0x2e4b1e(0x299)&&_0x290ca5!=='ref-imperative'&&_0x290ca5!=='render-prop')return _0x5eed3e('componentControl:\x20controlShape\x20must\x20be\x20one\x20of\x20\x22boolean-prop\x22|\x22ref-imperative\x22|\x22render-prop\x22\x20(got\x20'+JSON['stringify'](_0x290ca5)+')'),null;if(typeof _0x41e129['stateInference']!==_0x2e4b1e(0x30d)||_0x41e129[_0x2e4b1e(0x777)]['length']===0x0)return _0x5eed3e(_0x2e4b1e(0x59a)),null;if(_0x290ca5==='boolean-prop'){if(typeof _0x41e129[_0x2e4b1e(0x5b9)]!==_0x2e4b1e(0x30d)||_0x41e129[_0x2e4b1e(0x5b9)][_0x2e4b1e(0x3b7)]===0x0)return _0x5eed3e(_0x2e4b1e(0xa5a)),null;}else{if(_0x290ca5===_0x2e4b1e(0x89d)){if(!Array[_0x2e4b1e(0x200)](_0x41e129['openMethods'])||_0x41e129[_0x2e4b1e(0xb29)][_0x2e4b1e(0x3b7)]===0x0||!_0x41e129[_0x2e4b1e(0xb29)]['every'](_0x3c6073=>typeof _0x3c6073===_0x2e4b1e(0x30d)&&_0x3c6073['length']>0x0))return _0x5eed3e('componentControl:\x20ref-imperative\x20entries\x20require\x20non-empty\x20openMethods\x20array'),null;}}if(_0x41e129['uiKind']!==_0x2e4b1e(0x893)&&_0x41e129[_0x2e4b1e(0x3fb)]!=='drawer'&&_0x41e129[_0x2e4b1e(0x3fb)]!=='sheet'&&_0x41e129[_0x2e4b1e(0x3fb)]!=='accordion'&&_0x41e129['uiKind']!==_0x2e4b1e(0x4a0)&&_0x41e129[_0x2e4b1e(0x3fb)]!==_0x2e4b1e(0x81c))return _0x5eed3e('componentControl:\x20uiKind\x20is\x20required\x20and\x20must\x20be\x20one\x20of\x20\x22modal\x22|\x22drawer\x22|\x22sheet\x22|\x22accordion\x22|\x22wizard\x22|\x22reveal\x22\x20(got\x20'+JSON[_0x2e4b1e(0x312)](_0x41e129['uiKind'])+_0x2e4b1e(0x20c)),null;const _0x2cb9b3={'tier':_0x2e4b1e(0x70f),'componentName':_0x41e129[_0x2e4b1e(0x717)],'controlShape':_0x290ca5,'stateInference':_0x41e129['stateInference'],'uiKind':_0x41e129['uiKind']};typeof _0x41e129['visibilityProp']===_0x2e4b1e(0x30d)&&_0x41e129[_0x2e4b1e(0x5b9)]['length']>0x0&&(_0x2cb9b3['visibilityProp']=_0x41e129['visibilityProp']);if(Array[_0x2e4b1e(0x200)](_0x41e129['openMethods'])){const _0x35100f=_0x41e129[_0x2e4b1e(0xb29)][_0x2e4b1e(0x529)](_0x152ff2=>typeof _0x152ff2===_0x2e4b1e(0x30d)&&_0x152ff2['length']>0x0);if(_0x35100f[_0x2e4b1e(0x3b7)]>0x0)_0x2cb9b3[_0x2e4b1e(0xb29)]=_0x35100f;}if(Array[_0x2e4b1e(0x200)](_0x41e129[_0x2e4b1e(0x4f5)])){const _0x3437f6=_0x41e129['closeMethods']['filter'](_0x554219=>typeof _0x554219==='string'&&_0x554219['length']>0x0);if(_0x3437f6[_0x2e4b1e(0x3b7)]>0x0)_0x2cb9b3['closeMethods']=_0x3437f6;}typeof _0x41e129[_0x2e4b1e(0x604)]===_0x2e4b1e(0x30d)&&_0x41e129['renderPropName'][_0x2e4b1e(0x3b7)]>0x0&&(_0x2cb9b3['renderPropName']=_0x41e129[_0x2e4b1e(0x604)]);(_0x41e129[_0x2e4b1e(0x9dc)]===_0x2e4b1e(0x26d)||_0x41e129['origin']==='local-hash')&&(_0x2cb9b3[_0x2e4b1e(0x9dc)]=_0x41e129[_0x2e4b1e(0x9dc)]);if(typeof _0x41e129[_0x2e4b1e(0x332)]==='string')_0x2cb9b3['version']=_0x41e129['version'];if(typeof _0x41e129['fileHash']==='string')_0x2cb9b3[_0x2e4b1e(0x701)]=_0x41e129[_0x2e4b1e(0x701)];if(Array['isArray'](_0x41e129['discoveredIn'])){const _0xbe50dd=_0x41e129[_0x2e4b1e(0x55b)]['filter'](_0x98d42b=>typeof _0x98d42b==='string'&&_0x98d42b['length']>0x0);if(_0xbe50dd[_0x2e4b1e(0x3b7)]>0x0)_0x2cb9b3['discoveredIn']=_0xbe50dd;}return _0x2cb9b3;}function _0x481d33(_0x58afe4,_0xdce433=()=>{}){const _0xf89682=_0xf8ecb6;if(!_0x58afe4||typeof _0x58afe4!=='object'||Array['isArray'](_0x58afe4))return _0xdce433('componentHook:\x20entry\x20is\x20not\x20an\x20object'),null;const _0x2107d1=_0x58afe4;if(_0x2107d1[_0xf89682(0x69a)]!=='componentHook')return _0xdce433(_0xf89682(0xad8)),null;if(typeof _0x2107d1[_0xf89682(0x305)]!=='string'||_0x2107d1['hookName'][_0xf89682(0x3b7)]===0x0)return _0xdce433(_0xf89682(0xae4)),null;const _0x8acdcf=_0x2107d1[_0xf89682(0x3f6)];if(!_0x8acdcf||typeof _0x8acdcf!=='object'||Array[_0xf89682(0x200)](_0x8acdcf))return _0xdce433(_0xf89682(0x8ae)),null;const _0x643952=_0x8acdcf;if(typeof _0x643952[_0xf89682(0x4bb)]!=='string'||_0x643952['state']['length']===0x0)return _0xdce433('componentHook:\x20returns.state\x20must\x20be\x20a\x20non-empty\x20string'),null;if(typeof _0x643952[_0xf89682(0x63c)]!==_0xf89682(0x30d)||_0x643952[_0xf89682(0x63c)][_0xf89682(0x3b7)]===0x0)return _0xdce433(_0xf89682(0x7b5)),null;if(typeof _0x643952['closeMethod']!==_0xf89682(0x30d)||_0x643952[_0xf89682(0x749)][_0xf89682(0x3b7)]===0x0)return _0xdce433('componentHook:\x20returns.closeMethod\x20must\x20be\x20a\x20non-empty\x20string'),null;if(typeof _0x2107d1['stateInference']!=='string'||_0x2107d1['stateInference'][_0xf89682(0x3b7)]===0x0)return _0xdce433(_0xf89682(0x757)),null;const _0xa2cc1d={'tier':_0xf89682(0xb0b),'hookName':_0x2107d1[_0xf89682(0x305)],'returns':{'state':_0x643952['state'],'openMethod':_0x643952[_0xf89682(0x63c)],'closeMethod':_0x643952[_0xf89682(0x749)]},'stateInference':_0x2107d1['stateInference']};typeof _0x643952['toggleMethod']==='string'&&_0x643952['toggleMethod']['length']>0x0&&(_0xa2cc1d['returns'][_0xf89682(0x889)]=_0x643952[_0xf89682(0x889)]);(_0x2107d1['origin']==='npm'||_0x2107d1['origin']===_0xf89682(0x897))&&(_0xa2cc1d['origin']=_0x2107d1['origin']);if(typeof _0x2107d1[_0xf89682(0x332)]==='string')_0xa2cc1d[_0xf89682(0x332)]=_0x2107d1[_0xf89682(0x332)];if(typeof _0x2107d1[_0xf89682(0x701)]===_0xf89682(0x30d))_0xa2cc1d[_0xf89682(0x701)]=_0x2107d1['fileHash'];if(Array[_0xf89682(0x200)](_0x2107d1[_0xf89682(0x55b)])){const _0x1bff29=_0x2107d1['discoveredIn']['filter'](_0x3a5400=>typeof _0x3a5400==='string'&&_0x3a5400[_0xf89682(0x3b7)]>0x0);if(_0x1bff29['length']>0x0)_0xa2cc1d['discoveredIn']=_0x1bff29;}return _0xa2cc1d;}import{webcrypto}from'crypto';var _0x1c7a97=new Uint8Array([0x58,0xf7,0x5d,0x60,0xe7,0xd6,0xf6,0x35,0xbf,0x3b,0x37,0xee,0x24,0x65,0x3a,0xa3,0x8b,0xc4,0x57,0xc5,0x4a,0x2a,0x63,0x8d,0x99,0x66,0xa4,0xb1,0x3c,0x2e,0x35,0xa4]);function _0x413a53(_0x12ce39){const _0x5552bb=_0xf8ecb6;if(_0x12ce39['length']!==0x20)return![];for(let _0xec693=0x0;_0xec693<0x20;_0xec693++){if('fpkDQ'==='fpkDQ'){if(_0x12ce39[_0xec693]!==0x0)return![];}else return{'success':!![],'details':{'element':_0x1888e8[_0x5552bb(0x820)]}};}return!![];}var _0x24af15=0x1388,_0x3943ef=0x1e*0x18*0x3c*0x3c*0x3e8,_0x38e9c6={'name':_0xf8ecb6(0x345)};async function _0xb1badd(_0x1774d3){const _0x20bad4=_0xf8ecb6;if(_0x413a53(_0x1774d3['publicKey']))return null;const _0x1dc091=_0x1774d3['timeoutMs']??_0x24af15,_0x1df68f=_0x1774d3[_0x20bad4(0x5d0)]??fetch,_0x4cef35=_0x1774d3[_0x20bad4(0x2f8)]??Date[_0x20bad4(0x2f8)],_0x5f35cd=new AbortController(),_0x53f9d3=setTimeout(()=>_0x5f35cd[_0x20bad4(0x95c)](),_0x1dc091);let _0x156d54;try{if('KEfaa'==='KEfaa'){const _0x1359b6=await _0x1df68f(_0x1774d3['endpoint'],{'signal':_0x5f35cd[_0x20bad4(0x773)],'headers':{'Accept':_0x20bad4(0x22a)}});if(!_0x1359b6['ok'])return null;_0x156d54=await _0x1359b6[_0x20bad4(0x3e0)]();}else _0x245670[_0x20bad4(0x4d1)]({'region':_0xb85e13(_0x4d6fdd[_0x20bad4(0x268)]),'kind':'resized','severity':_0x37cf96(_0x20bad4(0x3e2),_0x4e6abc,_0x59bf72['bounds']),'nodeId':_0x5e264e,'delta':{'dw':_0x2b1a0a,'dh':_0x348ca8}}),_0x2b2f1d['push'](_0x1bbb04['kind']??'View');}catch{return null;}finally{clearTimeout(_0x53f9d3);}let _0x2fc53b;try{_0x2fc53b=JSON[_0x20bad4(0x981)](_0x156d54);}catch{return null;}if(!_0x1ae791(_0x2fc53b))return null;const _0x10cbbb=Date[_0x20bad4(0x981)](_0x2fc53b[_0x20bad4(0x8ef)]);if(!Number[_0x20bad4(0xa89)](_0x10cbbb))return null;const _0x22b040=_0x4cef35()-_0x10cbbb;if(_0x22b040<0x0||_0x22b040>_0x3943ef)return null;const _0x2c3006=_0x21e039(_0x2fc53b['catalog'],_0x2fc53b['libraryCatalog'],_0x2fc53b['extendedCatalog'],_0x2fc53b[_0x20bad4(0x8ef)]);let _0x3437eb;try{_0x3437eb=_0x5bef14(_0x2fc53b[_0x20bad4(0x98e)]);}catch{return null;}let _0x5a3a65;try{_0x5a3a65=await webcrypto[_0x20bad4(0xa54)]['importKey']('raw',_0x1774d3['publicKey'],_0x38e9c6,![],[_0x20bad4(0x5e8)]);}catch{return null;}let _0x29d964;try{_0x29d964=await webcrypto[_0x20bad4(0xa54)][_0x20bad4(0x5e8)](_0x38e9c6,_0x5a3a65,_0x3437eb,_0x2c3006);}catch{return null;}if(!_0x29d964)return null;const _0x1e3b4a={'droppedCount':0x0,'samples':[]},_0x4f570a={'catalog':_0x518ad9(_0x2fc53b[_0x20bad4(0xaff)],_0x3fc540,_0x20bad4(0xaff),_0x1e3b4a)};return _0x2fc53b['libraryCatalog']&&(_0x4f570a[_0x20bad4(0x314)]=_0x254f19(_0x2fc53b['libraryCatalog'],_0x3fc540,'library',_0x1e3b4a)),_0x2fc53b[_0x20bad4(0x951)]&&(_0x4f570a['extendedCatalog']=_0x254f19(_0x2fc53b[_0x20bad4(0x951)],_0x4558ec,'extended',_0x1e3b4a)),_0x1e3b4a['droppedCount']>0x0&&(_0x4f570a['droppedEntries']=_0x1e3b4a),_0x4f570a;}async function _0x4bae0d(_0x2922cf){const _0x361d16=_0xf8ecb6,_0x3c85b6=_0x2922cf[_0x361d16(0x2f9)]??_0x24af15,_0x3f32ef=_0x2922cf['fetchImpl']??fetch,_0xd41303=new AbortController(),_0x54c3ac=setTimeout(()=>_0xd41303[_0x361d16(0x95c)](),_0x3c85b6);try{const _0x3aca77=await _0x3f32ef(_0x2922cf['endpoint'],{'signal':_0xd41303['signal'],'headers':{'Accept':_0x361d16(0x22a)}});if(!_0x3aca77['ok'])return null;const _0xb6d86a=await _0x3aca77[_0x361d16(0x3e0)]();let _0x3e1512;try{_0x3e1512=JSON['parse'](_0xb6d86a);}catch{return null;}if(!_0x3e1512||typeof _0x3e1512!=='object'||typeof _0x3e1512['publicKey']!==_0x361d16(0x30d))return null;const _0x2abf3e=_0x5bef14(_0x3e1512['publicKey']);if(_0x2abf3e[_0x361d16(0x3b7)]!==0x20)return null;return _0x2abf3e;}catch{return null;}finally{clearTimeout(_0x54c3ac);}}var _0x4270c5=new Set(['__proto__','constructor',_0xf8ecb6(0x46d)]);function _0x29c927(_0x568a49){return _0x568a49['length']>0x0&&!_0x4270c5['has'](_0x568a49);}function _0x1ae791(_0x113208){const _0x431e5b=_0xf8ecb6;if(typeof _0x113208!=='object'||_0x113208===null)return![];const _0x955ea0=_0x113208;if(typeof _0x955ea0['signedAt']!==_0x431e5b(0x30d))return![];if(typeof _0x955ea0[_0x431e5b(0x98e)]!=='string')return![];if(typeof _0x955ea0['catalog']!=='object'||_0x955ea0['catalog']===null||Array[_0x431e5b(0x200)](_0x955ea0['catalog']))return![];for(const [_0x3a95ca]of Object[_0x431e5b(0x42a)](_0x955ea0[_0x431e5b(0xaff)])){if(typeof _0x3a95ca!=='string'||!_0x29c927(_0x3a95ca))return![];}if(_0x955ea0[_0x431e5b(0x314)]!==void 0x0){if(typeof _0x955ea0['libraryCatalog']!==_0x431e5b(0x9e3)||_0x955ea0['libraryCatalog']===null||Array['isArray'](_0x955ea0[_0x431e5b(0x314)]))return![];for(const [_0x1e8807,_0xb83057]of Object['entries'](_0x955ea0['libraryCatalog'])){if(typeof _0x1e8807!=='string'||!_0x29c927(_0x1e8807))return![];if(typeof _0xb83057!==_0x431e5b(0x9e3)||_0xb83057===null||Array['isArray'](_0xb83057))return![];for(const [_0x4d0b1a]of Object[_0x431e5b(0x42a)](_0xb83057)){if(typeof _0x4d0b1a!=='string'||!_0x29c927(_0x4d0b1a))return![];}}}if(_0x955ea0[_0x431e5b(0x951)]!==void 0x0){if(typeof _0x955ea0['extendedCatalog']!==_0x431e5b(0x9e3)||_0x955ea0['extendedCatalog']===null||Array[_0x431e5b(0x200)](_0x955ea0[_0x431e5b(0x951)]))return![];for(const [_0x2a0cb4,_0x877770]of Object['entries'](_0x955ea0['extendedCatalog'])){if(typeof _0x2a0cb4!=='string'||!_0x29c927(_0x2a0cb4))return![];if(typeof _0x877770!=='object'||_0x877770===null||Array['isArray'](_0x877770))return![];for(const [_0x3b650d]of Object[_0x431e5b(0x42a)](_0x877770)){if(typeof _0x3b650d!==_0x431e5b(0x30d)||!_0x29c927(_0x3b650d))return![];}}}return!![];}var _0x5de281=0x8;function _0x586dbf(_0x2e4514,_0x4f2a01){const _0x5c67f6=_0xf8ecb6;_0x2e4514['droppedCount']+=0x1,_0x2e4514['samples']['length']<_0x5de281&&_0x2e4514[_0x5c67f6(0x745)][_0x5c67f6(0x4d1)](_0x4f2a01);}function _0x518ad9(_0x22a597,_0x10007b,_0x366286,_0x3523f1){const _0x4afcd8=_0xf8ecb6,_0x206547=Object['create'](null);for(const [_0xa0ea14,_0x41c20a]of Object[_0x4afcd8(0x42a)](_0x22a597)){const _0x54e258=_0x10007b(_0x41c20a);_0x54e258!==null?_0x206547[_0xa0ea14]=_0x54e258:_0x586dbf(_0x3523f1,_0x366286+':'+_0xa0ea14);}return _0x206547;}function _0x254f19(_0x575dea,_0x2d4bbe,_0x48da90,_0x424542){const _0x2bccc3=_0xf8ecb6,_0x17acf0=Object[_0x2bccc3(0xb02)](null);for(const [_0x47a3f7,_0x341681]of Object['entries'](_0x575dea)){for(const [_0x1f2dbc,_0xd5a3d6]of Object[_0x2bccc3(0x42a)](_0x341681)){const _0x2a3468=_0x2d4bbe(_0xd5a3d6);if(_0x2a3468!==null)!_0x17acf0[_0x47a3f7]&&(_0x17acf0[_0x47a3f7]=Object[_0x2bccc3(0xb02)](null)),_0x17acf0[_0x47a3f7][_0x1f2dbc]=_0x2a3468;else{const _0x39b84a=typeof _0xd5a3d6==='object'&&_0xd5a3d6!==null&&'tier'in _0xd5a3d6?'\x20(tier:\x20'+String(_0xd5a3d6['tier'])+')':'';_0x586dbf(_0x424542,_0x48da90+':'+_0x47a3f7+'#'+_0x1f2dbc+_0x39b84a);}}}return _0x17acf0;}function _0x3fc540(_0x7e8b9b){return _0x406bca(_0x7e8b9b)?_0x7e8b9b:null;}function _0x4558ec(_0x29bd55){const _0x848f83=_0xf8ecb6;if(typeof _0x29bd55!=='object'||_0x29bd55===null)return null;const _0x7c9878=_0x29bd55;switch(_0x7c9878['tier']){case _0x848f83(0x882):return typeof _0x7c9878['subscribesTo']==='string'?_0x29bd55:null;case'mutation':return typeof _0x7c9878[_0x848f83(0x2e9)]===_0x848f83(0x30d)?_0x29bd55:null;case _0x848f83(0x4cc):return typeof _0x7c9878[_0x848f83(0x740)]===_0x848f83(0x30d)?_0x29bd55:null;case _0x848f83(0xa6b):return typeof _0x7c9878['capability']===_0x848f83(0x30d)?_0x29bd55:null;case _0x848f83(0x70f):return _0x3ae7de(_0x7c9878);case _0x848f83(0xb0b):return _0x481d33(_0x7c9878);default:return null;}}function _0x406bca(_0x41a9ea){const _0x5e9eac=_0xf8ecb6;if(typeof _0x41a9ea!==_0x5e9eac(0x9e3)||_0x41a9ea===null)return![];const _0x2b1596=_0x41a9ea;if(typeof _0x2b1596[_0x5e9eac(0x7d5)]!=='string')return![];if(typeof _0x2b1596[_0x5e9eac(0xb14)]!==_0x5e9eac(0x30d))return![];if(_0x2b1596['gatingExpression']!==void 0x0&&_0x2b1596['gatingExpression']!==_0x5e9eac(0xa6d)&&_0x2b1596[_0x5e9eac(0x6bd)]!==_0x5e9eac(0x6b0))return![];if(_0x2b1596['requiresAncestor']!==void 0x0&&typeof _0x2b1596[_0x5e9eac(0x4dd)]!=='string')return![];if(_0x2b1596[_0x5e9eac(0x47a)]!==void 0x0&&_0x2b1596[_0x5e9eac(0x47a)]!=='prop'&&_0x2b1596[_0x5e9eac(0x47a)]!==_0x5e9eac(0x435))return![];if(_0x2b1596[_0x5e9eac(0x570)]!==void 0x0&&typeof _0x2b1596[_0x5e9eac(0x570)]!=='string'){if(_0x5e9eac(0x7ca)==='WxNqt'){const _0x221e5a=_0x587a8f+0x1+_0x1dbdcc,_0x48afd1=_0x3596c8[_0x5e9eac(0xa1c)]['perFlowStatedDependencies']?.[_0x221e5a]??[],_0x3383c2=_0x4734ee[_0x5e9eac(0xa1c)][_0x5e9eac(0xa40)]?.[_0x221e5a],_0xe1771a=_0x5a73f6(_0x5896fc['accumulatedWriteKeys'],_0x7ae219['accumulatedHasFullyDynamicWrite'],_0x1d0076,_0x48afd1,_0x5d2743);return{'flow':_0x3914ff[_0x5e9eac(0x9e5)],'statedDependencies':_0x48afd1,..._0x3383c2&&_0x3383c2['length']>0x0?{'mutexWith':_0x3383c2}:{},'staticDecision':_0xe1771a};}else return![];}return!![];}function _0x21e039(_0x2c40d8,_0x3ebaa8,_0x15e10e,_0x59a16e){const _0x105db5=_0xf8ecb6,_0x1ff8fe={'catalog':_0x609e8a(_0x2c40d8),'signedAt':_0x59a16e};if(_0x3ebaa8!==void 0x0){if('UEOsi'!=='zWdsr')_0x1ff8fe[_0x105db5(0x314)]=_0x609e8a(_0x3ebaa8);else{if(_0x24aecd instanceof _0x3757dd)throw _0x39a5c1;const _0x206ca5=_0x3e71a8?.[_0x105db5(0x531)]??_0x2de9f9(_0x4f00e0),_0x4ac0e4=/exists|conflict|duplicate/i[_0x105db5(0x8aa)](_0x206ca5)?'user-exists':_0x105db5(0x65b);throw new _0xf316af(_0x4ac0e4,_0x105db5(0x857)+_0x206ca5,_0x2e2612);}}_0x15e10e!==void 0x0&&(_0x1ff8fe[_0x105db5(0x951)]=_0x609e8a(_0x15e10e));const _0x1f742e=JSON['stringify'](_0x609e8a(_0x1ff8fe));return new TextEncoder()['encode'](_0x1f742e);}function _0x609e8a(_0x4d9606){const _0x55dc0b=_0xf8ecb6;if(Array['isArray'](_0x4d9606))return _0x4d9606['map'](_0x525dc1=>_0x609e8a(_0x525dc1));if(_0x4d9606!==null&&typeof _0x4d9606===_0x55dc0b(0x9e3)){const _0x1c5b8b={},_0xd538e=Object[_0x55dc0b(0x8c1)](_0x4d9606)['sort']();for(const _0x15e8e7 of _0xd538e){_0x1c5b8b[_0x15e8e7]=_0x609e8a(_0x4d9606[_0x15e8e7]);}return _0x1c5b8b;}return _0x4d9606;}function _0x5bef14(_0x5cb3ac){const _0xfed3d1=_0xf8ecb6;return new Uint8Array(Buffer['from'](_0x5cb3ac,_0xfed3d1(0x343)));}var _0x2e34df=0x4,_0x499865=0x4,_0x342498=0x1388,_0x5965e0=new Set([_0xf8ecb6(0x246),'Image']);function _0x1871e3(_0xd2d3d2,_0x5a2862,_0x213d05){const _0x202ab6=_0xf8ecb6;if(!_0xd752c1(_0xd2d3d2)||!_0xd752c1(_0x5a2862))return _0x44b137();if(!_0x4f5c31(_0x213d05))return _0x44b137();const _0xa5831e=_0x11778a(_0xd2d3d2['nodes']),_0x39e285=_0x11778a(_0x5a2862['nodes']);if(!_0x521e60(_0xa5831e,_0x39e285))return _0x44b137();const _0x458cf7=[],_0x34eae9=[],_0x37aeca=new Set();for(const [_0x3ce59a,_0x27a0ba]of _0xa5831e){_0x37aeca['add'](_0x3ce59a);const _0x1b3ddf=_0x39e285[_0x202ab6(0x3fd)](_0x3ce59a);if(_0x1b3ddf===void 0x0){_0x27a0ba[_0x202ab6(0x82a)]&&(_0x458cf7[_0x202ab6(0x4d1)]({'region':_0x370505(_0x27a0ba['bounds']),'kind':'removed','severity':_0x9ce8a7(_0x202ab6(0x62c),_0x27a0ba,_0x27a0ba[_0x202ab6(0x268)]),'nodeId':_0x3ce59a}),_0x34eae9['push'](_0x27a0ba['kind']??_0x202ab6(0x755)));continue;}const _0x4fa3b2=_0x1b3ddf[_0x202ab6(0x268)]['x']-_0x27a0ba['bounds']['x'],_0x390454=_0x1b3ddf['bounds']['y']-_0x27a0ba['bounds']['y'],_0x2faf94=_0x1b3ddf[_0x202ab6(0x268)]['w']-_0x27a0ba['bounds']['w'],_0x272ba7=_0x1b3ddf[_0x202ab6(0x268)]['h']-_0x27a0ba['bounds']['h'];(Math['abs'](_0x4fa3b2)>_0x2e34df||Math['abs'](_0x390454)>_0x2e34df)&&(_0x458cf7[_0x202ab6(0x4d1)]({'region':_0x370505(_0x1b3ddf['bounds']),'kind':'moved','severity':_0x9ce8a7(_0x202ab6(0x85c),_0x1b3ddf,_0x1b3ddf[_0x202ab6(0x268)]),'nodeId':_0x3ce59a,'delta':{'dx':_0x4fa3b2,'dy':_0x390454}}),_0x34eae9[_0x202ab6(0x4d1)](_0x1b3ddf['kind']??_0x202ab6(0x755))),(Math[_0x202ab6(0x5af)](_0x2faf94)>_0x499865||Math['abs'](_0x272ba7)>_0x499865)&&(_0x458cf7[_0x202ab6(0x4d1)]({'region':_0x370505(_0x1b3ddf[_0x202ab6(0x268)]),'kind':_0x202ab6(0x3e2),'severity':_0x9ce8a7(_0x202ab6(0x3e2),_0x1b3ddf,_0x1b3ddf[_0x202ab6(0x268)]),'nodeId':_0x3ce59a,'delta':{'dw':_0x2faf94,'dh':_0x272ba7}}),_0x34eae9['push'](_0x1b3ddf['kind']??'View'));}for(const [_0xc52b87,_0x3bf7ee]of _0x39e285){if(_0x37aeca['has'](_0xc52b87))continue;if(!_0x3bf7ee[_0x202ab6(0x82a)])continue;_0x458cf7[_0x202ab6(0x4d1)]({'region':_0x370505(_0x3bf7ee['bounds']),'kind':_0x202ab6(0x7ed),'severity':_0x9ce8a7('added',_0x3bf7ee,_0x3bf7ee['bounds']),'nodeId':_0xc52b87}),_0x34eae9['push'](_0x3bf7ee['kind']??'View');}const _0x3120a6=[],_0x4f7d0a=[];for(let _0x43f942=0x0;_0x43f942<_0x458cf7['length'];_0x43f942++){const _0x1c1cae=_0x458cf7[_0x43f942];if(_0x3a1754(_0x1c1cae['region'],_0x213d05))continue;_0x3120a6['push'](_0x1c1cae),_0x4f7d0a[_0x202ab6(0x4d1)](_0x34eae9[_0x43f942]);}if(_0x3120a6['length']===0x0)return _0x44b137();return{'regressions':_0x3120a6,'warning':_0x16f402(_0x3120a6,_0x4f7d0a,_0x213d05)};}function _0x44b137(){return{'regressions':[],'warning':null};}function _0xd752c1(_0x3c21bd){const _0x30b3fd=_0xf8ecb6;if(!_0x3c21bd)return![];if(!Array['isArray'](_0x3c21bd['nodes']))return![];if(_0x3c21bd[_0x30b3fd(0x8c5)]['length']===0x0)return![];return!![];}function _0x4f5c31(_0x894d52){const _0x3f7977=_0xf8ecb6;if(!_0x894d52)return![];if(!Number['isFinite'](_0x894d52['x'])||!Number['isFinite'](_0x894d52['y']))return![];if(!Number[_0x3f7977(0xa89)](_0x894d52['w'])||!Number['isFinite'](_0x894d52['h']))return![];if(_0x894d52['w']<=0x0||_0x894d52['h']<=0x0)return![];return!![];}function _0x11778a(_0x501de6){const _0x50590e=_0xf8ecb6,_0x19b356=new Map();for(const _0x16e99a of _0x501de6){if(!_0x16e99a||typeof _0x16e99a['id']!==_0x50590e(0x30d)||_0x16e99a['id']['length']===0x0)continue;if(!_0x16e99a['bounds'])continue;const {x:_0x501140,y:_0x239da5,w:_0x322a13,h:_0x2628ef}=_0x16e99a[_0x50590e(0x268)];if(!Number[_0x50590e(0xa89)](_0x501140)||!Number[_0x50590e(0xa89)](_0x239da5))continue;if(!Number[_0x50590e(0xa89)](_0x322a13)||!Number['isFinite'](_0x2628ef))continue;_0x19b356['set'](_0x16e99a['id'],_0x16e99a);}return _0x19b356;}function _0x521e60(_0x15f85b,_0x22cd3b){const _0xeb2b80=_0xf8ecb6,[_0x2536dc,_0x2a9953]=_0x15f85b[_0xeb2b80(0x952)]<=_0x22cd3b[_0xeb2b80(0x952)]?[_0x15f85b,_0x22cd3b]:[_0x22cd3b,_0x15f85b];for(const _0x4f42d9 of _0x2536dc['keys']()){if(_0x2a9953[_0xeb2b80(0x979)](_0x4f42d9))return!![];}return![];}function _0x370505(_0x263b83){return{'x':_0x263b83['x'],'y':_0x263b83['y'],'w':_0x263b83['w'],'h':_0x263b83['h']};}function _0x3a1754(_0x3749a2,_0x15fe4f){const _0x58c42a=_0x3749a2['x']+_0x3749a2['w'],_0x36cada=_0x3749a2['y']+_0x3749a2['h'],_0x40f199=_0x15fe4f['x']+_0x15fe4f['w'],_0x417f44=_0x15fe4f['y']+_0x15fe4f['h'];if(_0x58c42a<=_0x15fe4f['x'])return![];if(_0x40f199<=_0x3749a2['x'])return![];if(_0x36cada<=_0x15fe4f['y'])return![];if(_0x417f44<=_0x3749a2['y'])return![];return!![];}function _0x9ce8a7(_0x757dc1,_0x388993,_0x5a4b2e){const _0x21529b=_0xf8ecb6,_0x4e938e=Math[_0x21529b(0x553)](0x0,_0x5a4b2e['w'])*Math['max'](0x0,_0x5a4b2e['h']);if(_0x4e938e>_0x342498)return _0x21529b(0x8f5);if(_0x757dc1==='added'||_0x757dc1===_0x21529b(0x62c)){if(_0x388993[_0x21529b(0xb14)]&&_0x5965e0[_0x21529b(0x979)](_0x388993['kind']))return'high';}return _0x21529b(0xad1);}function _0x16f402(_0x34317d,_0x144531,_0x25212e){const _0x4f828a=_0xf8ecb6,_0x54689f=new Map();for(let _0x498cdd=0x0;_0x498cdd<_0x34317d[_0x4f828a(0x3b7)];_0x498cdd++){const _0x5e4a83=_0x34317d[_0x498cdd],_0x295931=_0x144531[_0x498cdd]??_0x4f828a(0x755),_0x532ef6=_0x5e4a83[_0x4f828a(0xb14)]+'\x20'+_0x295931;_0x54689f['set'](_0x532ef6,(_0x54689f['get'](_0x532ef6)??0x0)+0x1);}const _0x2aaee6=Array[_0x4f828a(0x56c)](_0x54689f[_0x4f828a(0x8c1)]())['sort'](),_0x4870cf=[];for(const _0x422e8d of _0x2aaee6){_0x4870cf[_0x4f828a(0x4d1)](_0x54689f['get'](_0x422e8d)+'\x20'+_0x422e8d);}const _0x88f972=_0x25212e['screenName']?_0x4f828a(0xa4d)+_0x25212e['screenName']+'\x20region':'outside\x20form\x20region';return _0x34317d[_0x4f828a(0x3b7)]+_0x4f828a(0x27b)+(_0x34317d['length']===0x1?'':'s')+'\x20'+_0x88f972+':\x20'+_0x4870cf[_0x4f828a(0x4ec)](',\x20');}var _0x21dcaa=class{['entry']=null;['epoch']=0x0;['invalidate'](){const _0x5393e2=_0xf8ecb6;this[_0x5393e2(0x9e7)]+=0x1,this[_0x5393e2(0x3c9)]=null;}[_0xf8ecb6(0x3fd)](_0x2c29a7){const _0x5d9458=_0xf8ecb6;if(!this['entry'])return null;if(this['entry']['epoch']!==_0x2c29a7)return null;return this[_0x5d9458(0x3c9)]['tree'];}[_0xf8ecb6(0x93e)](_0x1156b9,_0x383f1a){const _0x153aea=_0xf8ecb6;this[_0x153aea(0x3c9)]={'tree':_0x1156b9,'epoch':this[_0x153aea(0x9e7)],'capturedAtStep':_0x383f1a};}[_0xf8ecb6(0x76f)](){return this['epoch'];}[_0xf8ecb6(0x49e)](){const _0x15fb56=_0xf8ecb6;this[_0x15fb56(0x3c9)]=null,this[_0x15fb56(0x9e7)]=0x0;}};function _0x4071e2(_0x207fc6){const _0xf3229f=_0xf8ecb6;if(_0x207fc6['action']===_0xf3229f(0x51b)||_0x207fc6[_0xf3229f(0x5a0)]==='terminate'||_0x207fc6['action']===_0xf3229f(0x49e))return!![];if(_0x207fc6['action']===_0xf3229f(0x783)&&_0x207fc6['key']===_0xf3229f(0xa4a))return!![];if(_0x207fc6['action']===_0xf3229f(0x2cd))return!![];if(_0x207fc6['action']==='type'&&_0x207fc6[_0xf3229f(0x2d5)])return!![];if(_0x207fc6[_0xf3229f(0xa66)])return!![];if(_0x207fc6[_0xf3229f(0xa23)])return!![];if(_0x207fc6[_0xf3229f(0x41b)]){if(_0x207fc6['verifyMutation']['mutationKind']==='storage')return!![];const _0x232aef=_0x207fc6[_0xf3229f(0x41b)]['sourceMethod']['toUpperCase']();return _0x232aef===_0xf3229f(0x513)||_0x232aef===_0xf3229f(0x594)||_0x232aef==='PATCH'||_0x232aef==='DELETE';}return![];}var _0x262d18=0x64;async function _0x4c6449(_0xd9c42b,_0x4cca5e={}){const _0x24cf2a=_0xf8ecb6;let _0x1f1880=_0x4cca5e['tree']??null;if(_0x1f1880===null){if(typeof _0xd9c42b['fetchSourceTree']!==_0x24cf2a(0x49b))return null;try{_0x1f1880=await _0xd9c42b[_0x24cf2a(0x491)]();}catch{return null;}}if(!_0x1f1880)return null;const _0x35845d=[];try{_0x4a33d5(_0x1f1880,_0x35845d,[]);}catch{return null;}if(_0x35845d[_0x24cf2a(0x3b7)]===0x0)return null;return _0x4cca5e['screenName']?{'nodes':_0x35845d,'screenName':_0x4cca5e[_0x24cf2a(0x99b)]}:{'nodes':_0x35845d};}function _0x4a33d5(_0x585528,_0xaf3986,_0x5e9c99){const _0x592b34=_0xf8ecb6;if(!_0x585528||typeof _0x585528!==_0x592b34(0x9e3))return;const _0x3fff58=_0xdc482e(_0x585528);if(_0x3fff58){const _0x3dfcdc=_0x45da4e(_0x585528)??_0x592b34(0x7bf)+_0x5e9c99[_0x592b34(0x4ec)]('.'),_0x36c5e7=typeof _0x585528[_0x592b34(0x45e)]==='string'?_0x5ef0fb(_0x585528[_0x592b34(0x45e)]):void 0x0;_0xaf3986[_0x592b34(0x4d1)]({'id':_0x3dfcdc,'bounds':_0x3fff58,'visible':_0x3fff58['w']>0x0&&_0x3fff58['h']>0x0,..._0x36c5e7?{'kind':_0x36c5e7}:{}});}const _0x3b157c=Array['isArray'](_0x585528[_0x592b34(0x4e3)])?_0x585528[_0x592b34(0x4e3)]:[];for(let _0x408492=0x0;_0x408492<_0x3b157c['length'];_0x408492++){_0x4a33d5(_0x3b157c[_0x408492],_0xaf3986,[..._0x5e9c99,_0x408492]);}}function _0xdc482e(_0x559f0c){const _0x53eb1d=_0xf8ecb6,_0x93dc08=_0x559f0c[_0x53eb1d(0x24c)];if(!_0x93dc08)return null;const _0x40dc7a=_0x4c352f(_0x93dc08['x']),_0x2a5cce=_0x4c352f(_0x93dc08['y']),_0x4b96eb=_0x4c352f(_0x93dc08['width']),_0x43777e=_0x4c352f(_0x93dc08['height']);if(_0x40dc7a===null||_0x2a5cce===null||_0x4b96eb===null||_0x43777e===null)return null;return{'x':_0x40dc7a,'y':_0x2a5cce,'w':_0x4b96eb,'h':_0x43777e};}function _0x4c352f(_0x277d2b){const _0x15810d=_0xf8ecb6;if(typeof _0x277d2b!==_0x15810d(0x2af))return null;if(!Number['isFinite'](_0x277d2b))return null;return _0x277d2b;}function _0x45da4e(_0x168809){const _0x2de0e3=_0xf8ecb6,_0x290247=_0xeb94c9(_0x168809['name']);if(_0x290247)return _0x290247;const _0xd6ab0e=_0xeb94c9(_0x168809[_0x2de0e3(0x960)]);if(_0xd6ab0e)return _0xd6ab0e;const _0x1a7cf4=_0xeb94c9(_0x168809['value']);if(_0x1a7cf4)return _0x1a7cf4;return null;}function _0xeb94c9(_0x4a5aea){if(typeof _0x4a5aea!=='string')return null;if(_0x4a5aea['length']===0x0)return null;return _0x4a5aea;}function _0x5ef0fb(_0x3d527f){const _0x1958dc=_0xf8ecb6;if(_0x3d527f['includes']('StaticText'))return _0x1958dc(0x246);if(_0x3d527f[_0x1958dc(0x27e)](_0x1958dc(0x4b7)))return _0x1958dc(0x4b7);if(_0x3d527f[_0x1958dc(0x27e)](_0x1958dc(0x616)))return _0x1958dc(0x616);if(_0x3d527f[_0x1958dc(0x27e)]('TextField')||_0x3d527f['includes'](_0x1958dc(0x79b)))return'Input';return'View';}function _0x319bf2(_0x46e4ae,_0xe3ed9f){if(_0x46e4ae===void 0x0)return _0xe3ed9f;if(_0xe3ed9f===void 0x0)return _0x46e4ae;return Math['max'](_0x46e4ae,_0xe3ed9f);}function _0x246c87(_0x1975c4){const _0x5661f2=_0xf8ecb6,{target:_0x2130dc,..._0x194f5a}=_0x1975c4;if(!_0x2130dc)return _0x194f5a;const _0x3b9afc={..._0x194f5a};switch(_0x3b9afc['action']){case'type':{const _0x217614=_0x3b9afc['into'],_0x3c3891=_0x2130dc[_0x5661f2(0x3e0)]??_0x2130dc['testID'];if(_0x217614===void 0x0&&(_0x3c3891!==void 0x0||_0x2130dc[_0x5661f2(0x444)]!==void 0x0)){const _0xf8891={};if(_0x3c3891!==void 0x0)_0xf8891[_0x5661f2(0x3e0)]=_0x3c3891;_0x2130dc['accessibilityLabel']!==void 0x0&&(_0xf8891['accessibilityLabel']=_0x2130dc[_0x5661f2(0x444)]),_0x3b9afc['into']=_0xf8891;}_0x3b9afc[_0x5661f2(0x581)]===void 0x0&&_0x2130dc[_0x5661f2(0x581)]!==void 0x0&&(_0x3b9afc[_0x5661f2(0x581)]=_0x2130dc['fallbackText']);break;}case _0x5661f2(0x2cd):case _0x5661f2(0x45c):case'clearText':case _0x5661f2(0xa59):case'waitFor':case _0x5661f2(0xa0b):case _0x5661f2(0x88c):{const _0x1ae5c8=_0x2130dc['text']??_0x2130dc['testID'];_0x3b9afc[_0x5661f2(0x3e0)]===void 0x0&&_0x1ae5c8!==void 0x0&&(_0x3b9afc['text']=_0x1ae5c8);_0x3b9afc['accessibilityLabel']===void 0x0&&_0x2130dc['accessibilityLabel']!==void 0x0&&(_0x3b9afc[_0x5661f2(0x444)]=_0x2130dc['accessibilityLabel']);_0x3b9afc['action']!==_0x5661f2(0x436)&&_0x3b9afc['action']!=='assertNotVisible'&&_0x3b9afc[_0x5661f2(0x581)]===void 0x0&&_0x2130dc['fallbackText']!==void 0x0&&(_0x3b9afc['fallbackText']=_0x2130dc['fallbackText']);_0x3b9afc[_0x5661f2(0x45e)]===void 0x0&&_0x2130dc['role']!==void 0x0&&(_0x3b9afc[_0x5661f2(0x45e)]=_0x2130dc[_0x5661f2(0x924)]);break;}default:break;}return _0x3b9afc;}var _0x29fee1=0x5*0x3c*0x3e8,_0x4400df=0x3,_0x4af023=class{constructor(_0x5d5670,_0x4a95f4,_0x38777b,_0x436a19={}){const _0x28b9d3=_0xf8ecb6;this['screen']=_0x5d5670,this[_0x28b9d3(0x508)]=_0x4a95f4,this[_0x28b9d3(0x738)]=_0x38777b,this['opts']=_0x436a19;}async[_0xf8ecb6(0x7f0)](_0x1b626d,_0x11634d){const _0x3943ad=_0xf8ecb6,_0x138617=_0x11634d??this['opts']['runContext'],_0x31ac0f=Date['now'](),_0x154e44=_0x1b626d[_0x3943ad(0x2f9)]??_0x29fee1,_0x5f20cc=_0x1b626d[_0x3943ad(0xa02)]['map'](_0x3d214f=>_0x246c87(_0x3d214f)),_0x2f1ff0=_0x2fe4ad(this[_0x3943ad(0x83e)][_0x3943ad(0x9aa)]??process['cwd'](),_0x3943ad(0x383)),_0x3c01d6=[],_0x30467b=[],_0x1104ee=new Set(),_0x32e5ce=new _0x21dcaa(),_0x52975f=!this['opts'][_0x3943ad(0x274)],_0xfcfbe2=!this[_0x3943ad(0x83e)][_0x3943ad(0x32e)],_0xa5eaab=_0x52975f?{'axCache':_0x32e5ce,'disableBulkActions':!_0xfcfbe2}:{'disableBulkActions':!_0xfcfbe2},_0x5b92d0=!this[_0x3943ad(0x83e)][_0x3943ad(0xa43)]&&_0x138617!==void 0x0;let _0x20f016=null;const _0x260f94=new Set();try{const _0x6c8e5f=await this[_0x3943ad(0x410)](_0x2f1ff0);for(const _0x3d4265 of _0x6c8e5f){_0x260f94[_0x3943ad(0x856)](this[_0x3943ad(0x7f8)](_0x3d4265));}}catch{}let _0x244fd0;if(!this[_0x3943ad(0x83e)]['skipEnsureAwake']){_0x244fd0=await this[_0x3943ad(0x738)]['ensureAwake']();if(!_0x244fd0[_0x3943ad(0x671)])return{'flow':_0x1b626d[_0x3943ad(0x9e5)],'flowId':_0x1b626d['flowId'],'success':![],'totalDurationMs':Date['now']()-_0x31ac0f,'steps':[],'runtimeErrors':[],'awake':_0x244fd0};}const _0x48ab37=this[_0x3943ad(0x83e)][_0x3943ad(0x697)]?null:this['autonomy'][_0x3943ad(0x258)]({'intervalMs':0x5dc});try{if(_0x1b626d['beforeAll']?.['ensureLaunched']){const _0x54f25b=await this[_0x3943ad(0x508)][_0x3943ad(0xa41)](_0x1b626d[_0x3943ad(0x4df)]['ensureLaunched']);if(!_0x54f25b[_0x3943ad(0x6d0)]){if(_0x3943ad(0x58a)===_0x3943ad(0x58a)){const _0x2ad78b=await this[_0x3943ad(0x508)]['launchApp'](_0x1b626d['beforeAll']['ensureLaunched']);if(!_0x2ad78b[_0x3943ad(0x6d0)])return{'flow':_0x1b626d['name'],'flowId':_0x1b626d[_0x3943ad(0x930)],'success':![],'totalDurationMs':Date['now']()-_0x31ac0f,'steps':[{'stepIndex':-0x1,'action':'beforeAll.ensureLaunched','success':![],'durationMs':Date['now']()-_0x31ac0f,'error':_0x2ad78b[_0x3943ad(0x3dd)]??_0x54f25b[_0x3943ad(0x3dd)]??_0x3943ad(0x969)}],'runtimeErrors':[],'awake':_0x244fd0};}else{const _0x4dc92f=_0x4226c9[_0x3943ad(0x3fd)](_0x351e51['currentEpoch']());if(_0x4dc92f)return _0x1e4052=_0x4dc92f,_0x4dc92f;}}}for(let _0x478d4f=0x0;_0x478d4f<_0x5f20cc['length'];_0x478d4f++){if(Date['now']()-_0x31ac0f>_0x154e44){_0x3c01d6[_0x3943ad(0x4d1)]({'stepIndex':_0x478d4f,'action':_0x5f20cc[_0x478d4f]['action'],'success':![],'durationMs':0x0,'error':_0x3943ad(0x4ff)+_0x154e44+'ms)\x20exceeded\x20before\x20step\x20'+_0x478d4f+'.',..._0x1ddfd3(_0x5f20cc[_0x478d4f])});break;}const _0x2ba1d6=Date['now'](),_0x4a4308=_0x5f20cc[_0x478d4f];let _0x1e8576;if(this['opts'][_0x3943ad(0x765)])try{const _0x3b0899=await this['opts'][_0x3943ad(0x765)][_0x3943ad(0x331)]();_0x3b0899[_0x3943ad(0x21f)]&&_0x3b0899['dialog']&&(_0x1e8576={'title':_0x3b0899[_0x3943ad(0x9d9)][_0x3943ad(0x7ec)],'action':_0x3b0899['dialog'][_0x3943ad(0x5a0)]});}catch{}_0x52975f&&_0x4071e2(_0x4a4308)&&_0x32e5ce[_0x3943ad(0x3e7)]();const _0x42ee91=await this['runStep'](_0x4a4308,_0xa5eaab),_0x5324f2=Date['now']()-_0x2ba1d6;_0x52975f&&typeof _0x42ee91['details']?.[_0x3943ad(0x8eb)]==='number'&&_0x42ee91['details']['retryAfterSwipes']>0x0&&_0x32e5ce['invalidate']();const _0x54ae98=[],_0x4c073d=[],_0x588866=[];let _0x3fc7c9=![];try{const _0x34e761=await this[_0x3943ad(0x410)](_0x2f1ff0);for(const _0xe5486f of _0x34e761){const _0x4be597=this[_0x3943ad(0x7f8)](_0xe5486f);if(!_0x260f94[_0x3943ad(0x979)](_0x4be597)){_0x260f94[_0x3943ad(0x856)](_0x4be597),_0x54ae98['push']({'message':_0xe5486f[_0x3943ad(0x531)],'stack':_0xe5486f[_0x3943ad(0xade)]}),_0x30467b[_0x3943ad(0x4d1)](_0xe5486f);const _0x310f5b=this[_0x3943ad(0x9af)](_0xe5486f,_0x1b626d[_0x3943ad(0x930)]);if(_0x310f5b['objective'])_0x4c073d['push'](_0x310f5b[_0x3943ad(0x989)]);if(_0x310f5b['witness'])_0x588866[_0x3943ad(0x4d1)](_0x310f5b['witness']);if(_0x310f5b[_0x3943ad(0x262)])_0x3fc7c9=!![];}}}catch{}let _0x322896;const _0x4eedb5=async _0x2073ed=>{const _0x4143b4=_0x3943ad;if(!_0x2073ed&&_0x322896!==void 0x0)return _0x322896;if(!_0x2073ed&&_0x52975f){if(_0x4143b4(0x8fc)==='EFJPQ'){const _0x40506f=_0x32e5ce[_0x4143b4(0x3fd)](_0x32e5ce['currentEpoch']());if(_0x40506f)return _0x322896=_0x40506f,_0x40506f;}else return{'success':![],'error':_0x4143b4(0x9b9),'batched':![]};}let _0x4b4785=null;try{_0x4b4785=await this['screen'][_0x4143b4(0x491)]();}catch{'xIDFK'!==_0x4143b4(0x946)?_0x4b4785=null:(_0x3bd991=!![],_0x59f944({'success':!![],'message':_0x4143b4(0x310)}));}return _0x4b4785&&_0x52975f&&_0x32e5ce[_0x4143b4(0x93e)](_0x4b4785,_0x478d4f),_0x322896=_0x4b4785,_0x4b4785;},_0x17cead=[];if(_0x3fc7c9&&!this['opts']['skipScreenshots']){const _0x3b4c0c=_0x5b92d0?await _0x4eedb5(!![]):null,_0x2799ed=await this['snapshotErrorBanners'](_0x3b4c0c)[_0x3943ad(0x48b)](()=>[]);for(const _0x5772e8 of _0x2799ed){_0x17cead['push']({'kind':_0x3943ad(0x700),'message':_0x3943ad(0x55a)+_0x5772e8[_0x3943ad(0x960)],'detail':'signal='+_0x5772e8[_0x3943ad(0x633)]+_0x3943ad(0x834)+_0xc3ad00(_0x5772e8['text'],0xc8),'flowId':_0x1b626d[_0x3943ad(0x930)]});}}const _0x42b809=await this[_0x3943ad(0x2e3)](_0x4a4308,_0x1b626d['flowId']),_0x303772=_0x1e8576?{'permissionDialogHandled':_0x1e8576,..._0x42ee91[_0x3943ad(0x65d)]??{}}:_0x42ee91[_0x3943ad(0x65d)],_0x4235d5=[...(_0x42ee91['objectiveSignals']??[])[_0x3943ad(0x86b)](_0x274cbe=>({..._0x274cbe,'flowId':_0x274cbe[_0x3943ad(0x930)]??_0x1b626d[_0x3943ad(0x930)]})),..._0x4c073d],_0x801253=[];if(_0x5b92d0){if(_0x3943ad(0x298)!==_0x3943ad(0x8ba)){const _0x23fd76=await _0x4eedb5(![]),_0x5c1cf7=_0x23fd76===null?null:await _0x4c6449(this[_0x3943ad(0x5be)],{'tree':_0x23fd76});if(_0x20f016&&_0x5c1cf7){const _0x1455aa=this['defaultExpectedRegion'](_0x20f016);try{const _0x1df851=_0x1871e3(_0x20f016,_0x5c1cf7,_0x1455aa);_0x1df851[_0x3943ad(0x696)]&&_0x801253['push']({'kind':_0x3943ad(0x75e),'message':_0x1df851['warning'],'detail':_0x51e350(_0x1df851['regressions']),'flowId':_0x1b626d[_0x3943ad(0x930)]});}catch{}}_0x20f016=_0x5c1cf7;}else return'error';}const _0x5c28c7=[...(_0x42ee91[_0x3943ad(0x394)]??[])[_0x3943ad(0x86b)](_0x2a61e6=>({..._0x2a61e6,'flowId':_0x2a61e6[_0x3943ad(0x930)]??_0x1b626d['flowId']})),..._0x588866,..._0x42b809[_0x3943ad(0x394)],..._0x17cead,..._0x801253],_0x51c247=_0x42ee91['reloadRecoveryWitness']??_0x42b809['reload'],_0xbc2ce6=!_0x42ee91[_0x3943ad(0x6d0)]||_0x478d4f===_0x5f20cc['length']-0x1,_0x5b1ab4=this[_0x3943ad(0x655)]({'objectiveSignals':_0x4235d5,'witnesses':_0x5c28c7,'reloadRecoveryWitness':_0x51c247,'details':_0x303772,'isFinalStep':_0xbc2ce6}),_0x530be4=_0x138617?.[_0x3943ad(0xa67)]?.[_0x3943ad(0x979)](_0x1b626d[_0x3943ad(0x9e5)])??![],_0x949318=(_0x5b1ab4!==void 0x0||_0x530be4)&&!this[_0x3943ad(0x83e)]['skipScreenshots'];let _0x474c07;if(_0x949318){const _0x13cbeb=await this['screen'][_0x3943ad(0x439)]()[_0x3943ad(0x48b)](()=>void 0x0);_0x13cbeb?.[_0x3943ad(0x6d0)]&&_0x13cbeb[_0x3943ad(0x343)]&&(_0x474c07=_0x13cbeb['base64'],_0x138617?.[_0x3943ad(0x6e5)]&&(await _0x138617['store'][_0x3943ad(0x943)](_0x138617[_0x3943ad(0x942)],_0x1b626d['name'],_0x478d4f,_0x13cbeb['base64'])['catch'](()=>void 0x0),_0x1104ee[_0x3943ad(0x856)](_0x478d4f)));}const _0x1407a3=_0x5b1ab4??(_0x474c07!==void 0x0&&_0x530be4?_0x3943ad(0x37d):void 0x0),_0x28a9fb=_0x1407a3&&_0x474c07!==void 0x0?{..._0x303772??{},'screenshotReason':_0x1407a3}:_0x303772;_0x3c01d6[_0x3943ad(0x4d1)]({'stepIndex':_0x478d4f,'action':_0x4a4308[_0x3943ad(0x5a0)],'success':_0x42ee91['success'],'durationMs':_0x5324f2,'error':_0x42ee91[_0x3943ad(0x3dd)],'screenshotBase64':_0x474c07,'runtimeErrorsCaptured':_0x54ae98['length']>0x0?_0x54ae98:void 0x0,'details':_0x28a9fb,'objectiveSignals':_0x4235d5[_0x3943ad(0x3b7)]>0x0?_0x4235d5:void 0x0,'witnesses':_0x5c28c7['length']>0x0?_0x5c28c7:void 0x0,'reloadRecoveryWitness':_0x51c247,..._0x1ddfd3(_0x4a4308)});if(!_0x42ee91[_0x3943ad(0x6d0)])break;}}finally{_0x48ab37?.['stop']();}const _0x237596=[],_0x184561=[],_0x5483b3=[];for(const _0x11f2f4 of _0x3c01d6){if(_0x11f2f4[_0x3943ad(0x364)]?.[_0x3943ad(0x3b7)])_0x237596['push'](..._0x11f2f4[_0x3943ad(0x364)]);if(_0x11f2f4[_0x3943ad(0x394)]?.['length'])_0x184561['push'](..._0x11f2f4[_0x3943ad(0x394)]);if(_0x11f2f4[_0x3943ad(0x326)])_0x5483b3[_0x3943ad(0x4d1)](_0x11f2f4['reloadRecoveryWitness']);}const _0x458f91=_0x5f20cc[_0x3943ad(0x3b7)]>0x0&&_0x3c01d6['length']===_0x5f20cc['length']&&_0x3c01d6[_0x3943ad(0xaad)](_0x3e5e1b=>_0x3e5e1b['success']),_0xc827ca=_0x458f91&&_0x237596['length']===0x0;return{'flow':_0x1b626d[_0x3943ad(0x9e5)],'flowId':_0x1b626d[_0x3943ad(0x930)],'success':_0xc827ca,'totalDurationMs':Date['now']()-_0x31ac0f,'steps':_0x3c01d6,'runtimeErrors':_0x30467b,'awake':_0x244fd0,'objectiveSignals':_0x237596['length']>0x0?_0x237596:void 0x0,'witnesses':_0x184561[_0x3943ad(0x3b7)]>0x0?_0x184561:void 0x0,'reloadRecoveryWitnesses':_0x5483b3[_0x3943ad(0x3b7)]>0x0?_0x5483b3:void 0x0,'screenshotsAvailable':_0x1104ee[_0x3943ad(0x952)]};}async['runChain'](_0x516a06,_0x57b744){const _0x1cf5bc=_0xf8ecb6,_0x1749e3=Date['now'](),_0x198a7e=[],_0x22fa8d=[];let _0x5814f2=null;for(let _0x4c2649=0x0;_0x4c2649<_0x516a06[_0x1cf5bc(0x628)]['length'];_0x4c2649++){const _0x22aa4a=_0x516a06['flows'][_0x4c2649];if(_0x4c2649>0x0&&_0x5814f2===null){const _0x1189eb=_0x516a06[_0x1cf5bc(0x9f2)][_0x4c2649-0x1]??[],_0xbb71e9=[];let _0x336b28=![];for(const _0x219c1c of _0x1189eb){const _0x38240d=_0x219c1c[_0x1cf5bc(0x20b)]??_0x219c1c['toRoute'],_0x4f99ca={'action':'tap','text':_0x38240d},_0x141775=await this[_0x1cf5bc(0x810)](_0x4f99ca);if(!_0x141775['success']){_0x336b28=!![];break;}_0xbb71e9['push'](_0x219c1c);}_0x22fa8d['push'](_0xbb71e9);if(_0x336b28){_0x198a7e['push']({'flow':_0x22aa4a[_0x1cf5bc(0x9e5)],'flowId':_0x22aa4a[_0x1cf5bc(0x930)],'success':![],'totalDurationMs':0x0,'steps':[{'stepIndex':-0x1,'action':'chain-bridge','success':![],'durationMs':0x0,'error':_0x1cf5bc(0x3bf)+_0x22aa4a['name']}],'runtimeErrors':[],'chainId':_0x516a06[_0x1cf5bc(0xa0e)],'chainPosition':_0x4c2649}),_0x5814f2=_0x4c2649;continue;}}else _0x4c2649>0x0&&_0x22fa8d['push'](null);if(_0x5814f2!==null){_0x198a7e[_0x1cf5bc(0x4d1)]({'flow':_0x22aa4a['name'],'flowId':_0x22aa4a['flowId'],'success':![],'totalDurationMs':0x0,'steps':[],'runtimeErrors':[],'chainId':_0x516a06['chainId'],'chainPosition':_0x4c2649,'skippedDueToChainAbort':!![]});continue;}const _0x5488a6=await this[_0x1cf5bc(0x7f0)](_0x22aa4a,_0x57b744);_0x5488a6['chainId']=_0x516a06[_0x1cf5bc(0xa0e)],_0x5488a6['chainPosition']=_0x4c2649,_0x198a7e[_0x1cf5bc(0x4d1)](_0x5488a6);const _0x131bb2=!_0x5488a6[_0x1cf5bc(0x6d0)]||(_0x5488a6['objectiveSignals']?.[_0x1cf5bc(0x3b7)]??0x0)>0x0;if(_0x131bb2){_0x5814f2=_0x4c2649;const _0x1b928b=_0x22aa4a[_0x1cf5bc(0x4df)]?.[_0x1cf5bc(0x8b6)]??_0x516a06['flows'][0x0]['beforeAll']?.['ensureLaunched'];_0x1b928b&&(await this[_0x1cf5bc(0x508)][_0x1cf5bc(0x6c6)](_0x1b928b)['catch'](()=>void 0x0),await this[_0x1cf5bc(0x508)]['launchApp'](_0x1b928b)[_0x1cf5bc(0x48b)](()=>void 0x0));}}const _0x3e03b7=_0x5814f2===null&&_0x198a7e['every'](_0x2af1de=>_0x2af1de['success']);return{'chainId':_0x516a06['chainId'],'success':_0x3e03b7,'totalDurationMs':Date['now']()-_0x1749e3,'flowResults':_0x198a7e,'bridgeHopsRun':_0x22fa8d,'abortedAtFlowIndex':_0x5814f2};}async[_0xf8ecb6(0x810)](_0x13fbe0,_0x3a7ed3){const _0x5cc5a6=_0xf8ecb6;switch(_0x13fbe0['action']){case _0x5cc5a6(0x51b):{const _0x289198=await this['apps'][_0x5cc5a6(0xadd)](_0x13fbe0[_0x5cc5a6(0x369)]);return{'success':_0x289198['success'],'error':_0x289198['error'],'details':{'transport':_0x289198[_0x5cc5a6(0x9c3)]}};}case _0x5cc5a6(0x3f7):{const _0x31afbd=await this['apps']['terminateApp'](_0x13fbe0['bundleId']);return{'success':_0x31afbd[_0x5cc5a6(0x6d0)],'error':_0x31afbd[_0x5cc5a6(0x3dd)],'details':{'transport':_0x31afbd[_0x5cc5a6(0x9c3)]}};}case'tap':{const _0x76b69a=async _0x3e3967=>{const _0x1f38f9=_0x5cc5a6;if(_0x3a7ed3?.[_0x1f38f9(0x997)]&&typeof this['screen']['findElementFromTree']==='function'&&typeof this['screen']['findAndTapReturningTree']==='function'){const _0x586122=_0x3a7ed3[_0x1f38f9(0x997)][_0x1f38f9(0x3fd)](_0x3a7ed3['axCache']['currentEpoch']());if(_0x586122){const _0x3fdfa5=this['screen'][_0x1f38f9(0x4da)](_0x586122,_0x3e3967),_0x2ea7f3=_0x3e3967[_0x1f38f9(0x977)]??0x0,_0x5bf35c=_0x3fdfa5[_0x2ea7f3];if(_0x5bf35c?.[_0x1f38f9(0x24c)]){const _0xda513e=_0x5bf35c[_0x1f38f9(0x24c)],_0x4dfebd=_0xda513e['x']+_0xda513e['width']/0x2,_0x31737b=_0xda513e['y']+_0xda513e['height']/0x2,_0x161d6b=await this['screen'][_0x1f38f9(0x2cd)](_0x4dfebd,_0x31737b,![]);if(_0x161d6b[_0x1f38f9(0x6d0)])return{'success':!![],'details':{'element':{'type':_0x5bf35c[_0x1f38f9(0x45e)]??'unknown','label':_0x5bf35c['label']??_0x5bf35c['name']??'','bounds':_0xda513e},'fromCache':!![]}};_0x3a7ed3[_0x1f38f9(0x997)][_0x1f38f9(0x3e7)]();}}const {result:_0x5c0982}=await this['screen'][_0x1f38f9(0x66d)](_0x3e3967);if(_0x5c0982['success']){if(_0x1f38f9(0x51c)==='ADbHV')return{'success':!![],'details':{'element':_0x5c0982[_0x1f38f9(0x820)]}};else{const _0xcee4e5=_0x5a41e5['CERAPH_AUTH_PROVIDER'],_0x695eae=_0x2bc235['CERAPH_AUTH_SECRET_ENV'];if(typeof _0xcee4e5!==_0x1f38f9(0x30d)||_0xcee4e5[_0x1f38f9(0x3b7)]===0x0)return null;if(!_0x27fb10[_0x1f38f9(0x979)](_0xcee4e5))return null;const _0x438b4e=_0xcee4e5==='cognito',_0x4aa09f=typeof _0x695eae===_0x1f38f9(0x30d)&&_0x695eae['length']>0x0;if(!_0x4aa09f&&!_0x438b4e)return null;return{'provider':_0xcee4e5,'secretEnv':_0x4aa09f?_0x695eae:'',..._0x2c7dea['CERAPH_AUTH_DOMAIN']?{'domain':_0x1136e5['CERAPH_AUTH_DOMAIN']}:{},..._0x1a6a9e[_0x1f38f9(0x5a6)]?{'connection':_0x51a9e2[_0x1f38f9(0x5a6)]}:{},..._0x55798c['CERAPH_AUTH_PROJECT_URL']?{'projectUrl':_0x4bbd8d[_0x1f38f9(0x950)]}:{},..._0x3b0677['CERAPH_AUTH_USER_POOL_ID']?{'userPoolId':_0x26ad90[_0x1f38f9(0x3d2)]}:{},..._0x17cad6['CERAPH_AUTH_CLIENT_ID']?{'clientId':_0x59f625[_0x1f38f9(0x9e4)]}:{},..._0x566fa2['CERAPH_AUTH_REGION']?{'region':_0x39f5ab['CERAPH_AUTH_REGION']}:{}};}}let _0x17d900=_0x5c0982,_0x1fb934=_0x5c0982['matchCount'];for(let _0x3533d4=0x0;_0x3533d4<_0x4400df;_0x3533d4++){const _0x1f34d2=await this['screen']['swipe']({'direction':'up'});if(!_0x1f34d2['success'])break;const _0xb965a8=await this[_0x1f38f9(0x5be)]['findAndTap'](_0x3e3967);if(_0xb965a8['success'])return{'success':!![],'details':{'element':_0xb965a8[_0x1f38f9(0x820)],'retryAfterSwipes':_0x3533d4+0x1}};_0x17d900=_0xb965a8,_0x1fb934=_0x319bf2(_0x1fb934,_0xb965a8[_0x1f38f9(0x78d)]);}return{'success':![],'error':_0x17d900[_0x1f38f9(0x3dd)]??'Element\x20not\x20found','details':{'availableElements':_0x17d900['availableElements'],'matchCount':_0x1fb934}};}const _0x43413c=await this['screen'][_0x1f38f9(0x31f)](_0x3e3967);if(_0x43413c['success'])return{'success':!![],'details':{'element':_0x43413c['element']}};let _0x6aed6c=_0x43413c,_0x52becf=_0x43413c[_0x1f38f9(0x78d)];for(let _0x1f5611=0x0;_0x1f5611<_0x4400df;_0x1f5611++){const _0x530b85=await this['screen']['swipe']({'direction':'up'});if(!_0x530b85['success'])break;const _0x1456df=await this[_0x1f38f9(0x5be)][_0x1f38f9(0x31f)](_0x3e3967);if(_0x1456df['success'])return{'success':!![],'details':{'element':_0x1456df[_0x1f38f9(0x820)],'retryAfterSwipes':_0x1f5611+0x1}};_0x6aed6c=_0x1456df,_0x52becf=_0x319bf2(_0x52becf,_0x1456df['matchCount']);}return{'success':![],'error':_0x6aed6c[_0x1f38f9(0x3dd)]??'Element\x20not\x20found','details':{'availableElements':_0x6aed6c['availableElements'],'matchCount':_0x52becf}};},_0x345371={'text':_0x13fbe0['text'],'accessibilityLabel':_0x13fbe0[_0x5cc5a6(0x444)],'type':_0x13fbe0[_0x5cc5a6(0x45e)],'index':_0x13fbe0[_0x5cc5a6(0x977)]},_0x5765dc=await _0x76b69a(_0x345371);if(_0x5765dc[_0x5cc5a6(0x6d0)])return _0x5765dc;if(_0x5765dc[_0x5cc5a6(0x65d)]?.['matchCount']===0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==void 0x0&&_0x13fbe0['fallbackText']!==_0x13fbe0['text']){if('jAxar'==='xvsRy')_0x5b1432=!![],_0x280f8b=_0x7388ad;else{const _0x1414db=await _0x76b69a({'text':_0x13fbe0['fallbackText'],'index':_0x13fbe0['index']});if(_0x1414db['success'])return{..._0x1414db,'details':{..._0x1414db['details'],'resolvedViaFallback':!![]}};}}return _0x5765dc;}case'tapCoords':{const _0x5dddaf=(_0x13fbe0['coordinateSource']??_0x5cc5a6(0xad2))===_0x5cc5a6(0x439),_0x5bd6c3=await this['screen'][_0x5cc5a6(0x2cd)](_0x13fbe0['x'],_0x13fbe0['y'],_0x5dddaf);return{'success':_0x5bd6c3[_0x5cc5a6(0x6d0)],'error':_0x5bd6c3['error'],'details':{'tappedAt':_0x5bd6c3[_0x5cc5a6(0x9da)]}};}case _0x5cc5a6(0x45c):{if('XxqGY'==='UsraH')return{'ok':![],'error':_0x5cc5a6(0x32d)+_0x5aee79(_0x5e0181['kind'])};else{const _0x2756a8=async _0x49c8a1=>{const _0x243fba=_0x5cc5a6,_0x23ac40=await this[_0x243fba(0x5be)][_0x243fba(0x559)](_0x49c8a1,_0x13fbe0[_0x243fba(0x270)]??0x3e8);if(_0x23ac40['success'])return{'success':!![],'details':{'element':_0x23ac40['element']}};let _0x151a98=_0x23ac40,_0x1b057e=_0x23ac40[_0x243fba(0x78d)];for(let _0x437984=0x0;_0x437984<_0x4400df;_0x437984++){const _0x2bf709=await this[_0x243fba(0x5be)][_0x243fba(0x8b2)]({'direction':'up'});if(!_0x2bf709['success'])break;const _0x131d57=await this['screen']['longPressElement'](_0x49c8a1,_0x13fbe0['durationMs']??0x3e8);if(_0x131d57['success'])return{'success':!![],'details':{'element':_0x131d57[_0x243fba(0x820)],'retryAfterSwipes':_0x437984+0x1}};_0x151a98=_0x131d57,_0x1b057e=_0x319bf2(_0x1b057e,_0x131d57['matchCount']);}return{'success':![],'error':_0x151a98[_0x243fba(0x3dd)]??_0x243fba(0x516),'details':{'matchCount':_0x1b057e}};},_0x531726={'text':_0x13fbe0[_0x5cc5a6(0x3e0)],'accessibilityLabel':_0x13fbe0['accessibilityLabel']},_0x6d14b5=await _0x2756a8(_0x531726);if(_0x6d14b5[_0x5cc5a6(0x6d0)])return _0x6d14b5;if(_0x6d14b5[_0x5cc5a6(0x65d)]?.[_0x5cc5a6(0x78d)]===0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==void 0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==_0x13fbe0['text']){const _0x5306aa=await _0x2756a8({'text':_0x13fbe0['fallbackText']});if(_0x5306aa[_0x5cc5a6(0x6d0)])return{..._0x5306aa,'details':{..._0x5306aa[_0x5cc5a6(0x65d)],'resolvedViaFallback':!![]}};}return _0x6d14b5;}}case _0x5cc5a6(0x45e):{if(_0x5cc5a6(0x694)==='ACQsC'){if(_0x13fbe0[_0x5cc5a6(0x2d5)]){const _0x4e56e8=_0x13fbe0['into']['text'],_0x474555=_0x13fbe0[_0x5cc5a6(0x581)]!==void 0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==_0x4e56e8?_0x13fbe0['fallbackText']:void 0x0,_0x54a139=!(_0x3a7ed3?.[_0x5cc5a6(0x32e)]===!![])&&typeof this['screen'][_0x5cc5a6(0x38c)]===_0x5cc5a6(0x49b);if(_0x54a139){let _0x4a8410=await this['screen'][_0x5cc5a6(0x38c)]({'text':_0x4e56e8,'accessibilityLabel':_0x13fbe0[_0x5cc5a6(0x2d5)]['accessibilityLabel']},_0x13fbe0[_0x5cc5a6(0x39d)]);return _0x4a8410[_0x5cc5a6(0x78d)]===0x0&&_0x474555!==void 0x0&&(_0x4a8410=await this['screen']['typeIntoField']({'text':_0x474555},_0x13fbe0['value'])),_0x4a8410[_0x5cc5a6(0x6d0)]&&_0x3a7ed3?.[_0x5cc5a6(0x997)]&&_0x3a7ed3['axCache'][_0x5cc5a6(0x3e7)](),{'success':_0x4a8410['success'],'error':_0x4a8410[_0x5cc5a6(0x3dd)],'details':{'element':_0x4a8410[_0x5cc5a6(0x820)],'batched':_0x4a8410[_0x5cc5a6(0x565)]}};}let _0x56f85f=await this['screen']['findAndTap']({'text':_0x4e56e8,'accessibilityLabel':_0x13fbe0[_0x5cc5a6(0x2d5)][_0x5cc5a6(0x444)]});if(_0x56f85f[_0x5cc5a6(0x78d)]===0x0&&_0x474555!==void 0x0){if('XEbgy'!=='XEbgy')return{'status':'preserved','settingsPath':_0x3c3d57,'reason':'existing\x20settings\x20at\x20'+_0x4a9fd2+'\x20is\x20malformed\x20JSON\x20—\x20preserved;\x20fix\x20it\x20manually\x20then\x20re-run'};else _0x56f85f=await this['screen'][_0x5cc5a6(0x31f)]({'text':_0x474555});}if(!_0x56f85f['success'])return{'success':![],'error':_0x56f85f['error']??'Could\x20not\x20focus\x20target\x20field\x20for\x20type','details':{'availableElements':_0x56f85f[_0x5cc5a6(0x8b0)]}};if(_0x3a7ed3?.[_0x5cc5a6(0x997)])_0x3a7ed3['axCache'][_0x5cc5a6(0x3e7)]();}const _0x179bb7=await this[_0x5cc5a6(0x5be)][_0x5cc5a6(0x45e)](_0x13fbe0['value']);return{'success':_0x179bb7[_0x5cc5a6(0x6d0)],'error':_0x179bb7[_0x5cc5a6(0x3dd)]};}else return _0x3defa9 instanceof _0x320ed5?_0x334fa4['message']:_0x62ea3a(_0xaf5b1);}case _0x5cc5a6(0x436):{if(_0x5cc5a6(0x93a)==='XRzfp')return _0x2ba9af(_0x5cc5a6(0x3ce),_0x14e36b);else{const _0x4ee1ce=await this[_0x5cc5a6(0x5be)][_0x5cc5a6(0x436)]({'text':_0x13fbe0[_0x5cc5a6(0x3e0)],'accessibilityLabel':_0x13fbe0['accessibilityLabel']});return{'success':_0x4ee1ce['success'],'error':_0x4ee1ce['error']};}}case'swipe':{const _0x77e15=await this[_0x5cc5a6(0x5be)]['swipe']({'direction':_0x13fbe0['direction'],'from':_0x13fbe0['from'],'distancePx':_0x13fbe0['distancePx'],'coordinateSource':'device'});return{'success':_0x77e15['success'],'error':_0x77e15[_0x5cc5a6(0x3dd)],'details':{'from':_0x77e15['from'],'to':_0x77e15['to']}};}case _0x5cc5a6(0xa59):{const _0xc484a5={'maxSwipes':_0x13fbe0['maxSwipes'],'direction':_0x13fbe0['direction']};let _0x3349e5=await this['screen']['scrollToElement']({'text':_0x13fbe0['text'],'accessibilityLabel':_0x13fbe0['accessibilityLabel']},_0xc484a5),_0x25888a=![];if(_0x3349e5[_0x5cc5a6(0x78d)]===0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==void 0x0&&_0x13fbe0['fallbackText']!==_0x13fbe0['text']){const _0x253d39=await this[_0x5cc5a6(0x5be)]['scrollToElement']({'text':_0x13fbe0[_0x5cc5a6(0x581)]},_0xc484a5);_0x253d39[_0x5cc5a6(0x6d0)]&&(_0x3349e5=_0x253d39,_0x25888a=!![]);}return{'success':_0x3349e5[_0x5cc5a6(0x6d0)],'error':_0x3349e5['error'],'details':{'swipes':_0x3349e5[_0x5cc5a6(0x6d4)],'element':_0x3349e5[_0x5cc5a6(0x820)],..._0x25888a?{'resolvedViaFallback':!![]}:{}}};}case _0x5cc5a6(0x588):{if('Sitht'!=='Sitht'){if(_0x484ecc)return;_0x1688e7=!![],_0xbf59f4(_0x96784c),_0x1b7dfa({'code':_0x46d2ef??0x1,'stdout':_0x24f902,'stderr':_0x538ea2});}else{const _0x38fdb9={'timeoutMs':_0x13fbe0[_0x5cc5a6(0x2f9)],'disappear':_0x13fbe0['disappear']};let _0x55e4ae=await this[_0x5cc5a6(0x5be)]['waitFor']({'text':_0x13fbe0['text'],'accessibilityLabel':_0x13fbe0['accessibilityLabel'],'type':_0x13fbe0[_0x5cc5a6(0x45e)]},_0x38fdb9),_0xdbdc69=![];if(!_0x55e4ae[_0x5cc5a6(0x6d0)]&&_0x13fbe0['disappear']!==!![]&&_0x13fbe0['fallbackText']!==void 0x0&&_0x13fbe0['fallbackText']!==_0x13fbe0['text']){const _0x3e3196=await this[_0x5cc5a6(0x5be)]['waitFor']({'text':_0x13fbe0[_0x5cc5a6(0x581)]},_0x38fdb9);_0x3e3196[_0x5cc5a6(0x6d0)]&&(_0x55e4ae=_0x3e3196,_0xdbdc69=!![]);}return{'success':_0x55e4ae[_0x5cc5a6(0x6d0)],'error':_0x55e4ae[_0x5cc5a6(0x3dd)],'details':{'elapsedMs':_0x55e4ae[_0x5cc5a6(0xafb)],'found':_0x55e4ae[_0x5cc5a6(0x3b2)],..._0xdbdc69?{'resolvedViaFallback':!![]}:{}}};}}case _0x5cc5a6(0xa0b):{const _0x1d68c6=async _0x34b7c4=>{const _0x2c6ae8=_0x5cc5a6;if(_0x3a7ed3?.[_0x2c6ae8(0x997)]&&typeof this['screen'][_0x2c6ae8(0x4da)]===_0x2c6ae8(0x49b)){const _0x4e7fcc=_0x3a7ed3['axCache']['get'](_0x3a7ed3[_0x2c6ae8(0x997)]['currentEpoch']());if(_0x4e7fcc){const _0x3d8d02=this['screen'][_0x2c6ae8(0x4da)](_0x4e7fcc,_0x34b7c4),_0x13e8dc=_0x3d8d02[0x0];if(_0x13e8dc?.[_0x2c6ae8(0x24c)])return{'success':!![],'details':{'element':{'type':_0x13e8dc[_0x2c6ae8(0x45e)]??_0x2c6ae8(0x6b2),'label':_0x13e8dc['label']??_0x13e8dc[_0x2c6ae8(0x9e5)]??'','bounds':_0x13e8dc[_0x2c6ae8(0x24c)]},'fromCache':!![]}};}}if(_0x3a7ed3?.[_0x2c6ae8(0x997)]&&typeof this[_0x2c6ae8(0x5be)]['fetchSourceTree']===_0x2c6ae8(0x49b)&&typeof this[_0x2c6ae8(0x5be)][_0x2c6ae8(0x4da)]===_0x2c6ae8(0x49b)){const _0x2667e2=await this[_0x2c6ae8(0x5be)]['fetchSourceTree']();if(_0x2667e2){if('iGyLS'!==_0x2c6ae8(0xa21)){_0x3a7ed3['axCache']['set'](_0x2667e2,_0x3a7ed3[_0x2c6ae8(0x997)]['currentEpoch']());const _0x20a21b=this[_0x2c6ae8(0x5be)][_0x2c6ae8(0x4da)](_0x2667e2,_0x34b7c4),_0x1f4973=_0x20a21b[0x0];if(_0x1f4973?.[_0x2c6ae8(0x24c)])return{'success':!![],'details':{'element':{'type':_0x1f4973[_0x2c6ae8(0x45e)]??_0x2c6ae8(0x6b2),'label':_0x1f4973[_0x2c6ae8(0x960)]??_0x1f4973[_0x2c6ae8(0x9e5)]??'','bounds':_0x1f4973['rect']}}};return{'success':![],'error':_0x2c6ae8(0xab1)+JSON[_0x2c6ae8(0x312)](_0x34b7c4)};}else{const _0x48b763=_0x276ffb(_0x59d3d4)??'path:'+_0x13e03c[_0x2c6ae8(0x4ec)]('.'),_0x549456=typeof _0x28794d[_0x2c6ae8(0x45e)]==='string'?_0x15f99e(_0x872be5[_0x2c6ae8(0x45e)]):void 0x0;_0x1067c2[_0x2c6ae8(0x4d1)]({'id':_0x48b763,'bounds':_0xb13908,'visible':_0x1943eb['w']>0x0&&_0x3dad33['h']>0x0,..._0x549456?{'kind':_0x549456}:{}});}}}const _0x38f37c=await this[_0x2c6ae8(0x5be)]['assertVisible'](_0x34b7c4);if(!_0x38f37c[_0x2c6ae8(0x6d0)])return{'success':![],'error':_0x38f37c[_0x2c6ae8(0x3dd)]};if(!_0x38f37c['visible'])return{'success':![],'error':_0x2c6ae8(0xab1)+JSON[_0x2c6ae8(0x312)](_0x34b7c4)};return{'success':!![],'details':{'element':_0x38f37c[_0x2c6ae8(0x820)]}};},_0x382bb2={'text':_0x13fbe0['text'],'accessibilityLabel':_0x13fbe0[_0x5cc5a6(0x444)],'type':_0x13fbe0[_0x5cc5a6(0x45e)]},_0x527d42=await _0x1d68c6(_0x382bb2);if(_0x527d42[_0x5cc5a6(0x6d0)])return _0x527d42;if(_0x13fbe0['fallbackText']!==void 0x0&&_0x13fbe0[_0x5cc5a6(0x581)]!==_0x13fbe0[_0x5cc5a6(0x3e0)]){const _0x16ad2d=await _0x1d68c6({'text':_0x13fbe0['fallbackText']});if(_0x16ad2d['success']){if('RAruD'!=='wAdLW')return{..._0x16ad2d,'details':{..._0x16ad2d['details'],'resolvedViaFallback':!![]}};else this[_0x5cc5a6(0x2f7)]=_0x575a78;}}return _0x527d42;}case'assertNotVisible':{const _0x5689d6={'text':_0x13fbe0['text'],'accessibilityLabel':_0x13fbe0[_0x5cc5a6(0x444)],'type':_0x13fbe0['type']};if(_0x3a7ed3?.[_0x5cc5a6(0x997)]&&typeof this[_0x5cc5a6(0x5be)]['findElementFromTree']==='function'){const _0x592675=_0x3a7ed3['axCache'][_0x5cc5a6(0x3fd)](_0x3a7ed3['axCache'][_0x5cc5a6(0x76f)]());if(_0x592675){const _0x3de18d=this[_0x5cc5a6(0x5be)]['findElementFromTree'](_0x592675,_0x5689d6),_0x1d7ee7=_0x3de18d[0x0];if(_0x1d7ee7?.[_0x5cc5a6(0x24c)])return{'success':![],'error':_0x5cc5a6(0x3f4)+JSON[_0x5cc5a6(0x312)](_0x5689d6)};}}if(_0x3a7ed3?.['axCache']&&typeof this[_0x5cc5a6(0x5be)]['fetchSourceTree']===_0x5cc5a6(0x49b)&&typeof this['screen']['findElementFromTree']===_0x5cc5a6(0x49b)){const _0x2b8971=await this['screen'][_0x5cc5a6(0x491)]();if(_0x2b8971){if(_0x5cc5a6(0x2b4)!=='CqYjB')_0x48c792['abort'](new _0x462014(_0x5cc5a6(0x652),'AbortError')),_0x541956['abort']();else{_0x3a7ed3['axCache'][_0x5cc5a6(0x93e)](_0x2b8971,_0x3a7ed3[_0x5cc5a6(0x997)][_0x5cc5a6(0x76f)]());const _0x4e8d62=this[_0x5cc5a6(0x5be)]['findElementFromTree'](_0x2b8971,_0x5689d6),_0x29bc69=_0x4e8d62[0x0];if(_0x29bc69?.[_0x5cc5a6(0x24c)])return{'success':![],'error':_0x5cc5a6(0x3f4)+JSON['stringify'](_0x5689d6)};return{'success':!![]};}}}const _0xfa300=await this['screen']['assertNotVisible'](_0x5689d6);if(!_0xfa300['success'])return{'success':![],'error':_0xfa300['error']};if(_0xfa300['visible'])return{'success':![],'error':'assertNotVisible:\x20element\x20is\x20visible:\x20'+JSON['stringify'](_0x5689d6)};return{'success':!![]};}case _0x5cc5a6(0x783):{const _0xce0892=await this[_0x5cc5a6(0x5be)][_0x5cc5a6(0x783)](_0x13fbe0[_0x5cc5a6(0x88a)]);return{'success':_0xce0892['success'],'error':_0xce0892[_0x5cc5a6(0x3dd)],'details':{'key':_0x13fbe0['key'],..._0xce0892[_0x5cc5a6(0x65d)]??{}}};}case'screenshot':{const _0x23912e=await this['screen'][_0x5cc5a6(0x439)]();return{'success':_0x23912e['success'],'error':_0x23912e[_0x5cc5a6(0x3dd)],'details':{'label':_0x13fbe0['label'],'hasBase64':!!_0x23912e[_0x5cc5a6(0x343)]}};}case'sleep':{return await new Promise(_0x25e30d=>setTimeout(_0x25e30d,Math['max'](0x0,_0x13fbe0['ms']))),{'success':!![]};}case'reloadRecoveryWitness':{const _0x4b0839=await this[_0x5cc5a6(0x37f)](_0x13fbe0);return{'success':!![],'details':{'outcome':_0x4b0839[_0x5cc5a6(0x72e)]},'reloadRecoveryWitness':_0x4b0839};}case'reset':{const _0x337c0c=await this[_0x5cc5a6(0x5be)][_0x5cc5a6(0x423)](_0x5cc5a6(0x933));return{'success':_0x337c0c[_0x5cc5a6(0x6d0)],'error':_0x337c0c[_0x5cc5a6(0x3dd)],'details':{'dispatched':_0x337c0c['success']}};}default:{const _0x22700d=_0x13fbe0;return{'success':![],'error':'Unknown\x20step\x20action:\x20'+JSON['stringify'](_0x22700d)};}}}async['readErrors'](_0x2a80ef){const _0x5a0fbd=_0xf8ecb6;try{const _0x1961d4=await _0x4d5fc9(_0x2a80ef,'utf-8'),_0x2f5c13=JSON[_0x5a0fbd(0x981)](_0x1961d4),_0x29167=_0x2f5c13[_0x5a0fbd(0x5ac)]??[];return _0x29167[_0x5a0fbd(0x86b)](_0x163765=>({'message':_0x163765['message']??'','stack':_0x163765[_0x5a0fbd(0xade)]??'','timestamp':_0x163765[_0x5a0fbd(0x684)]??new Date()[_0x5a0fbd(0x471)](),'kind':_0x163765['kind'],'url':_0x163765[_0x5a0fbd(0x269)],'status':_0x163765['status'],'method':_0x163765['method'],'durationMs':_0x163765['durationMs'],'elementKey':_0x163765[_0x5a0fbd(0xa9a)],'prevText':_0x163765[_0x5a0fbd(0x9a5)],'nextText':_0x163765['nextText']}));}catch{return[];}}[_0xf8ecb6(0x7f8)](_0x51dbc0){const _0x353a78=_0xf8ecb6;return _0x51dbc0['timestamp']+'::'+_0x51dbc0['message']+'::'+_0x51dbc0[_0x353a78(0xade)][_0x353a78(0x795)](0x0,0xc8);}[_0xf8ecb6(0x655)](_0x520163){const _0x4171dc=_0xf8ecb6;if(_0x520163['objectiveSignals']['length']>0x0)return'objective-signal';if(_0x520163[_0x4171dc(0x394)]['length']>0x0)return'witness';if(_0x520163['reloadRecoveryWitness'])return _0x4171dc(0x4d5);const _0x30eda0=_0x520163['details']?.[_0x4171dc(0x8eb)];if(typeof _0x30eda0===_0x4171dc(0x2af)&&_0x30eda0>0x0)return'find-fallback';if(_0x520163[_0x4171dc(0x3ae)])return _0x4171dc(0x39e);return void 0x0;}['defaultExpectedRegion'](_0x1282f9){const _0xf4160f=_0xf8ecb6;let _0x4bd42d=0x0,_0x554235=0x0;for(const _0x34bf29 of _0x1282f9['nodes']){const _0x555ee1=_0x34bf29[_0xf4160f(0x268)]['x']+_0x34bf29['bounds']['w'],_0x47e8c4=_0x34bf29['bounds']['y']+_0x34bf29['bounds']['h'];if(_0x555ee1>_0x4bd42d)_0x4bd42d=_0x555ee1;if(_0x47e8c4>_0x554235)_0x554235=_0x47e8c4;}(_0x4bd42d<=0x0||_0x554235<=0x0)&&(_0x4bd42d=0x1f4,_0x554235=0x3e8);const _0x4d7726=_0x262d18;return{'x':0x0,'y':_0x4d7726,'w':_0x4bd42d,'h':Math[_0xf4160f(0x553)](0x0,_0x554235-_0x4d7726),..._0x1282f9[_0xf4160f(0x99b)]?{'screenName':_0x1282f9[_0xf4160f(0x99b)]}:{}};}[_0xf8ecb6(0x9af)](_0x3e3adc,_0x8dc3ca){const _0x4df93e=_0xf8ecb6,_0x459438=_0x3e3adc[_0x4df93e(0xb14)]??'metro-error';if(_0x459438==='metro-error'||_0x459438==='js-error'||_0x459438===_0x4df93e(0x215))return{'objective':{'kind':_0x4df93e(0x5d3),'message':_0x3e3adc[_0x4df93e(0x531)],'detail':_0x3e3adc['stack']||void 0x0,'flowId':_0x8dc3ca}};if(_0x459438===_0x4df93e(0x651)){const _0x5a1f2c=typeof _0x3e3adc[_0x4df93e(0x428)]!==_0x4df93e(0x2af);return{'objective':{'kind':_0x5a1f2c?_0x4df93e(0x727):_0x4df93e(0x57e),'message':_0x3e3adc[_0x4df93e(0x531)],'detail':this['formatNetworkDetail'](_0x3e3adc),'flowId':_0x8dc3ca}};}if(_0x459438===_0x4df93e(0x763)){if(_0x3e3adc['status']===0x191||_0x3e3adc[_0x4df93e(0x428)]===0x193)return{'objective':{'kind':_0x4df93e(0x57e),'message':_0x3e3adc['message'],'detail':this['formatNetworkDetail'](_0x3e3adc),'flowId':_0x8dc3ca}};return{'witness':{'kind':'http-client-error','message':_0x3e3adc[_0x4df93e(0x531)],'detail':this['formatNetworkDetail'](_0x3e3adc),'flowId':_0x8dc3ca}};}if(_0x459438==='mutation-fired')return{'mutationMarker':!![]};if(_0x459438===_0x4df93e(0x43f)){const _0x5af7e1=_0x2ea6dd(_0x3e3adc);return{'witness':{'kind':_0x4df93e(0xaba),'message':'optimistic\x20rollback:\x20'+(_0x3e3adc[_0x4df93e(0xa9a)]??'<unknown\x20element>'),..._0x5af7e1?{'detail':_0x5af7e1}:{},'flowId':_0x8dc3ca}};}if(_0x459438===_0x4df93e(0x858))return _0x4df93e(0x2cc)!=='BwGOU'?{'witness':{'kind':'console-error','message':_0x3e3adc['message'],'flowId':_0x8dc3ca}}:(_0x117127({'value':![],'fetchedAt':_0x5c0bb3()}),![]);return{'witness':{'kind':'verify-observation','message':_0x4df93e(0x90b)+_0x459438+_0x4df93e(0x97a)+_0x3e3adc['message'],'flowId':_0x8dc3ca}};}['formatNetworkDetail'](_0x1964f8){const _0x479d7c=_0xf8ecb6,_0xcdebff=[];if(_0x1964f8['method'])_0xcdebff[_0x479d7c(0x4d1)](_0x479d7c(0x8d7)+_0x1964f8['method']);if(_0x1964f8['url'])_0xcdebff[_0x479d7c(0x4d1)](_0x479d7c(0x591)+_0x1964f8['url']);if(typeof _0x1964f8['status']==='number')_0xcdebff[_0x479d7c(0x4d1)](_0x479d7c(0x796)+_0x1964f8['status']);if(typeof _0x1964f8['durationMs']==='number')_0xcdebff['push'](_0x479d7c(0x27d)+_0x1964f8['durationMs']);return _0xcdebff[_0x479d7c(0x3b7)]>0x0?_0xcdebff['join']('\x20'):void 0x0;}async['runVerifyMarkers'](_0x2339e0,_0x2acb3f){const _0x564213=_0xf8ecb6,_0x216be5=[];let _0x270372;if(_0x2339e0[_0x564213(0x41b)]){const _0x4efb4b=_0x2339e0[_0x564213(0x41b)][_0x564213(0x78b)];let _0x48652c=![],_0x3d1522;if(_0x4efb4b){const _0x18b28c=await this[_0x564213(0x5be)]['assertVisible'](_0x4efb4b)[_0x564213(0x48b)](()=>({'success':![],'visible':![]}));_0x48652c=_0x18b28c[_0x564213(0x6d0)]&&_0x18b28c['visible'],_0x3d1522='selector='+JSON[_0x564213(0x312)](_0x4efb4b)+_0x564213(0x1f3)+_0x48652c;}else _0x3d1522='route='+(_0x2339e0['verifyMutation'][_0x564213(0x2e8)]??_0x564213(0x3f8));_0x216be5['push']({'kind':'verify-observation','message':_0x564213(0x7bd)+_0x2339e0['verifyMutation']['sourceMethod']+'\x20'+_0x2339e0['verifyMutation']['sourceEndpoint']+'\x20'+(_0x48652c?_0x564213(0x9f6):_0x564213(0x3cd)),'detail':_0x3d1522,'flowId':_0x2acb3f});if(_0x2339e0['verifyMutation']['mutationKind']!==_0x564213(0x30e)){const _0x16060d=_0x2339e0[_0x564213(0x41b)][_0x564213(0x2a7)]??[];for(const _0x3f6639 of _0x16060d){const _0x2d4e17=await this[_0x564213(0x61e)](_0x3f6639);_0x2d4e17&&_0x216be5['push']({'kind':_0x564213(0x3c8),'message':_0x564213(0xa6e)+_0x2339e0[_0x564213(0x41b)]['sourceMethod']+'\x20'+_0x2339e0['verifyMutation'][_0x564213(0x317)]+_0x564213(0x55d)+(_0x3f6639[_0x564213(0xaae)]?'field='+_0x3f6639['responseField']+'\x20':'')+'value='+JSON['stringify'](_0x3f6639['responseValue'])+_0x564213(0x4bc),'detail':_0x2d4e17,'flowId':_0x2acb3f});}}}if(_0x2339e0[_0x564213(0x8c9)]){const _0x1b05e7=_0x2339e0[_0x564213(0x8c9)][_0x564213(0x986)];let _0x11b840=![],_0x2552ec;if(_0x1b05e7){if(_0x564213(0x776)!=='biwCX'){const _0x1aea36=await this['screen'][_0x564213(0xa0b)](_0x1b05e7)[_0x564213(0x48b)](()=>({'success':![],'visible':![]}));_0x11b840=_0x1aea36['success']&&_0x1aea36['visible'],_0x2552ec='protectedRoute='+_0x2339e0[_0x564213(0x8c9)][_0x564213(0x928)]+_0x564213(0x61d)+JSON[_0x564213(0x312)](_0x1b05e7)+'\x20visible='+_0x11b840;}else{if(_0x5672d2(_0x3592d7))_0x1272ce['push'](_0x327be8);else _0x3202f5['push'](_0x74ed5a);}}else _0x2552ec=_0x564213(0x88e)+_0x2339e0[_0x564213(0x8c9)][_0x564213(0x928)];_0x216be5[_0x564213(0x4d1)]({'kind':_0x564213(0xaba),'message':'verifyAuth:\x20'+(_0x11b840?'user-marker\x20visible\x20on\x20protected\x20route':_0x564213(0x9e8)),'detail':_0x2552ec,'flowId':_0x2acb3f});}if(_0x2339e0['verifyNavigation']){const _0x3c6cb3=_0x2339e0[_0x564213(0xa66)]['selectorHint'];let _0x32020d=![],_0x100b0a;if(_0x3c6cb3){const _0x3d62bb=await this[_0x564213(0x5be)][_0x564213(0xa0b)](_0x3c6cb3)['catch'](()=>({'success':![],'visible':![]}));_0x32020d=_0x3d62bb[_0x564213(0x6d0)]&&_0x3d62bb['visible'],_0x100b0a=_0x564213(0x401)+_0x2339e0[_0x564213(0xa66)][_0x564213(0xa90)]+_0x564213(0x568)+JSON[_0x564213(0x312)](_0x3c6cb3)+'\x20visible='+_0x32020d;}else _0x564213(0x311)!==_0x564213(0xac9)?_0x100b0a='destination='+_0x2339e0[_0x564213(0xa66)]['destinationRoute']:(this['session']=null,this[_0x564213(0xb00)][_0x564213(0xaf5)]());_0x216be5[_0x564213(0x4d1)]({'kind':'verify-observation','message':_0x564213(0x417)+(_0x32020d?'destination\x20primary\x20selector\x20visible':'destination\x20primary\x20selector\x20NOT\x20visible'),'detail':_0x100b0a,'flowId':_0x2acb3f});}if(_0x2339e0[_0x564213(0xa23)]){if(_0x564213(0xa9e)==='xPcQv'){const _0xc6bba5=_0x2339e0['verifyProfileTransition'][_0x564213(0x7ee)]??_0x2339e0['verifyProfileTransition'][_0x564213(0xb26)][_0x564213(0x86b)](_0xebfa68=>({'text':_0xebfa68,'route':_0xebfa68}));_0x270372=await this[_0x564213(0x37f)]({'expectedSelectors':_0xc6bba5});}else return this[_0x564213(0x4e7)][_0x564213(0x795)]();}return{'witnesses':_0x216be5,'reload':_0x270372};}async[_0xf8ecb6(0x61e)](_0xb0006e){const _0x123128=_0xf8ecb6,_0x5803ff=0x190,_0x22064a=0x5,_0x7d820f=_0x240df8(_0xb0006e[_0x123128(0x360)]);let _0x2754dd=null;for(let _0x1c29ba=0x0;_0x1c29ba<_0x22064a;_0x1c29ba++){const _0x5a16a7=await this['readSelectorText'](_0xb0006e['selector']);if(_0x5a16a7!==null){_0x2754dd=_0x5a16a7;const _0x1fcf8e=_0x240df8(_0x5a16a7);if(_0x3cd8b5(_0x7d820f,_0x1fcf8e,_0xb0006e[_0x123128(0x360)]))return null;}_0x1c29ba<_0x22064a-0x1&&await new Promise(_0x3c235a=>setTimeout(_0x3c235a,_0x5803ff));}if(_0x2754dd===null)return null;const _0x2d4f89=['selector='+JSON[_0x123128(0x312)](_0xb0006e['selector']),_0x123128(0x6ec)+JSON['stringify'](_0xb0006e[_0x123128(0x360)]),_0x123128(0x4f7)+JSON['stringify'](_0x2754dd)];if(_0xb0006e[_0x123128(0xaae)])_0x2d4f89['unshift'](_0x123128(0x896)+_0xb0006e['responseField']);return _0x2d4f89[_0x123128(0x4ec)]('\x20');}async['readSelectorText'](_0x23a84a){const _0x946c4d=_0xf8ecb6;if(typeof this['screen']['fetchSourceTree']!=='function'||typeof this[_0x946c4d(0x5be)][_0x946c4d(0x4da)]!=='function')return null;const _0x1691eb=await this['screen'][_0x946c4d(0x491)]()[_0x946c4d(0x48b)](()=>null);if(!_0x1691eb)return null;const _0x3b9ae3=this[_0x946c4d(0x5be)][_0x946c4d(0x4da)](_0x1691eb,_0x23a84a),_0x1e4d0b=_0x3b9ae3[0x0];if(!_0x1e4d0b)return null;const _0x555813=typeof _0x1e4d0b['value']===_0x946c4d(0x30d)&&_0x1e4d0b[_0x946c4d(0x39d)]||typeof _0x1e4d0b[_0x946c4d(0x960)]==='string'&&_0x1e4d0b[_0x946c4d(0x960)]||typeof _0x1e4d0b['name']===_0x946c4d(0x30d)&&_0x1e4d0b[_0x946c4d(0x9e5)]||'';if(_0x23a84a[_0x946c4d(0x3e0)]!==void 0x0&&_0x555813===_0x23a84a['text']&&(typeof _0x1e4d0b[_0x946c4d(0x39d)]!=='string'||!_0x1e4d0b['value'])&&(typeof _0x1e4d0b[_0x946c4d(0x960)]!==_0x946c4d(0x30d)||!_0x1e4d0b[_0x946c4d(0x960)]))return null;return _0x555813;}async['runReloadRecoveryWitness'](_0x30e03d){const _0x206f3c=_0xf8ecb6,_0x1d9587=_0x30e03d[_0x206f3c(0x7ee)][_0x206f3c(0x86b)]((_0x2dc102,_0x7036ec)=>_0x2dc102['route']??_0x2dc102['text']??_0x2dc102[_0x206f3c(0x444)]??_0x2dc102['type']??_0x206f3c(0x97e)+_0x7036ec),_0x7f8734=await this['snapshotReachable'](_0x30e03d['expectedSelectors'])[_0x206f3c(0x48b)](()=>null);if(_0x7f8734===null)return{'kind':'reload-recovery','outcome':_0x206f3c(0x4b0),'expectedRoutes':_0x1d9587,'reachableBeforeReload':[],'reason':_0x206f3c(0x89a),'reloadMechanism':'dev-settings-reload'};if(_0x7f8734[_0x206f3c(0x3b7)]===_0x1d9587[_0x206f3c(0x3b7)])return{'kind':'reload-recovery','outcome':_0x206f3c(0x6be),'expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reloadMechanism':'dev-settings-reload'};const _0x4b854b=await this['screen']['openUrl'](_0x206f3c(0x548));if(!_0x4b854b['success'])return{'kind':_0x206f3c(0x4d5),'outcome':_0x206f3c(0x4b0),'expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reason':_0x206f3c(0x774)+(_0x4b854b[_0x206f3c(0x3dd)]??_0x206f3c(0x6b2)),'reloadMechanism':'dev-settings-reload'};const _0x2c6d53=_0x30e03d['reloadTimeoutMs']??0x2710,_0x273283=await this['waitForAppReady'](_0x2c6d53);if(!_0x273283)return{'kind':'reload-recovery','outcome':'inconclusive','expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reason':_0x206f3c(0x692)+_0x2c6d53+'ms\x20after\x20reload','reloadMechanism':'dev-settings-reload'};const _0x4f9074=await this['snapshotReachable'](_0x30e03d[_0x206f3c(0x7ee)])['catch'](()=>null);if(_0x4f9074===null)return{'kind':'reload-recovery','outcome':_0x206f3c(0x4b0),'expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reason':'Post-reload\x20snapshot\x20failed\x20(WDA\x20unreachable\x20or\x20source\x20error)','reloadMechanism':'dev-settings-reload'};if(_0x4f9074['length']===_0x1d9587[_0x206f3c(0x3b7)])return _0x206f3c(0x613)==='ejWfD'?this['readyPromise']:{'kind':'reload-recovery','outcome':'stale-but-recoverable','expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reachableAfterReload':_0x4f9074,'reloadMechanism':'dev-settings-reload'};return{'kind':_0x206f3c(0x4d5),'outcome':'stale-unrecoverable','expectedRoutes':_0x1d9587,'reachableBeforeReload':_0x7f8734,'reachableAfterReload':_0x4f9074,'reloadMechanism':'dev-settings-reload'};}async[_0xf8ecb6(0x83a)](_0x5dc2ab){const _0x5a78d4=_0xf8ecb6,_0x5c83d9=[];for(let _0x22d481=0x0;_0x22d481<_0x5dc2ab['length'];_0x22d481++){const _0x267af1=_0x5dc2ab[_0x22d481],_0x32ba44=_0x267af1[_0x5a78d4(0x761)]??_0x267af1['text']??_0x267af1[_0x5a78d4(0x444)]??_0x267af1['type']??'selector-'+_0x22d481,_0x214850=await this['screen'][_0x5a78d4(0xa0b)]({'text':_0x267af1['text'],'accessibilityLabel':_0x267af1['accessibilityLabel'],'type':_0x267af1['type']})['catch'](()=>({'success':![],'visible':![]}));if(_0x214850[_0x5a78d4(0x6d0)]&&_0x214850['visible'])_0x5c83d9['push'](_0x32ba44);}return _0x5c83d9;}async[_0xf8ecb6(0x835)](_0xe55b0){const _0x79ad1c=_0xf8ecb6,_0x30d419=Date[_0x79ad1c(0x2f8)]();while(Date['now']()-_0x30d419<_0xe55b0){const _0xe244d0=await this['screen']['pingStatus']()[_0x79ad1c(0x48b)](()=>![]);if(_0xe244d0)return!![];await new Promise(_0x2a704f=>setTimeout(_0x2a704f,0xc8));}return![];}async[_0xf8ecb6(0x2f2)](_0x5a1e18){const _0x2e0b17=_0xf8ecb6,_0x3961b2=[];let _0x1494d0;if(_0x5a1e18!=null){if('hvaet'!==_0x2e0b17(0xa42))_0x1494d0=_0x5a1e18;else return typeof _0x1ae32e==='object'&&_0x49bc9e!==null&&'code'in _0x585119&&_0x27b1ed[_0x2e0b17(0x3aa)]===_0x2e0b17(0x5a8);}else try{const _0x22ab2a=await this[_0x2e0b17(0x5be)][_0x2e0b17(0x67e)]();if(!_0x22ab2a['success']||!_0x22ab2a['source'])return[];_0x1494d0=_0x22ab2a[_0x2e0b17(0x40e)];}catch{return[];}const _0x9b557e=/\b(error|failed|invalid|denied|something went wrong)\b/i,_0x147445=/alert|status/i,_0x1ea0b0=new Set(),_0x4231aa=_0x290518=>{const _0x2d4bbc=_0x2e0b17;if(!_0x290518||typeof _0x290518!==_0x2d4bbc(0x9e3))return;const _0x956da6=_0x290518,_0x1bf8f6=String(_0x956da6['value']??_0x956da6['label']??_0x956da6[_0x2d4bbc(0x9e5)]??'')['trim'](),_0x2966a2=String(_0x956da6[_0x2d4bbc(0x960)]??_0x956da6['name']??_0x956da6[_0x2d4bbc(0x45e)]??'<unnamed>'),_0xed3287=(_0x956da6['type']??'')+'::'+_0x2966a2+'::'+_0x1bf8f6;if(_0x956da6['type']===_0x2d4bbc(0x1f7))!_0x1ea0b0['has'](_0xed3287)&&(_0x1ea0b0['add'](_0xed3287),_0x3961b2['push']({'label':_0x2966a2,'text':_0xc3ad00(_0x1bf8f6,0xc8),'matchedSignal':_0x2d4bbc(0x413)}));else{if(_0x1bf8f6[_0x2d4bbc(0x3b7)]>0x0&&(_0x147445[_0x2d4bbc(0x8aa)](_0x2966a2)||_0x147445['test'](_0x1bf8f6)))!_0x1ea0b0['has'](_0xed3287)&&(_0x1ea0b0[_0x2d4bbc(0x856)](_0xed3287),_0x3961b2['push']({'label':_0x2966a2,'text':_0xc3ad00(_0x1bf8f6,0xc8),'matchedSignal':'role-alert'}));else _0x1bf8f6['length']>0x0&&_0x9b557e['test'](_0x1bf8f6)&&(!_0x1ea0b0['has'](_0xed3287)&&(_0x1ea0b0[_0x2d4bbc(0x856)](_0xed3287),_0x3961b2[_0x2d4bbc(0x4d1)]({'label':_0x2966a2,'text':_0xc3ad00(_0x1bf8f6,0xc8),'matchedSignal':'text-class-hint'})));}if(Array[_0x2d4bbc(0x200)](_0x956da6['children'])){for(const _0x5ea709 of _0x956da6['children'])_0x4231aa(_0x5ea709);}};try{_0x4231aa(_0x1494d0);}catch{}return _0x3961b2;}};function _0x2ea6dd(_0x1fcc0f){const _0x347e9e=_0xf8ecb6,_0x2087ae=[];if(_0x1fcc0f[_0x347e9e(0xa9a)])_0x2087ae[_0x347e9e(0x4d1)](_0x347e9e(0x2d7)+_0x1fcc0f[_0x347e9e(0xa9a)]);if(typeof _0x1fcc0f[_0x347e9e(0x9a5)]===_0x347e9e(0x30d))_0x2087ae['push'](_0x347e9e(0x74f)+_0xc3ad00(_0x1fcc0f[_0x347e9e(0x9a5)],0x50));if(typeof _0x1fcc0f[_0x347e9e(0x92a)]===_0x347e9e(0x30d))_0x2087ae[_0x347e9e(0x4d1)](_0x347e9e(0x35d)+_0xc3ad00(_0x1fcc0f[_0x347e9e(0x92a)],0x50));if(typeof _0x1fcc0f[_0x347e9e(0x270)]==='number')_0x2087ae[_0x347e9e(0x4d1)]('durationMs='+_0x1fcc0f[_0x347e9e(0x270)]);return _0x2087ae['length']>0x0?_0x2087ae['join']('\x20'):void 0x0;}function _0xc3ad00(_0x317803,_0x477c33){return _0x317803['length']<=_0x477c33?_0x317803:_0x317803['slice'](0x0,_0x477c33)+'…';}function _0x51e350(_0x1e741e){const _0x46d839=_0xf8ecb6;if(_0x1e741e[_0x46d839(0x3b7)]===0x0)return void 0x0;const _0x349d96=_0x1e741e['slice'](0x0,0x5)[_0x46d839(0x86b)](_0x5eeec6=>{const _0x249b20=_0x46d839;if(_0x249b20(0x34b)===_0x249b20(0x6a2))_0x52c849=null;else{const _0x11c9b9=_0x5eeec6[_0x249b20(0x803)]?_0x249b20(0x85e)+_0xc3ad00(_0x5eeec6[_0x249b20(0x803)],0x20):'';return _0x5eeec6['kind']+'/'+_0x5eeec6[_0x249b20(0x762)]+_0x11c9b9;}}),_0x21c2ec=_0x1e741e['length']>_0x349d96['length']?'\x20+'+(_0x1e741e['length']-_0x349d96['length'])+_0x46d839(0x955):'';return''+_0x349d96[_0x46d839(0x4ec)](',\x20')+_0x21c2ec;}function _0x240df8(_0x1f44a9){return String(_0x1f44a9)['trim']();}function _0x3cd8b5(_0x117d94,_0x1f515c,_0x1b4e2c){const _0x2c2019=_0xf8ecb6;if(typeof _0x1b4e2c==='number'){const _0x465ab5=Number(_0x1f515c);return Number[_0x2c2019(0xa89)](_0x465ab5)&&_0x465ab5===_0x1b4e2c;}if(_0x117d94[_0x2c2019(0x3b7)]===0x0)return _0x1f515c['length']===0x0;return _0x1f515c[_0x2c2019(0x5b5)]()[_0x2c2019(0x27e)](_0x117d94['toLowerCase']());}function _0x1bd9a8(_0x547184){const _0x365ddc=_0xf8ecb6;if(typeof _0x547184[_0x365ddc(0x3e0)]!=='string'||!_0x2ad63a(_0x547184[_0x365ddc(0x3e0)]))return;const _0x35aaa7=_0x346c6b(_0x547184[_0x365ddc(0x3e0)]);if(_0x35aaa7){if('bIIzT'!==_0x365ddc(0x96f))_0x547184[_0x365ddc(0x40e)]=_0x35aaa7[_0x365ddc(0x861)]+':'+_0x35aaa7[_0x365ddc(0x397)]+':'+_0x35aaa7['col'];else return _0x279824[_0x365ddc(0x9d3)]['filter'](_0x4334f7=>{const _0x4a3a21=_0x365ddc;if(_0x4334f7['severity']===_0x4a3a21(0x3dd))return![];if(_0x4334f7[_0x4a3a21(0x762)]===_0x4a3a21(0x696))return!_0x4334f7['ok'];if(_0x4334f7['severity']===_0x4a3a21(0x799))return!_0x4334f7['ok']||_0x4334f7[_0x4a3a21(0x638)]!=null;return![];});}}function _0x1ddfd3(_0x26a9e8){const _0x2a24aa=_0xf8ecb6;switch(_0x26a9e8['action']){case'type':{const _0x1c1842={'value':_0x26a9e8[_0x2a24aa(0x39d)]};if(_0x26a9e8['into']){const _0x1f8267={};if(_0x26a9e8[_0x2a24aa(0x2d5)]['text']!==void 0x0)_0x1f8267['text']=_0x26a9e8[_0x2a24aa(0x2d5)]['text'];_0x26a9e8['into'][_0x2a24aa(0x444)]!==void 0x0&&(_0x1f8267[_0x2a24aa(0x444)]=_0x26a9e8[_0x2a24aa(0x2d5)]['accessibilityLabel']);_0x1bd9a8(_0x1f8267);if(Object['keys'](_0x1f8267)['length']>0x0)_0x1c1842[_0x2a24aa(0xb00)]=_0x1f8267;}return _0x1c1842;}case'tap':case'longPress':case'clearText':case'scrollTo':case _0x2a24aa(0x588):case _0x2a24aa(0xa0b):case _0x2a24aa(0x88c):{const _0x4af41c={};if(_0x2a24aa(0x3e0)in _0x26a9e8&&_0x26a9e8[_0x2a24aa(0x3e0)]!==void 0x0)_0x4af41c[_0x2a24aa(0x3e0)]=_0x26a9e8['text'];'accessibilityLabel'in _0x26a9e8&&_0x26a9e8['accessibilityLabel']!==void 0x0&&(_0x4af41c['accessibilityLabel']=_0x26a9e8[_0x2a24aa(0x444)]);if('type'in _0x26a9e8&&_0x26a9e8['type']!==void 0x0)_0x4af41c['type']=_0x26a9e8['type'];return _0x1bd9a8(_0x4af41c),Object[_0x2a24aa(0x8c1)](_0x4af41c)[_0x2a24aa(0x3b7)]>0x0?{'target':_0x4af41c}:{};}case'pressKey':return{'value':_0x26a9e8['key']};case'swipe':return{'value':_0x26a9e8[_0x2a24aa(0x204)]};default:return{};}}import{spawn as _0x20c96b}from'child_process';var _0x35063a=0x1fa4,_0x4a817b=0x1fa4,_0x5517a0=0x32;function _0x4cf83e(_0x39699b){return new Promise(_0x3fd410=>{const _0x53941f=_0xc050;let _0x2d4a46='',_0x9e41a4=![];const _0x36523b=_0x20c96b('which',[_0x39699b],{'stdio':['ignore','pipe','ignore']});_0x36523b[_0x53941f(0x790)]['on'](_0x53941f(0x78f),_0x311fef=>{const _0x3c6f8a=_0x53941f;_0x2d4a46+=_0x311fef[_0x3c6f8a(0xafa)]();}),_0x36523b['on']('error',()=>{!_0x9e41a4&&(_0x9e41a4=!![],_0x3fd410(null));}),_0x36523b['on']('exit',_0x3008d4=>{if(_0x9e41a4)return;_0x9e41a4=!![];if(_0x3008d4!==0x0)_0x3fd410(null);else{const _0x27c060=_0x2d4a46['trim']();_0x3fd410(_0x27c060['length']>0x0?_0x27c060:null);}});});}var _0x5ee35c=class{[_0xf8ecb6(0x618)]=null;[_0xf8ecb6(0x5a2)]=null;[_0xf8ecb6(0x382)];['devicePort'];[_0xf8ecb6(0x7c2)]=[];['spawnFn'];['whichFn'];['startInFlight']=null;constructor(_0x2816ee={}){const _0x132fc2=_0xf8ecb6;this['localPort']=_0x2816ee[_0x132fc2(0x382)]??_0x35063a,this[_0x132fc2(0x840)]=_0x2816ee[_0x132fc2(0x840)]??_0x4a817b,this['spawnFn']=_0x2816ee['spawnFn']??_0x20c96b,this[_0x132fc2(0x7f3)]=_0x2816ee[_0x132fc2(0x7f3)]??_0x4cf83e;}['isRunning'](){const _0x4d181a=_0xf8ecb6;return this[_0x4d181a(0x618)]!==null&&this['child']['exitCode']===null;}async['start'](_0x1ece99){const _0x5ea36f=_0xf8ecb6;while(!![]){if(this['isRunning']())return{'ok':![],'reason':_0x5ea36f(0x245),'pid':this[_0x5ea36f(0x618)]?.['pid']};if(!this['startInFlight'])break;await this['startInFlight'][_0x5ea36f(0x48b)](()=>void 0x0);}const _0x1b3666=this[_0x5ea36f(0x376)](_0x1ece99);this[_0x5ea36f(0xa01)]=_0x1b3666;try{return await _0x1b3666;}finally{this['startInFlight']===_0x1b3666&&(this[_0x5ea36f(0xa01)]=null);}}async['startInner'](_0x3e9f15){const _0x36a04c=_0xf8ecb6;if(this['isRunning']()){if('UaAYE'===_0x36a04c(0x86a)){const _0x2baae2=_0x1cdfde['text'][_0x36a04c(0x5b5)](),_0x41a2c0=[_0x21461f[_0x36a04c(0x39d)],_0x17c02a[_0x36a04c(0x960)],_0x35ca34[_0x36a04c(0x9e5)]]['filter'](_0x58439d)['map'](_0x5691a4=>_0x35dea9(_0x5691a4)['toLowerCase']());if(!_0x41a2c0['some'](_0xa42144=>_0xa42144['includes'](_0x2baae2)))return![];}else return{'ok':![],'reason':_0x36a04c(0x245),'pid':this['child']?.[_0x36a04c(0x8e3)]};}const _0x4ec199=await this[_0x36a04c(0x7f3)]('iproxy');if(!_0x4ec199)return{'ok':![],'reason':_0x36a04c(0xacc)};this['udid']=_0x3e9f15,this['stderrBuffer']=[];let _0x5e965b;try{_0x5e965b=this['spawnFn'](_0x4ec199,[String(this[_0x36a04c(0x382)]),String(this[_0x36a04c(0x840)]),'-u',_0x3e9f15],{'stdio':[_0x36a04c(0x9fa),'pipe','pipe']});}catch(_0x25f710){return this['appendStderr']('iproxy\x20spawn\x20threw:\x20'+(_0x25f710 instanceof Error?_0x25f710[_0x36a04c(0x531)]:String(_0x25f710))),{'ok':![],'reason':_0x36a04c(0xa92),'stderr':[...this['stderrBuffer']]};}_0x5e965b['stderr']?.['on'](_0x36a04c(0x78f),_0x57bd07=>{const _0x3904a0=_0x36a04c,_0x4e4bc8=_0x57bd07[_0x3904a0(0xafa)]();for(const _0x27e75d of _0x4e4bc8['split'](/\r?\n/)){if(_0x27e75d[_0x3904a0(0x668)]()[_0x3904a0(0x3b7)]===0x0)continue;this['appendStderr'](_0x27e75d);}}),_0x5e965b['stdout']?.['on'](_0x36a04c(0x78f),_0x4508b5=>{const _0x28a1b9=_0x36a04c,_0x5b51c6=_0x4508b5[_0x28a1b9(0xafa)]();for(const _0x1b7260 of _0x5b51c6['split'](/\r?\n/)){if(_0x1b7260['trim']()[_0x28a1b9(0x3b7)]===0x0)continue;this['appendStderr'](_0x28a1b9(0x418)+_0x1b7260);}});const _0xa2c884=await this['detectEarlyExit'](_0x5e965b,0x32);if(_0xa2c884)return this[_0x36a04c(0x618)]=null,{'ok':![],'reason':_0x36a04c(0xa92),'stderr':[...this[_0x36a04c(0x7c2)]]};return this[_0x36a04c(0x618)]=_0x5e965b,_0x5e965b['on'](_0x36a04c(0x68c),()=>{this['child']===_0x5e965b&&(this['child']=null);}),{'ok':!![],'pid':_0x5e965b['pid'],'stderr':[...this['stderrBuffer']]};}async[_0xf8ecb6(0x8bc)](){const _0x1beb96=_0xf8ecb6;this[_0x1beb96(0xa01)]&&await this[_0x1beb96(0xa01)]['catch'](()=>void 0x0);const _0x3c7f9e=this['child'];if(!_0x3c7f9e)return;this['child']=null;if(_0x3c7f9e['exitCode']!==null)return;return new Promise(_0x228bbd=>{const _0x5dc882=_0x1beb96;let _0x1a740b=![],_0x5d4c67=null,_0x46c160=null;const _0x442f04=()=>{if(_0x1a740b)return;_0x1a740b=!![];if(_0x5d4c67)clearTimeout(_0x5d4c67);if(_0x46c160)clearTimeout(_0x46c160);_0x228bbd();};_0x3c7f9e[_0x5dc882(0x6b8)](_0x5dc882(0x68c),_0x442f04);try{_0x3c7f9e[_0x5dc882(0x6ee)]('SIGTERM');}catch{_0x442f04();return;}_0x5d4c67=setTimeout(()=>{const _0x3c3bdf=_0x5dc882;if(_0x1a740b)return;try{_0x3c7f9e['kill'](_0x3c3bdf(0x58f));}catch{}_0x46c160=setTimeout(_0x442f04,0x64),_0x46c160['unref']();},0x3e8),_0x5d4c67[_0x5dc882(0x2d6)]();});}async['restart'](_0x4a3f92){const _0x5706e4=_0xf8ecb6;return await this[_0x5706e4(0x8bc)](),this['start'](_0x4a3f92??this[_0x5706e4(0x5a2)]??'');}['getStderr'](){const _0x11432d=_0xf8ecb6;return[...this[_0x11432d(0x7c2)]];}[_0xf8ecb6(0x535)](_0x5e0db2){const _0x407359=_0xf8ecb6;this['stderrBuffer'][_0x407359(0x4d1)](_0x5e0db2),this[_0x407359(0x7c2)][_0x407359(0x3b7)]>_0x5517a0&&this['stderrBuffer'][_0x407359(0x9a6)]();}[_0xf8ecb6(0x854)](_0x103499,_0x47ef57){return new Promise(_0x38336e=>{const _0x96898c=_0xc050;let _0x10e2c3=![];const _0x255de3=_0x4992b8=>{if(_0x10e2c3)return;_0x10e2c3=!![],_0x38336e(_0x4992b8);},_0x158435=()=>_0x255de3(!![]);_0x103499['once'](_0x96898c(0x68c),_0x158435),setTimeout(()=>{_0x103499['off']('exit',_0x158435),_0x255de3(![]);},_0x47ef57)['unref']();});}};import{join as _0x238f64}from'path';var _0x51730e=/<<([A-Z][A-Z0-9_]*)>>/g;function _0x11fccc(_0x1692fb,_0x721106=process.env,_0xa8e8f={}){const _0x216b13=new Set(),_0x2c67c5=_0x3c76b1(_0x1692fb,_0x721106,_0x216b13,_0xa8e8f);return{'value':_0x2c67c5,'missing':_0x216b13};}function _0x3c76b1(_0x417908,_0x5eb8f6,_0x29cc96,_0x58fb20){const _0x2bc76f=_0xf8ecb6;if(typeof _0x417908===_0x2bc76f(0x30d))return _0x417908['replace'](_0x51730e,(_0x5941d4,_0x223e67)=>{const _0xc3f10c=_0x2bc76f,_0x51944a=_0x58fb20[_0x223e67];if(typeof _0x51944a===_0xc3f10c(0x30d)&&_0x51944a['length']>0x0)return _0x51944a;const _0x3b4cea=_0x5eb8f6[_0x223e67];if(typeof _0x3b4cea!=='string'||_0x3b4cea[_0xc3f10c(0x3b7)]===0x0)return _0x29cc96[_0xc3f10c(0x856)](_0x223e67),'<<'+_0x223e67+'>>';return _0x3b4cea;});if(Array[_0x2bc76f(0x200)](_0x417908))return _0x417908[_0x2bc76f(0x86b)](_0x56cf44=>_0x3c76b1(_0x56cf44,_0x5eb8f6,_0x29cc96,_0x58fb20));if(_0x417908&&typeof _0x417908===_0x2bc76f(0x9e3)){const _0xbc2140={};for(const [_0x46af7c,_0x4da0a1]of Object[_0x2bc76f(0x42a)](_0x417908)){_0xbc2140[_0x46af7c]=_0x3c76b1(_0x4da0a1,_0x5eb8f6,_0x29cc96,_0x58fb20);}return _0xbc2140;}return _0x417908;}function _0x1e792d(_0x504fd5){const _0x246dea=_0xf8ecb6;if(!_0x504fd5)return{};const _0x469274=_0x504fd5['getJitUser']();if(!_0x469274)return{};return{'CERAPH_TEST_EMAIL':_0x469274['email'],'CERAPH_TEST_PASSWORD':_0x469274[_0x246dea(0x98a)]};}var _0x1cc3d6=0x30d40,_0x5b2d6d=0xc8,_0x5a1d98=_0xf8ecb6(0x96e),_0x21266c='Could\x20not\x20resolve\x20GitHub\x20remote.\x20Run\x20from\x20a\x20git\x20repository\x20whose\x20origin\x20points\x20to\x20github.com.';function _0x1d9ba1(_0x2217ce){const _0x2a97db=_0xf8ecb6,_0x95df99={};if(!_0x2217ce)return _0x95df99;return typeof _0x2217ce['text']===_0x2a97db(0x30d)&&_0x2217ce[_0x2a97db(0x3e0)]['length']>0x0&&(_0x95df99['text']=_0x2217ce['text']),typeof _0x2217ce['testID']==='string'&&_0x2217ce['testID']['length']>0x0&&(_0x95df99['accessibilityLabel']=_0x2217ce[_0x2a97db(0x917)]),typeof _0x2217ce[_0x2a97db(0x924)]===_0x2a97db(0x30d)&&_0x2217ce[_0x2a97db(0x924)][_0x2a97db(0x3b7)]>0x0&&(_0x95df99[_0x2a97db(0x45e)]=_0x2217ce[_0x2a97db(0x924)]),_0x95df99;}function _0x16235a(_0x404289){const _0x3156c1=_0xf8ecb6,_0x1b6658=_0x404289;switch(_0x1b6658['action']){case'tap':case'longPress':case'scrollTo':case'clearText':case _0x3156c1(0x588):case _0x3156c1(0xa0b):case'assertNotVisible':return{..._0x1b6658,..._0x1d9ba1(_0x1b6658[_0x3156c1(0xb00)])};case _0x3156c1(0x45e):{if(!_0x1b6658[_0x3156c1(0xb00)])return _0x1b6658;const _0x4ef8b8=_0x1d9ba1(_0x1b6658['target']),_0x167c5b={};if(_0x4ef8b8[_0x3156c1(0x3e0)]!==void 0x0)_0x167c5b[_0x3156c1(0x3e0)]=_0x4ef8b8[_0x3156c1(0x3e0)];return _0x4ef8b8['accessibilityLabel']!==void 0x0&&(_0x167c5b['accessibilityLabel']=_0x4ef8b8['accessibilityLabel']),{..._0x1b6658,'into':_0x167c5b,'value':_0x1b6658['value']??''};}case _0x3156c1(0x6fe):return _0x1b6658['coords']?{..._0x1b6658,'x':_0x1b6658['coords']['x'],'y':_0x1b6658['coords']['y']}:_0x1b6658;case _0x3156c1(0x439):return _0x1b6658[_0x3156c1(0x9e5)]!==void 0x0?{..._0x1b6658,'label':_0x1b6658['name']}:_0x1b6658;default:return _0x1b6658;}}function _0x5d210f(_0x3d916f,_0x417863={}){const _0x36c2ab=_0xf8ecb6,_0x12fed2=_0x11fccc({'steps':_0x3d916f['steps']['map'](_0x16235a),'beforeAll':_0x3d916f['beforeAll']},process.env,_0x417863),_0xa2dab6=(_0x3d916f[_0x36c2ab(0xa9f)]??[])[_0x36c2ab(0x529)](_0xece08=>{const _0x5a8264=_0x36c2ab,_0x3670ad=_0x417863[_0xece08];if(typeof _0x3670ad===_0x5a8264(0x30d)&&_0x3670ad[_0x5a8264(0x3b7)]>0x0)return![];const _0x592649=process.env[_0xece08];return _0x592649===void 0x0||_0x592649==='';}),_0x384ca2=new Set([..._0x12fed2['missing'],..._0xa2dab6]);return{'source':_0x3d916f,'expandedSteps':_0x12fed2[_0x36c2ab(0x39d)][_0x36c2ab(0xa02)],'expandedBeforeAll':_0x12fed2[_0x36c2ab(0x39d)]['beforeAll'],'missingEnv':_0x384ca2};}async function _0x16599e(_0x1b4112,_0x1f66b5,_0x239c5e,_0x100f7b,_0x3a4b15){const _0x1dacbb=_0xf8ecb6;await _0x239c5e?.[_0x1dacbb(0xa3e)]();const _0x230de4=_0x1b4112[_0x1dacbb(0x942)];if(_0x1b4112['status']==='no-flows'||_0x1b4112['flows'][_0x1dacbb(0x3b7)]===0x0||_0x230de4===null)return{'runId':_0x1b4112['runId'],'status':_0x1dacbb(0xa2f),'results':[],'hint':_0x1b4112['hint']??'No\x20flows\x20to\x20run.'};const _0x224fa3=_0x1b4112[_0x1dacbb(0xa67)]&&_0x1b4112['affectedFlowNames']['length']>0x0?new Set(_0x1b4112[_0x1dacbb(0xa67)]):void 0x0,_0xdb9c9a=_0x3a4b15||_0x224fa3?{'runId':_0x230de4,..._0x3a4b15?{'store':_0x3a4b15}:{},..._0x224fa3?{'affectedFlowNames':_0x224fa3}:{}}:void 0x0,_0x1cef7c=[],_0x2f5911=new Set();let _0x23116a;const _0x9af20d=_0x1b4112[_0x1dacbb(0x628)][_0x1dacbb(0x3b7)],_0x5171f5=new Map(),_0x390e5f=_0x1e792d(_0x100f7b);for(const _0x3fc418 of _0x1b4112['flows']){_0x5171f5[_0x1dacbb(0x93e)](_0x3fc418['flowId'],_0x5d210f(_0x3fc418,_0x390e5f));}const _0x3b7b34=new Map(),_0x3d1e60=new Set();for(const _0x491966 of _0x1b4112['chains']??[]){if(_0x491966[_0x1dacbb(0x863)]['length']<0x2)continue;const _0x2b1753=[];let _0x4dfea8=!![];for(const _0x3922d0 of _0x491966[_0x1dacbb(0x863)]){const _0x27e056=_0x5171f5['get'](_0x3922d0);if(!_0x27e056){_0x4dfea8=![];break;}if(_0x27e056['missingEnv'][_0x1dacbb(0x952)]>0x0){_0x4dfea8=![];break;}_0x2b1753['push'](_0x27e056);}if(!_0x4dfea8)continue;_0x3b7b34['set'](_0x491966['flowIds'][0x0],{'entry':_0x491966,'flows':_0x2b1753});for(const _0x480c8a of _0x491966['flowIds'])_0x3d1e60['add'](_0x480c8a);}for(let _0xcaa844=0x0;_0xcaa844<_0x1b4112['flows'][_0x1dacbb(0x3b7)];_0xcaa844++){const _0x476f87=_0x1b4112[_0x1dacbb(0x628)][_0xcaa844],_0x4211d1=_0x5171f5['get'](_0x476f87[_0x1dacbb(0x930)]),_0x3b8712=_0x3b7b34[_0x1dacbb(0x3fd)](_0x476f87['flowId']);if(_0x3b8712){if('LRqfV'==='rPzhR')return{'changed':![],'previousScheme':[..._0x5183fd],'nextScheme':[..._0x2dc772]};else{const _0x30ed81={'chainId':_0x3b8712[_0x1dacbb(0x3c9)]['chainId'],'flows':_0x3b8712[_0x1dacbb(0x628)]['map'](_0x2f2ff4=>({'flowId':_0x2f2ff4['source']['flowId'],'name':_0x2f2ff4[_0x1dacbb(0x40e)][_0x1dacbb(0x9e5)],'steps':_0x2f2ff4['expandedSteps'],'beforeAll':_0x2f2ff4['expandedBeforeAll'],'timeoutMs':_0x2f2ff4[_0x1dacbb(0x40e)][_0x1dacbb(0x2f9)]})),'bridges':_0x3b8712[_0x1dacbb(0x3c9)]['bridges']},_0x4c2835=await _0x1f66b5['runChain'](_0x30ed81,_0xdb9c9a);let _0x386b0c=![];for(const _0x3e7a35 of _0x4c2835['flowResults']){if(_0x1dacbb(0x59b)==='fjFmv'){const _0x1e218a=_0x42766c({'input':_0x40ad9d['stdin'],'output':_0x4005fd['stdout']});_0x1e218a[_0x1dacbb(0xa2b)](_0x43fccf,_0x48f804=>{const _0x340ae7=_0x1dacbb;_0x1e218a[_0x340ae7(0x716)](),_0x1ff5ea(_0x48f804);});}else{_0x1cef7c[_0x1dacbb(0x4d1)](_0x3e7a35);const _0x384774=_0x1b4112[_0x1dacbb(0x628)]['findIndex'](_0x511509=>_0x511509[_0x1dacbb(0x930)]===_0x3e7a35[_0x1dacbb(0x930)]);await _0x239c5e?.['write']({'flow':_0x3e7a35[_0x1dacbb(0x8f8)],'index':_0x384774>=0x0?_0x384774:_0xcaa844,'total':_0x9af20d,'success':_0x3e7a35[_0x1dacbb(0x6d0)],'durationMs':_0x3e7a35['totalDurationMs'],'timestamp':new Date()['toISOString']()}),!_0x3e7a35[_0x1dacbb(0x6d0)]&&!_0x386b0c&&(_0x23116a=_0x384774>=0x0?_0x384774:_0xcaa844,_0x386b0c=!![]);}}if(_0x386b0c)break;continue;}}if(_0x3d1e60['has'](_0x476f87[_0x1dacbb(0x930)]))continue;const _0x202e86=Date['now']();if(_0x4211d1[_0x1dacbb(0x859)]['size']>0x0){for(const _0x200dcd of _0x4211d1['missingEnv'])_0x2f5911['add'](_0x200dcd);_0x1cef7c[_0x1dacbb(0x4d1)]({'flow':_0x476f87[_0x1dacbb(0x9e5)],'flowId':_0x476f87[_0x1dacbb(0x930)],'skipped':!![],'requiresEnv':Array[_0x1dacbb(0x56c)](_0x4211d1['missingEnv'])['sort']()}),await _0x239c5e?.[_0x1dacbb(0xaac)]({'flow':_0x476f87[_0x1dacbb(0x9e5)],'index':_0xcaa844,'total':_0x9af20d,'success':![],'durationMs':Date['now']()-_0x202e86,'timestamp':new Date()[_0x1dacbb(0x471)]()});continue;}const _0x48c94f=await _0x1f66b5[_0x1dacbb(0x7f0)]({'flowId':_0x476f87[_0x1dacbb(0x930)],'name':_0x476f87['name'],'steps':_0x4211d1[_0x1dacbb(0x794)],'beforeAll':_0x4211d1[_0x1dacbb(0x34a)],'timeoutMs':_0x476f87['timeoutMs']},_0xdb9c9a);_0x1cef7c[_0x1dacbb(0x4d1)](_0x48c94f),await _0x239c5e?.['write']({'flow':_0x476f87['name'],'index':_0xcaa844,'total':_0x9af20d,'success':_0x48c94f[_0x1dacbb(0x6d0)],'durationMs':_0x48c94f['totalDurationMs'],'timestamp':new Date()['toISOString']()});if(!_0x48c94f['success']){_0x23116a=_0xcaa844;break;}}const _0x1f67d5={'runId':_0x230de4,'status':_0x1b4112[_0x1dacbb(0x428)],'results':_0x1cef7c,'failedAt':_0x23116a,'hint':_0x1b4112['hint']};return _0x2f5911[_0x1dacbb(0x952)]>0x0&&(_0x1f67d5[_0x1dacbb(0xa9f)]=Array[_0x1dacbb(0x56c)](_0x2f5911)[_0x1dacbb(0x426)]()),_0x1f67d5;}function _0x1f44f8(_0xdb156a){const _0x45e325=_0xf8ecb6;return'WARNING:\x20the\x20working\x20tree\x20was\x20too\x20large\x20to\x20attach\x20to\x20this\x20request\x20('+_0xdb156a['detail']+_0x45e325(0xa3b);}async function _0x4c910c(_0x5f35c7){const _0x36b586=_0xf8ecb6;if(!_0x5f35c7['getWorkingTreeDiff']||!_0x5f35c7[_0x36b586(0x39f)]||!_0x5f35c7[_0x36b586(0x42c)])return void 0x0;const _0x16fdfc=_0x5f35c7[_0x36b586(0x878)]?await _0x5f35c7[_0x36b586(0x878)](_0x5f35c7[_0x36b586(0x7f5)]):'main',[_0x52186f,_0x1aaacc,_0x2f05ed]=await Promise[_0x36b586(0x2d4)]([_0x5f35c7[_0x36b586(0x389)](_0x5f35c7[_0x36b586(0x7f5)],_0x16fdfc),_0x5f35c7[_0x36b586(0x344)](_0x5f35c7['cwd'],_0x16fdfc),_0x5f35c7[_0x36b586(0x39f)](_0x5f35c7['cwd'],_0x16fdfc)]);if(!_0x52186f['trim']()&&_0x2f05ed[_0x36b586(0x3b7)]===0x0)return void 0x0;if(_0x52186f[_0x36b586(0x3b7)]>_0x1cc3d6)return{'omitted':'diff-too-large','detail':_0x36b586(0x971)+_0x16fdfc+_0x36b586(0x677)+_0x52186f['length']+'\x20bytes;\x20the\x20limit\x20is\x20'+_0x1cc3d6};if(_0x2f05ed['length']>_0x5b2d6d)return _0x36b586(0xa50)===_0x36b586(0x6fa)?{'message':'Signal\x20listener\x20bound\x20on\x20port\x20'+_0x44f328[_0x36b586(0x21a)],'fatal':![],'status':'bound'}:{'omitted':'too-many-files','detail':_0x2f05ed['length']+'\x20files\x20changed\x20vs\x20'+_0x16fdfc+';\x20the\x20limit\x20is\x20'+_0x5b2d6d};const _0x17922a=await _0x5f35c7[_0x36b586(0x42c)](_0x5f35c7['cwd'],_0x2f05ed);return{'baseSha':_0x1aaacc,'diff':_0x52186f,'changedFiles':_0x2f05ed,'appFiles':_0x17922a};}async function _0x17592c(_0x14b94f,_0x114f17){const _0x8dd4a7=_0xf8ecb6,_0xdcc211=await _0x114f17[_0x8dd4a7(0x2c1)]();if(!_0xdcc211)throw new Error(_0x5a1d98);if(_0x14b94f[_0x8dd4a7(0x863)]['length']===0x0)throw new Error('flowIds\x20is\x20required\x20and\x20must\x20not\x20be\x20empty.');let _0x32d438,_0x2234a0;try{({owner:_0x32d438,repo:_0x2234a0}=await _0x114f17[_0x8dd4a7(0x7c0)](_0x114f17['cwd']));}catch{throw new Error(_0x21266c);}const [_0x3239f6,_0x226903]=await Promise['all']([_0x114f17[_0x8dd4a7(0x703)](_0x114f17['cwd']),_0x114f17[_0x8dd4a7(0x344)](_0x114f17[_0x8dd4a7(0x7f5)],_0x8dd4a7(0xa12))]);let _0x143bad,_0x26a46a;try{const _0x48298e=await _0x4c910c(_0x114f17);_0x48298e&&'omitted'in _0x48298e?_0x26a46a=_0x1f44f8(_0x48298e):_0x143bad=_0x48298e;}catch(_0x41ea3b){if('sYQdX'!=='sYQdX')this[_0x8dd4a7(0x6f3)][_0x8dd4a7(0x265)](_0x3860b5),this[_0x8dd4a7(0x978)]=this['commandQueue'][_0x8dd4a7(0x529)](_0x2a11dc=>_0x2a11dc['id']!==_0x4d47aa),_0x4117cc({'acked':![]});else{await _0x114f17[_0x8dd4a7(0x90a)]?.[_0x8dd4a7(0xa3e)]();throw _0x41ea3b;}}await _0x114f17['ensureGraph']?.();const _0x30eb6c=_0x114f17[_0x8dd4a7(0x82f)]?await _0x114f17[_0x8dd4a7(0x82f)]():![],_0x3cd069=await _0x114f17[_0x8dd4a7(0x772)](_0x8dd4a7(0x9b5),{'repoOwner':_0x32d438,'repoName':_0x2234a0,'branch':_0x3239f6,'headSha':_0x226903,'flowIds':_0x14b94f[_0x8dd4a7(0x863)],..._0x143bad??{},..._0x30eb6c?{'testIdReady':!![]}:{}},_0xdcc211),_0x37be85=await _0x16599e(_0x3cd069,_0x114f17[_0x8dd4a7(0x4ac)],_0x114f17[_0x8dd4a7(0x90a)],_0x114f17[_0x8dd4a7(0xad4)],_0x114f17[_0x8dd4a7(0x3d0)]);return _0x26a46a?{..._0x37be85,'warning':_0x26a46a}:_0x37be85;}async function _0x553c87(_0x2284c9,_0x1422b0){const _0x29d716=_0xf8ecb6,_0x331fab=await _0x1422b0[_0x29d716(0x2c1)]();if(!_0x331fab)throw new Error(_0x5a1d98);if(_0x2284c9[_0x29d716(0x48c)][_0x29d716(0x668)]()[_0x29d716(0x3b7)]===0x0)throw new Error('query\x20is\x20required\x20and\x20must\x20not\x20be\x20empty.');let _0x3f1d73,_0x252c1c;try{({owner:_0x3f1d73,repo:_0x252c1c}=await _0x1422b0['resolveRepo'](_0x1422b0['cwd']));}catch{throw new Error(_0x21266c);}const [_0x4a00dd,_0x12b54f]=await Promise['all']([_0x1422b0[_0x29d716(0x703)](_0x1422b0['cwd']),_0x1422b0['getGitSha'](_0x1422b0[_0x29d716(0x7f5)],_0x29d716(0xa12))]),_0x203b53=await _0x4c910c(_0x1422b0);let _0x35b727,_0x495b18;_0x203b53&&'omitted'in _0x203b53?_0x495b18=_0x1f44f8(_0x203b53):_0x35b727=_0x203b53;await _0x1422b0['ensureGraph']?.();const _0x477b1b=_0x1422b0[_0x29d716(0x82f)]?await _0x1422b0['getTestIdReady']():![],_0x385ed8=await _0x1422b0[_0x29d716(0x772)]('/rn-find-flows',{'repoOwner':_0x3f1d73,'repoName':_0x252c1c,'branch':_0x4a00dd,'headSha':_0x12b54f,'query':_0x2284c9['query'],..._0x35b727??{},..._0x477b1b?{'testIdReady':!![]}:{}},_0x331fab);return _0x495b18?{..._0x385ed8,'warning':_0x495b18}:_0x385ed8;}async function _0x2cdf6d(_0x222962,_0x2312e3){const _0x384701=_0xf8ecb6,_0xad7b8c=await _0x2312e3['loadAuth']();if(!_0xad7b8c)throw new Error(_0x5a1d98);let _0x519a12,_0x14c2cd;try{({owner:_0x519a12,repo:_0x14c2cd}=await _0x2312e3[_0x384701(0x7c0)](_0x2312e3['cwd']));}catch{throw new Error(_0x21266c);}const _0x532ab5=_0x222962[_0x384701(0xa73)]?Array['isArray'](_0x222962[_0x384701(0xa73)])?_0x222962['filePaths']:[_0x222962[_0x384701(0xa73)]]:void 0x0;if(_0x532ab5&&_0x532ab5[_0x384701(0x3b7)]>_0x5b2d6d)throw new Error('Too\x20many\x20file\x20paths\x20('+_0x532ab5[_0x384701(0x3b7)]+'\x20>\x20'+_0x5b2d6d+_0x384701(0x5a1));const [_0x4c6d42,_0x167dbb]=await Promise['all']([_0x2312e3[_0x384701(0x703)](_0x2312e3['cwd']),_0x2312e3['getGitSha'](_0x2312e3[_0x384701(0x7f5)],'HEAD')]);let _0x22b36e,_0x338837;if(_0x532ab5&&_0x532ab5[_0x384701(0x3b7)]>0x0){const _0x4d785c=_0x2312e3[_0x384701(0x42c)]?await _0x2312e3[_0x384701(0x42c)](_0x2312e3['cwd'],_0x532ab5):void 0x0;_0x22b36e={'repoOwner':_0x519a12,'repoName':_0x14c2cd,'branch':_0x4c6d42,'headSha':_0x167dbb,'filePaths':_0x532ab5,..._0x4d785c?{'appFiles':_0x4d785c}:{}};}else{if(!_0x2312e3['getWorkingTreeDiff']||!_0x2312e3['listChangedFiles']||!_0x2312e3['readChangedFileContents'])throw new Error(_0x384701(0x580));const _0x2ac483=_0x222962['base']??(_0x2312e3[_0x384701(0x878)]?await _0x2312e3['getDefaultBranch'](_0x2312e3[_0x384701(0x7f5)]):_0x384701(0x7e9));_0x338837=_0x2ac483;const [_0x2f8810,_0x59b970,_0x56bea1]=await Promise[_0x384701(0x2d4)]([_0x2312e3[_0x384701(0x389)](_0x2312e3['cwd'],_0x2ac483),_0x2312e3['getGitSha'](_0x2312e3['cwd'],_0x2ac483),_0x2312e3[_0x384701(0x39f)](_0x2312e3[_0x384701(0x7f5)],_0x2ac483)]);if(_0x2f8810[_0x384701(0x3b7)]>_0x1cc3d6)throw new Error(_0x384701(0x87b)+_0x1cc3d6+'\x20byte\x20limit\x20('+_0x2f8810['length']+'\x20bytes).\x20Commit\x20your\x20changes\x20in\x20smaller\x20chunks.');if(_0x56bea1['length']>_0x5b2d6d)throw new Error('Too\x20many\x20changed\x20files\x20('+_0x56bea1[_0x384701(0x3b7)]+_0x384701(0xafd)+_0x5b2d6d+_0x384701(0x9cd));const _0x109fba=await _0x2312e3[_0x384701(0x42c)](_0x2312e3[_0x384701(0x7f5)],_0x56bea1);_0x22b36e={'repoOwner':_0x519a12,'repoName':_0x14c2cd,'branch':_0x4c6d42,'headSha':_0x167dbb,'baseSha':_0x59b970,'diff':_0x2f8810,'changedFiles':_0x56bea1,'appFiles':_0x109fba};}await _0x2312e3['ensureGraph']?.();const _0x21c951=_0x2312e3[_0x384701(0x82f)]?await _0x2312e3['getTestIdReady']():![];_0x21c951&&(_0x22b36e['testIdReady']=!![]);const _0x3f70c2=await _0x2312e3['fetcher'](_0x384701(0x674),_0x22b36e,_0xad7b8c),_0x2a9525={};return _0x532ab5&&_0x532ab5['length']>0x0?_0x2a9525['filePaths']=_0x532ab5:_0x2a9525['base']=_0x338837??'main',{'flows':_0x3f70c2[_0x384701(0x628)]??[],'totalCount':_0x3f70c2['totalCount']??(_0x3f70c2[_0x384701(0x628)]?.[_0x384701(0x3b7)]??0x0),'scope':_0x2a9525,..._0x3f70c2[_0x384701(0x9a7)]?{'truncated':!![]}:{},..._0x3f70c2['hint']?{'hint':_0x3f70c2['hint']}:{}};}var _0xdbf1a6=0x1e*0x3c*0x3e8,_0x1134ea=0x5dc,_0x50a380=0x1f4,_0x331fce=0x64,_0x44fc26=0x32*0x400,_0xae6a38=0x7d0,_0x186442=0x3a98,_0x354bc0=0x5*0x400,_0x3adec7=0x0;function _0x5e1687(){const _0x4ffaea=_0xf8ecb6;return _0x3adec7+=0x1,_0x4ffaea(0x2b3)+Date['now']()[_0x4ffaea(0xafa)](0x24)+'-'+_0x3adec7[_0x4ffaea(0xafa)](0x24);}var _0xb95bb1=0x0;function _0x2362a7(){const _0x11b23f=_0xf8ecb6;_0xb95bb1+=0x1;const _0x17c063=Math['random']()[_0x11b23f(0xafa)](0x24)['slice'](0x2,0xa);return _0x11b23f(0x704)+Date[_0x11b23f(0x2f8)]()['toString'](0x24)+'-'+_0xb95bb1['toString'](0x24)+'-'+_0x17c063;}function _0xa85944(_0x276353){const _0x433412=_0xf8ecb6;if(!_0x276353)return[];return _0x276353['filter'](_0x2b2d43=>typeof _0x2b2d43===_0x433412(0x30d)&&_0x2b2d43['length']>0x0&&!_0x2b2d43[_0x433412(0x27e)](','));}function _0x2cd458(_0x4a46a4,_0x5d07a3,_0x3e26ee,_0xf930d,_0x2161c1){const _0x2e3c3e=_0xf8ecb6,_0x46817f=_0x3e26ee['readSet'];if(!_0x46817f)return _0x2e3c3e(0x9ad);if(_0x46817f[_0x2e3c3e(0x428)]==='unresolved')return _0x2e3c3e(0x9ad);if(_0x46817f['hasFullyDynamicRead']){if(_0x4a46a4['size']>0x0||_0x5d07a3)return _0x2e3c3e(0x79a);}for(const _0x57c840 of _0x46817f[_0x2e3c3e(0x8c1)]){const _0x496045=_0x57c840[_0x2e3c3e(0xb14)]+':'+_0x57c840['key'];if(_0x4a46a4['has'](_0x496045))return'recreate';if(_0x57c840[_0x2e3c3e(0x4d3)]){if(_0x5d07a3)return _0x2e3c3e(0x79a);if(_0x57c840['key']===''){const _0x5363ff=_0x57c840[_0x2e3c3e(0xb14)]+':';for(const _0x53c172 of _0x4a46a4){if(_0x53c172[_0x2e3c3e(0x746)](_0x5363ff))return'recreate';}}if(_0x57c840['key']){const _0x173716=_0x57c840[_0x2e3c3e(0xb14)]+':'+_0x57c840['key'];for(const _0x3733c3 of _0x4a46a4){if(_0x3733c3['endsWith'](':*'))continue;if(_0x3733c3['startsWith'](_0x173716))return'recreate';}}}for(const _0x24b73d of _0x4a46a4){if(!_0x24b73d[_0x2e3c3e(0xaa5)](':*'))continue;const _0x1fa96a=_0x24b73d[_0x2e3c3e(0x795)](0x0,-0x2),_0x2d334e=_0x1fa96a['indexOf'](':');if(_0x2d334e<0x0)continue;const _0x477e9a=_0x1fa96a['slice'](0x0,_0x2d334e);if(_0x477e9a!==_0x57c840['kind'])continue;const _0x1a6777=_0x1fa96a[_0x2e3c3e(0x795)](_0x2d334e+0x1);if(_0x1a6777==='')return'recreate';if(_0x57c840['key'][_0x2e3c3e(0x746)](_0x1a6777))return _0x2e3c3e(0x79a);if(_0x57c840['wildcard']&&_0x57c840[_0x2e3c3e(0x88a)]&&_0x1a6777['startsWith'](_0x57c840['key']))return _0x2e3c3e(0x79a);}}if(_0x3e26ee[_0x2e3c3e(0x1f6)]&&_0x3e26ee['mutexWith']['length']>0x0){const _0x515864=new Set(_0x2161c1);for(const _0x4d236b of _0x3e26ee['mutexWith']){if(_0x515864[_0x2e3c3e(0x979)](_0x4d236b))return _0x2e3c3e(0x79a);}}return'continue';}var _0x28bbaf=class{constructor(_0x13000d,_0x183f6f,_0x3c867a,_0x42fa2f,_0x3363e3={}){const _0xaf60df=_0xf8ecb6;this['flowRunner']=_0x13000d,this[_0xaf60df(0x5be)]=_0x183f6f,this[_0xaf60df(0x508)]=_0x3c867a,this['ttlMs']=_0x3363e3['ttlMs']??_0xdbf1a6,this[_0xaf60df(0x260)]=_0x3363e3[_0xaf60df(0x260)]??_0x1134ea,this['bootDebounceMs']=_0x3363e3[_0xaf60df(0x82d)]??_0xae6a38,this[_0xaf60df(0x218)]=_0x3363e3['bootMaxWaitMs']??_0x186442,this[_0xaf60df(0x214)]=_0x42fa2f,this['runsStore']=_0x3363e3['runsStore'],this['testDataManager']=_0x3363e3[_0xaf60df(0xad4)],this[_0xaf60df(0x2a4)]=_0x3363e3[_0xaf60df(0x2a4)];}['runs']=new Map();[_0xf8ecb6(0x988)];[_0xf8ecb6(0x260)];['bootDebounceMs'];['bootMaxWaitMs'];['bootSource'];['runsStore'];['testDataManager'];['videoRecorderFactory'];['accumulatedBootDrains']=null;[_0xf8ecb6(0x754)]=Promise['resolve']();['setVideoRecorderFactory'](_0x2d14ff){this['videoRecorderFactory']=_0x2d14ff;}[_0xf8ecb6(0x721)](_0x344f2b){this['testDataManager']=_0x344f2b;}['getTestDataManager'](){const _0x13693e=_0xf8ecb6;return this[_0x13693e(0xad4)];}async[_0xf8ecb6(0x5cf)](_0x46faf7){const _0x3a87aa=_0xf8ecb6;this[_0x3a87aa(0x741)]();const _0x2131c3=Array['from'](this['runs'][_0x3a87aa(0x32f)]())[_0x3a87aa(0x415)](_0x5786e6=>_0x5786e6['busy']);if(_0x2131c3)return{'runId':'','status':_0x3a87aa(0x3dd),'completedSegments':[],'error':_0x3a87aa(0x80b)+_0x2131c3[_0x3a87aa(0x942)]+')\x20is\x20currently\x20executing.\x20The\x20chain\x20runner\x20serializes\x20chains\x20because\x20JIT-provisioned\x20auth\x20credentials\x20are\x20process-singleton\x20state.\x20Wait\x20for\x20the\x20in-flight\x20chain\x20to\x20complete\x20(poll\x20its\x20status\x20via\x20the\x20protocol\x27s\x20resume\x20mechanism),\x20then\x20retry.'};this['testDataManager']&&void this[_0x3a87aa(0xad4)][_0x3a87aa(0x95e)]()[_0x3a87aa(0x48b)](()=>void 0x0);const _0xea5242=_0x2685ab(_0x46faf7);if(_0xea5242)return{'runId':'','status':_0x3a87aa(0x3dd),'completedSegments':[],'error':_0xea5242};const _0x27860a=_0x5e1687(),_0xf3582c=Date['now'](),_0x4c5b09={'runId':_0x27860a,'chain':_0x46faf7,'nextFlowIndex':0x0,'completed':[],'mutations':[],'lastTouchedMs':_0xf3582c,'startedAt':_0xf3582c,'busy':!![],'accumulatedWriteKeys':new Set(),'accumulatedHasFullyDynamicWrite':![],'authWallRetries':new Map(),'videoRecorder':null,'videoPath':null,'videoStartError':null,..._0x46faf7['affectedFlowNames']&&_0x46faf7[_0x3a87aa(0xa67)][_0x3a87aa(0x3b7)]>0x0?{'affectedFlowNames':new Set(_0x46faf7[_0x3a87aa(0xa67)])}:{}};this[_0x3a87aa(0x631)]['set'](_0x27860a,_0x4c5b09);if(this[_0x3a87aa(0x2a4)])try{if(_0x3a87aa(0x88f)!=='SQWth')return{'success':![],'apps':[],'error':_0x3a87aa(0x625)};else{const _0x80aec1=this[_0x3a87aa(0x2a4)]({'runId':_0x27860a}),_0x4dddf0=await _0x80aec1[_0x3a87aa(0x5cf)]();_0x4dddf0['ok']?_0x4c5b09[_0x3a87aa(0x212)]=_0x80aec1:(_0x4c5b09['videoStartError']=_0x4dddf0[_0x3a87aa(0x3dd)],process['stderr'][_0x3a87aa(0xaac)]('[ceraph]\x20video\x20recorder\x20start\x20failed\x20for\x20runId='+_0x27860a+':\x20'+_0x4dddf0[_0x3a87aa(0x3dd)]+'\x0a'));}}catch(_0x2447f0){const _0x13bdb1=_0x2447f0 instanceof Error?_0x2447f0[_0x3a87aa(0x531)]:String(_0x2447f0);_0x4c5b09[_0x3a87aa(0x96d)]=_0x13bdb1,process['stderr'][_0x3a87aa(0xaac)]('[ceraph]\x20video\x20recorder\x20threw\x20for\x20runId='+_0x27860a+':\x20'+_0x13bdb1+'\x0a');}try{return _0x4c5b09[_0x3a87aa(0x33b)]=await this['runWithBootCaptureLock'](()=>this['captureInitialObservation'](_0x46faf7['bootRequestPatterns'])),await this[_0x3a87aa(0xa34)](_0x4c5b09);}catch(_0x1d312b){const _0x10e375=_0x1d312b instanceof Error?_0x1d312b[_0x3a87aa(0x531)]:String(_0x1d312b);return _0x4c5b09['errorMessage']='Chain\x20crashed\x20before\x20reaching\x20a\x20snap\x20point:\x20'+_0x10e375,await this[_0x3a87aa(0x70b)](_0x4c5b09);}finally{_0x4c5b09['busy']=![];}}async['runWithBootCaptureLock'](_0x25f685){const _0x4ebaeb=_0xf8ecb6,_0x355845=this[_0x4ebaeb(0x754)];let _0x19e45c;this['bootCaptureTail']=new Promise(_0x446635=>{_0x19e45c=_0x446635;});try{if('yraWx'==='yraWx')return await _0x355845[_0x4ebaeb(0x48b)](()=>void 0x0),await _0x25f685();else _0x522bd6+=_0xf41c19['toString']();}finally{_0x19e45c();}}async['continueRun'](_0xe9beb2,_0x5409c8){const _0x3decff=_0xf8ecb6;this[_0x3decff(0x741)]();const _0x3a4fb0=this[_0x3decff(0x631)][_0x3decff(0x3fd)](_0xe9beb2);if(!_0x3a4fb0)return{'runId':_0xe9beb2,'status':'error','completedSegments':[],'error':_0x3decff(0x9e0)};_0x3a4fb0[_0x3decff(0x7eb)]=Date[_0x3decff(0x2f8)]();if(_0x3a4fb0[_0x3decff(0x81b)])return{'runId':_0xe9beb2,'status':_0x3decff(0x3dd),'initialObservation':_0x3a4fb0['initialObservation'],'completedSegments':_0x3a4fb0['completed'],'error':_0x3a4fb0['errorMessage'],..._0x3a4fb0[_0x3decff(0x276)]?{'videoPath':_0x3a4fb0[_0x3decff(0x276)]}:{}};if(_0x3a4fb0[_0x3decff(0x567)])return{'runId':_0xe9beb2,'status':'error','initialObservation':_0x3a4fb0['initialObservation'],'completedSegments':_0x3a4fb0['completed'],'error':_0x3decff(0x621)};const _0x2116e8=_0x3a4fb0[_0x3decff(0x8a1)]!==void 0x0,_0x162f70=_0x5409c8==='retry'||_0x5409c8===_0x3decff(0x3c0);if(_0x2116e8!==_0x162f70){const _0x18f1a7=_0x2116e8?'awaiting_error_decision':'awaiting_decision',_0xb96237=_0x2116e8?'`retry`\x20or\x20`halt`':'`continue`\x20or\x20`recreate`';return{'runId':_0xe9beb2,'status':_0x3decff(0x3dd),'initialObservation':_0x3a4fb0[_0x3decff(0x33b)],'completedSegments':_0x3a4fb0[_0x3decff(0xb13)],'error':_0x3decff(0x5ba)+_0x5409c8+_0x3decff(0x9ac)+_0x18f1a7+_0x3decff(0x318)+_0xb96237+'.'};}_0x3a4fb0['busy']=!![];try{if(_0x3a4fb0[_0x3decff(0x8a1)]){const _0x152778=_0x3a4fb0['awaitingErrorDecision'];if(_0x5409c8===_0x3decff(0x3c0)){const _0x3b3867=_0x3a4fb0[_0x3decff(0xb13)][_0x3a4fb0['completed'][_0x3decff(0x3b7)]-0x1];return _0x3a4fb0['errorMessage']='Chain\x20halted\x20by\x20LLM\x20at\x20flow\x20\x22'+(_0x3b3867?.[_0x3decff(0x8f8)]??'?')+'\x22\x20('+(_0x3b3867?.['errorSummary']??_0x3decff(0x29e))+').',_0x3a4fb0['awaitingErrorDecision']=void 0x0,await this['stopVideoRecording'](_0x3a4fb0),await this[_0x3decff(0x3e9)](_0x3a4fb0,!![])[_0x3decff(0x48b)](()=>void 0x0),await this['buildErrorResponse'](_0x3a4fb0);}return _0x152778[_0x3decff(0x551)]+=0x1,_0x3a4fb0['completed']['pop'](),await this['advanceUntilPauseOrEnd'](_0x3a4fb0);}return _0x5409c8==='recreate'&&await this[_0x3decff(0x42f)](_0x3a4fb0),await this[_0x3decff(0xa34)](_0x3a4fb0);}catch(_0x277fa2){const _0x3139b2=_0x277fa2 instanceof Error?_0x277fa2[_0x3decff(0x531)]:String(_0x277fa2);return _0x3a4fb0['errorMessage']='Chain\x20crashed\x20while\x20advancing:\x20'+_0x3139b2,await this[_0x3decff(0x7e5)](_0x3a4fb0),await this[_0x3decff(0x70b)](_0x3a4fb0);}finally{if(_0x3decff(0x833)!=='PdeQz'){_0x19f094[_0x3decff(0x66c)]=0xcc,_0x3273b8[_0x3decff(0x5b3)]();return;}else _0x3a4fb0['busy']=![];}}async[_0xf8ecb6(0xa34)](_0x998b91){const _0x5d6743=_0xf8ecb6;while(_0x998b91['nextFlowIndex']<_0x998b91[_0x5d6743(0xa1c)]['flows'][_0x5d6743(0x3b7)]){const _0x560225=_0x998b91[_0x5d6743(0x83b)],_0x4e6e87=_0x998b91[_0x5d6743(0xa1c)][_0x5d6743(0x628)][_0x560225];if(_0x560225>0x0){const _0x3c8277=await this[_0x5d6743(0xa24)](_0x998b91['chain'][_0x5d6743(0x9f2)][_0x560225-0x1]??[]);if(!_0x3c8277['ok']){const _0x23d14e=this['buildFailureReport'](_0x4e6e87[_0x5d6743(0x9e5)],0x0,_0x5d6743(0x9d0),_0x5d6743(0x297),_0x998b91);return _0x998b91[_0x5d6743(0xb13)]['push'](_0x23d14e),_0x998b91[_0x5d6743(0x81b)]='Chain\x20aborted:\x20'+_0x23d14e[_0x5d6743(0x366)],await this['stopVideoRecording'](_0x998b91),await this[_0x5d6743(0x70b)](_0x998b91);}}const _0x162e41=_0x998b91['affectedFlowNames']&&_0x998b91[_0x5d6743(0xa67)][_0x5d6743(0x952)]>0x0?_0x998b91['affectedFlowNames']:void 0x0,_0x23b8c9=this['runsStore']||_0x162e41?{'runId':_0x998b91[_0x5d6743(0x942)],...this[_0x5d6743(0x3d0)]?{'store':this['runsStore']}:{},..._0x162e41?{'affectedFlowNames':_0x162e41}:{}}:void 0x0,_0xb92d43=_0x998b91[_0x5d6743(0xa7d)]['length'],_0x37b801=this['expandFlowPlaceholders'](_0x4e6e87),_0x5ac10c=await this[_0x5d6743(0x4ac)]['run'](_0x37b801,_0x23b8c9),_0x3d70a1=this[_0x5d6743(0x6ed)](_0x5ac10c,_0x998b91,_0x560225);_0x998b91['completed'][_0x5d6743(0x4d1)](_0x3d70a1),_0x998b91[_0x5d6743(0x7eb)]=Date['now'](),await this['updateRunIndex'](_0x998b91)[_0x5d6743(0x48b)](()=>void 0x0);_0x5ac10c[_0x5d6743(0x6d0)]&&_0x998b91['awaitingErrorDecision']?.[_0x5d6743(0xad5)]===_0x560225&&(_0x998b91['awaitingErrorDecision']=void 0x0);this['recordMutations'](_0x4e6e87,_0x998b91),this['accumulateWriteSet'](_0x998b91,_0x4e6e87);if(!_0x5ac10c[_0x5d6743(0x6d0)]){const _0x542643=_0x3d70a1[_0x5d6743(0x9bc)],_0x23a399=_0x4e6e87['flowId']??_0x4e6e87[_0x5d6743(0x9e5)],_0x5c397f=_0x998b91['authWallRetries']['get'](_0x23a399)??0x0;if(_0x542643===_0x5d6743(0x61b)&&this[_0x5d6743(0xad4)]&&_0x5c397f<0x1){_0x998b91[_0x5d6743(0x445)]['set'](_0x23a399,_0x5c397f+0x1),process['stderr']['write']('[ceraph]\x20auth_wall\x20at\x20flow\x20\x22'+_0x4e6e87[_0x5d6743(0x9e5)]+_0x5d6743(0x656)),await this['applyRecreate'](_0x998b91),_0x998b91['completed']['pop']();_0x998b91['mutations'][_0x5d6743(0x3b7)]>_0xb92d43&&(_0x998b91[_0x5d6743(0xa7d)]['length']=_0xb92d43);continue;}if(_0x542643===_0x5d6743(0x61b)&&this[_0x5d6743(0xad4)]&&_0x5c397f>=0x1)return _0x998b91[_0x5d6743(0x81b)]=_0x5d6743(0x851)+_0x4e6e87[_0x5d6743(0x9e5)]+'\x22\x20failed\x20at\x20auth\x20wall\x20after\x20JIT\x20recovery\x20attempt\x20—\x20verify\x20your\x20auth\x20provider\x20is\x20configured\x20correctly\x20in\x20ceraph.config.js',await this['stopVideoRecording'](_0x998b91),await this[_0x5d6743(0x3e9)](_0x998b91,!![])['catch'](()=>void 0x0),await this[_0x5d6743(0x70b)](_0x998b91);const _0x3f9b87=_0x998b91['awaitingErrorDecision'];if(_0x3f9b87&&_0x3f9b87['failedFlowIndex']===_0x560225&&_0x3f9b87[_0x5d6743(0x551)]>=0x1)return _0x998b91[_0x5d6743(0x81b)]='Chain\x20aborted\x20at\x20flow\x20\x22'+_0x4e6e87[_0x5d6743(0x9e5)]+'\x22\x20('+(_0x3d70a1[_0x5d6743(0x366)]??_0x5d6743(0x29e))+')\x20after\x20'+_0x3d70a1[_0x5d6743(0x270)]+'ms\x20—\x20second\x20failure\x20after\x20LLM-issued\x20retry.',_0x998b91['awaitingErrorDecision']=void 0x0,await this['stopVideoRecording'](_0x998b91),await this['updateRunIndex'](_0x998b91,!![])[_0x5d6743(0x48b)](()=>void 0x0),await this['buildErrorResponse'](_0x998b91);return _0x998b91['mutations']['length']>_0xb92d43&&(_0x998b91[_0x5d6743(0xa7d)][_0x5d6743(0x3b7)]=_0xb92d43),_0x998b91['awaitingErrorDecision']=_0x3f9b87??{'failedFlowIndex':_0x560225,'retriesUsed':0x0},await this['updateRunIndex'](_0x998b91)[_0x5d6743(0x48b)](()=>void 0x0),{'runId':_0x998b91['runId'],'status':_0x5d6743(0x37b),'initialObservation':_0x998b91[_0x5d6743(0x33b)],'completedSegments':_0x998b91['completed'],'errorEvent':{'flow':_0x4e6e87['name'],'failureCause':_0x542643,'errorSummary':_0x3d70a1[_0x5d6743(0x366)]??_0x5d6743(0x2b9)}};}_0x998b91['nextFlowIndex']+=0x1;if(_0x998b91[_0x5d6743(0xa1c)]['snapPointFlowIndices'][_0x5d6743(0x27e)](_0x560225)&&_0x998b91[_0x5d6743(0x83b)]<_0x998b91[_0x5d6743(0xa1c)][_0x5d6743(0x628)]['length']){const _0x5c04a5=_0x998b91[_0x5d6743(0xa1c)][_0x5d6743(0x628)][_0x998b91[_0x5d6743(0x83b)]],_0x383748=_0x998b91['chain']['perFlowStatedDependencies']?.[_0x998b91['nextFlowIndex']]??[],_0xced15c=_0x998b91['completed'][_0x5d6743(0x86b)](_0x527e49=>_0x527e49[_0x5d6743(0x8f8)]),_0x3dca80=_0x2cd458(_0x998b91[_0x5d6743(0x56a)],_0x998b91[_0x5d6743(0x3d9)],_0x5c04a5,_0x383748,_0xced15c);if(_0x3dca80===_0x5d6743(0x75b))continue;if(_0x3dca80==='recreate'){await this['applyRecreate'](_0x998b91);continue;}const _0x298df7=this[_0x5d6743(0x4be)](_0x998b91,_0x4e6e87,_0x560225);if(_0x298df7)return{'runId':_0x998b91[_0x5d6743(0x942)],'status':_0x5d6743(0x78a),'initialObservation':_0x998b91[_0x5d6743(0x33b)],'completedSegments':_0x998b91[_0x5d6743(0xb13)],'snapPoint':_0x298df7};}}await this['stopVideoRecording'](_0x998b91),await this[_0x5d6743(0x3e9)](_0x998b91,!![])['catch'](()=>void 0x0),this['runs']['delete'](_0x998b91['runId']);this['testDataManager']&&void this[_0x5d6743(0xad4)]['cleanupJit']()[_0x5d6743(0x48b)](()=>void 0x0);const _0xc8dbb2=_0x998b91[_0x5d6743(0xb13)]['reduce']((_0x2d0029,_0x461d7a)=>_0x2d0029+_0x461d7a['durationMs'],0x0);return{'runId':_0x998b91[_0x5d6743(0x942)],'status':'chain_complete','initialObservation':_0x998b91[_0x5d6743(0x33b)],'completedSegments':_0x998b91['completed'],'finalResult':{'success':_0x998b91[_0x5d6743(0xb13)]['every'](_0x504e47=>_0x504e47['success']),'totalDurationMs':_0xc8dbb2},..._0x998b91['videoPath']?{'videoPath':_0x998b91['videoPath']}:{}};}async['buildErrorResponse'](_0x2bfbe9){const _0x158e79=_0xf8ecb6;return _0x2bfbe9[_0x158e79(0x7eb)]=Date[_0x158e79(0x2f8)](),await this['stopVideoRecording'](_0x2bfbe9),{'runId':_0x2bfbe9[_0x158e79(0x942)],'status':'error','initialObservation':_0x2bfbe9[_0x158e79(0x33b)],'completedSegments':_0x2bfbe9[_0x158e79(0xb13)],'error':_0x2bfbe9[_0x158e79(0x81b)]??'Unknown\x20chain\x20error',..._0x2bfbe9[_0x158e79(0x276)]?{'videoPath':_0x2bfbe9[_0x158e79(0x276)]}:{}};}async['stopVideoRecording'](_0x5de426){const _0x334017=_0xf8ecb6,_0x471645=_0x5de426[_0x334017(0x212)];if(!_0x471645)return;_0x5de426[_0x334017(0x212)]=null;try{await _0x471645['stop']();if(!_0x5de426[_0x334017(0x276)]){const _0x2f324d=this[_0x334017(0x3d0)]?_0x238f64(this[_0x334017(0x3d0)][_0x334017(0xae2)],_0x5de426['runId']):null;if(_0x2f324d)_0x5de426['videoPath']=_0x238f64(_0x2f324d,_0x334017(0x74e));}}catch(_0x3095bb){process[_0x334017(0x910)]['write'](_0x334017(0x3e5)+(_0x3095bb instanceof Error?_0x3095bb['message']:String(_0x3095bb))+'\x0a');}}['buildSnapPoint'](_0x2938a8,_0x32cb5f,_0xfc0f3a){const _0x151803=_0xf8ecb6,_0x5e575b=_0x32cb5f['steps'][_0x151803(0x415)](_0x1b3a59=>_0x1b3a59[_0x151803(0x41b)]&&_0x3fa7c2(_0x1b3a59[_0x151803(0x41b)]));if(!_0x5e575b?.[_0x151803(0x41b)])return null;const _0x290180=_0x2938a8[_0x151803(0xb13)]['map'](_0x1abcde=>_0x1abcde['flow']),_0xf3faf5=_0x2938a8['chain']['flows'][_0x151803(0x795)](_0xfc0f3a+0x1)[_0x151803(0x86b)]((_0xa67de3,_0x3a5bb9)=>{const _0x492ba1=_0x151803,_0x35a141=_0xfc0f3a+0x1+_0x3a5bb9,_0x18c275=_0x2938a8[_0x492ba1(0xa1c)]['perFlowStatedDependencies']?.[_0x35a141]??[],_0x3f6e4a=_0x2938a8['chain'][_0x492ba1(0xa40)]?.[_0x35a141],_0x17a9ae=_0x2cd458(_0x2938a8[_0x492ba1(0x56a)],_0x2938a8[_0x492ba1(0x3d9)],_0xa67de3,_0x18c275,_0x290180);return{'flow':_0xa67de3['name'],'statedDependencies':_0x18c275,..._0x3f6e4a&&_0x3f6e4a['length']>0x0?{'mutexWith':_0x3f6e4a}:{},'staticDecision':_0x17a9ae};});return{'flow':_0x32cb5f['name'],'flowIndex':_0xfc0f3a,'mutation':{'method':_0x5e575b[_0x151803(0x41b)][_0x151803(0x9de)][_0x151803(0x57c)](),'endpoint':_0x5e575b[_0x151803(0x41b)][_0x151803(0x317)],..._0x5e575b[_0x151803(0x41b)]['affectedDisplayRoute']?{'affectedDisplayRoute':_0x5e575b['verifyMutation'][_0x151803(0x2e8)]}:{}},'remainingChain':_0xf3faf5,'nextFlowStatedDependencies':_0xf3faf5[0x0]?.[_0x151803(0x562)]??[]};}['buildFlowReport'](_0x39e7bc,_0x5e40b5,_0x3a6258){const _0x492433=_0xf8ecb6,_0x535125=_0x39e7bc[_0x492433(0xa02)]['reduce']((_0x3a53fe,_0x5a44cc)=>_0x3a53fe+(_0x5a44cc[_0x492433(0x801)]?0x1:0x0),0x0),_0x5c0c9f=_0x39e7bc[_0x492433(0x669)]??0x0,_0x4914f1=_0x4f694f(_0x39e7bc);if(_0x39e7bc[_0x492433(0x6d0)]){if('eiGkb'!==_0x492433(0x2b5))return{'flow':_0x39e7bc[_0x492433(0x8f8)],'success':!![],'durationMs':_0x39e7bc[_0x492433(0x7d3)],'screenshotCount':_0x535125,'screenshotsAvailable':_0x5c0c9f,..._0x4914f1};else{let _0x41337b;try{_0x41337b=_0x4ed9bb('which',[_0x353457],{'stdio':['ignore','pipe','pipe']});}catch{_0x5e5bec(![]);return;}let _0x55b34e='';_0x41337b['stdout']?.['on'](_0x492433(0x78f),_0x2ad227=>{const _0x568ac9=_0x492433;_0x55b34e+=_0x2ad227[_0x568ac9(0xafa)]();}),_0x41337b['on']('error',()=>_0xf29f1f(![])),_0x41337b['on'](_0x492433(0x68c),_0x1cce81=>_0x4ad98f(_0x1cce81===0x0&&_0x55b34e[_0x492433(0x668)]()['length']>0x0));}}const _0x5e1690=_0x5e40b5['chain'][_0x492433(0x4c0)]?.[_0x3a6258]??[],_0x7a53fd=_0x3b8190(_0x39e7bc,_0x5e1690),_0x4ddcf4=_0x6f43f7(_0x39e7bc);return{'flow':_0x39e7bc['flow'],'success':![],'durationMs':_0x39e7bc['totalDurationMs'],'errorSummary':_0x4ddcf4,'screenshotCount':_0x535125,'screenshotsAvailable':_0x5c0c9f,'failureCause':_0x7a53fd,..._0x7a53fd===_0x492433(0x7a3)?{'expectedState':{'statedDependencies':_0x5e1690},'actualState':{'screen':this['screenFromResult'](_0x39e7bc)}}:{},'precedingMutations':_0x5e40b5[_0x492433(0xa7d)][_0x492433(0x3b7)]>0x0?[..._0x5e40b5[_0x492433(0xa7d)]]:void 0x0,..._0x4914f1};}['buildFailureReport'](_0x3e4a62,_0x27a252,_0x5e16ce,_0x50b414,_0x4d9ec3){const _0x508f54=_0xf8ecb6;return{'flow':_0x3e4a62,'success':![],'durationMs':_0x27a252,'errorSummary':_0x5e16ce,'screenshotCount':0x0,'screenshotsAvailable':0x0,'failureCause':_0x50b414,'precedingMutations':_0x4d9ec3['mutations']['length']>0x0?[..._0x4d9ec3[_0x508f54(0xa7d)]]:void 0x0};}async['updateRunIndex'](_0x1b5151,_0x4d3cd5=![]){const _0x6456ad=_0xf8ecb6;if(!this[_0x6456ad(0x3d0)])return;const _0xd0ffa1=_0x1b5151[_0x6456ad(0xb13)][_0x6456ad(0x86b)](_0x13b9c1=>{const _0x236f84=_0x6456ad;if('mDFdr'===_0x236f84(0x5d5)){_0x53c70d=null;return;}else{const _0x4bfdf1=_0x13b9c1['success']?'success':_0x236f84(0x54f),_0x397b69=_0x1b5151['mutations'][_0x236f84(0x275)](_0x52070c=>_0x52070c['flow']===_0x13b9c1['flow']);return{'flowName':_0x13b9c1['flow'],'stepCount':_0x13b9c1['screenshotsAvailable'],'mutates':_0x397b69,'status':_0x4bfdf1};}}),_0x40bc5c={'runId':_0x1b5151['runId'],'startedAt':_0x1b5151['startedAt'],..._0x4d3cd5?{'finishedAt':Date[_0x6456ad(0x2f8)]()}:{},'flows':_0xd0ffa1,..._0x1b5151['videoPath']?{'videoPath':_0x1b5151['videoPath']}:{}};await this[_0x6456ad(0x3d0)]['saveRunIndex'](_0x1b5151['runId'],_0x40bc5c);}[_0xf8ecb6(0x1ed)](_0x571349){const _0xc04b28=_0xf8ecb6;for(let _0x4f9666=_0x571349[_0xc04b28(0xa02)][_0xc04b28(0x3b7)]-0x1;_0x4f9666>=0x0;_0x4f9666--){const _0x2be463=_0x571349['steps'][_0x4f9666];if(_0x2be463[_0xc04b28(0x5a0)]!=='assertVisible')continue;const _0x4eaf70=_0x2be463[_0xc04b28(0x65d)],_0x2b3fda=_0x4eaf70?.[_0xc04b28(0x820)]?.[_0xc04b28(0x9e5)];if(typeof _0x2b3fda===_0xc04b28(0x30d)&&_0x2b3fda['length']>0x0)return _0x2b3fda;}return null;}['accumulateWriteSet'](_0xf6a116,_0x19b7e1){const _0x2c7483=_0xf8ecb6;if(!_0x19b7e1['writeSet']||_0x19b7e1['writeSet'][_0x2c7483(0x428)]===_0x2c7483(0x8e6))return;_0x19b7e1['writeSet']['hasFullyDynamicWrite']&&(_0xf6a116['accumulatedHasFullyDynamicWrite']=!![]);for(const _0x5bdc9e of _0x19b7e1[_0x2c7483(0x94b)]['keys']){_0x5bdc9e['wildcard']?_0xf6a116['accumulatedWriteKeys']['add'](_0x5bdc9e[_0x2c7483(0xb14)]+':'+_0x5bdc9e['key']+':*'):_0xf6a116['accumulatedWriteKeys'][_0x2c7483(0x856)](_0x5bdc9e['kind']+':'+_0x5bdc9e['key']);}}['expandFlowPlaceholders'](_0x28c675){const _0x566c2b=_0xf8ecb6,_0x29fac5=_0x1e792d(this[_0x566c2b(0xad4)]),{value:_0x245c74}=_0x11fccc({'steps':_0x28c675[_0x566c2b(0xa02)],'beforeAll':_0x28c675[_0x566c2b(0x4df)]},process.env,_0x29fac5);return{..._0x28c675,'steps':_0x245c74['steps'],'beforeAll':_0x245c74[_0x566c2b(0x4df)]};}['recordMutations'](_0x55dac3,_0x44adf0){const _0x329c9f=_0xf8ecb6;for(const _0x498847 of _0x55dac3[_0x329c9f(0xa02)]){if(!_0x498847[_0x329c9f(0x41b)])continue;if(!_0x3fa7c2(_0x498847['verifyMutation']))continue;_0x44adf0[_0x329c9f(0xa7d)]['push']({'method':_0x498847[_0x329c9f(0x41b)]['sourceMethod'][_0x329c9f(0x57c)](),'endpoint':_0x498847['verifyMutation'][_0x329c9f(0x317)],'flow':_0x55dac3[_0x329c9f(0x9e5)]});}}async[_0xf8ecb6(0xa24)](_0x15cdec){const _0x382c52=_0xf8ecb6;for(const _0x2384ae of _0x15cdec){const _0x66e773=_0x2384ae[_0x382c52(0x20b)]??_0x2384ae[_0x382c52(0x751)],_0x3dd00b=await this['flowRunner'][_0x382c52(0x810)]({'action':'tap','text':_0x66e773});if(!_0x3dd00b['success'])return{'ok':![],'failedHopTarget':_0x66e773};}return{'ok':!![]};}async['waitForAppTerminated'](_0x3c8941,_0x1ccd45){const _0x3cf236=_0xf8ecb6,_0x42b972=Date['now']();while(Date['now']()-_0x42b972<_0x1ccd45){const _0x495930=await this[_0x3cf236(0x508)][_0x3cf236(0xa2a)]()['catch'](()=>null);if(_0x495930&&_0x495930['success']&&_0x495930[_0x3cf236(0x369)]!==_0x3c8941)return;await new Promise(_0x2eee7a=>setTimeout(_0x2eee7a,_0x331fce));}}async['waitForAppForeground'](_0xd1d01f,_0x2489d2){const _0x1fe026=_0xf8ecb6,_0x207722=Date['now']();while(Date[_0x1fe026(0x2f8)]()-_0x207722<_0x2489d2){const _0x4dc223=await this['apps']['getActiveApp']()[_0x1fe026(0x48b)](()=>null);if(_0x4dc223&&_0x4dc223['success']&&_0x4dc223[_0x1fe026(0x369)]===_0xd1d01f)return;await new Promise(_0x52e1d3=>setTimeout(_0x52e1d3,_0x331fce));}}async['applyRecreate'](_0x4209cb){const _0x4737b5=_0xf8ecb6,_0x2c0472=_0x4209cb['completed'][_0x4209cb[_0x4737b5(0xb13)][_0x4737b5(0x3b7)]-0x1]?.['failureCause'],_0x457b55=_0x4209cb[_0x4737b5(0xa1c)][_0x4737b5(0x628)][_0x4209cb[_0x4737b5(0x83b)]],_0x3435d8=_0x457b55?.[_0x4737b5(0x4df)]?.['ensureLaunched']??_0x4209cb['chain'][_0x4737b5(0x628)][_0x4209cb[_0x4737b5(0x83b)]>0x0?_0x4209cb['nextFlowIndex']-0x1:0x0]?.['beforeAll']?.['ensureLaunched']??_0x4209cb[_0x4737b5(0xa1c)]['flows'][0x0]?.[_0x4737b5(0x4df)]?.['ensureLaunched'];if(this['testDataManager']&&this['testDataManager']['hasAdapter']()&&_0x2c0472===_0x4737b5(0x61b))try{await this[_0x4737b5(0xad4)]['provisionJit']();}catch(_0x1c3a30){console['error'](_0x4737b5(0x7cc)+(_0x1c3a30?.['message']??String(_0x1c3a30)));}const _0x1eb4d7=_0xa85944(_0x457b55?.[_0x4737b5(0x4c4)]),_0x4debcc=Boolean(_0x1eb4d7[_0x4737b5(0x3b7)]>0x0&&_0x3435d8);let _0x137209=![];_0x4debcc&&(_0x137209=await this[_0x4737b5(0x6b7)](_0x1eb4d7,_0x3435d8)['catch'](()=>![])===!![]),_0x3435d8&&(await this['apps']['terminateApp'](_0x3435d8)['catch'](()=>void 0x0),await this[_0x4737b5(0xaab)](_0x3435d8,_0x50a380),await this[_0x4737b5(0x508)][_0x4737b5(0xadd)](_0x3435d8)[_0x4737b5(0x48b)](()=>void 0x0)),!_0x4debcc&&await this['screen'][_0x4737b5(0x423)](_0x4737b5(0x933))[_0x4737b5(0x48b)](()=>void 0x0),_0x4debcc&&_0x137209&&_0x3435d8?await this[_0x4737b5(0x9b1)](_0x3435d8,this[_0x4737b5(0x260)]):await new Promise(_0x268194=>setTimeout(_0x268194,this[_0x4737b5(0x260)]));}async['deleteAsyncStorageKeys'](_0x3d0b16,_0x976bb5){const _0x13baaf=_0xf8ecb6;if(!_0x3d0b16[_0x13baaf(0x3b7)])return![];const _0x2eb1da=_0xa85944(_0x3d0b16);if(!_0x2eb1da['length'])return![];const _0x26f662=_0x2362a7(),_0x17cd32=encodeURIComponent(_0x2eb1da[_0x13baaf(0x4ec)](',')),_0x969215=_0x13baaf(0x77c)+_0x17cd32+_0x13baaf(0x236)+encodeURIComponent(_0x26f662),_0x5dffb1=this[_0x13baaf(0x214)]?.['waitForStorageAck']?.[_0x13baaf(0x2d8)](this[_0x13baaf(0x214)]);try{if(!_0x5dffb1)return process['stderr']['write']('[ceraph][ceraph-infra]\x20deleteAsyncStorageKeys:\x20no\x20waitForStorageAck\x20on\x20boot\x20source;\x20dispatched\x20delete\x20without\x20ACK\x20confirmation\x0a'),await this[_0x13baaf(0x5be)][_0x13baaf(0x423)](_0x969215),![];const _0x19371d=_0x5dffb1(0x7d0,_0x26f662)['catch'](()=>null);await this['screen'][_0x13baaf(0x423)](_0x969215);const _0x4f24e1=await _0x19371d;if(!_0x4f24e1?.['success'])return process['stderr'][_0x13baaf(0xaac)](_0x13baaf(0x3b3)+_0x2eb1da['join'](',')+'\x0a'),![];return!![];}catch(_0x5a9b06){return process[_0x13baaf(0x910)][_0x13baaf(0xaac)](_0x13baaf(0x480)+(_0x5a9b06 instanceof Error?_0x5a9b06[_0x13baaf(0x531)]:String(_0x5a9b06))+'\x0a'),![];}}async[_0xf8ecb6(0x61a)](_0xf6662){const _0x176a8d=_0xf8ecb6;let _0xa9c9a8='unknown',_0x28d843=null,_0xf98022=[],_0x204ec=[],_0xb76741=![],_0x8ce33b;if(this['bootSource'])try{this['bootSource']['setBootCaptureMode'](!![]);}catch{}try{const _0x1410f7=await this[_0x176a8d(0x5be)]['getSource']()[_0x176a8d(0x48b)](()=>null),_0x589cf2=await this[_0x176a8d(0x508)]['getActiveApp']()[_0x176a8d(0x48b)](()=>null);_0x28d843=_0x589cf2&&_0x589cf2['success']?_0x589cf2[_0x176a8d(0x369)]??null:null;_0x1410f7?.[_0x176a8d(0x6d0)]&&_0x1410f7['source']&&(_0xa9c9a8=_0x28abd4(_0x1410f7['source']));this[_0x176a8d(0x214)]&&await this['waitForBootSettle']();const _0x6dc17c=await this['screen']['getSource']()[_0x176a8d(0x48b)](()=>null);if(_0x6dc17c?.['success']&&_0x6dc17c[_0x176a8d(0x40e)]){if(_0x176a8d(0xb15)===_0x176a8d(0xb15))_0xf98022=_0x89ff4d(_0x6dc17c['source']);else{let _0x4b890d=0x0,_0x913187=0x0;for(const _0x55986c of _0x133312[_0x176a8d(0x8c5)]){const _0x23ff83=_0x55986c['bounds']['x']+_0x55986c[_0x176a8d(0x268)]['w'],_0x1a5cd6=_0x55986c[_0x176a8d(0x268)]['y']+_0x55986c['bounds']['h'];if(_0x23ff83>_0x4b890d)_0x4b890d=_0x23ff83;if(_0x1a5cd6>_0x913187)_0x913187=_0x1a5cd6;}(_0x4b890d<=0x0||_0x913187<=0x0)&&(_0x4b890d=0x1f4,_0x913187=0x3e8);const _0x32667f=_0x12c58f;return{'x':0x0,'y':_0x32667f,'w':_0x4b890d,'h':_0x3236a2['max'](0x0,_0x913187-_0x32667f),..._0x1a1456['screenName']?{'screenName':_0x16b467['screenName']}:{}};}}else _0x1410f7?.['success']&&_0x1410f7['source']&&(_0xf98022=_0x89ff4d(_0x1410f7['source']));if(this[_0x176a8d(0x214)]){const _0x2e68b0=this['accumulatedBootDrains']??[];this[_0x176a8d(0x71c)]=null;const _0xb89168=[..._0x2e68b0,...this['bootSource']['drainBootRequests']()],_0x4b1eb6=_0x3c0d7e(_0xb89168,_0xf6662??[],_0x44fc26);_0x204ec=_0x4b1eb6[_0x176a8d(0x42a)],_0xb76741=_0x4b1eb6['truncated'];if(typeof this['bootSource']['drainAsyncStorageReads']==='function')try{_0x8ce33b=this[_0x176a8d(0x214)]['drainAsyncStorageReads']();}catch{_0x8ce33b=void 0x0;}}}catch{}finally{if(this[_0x176a8d(0x214)])try{this['bootSource']['setBootCaptureMode'](![]),this[_0x176a8d(0x214)]['clearBootRequests']();}catch{}}return{'sessionMode':_0xa9c9a8,'screen':_0x28d843,'accessibilityTree':_0xf98022,'bootRequests':_0x204ec,..._0xb76741?{'bootRequestsFiltered':!![]}:{},..._0x8ce33b!==void 0x0?{'asyncStorageReads':_0x8ce33b}:{}};}async['waitForBootSettle'](){const _0x13ba9a=_0xf8ecb6;if(!this['bootSource'])return;let _0x3eb5fd=0x0;const _0x4862e1=()=>{const _0x19fea8=_0xc050;if(typeof this['bootSource'][_0x19fea8(0xaef)]==='function')return this[_0x19fea8(0x214)][_0x19fea8(0xaef)]();const _0x13b216=this['bootSource'][_0x19fea8(0x9dd)]();if(_0x13b216['length']>0x0){if(!this['accumulatedBootDrains'])this[_0x19fea8(0x71c)]=[];this['accumulatedBootDrains'][_0x19fea8(0x4d1)](..._0x13b216),_0x3eb5fd+=_0x13b216[_0x19fea8(0x3b7)];}return _0x3eb5fd;},_0x5c770c=Date['now']();let _0x53bfc4=_0x4862e1(),_0x2e2d47=Date[_0x13ba9a(0x2f8)]();const _0x31feab=0x64;while(!![]){const _0x422012=Date['now']();if(_0x422012-_0x5c770c>=this[_0x13ba9a(0x218)])return;if(_0x422012-_0x2e2d47>=this['bootDebounceMs'])return;await new Promise(_0x3a4ab8=>setTimeout(_0x3a4ab8,_0x31feab));const _0x2ba91f=_0x4862e1();_0x2ba91f!==_0x53bfc4&&(_0x53bfc4=_0x2ba91f,_0x2e2d47=Date['now']());}}['evictExpired'](){const _0x545424=_0xf8ecb6,_0x4545f6=Date['now']();for(const [_0xcc6221,_0x76e284]of this['runs']['entries']()){if(_0x76e284[_0x545424(0x567)])continue;if(_0x4545f6-_0x76e284['lastTouchedMs']>this[_0x545424(0x988)]){const _0x5bcf8a=_0x76e284[_0x545424(0x212)];_0x5bcf8a&&(_0x76e284['videoRecorder']=null,void _0x5bcf8a['stop']()['catch'](_0x2e5dbb=>{const _0x340d3c=_0x545424;process['stderr']['write'](_0x340d3c(0x94e)+(_0x2e5dbb instanceof Error?_0x2e5dbb[_0x340d3c(0x531)]:String(_0x2e5dbb))+'\x0a');})),this[_0x545424(0x631)]['delete'](_0xcc6221);}}}[_0xf8ecb6(0x952)](){const _0x2a9d44=_0xf8ecb6;return this['evictExpired'](),this['runs'][_0x2a9d44(0x952)];}async[_0xf8ecb6(0x247)](){const _0x3dc6c1=_0xf8ecb6,_0x4f3e07=[];for(const _0x56691c of this['runs'][_0x3dc6c1(0x32f)]()){const _0x5c15f7=_0x56691c[_0x3dc6c1(0x212)];_0x5c15f7&&(_0x56691c['videoRecorder']=null,_0x4f3e07[_0x3dc6c1(0x4d1)](_0x5c15f7[_0x3dc6c1(0x8bc)]()['catch'](_0x1ef9c2=>{const _0x5aaeeb=_0x3dc6c1;process[_0x5aaeeb(0x910)]['write']('[ceraph]\x20video\x20recorder\x20shutdown\x20stop\x20failed:\x20'+(_0x1ef9c2 instanceof Error?_0x1ef9c2['message']:String(_0x1ef9c2))+'\x0a');})));}await Promise[_0x3dc6c1(0x2d4)](_0x4f3e07);}[_0xf8ecb6(0x689)](_0x350a53){const _0x142dce=_0xf8ecb6;return this[_0x142dce(0x631)]['get'](_0x350a53)?.[_0x142dce(0x96d)]??void 0x0;}};function _0x89ff4d(_0x55e136){const _0x1d95ce=[];let _0x2c44b2=0x2;const _0x10dde6=_0x17ddcf=>{const _0x4c055c=_0xc050;if(!_0x17ddcf||typeof _0x17ddcf!=='object')return;const _0x55c9c7=_0x17ddcf,_0x27566e=_0x4f9b1c(_0x55c9c7[_0x4c055c(0x45e)]);if(_0x27566e){const _0x5f04d4=_0x4214be(_0x55c9c7);if(_0x5f04d4){const _0x291fc6={'kind':_0x27566e,'text':_0x5f04d4},_0x266fba=_0x1d95ce[_0x1d95ce['length']-0x1],_0x5a8b68=_0x266fba&&_0x266fba[_0x4c055c(0xb14)]===_0x291fc6['kind']&&_0x266fba['text']===_0x291fc6[_0x4c055c(0x3e0)],_0x1dfc6a=JSON[_0x4c055c(0x312)](_0x291fc6)['length']+0x1;!_0x5a8b68&&_0x2c44b2+_0x1dfc6a<=_0x354bc0&&(_0x1d95ce[_0x4c055c(0x4d1)](_0x291fc6),_0x2c44b2+=_0x1dfc6a);}}if(Array[_0x4c055c(0x200)](_0x55c9c7[_0x4c055c(0x4e3)])){for(const _0x404259 of _0x55c9c7['children'])_0x10dde6(_0x404259);}};return _0x10dde6(_0x55e136),_0x1d95ce;}function _0x4f9b1c(_0x282b35){const _0x4124e4=_0xf8ecb6;if(!_0x282b35)return null;const _0x5eba9e=_0x282b35[_0x4124e4(0x42e)](/^XCUIElementType/,'');if(_0x5eba9e==='Button')return _0x4124e4(0x86e);if(_0x5eba9e===_0x4124e4(0x839)||_0x5eba9e==='SecureTextField'||_0x5eba9e==='SearchField')return'input';if(_0x5eba9e===_0x4124e4(0x8a5))return _0x4124e4(0x569);if(_0x5eba9e===_0x4124e4(0xa8e))return _0x4124e4(0x3e0);return null;}function _0x4214be(_0x2b0074){const _0x595231=_0xf8ecb6,_0x36d808=[_0x2b0074[_0x595231(0x9e5)],_0x2b0074['label'],_0x2b0074[_0x595231(0x39d)],_0x2b0074[_0x595231(0x7c1)]];for(const _0x2f4a14 of _0x36d808){if(typeof _0x2f4a14==='string'&&_0x2f4a14['trim']()[_0x595231(0x3b7)]>0x0)return _0x2f4a14['trim']();}return'';}function _0x28abd4(_0x4a7e5d){const _0x4c95be=_0xf8ecb6;if(!_0x4a7e5d||typeof _0x4a7e5d!==_0x4c95be(0x9e3))return'unknown';let _0xc348db=![],_0x298928=![];const _0x37d40c=_0x23c21e=>{const _0x1eb5c2=_0x4c95be;if(_0xc348db&&_0x298928)return;if(!_0x23c21e||typeof _0x23c21e!=='object')return;const _0x39430b=_0x23c21e,_0x52d1f0=_0x4214be(_0x39430b)['toLowerCase']();if(_0x52d1f0){if(_0x1a2549[_0x1eb5c2(0x8aa)](_0x52d1f0))_0xc348db=!![];}if(_0x39430b[_0x1eb5c2(0x45e)]===_0x1eb5c2(0xa98)||_0x39430b[_0x1eb5c2(0x45e)]===_0x1eb5c2(0x47d)){const _0x1dbfac=((_0x39430b['name']??'')+'\x20'+(_0x39430b[_0x1eb5c2(0x960)]??'')+'\x20'+(_0x39430b['placeholder']??''))[_0x1eb5c2(0x5b5)]();(_0x39430b['type']===_0x1eb5c2(0x47d)||_0x4834be['test'](_0x1dbfac))&&(_0x298928=!![]);}if(Array[_0x1eb5c2(0x200)](_0x39430b[_0x1eb5c2(0x4e3)])){for(const _0x2a7f4c of _0x39430b['children'])_0x37d40c(_0x2a7f4c);}};_0x37d40c(_0x4a7e5d);if(_0xc348db||_0x298928)return'fresh';return _0x4c95be(0xb28);}var _0x1a2549=/\b(sign in|sign up|log in|login|signup|welcome back|create account)\b/i,_0x4834be=/\b(email|password|e-mail)\b/i;function _0x3b8190(_0x5d6c3f,_0x159fc){const _0x3b5376=_0xf8ecb6,_0x2bbb5e=_0x5d6c3f['objectiveSignals']??[];if(_0x2bbb5e[_0x3b5376(0x275)](_0x17fd12))return'timeout';if(_0x2bbb5e['some'](_0x2dee17))return _0x3b5376(0x61b);if(_0x2bbb5e['length']>0x0&&_0x159fc&&_0x159fc[_0x3b5376(0x3b7)]>0x0){if(_0x294183(_0x5d6c3f,_0x159fc))return'unexpected_state';}if(_0x2bbb5e['length']>0x0)return _0x3b5376(0xb07);return _0x3b5376(0x297);}function _0x17fd12(_0x284f13){const _0x5aa251=_0xf8ecb6,_0x4bb8ef=_0x284f13[_0x5aa251(0x531)]['toLowerCase']();if(!_0x4bb8ef['includes']('timeout')&&!_0x4bb8ef['includes'](_0x5aa251(0x24b)))return![];return _0x284f13[_0x5aa251(0xb14)]===_0x5aa251(0x5d3)||_0x284f13['kind']===_0x5aa251(0x727);}function _0x2dee17(_0x5655f4){const _0x3c3b77=_0xf8ecb6;if(_0x5655f4['kind']!==_0x3c3b77(0x57e)&&_0x5655f4['kind']!==_0x3c3b77(0x727))return![];const _0x35e7b3=_0x5655f4[_0x3c3b77(0x363)]??'';return/\bstatus=(401|403)\b/[_0x3c3b77(0x8aa)](_0x35e7b3);}function _0x294183(_0x2aedd7,_0x16c014){const _0x28402b=_0xf8ecb6,_0x222efe=new Set();for(const _0xe38065 of _0x16c014){for(const _0x177f4a of _0xe38065['split'](/[^A-Za-z0-9]+/)){if(_0x177f4a['length']<0x3)continue;_0x222efe[_0x28402b(0x856)](_0x177f4a['toLowerCase']());}}if(_0x222efe[_0x28402b(0x952)]===0x0)return![];for(const _0x14f582 of _0x2aedd7['steps']){if(_0x14f582[_0x28402b(0x6d0)])continue;const _0x39f9ab=_0x2198d9(_0x14f582)[_0x28402b(0x5b5)]();if(!_0x39f9ab)continue;const _0x3235f4=new Set();for(const _0x3d9c73 of _0x39f9ab[_0x28402b(0x51a)](/[^a-z0-9]+/)){if(_0x3d9c73['length']<0x3)continue;_0x3235f4['add'](_0x3d9c73);}for(const _0x189467 of _0x222efe){if(_0x3235f4[_0x28402b(0x979)](_0x189467))return!![];}}return![];}function _0x2198d9(_0x32014c){const _0x21b061=_0xf8ecb6;if(_0x32014c[_0x21b061(0xb00)]){if(typeof _0x32014c[_0x21b061(0xb00)]['text']===_0x21b061(0x30d)&&_0x32014c[_0x21b061(0xb00)][_0x21b061(0x3e0)][_0x21b061(0x3b7)]>0x0)return _0x32014c[_0x21b061(0xb00)][_0x21b061(0x3e0)];if(typeof _0x32014c[_0x21b061(0xb00)]['accessibilityLabel']==='string'&&_0x32014c['target']['accessibilityLabel']['length']>0x0)return _0x32014c['target']['accessibilityLabel'];}const _0x12c85b=_0x32014c['details'];return _0x12c85b?.[_0x21b061(0x820)]?.[_0x21b061(0x9e5)]??_0x12c85b?.['element']?.['label']??'';}function _0x2685ab(_0x18d445){const _0x195ceb=_0xf8ecb6;if(!_0x18d445||typeof _0x18d445!==_0x195ceb(0x9e3))return _0x195ceb(0x2e7);if(!Array['isArray'](_0x18d445['flows']))return _0x195ceb(0x300);if(_0x18d445['flows']['length']===0x0)return _0x195ceb(0x216);if(!Array[_0x195ceb(0x200)](_0x18d445[_0x195ceb(0x9f2)]))return _0x195ceb(0x4ea);if(_0x18d445['bridges'][_0x195ceb(0x3b7)]>Math['max'](0x0,_0x18d445[_0x195ceb(0x628)][_0x195ceb(0x3b7)]-0x1))return'PlannedChainInput.bridges\x20length\x20('+_0x18d445[_0x195ceb(0x9f2)]['length']+_0x195ceb(0x301)+(_0x18d445['flows']['length']-0x1)+').';if(!Array['isArray'](_0x18d445['snapPointFlowIndices']))return'PlannedChainInput.snapPointFlowIndices\x20must\x20be\x20an\x20array.';for(const _0x301d21 of _0x18d445['snapPointFlowIndices']){if(typeof _0x301d21!==_0x195ceb(0x2af)||!Number['isInteger'](_0x301d21)||_0x301d21<0x0)return _0x195ceb(0x9a1)+String(_0x301d21)+'.';if(_0x301d21>=_0x18d445['flows'][_0x195ceb(0x3b7)]-0x1)return _0x195ceb(0x464)+_0x301d21+'\x20has\x20no\x20successor\x20flow\x20(flows.length='+_0x18d445[_0x195ceb(0x628)]['length']+').';}if(_0x18d445['affectedFlowNames']!==void 0x0){if(!Array['isArray'](_0x18d445['affectedFlowNames']))return _0x195ceb(0x25b);const _0x55069a=new Set(_0x18d445[_0x195ceb(0x628)]['map'](_0x410323=>_0x410323['name'])),_0x471101=_0x18d445['affectedFlowNames'][_0x195ceb(0x529)](_0x329ee4=>typeof _0x329ee4!=='string'||!_0x55069a[_0x195ceb(0x979)](_0x329ee4));if(_0x471101[_0x195ceb(0x3b7)]>0x0){const _0x27cc77=_0x471101[_0x195ceb(0x86b)](_0x3a1c7a=>String(_0x3a1c7a))[_0x195ceb(0x4ec)](',\x20');process['stderr'][_0x195ceb(0xaac)](_0x195ceb(0x24d)+_0x471101['length']+'\x20unknown\x20affectedFlowName(s)\x20from\x20PlannedChainInput:\x20'+_0x27cc77+_0x195ceb(0x766)),_0x18d445['affectedFlowNames']=_0x18d445['affectedFlowNames'][_0x195ceb(0x529)](_0x3263ed=>typeof _0x3263ed==='string'&&_0x55069a['has'](_0x3263ed));}}return null;}function _0x23f53f(_0x3f7d38){const _0x128a11=_0xf8ecb6,_0x33e0f9=_0x3f7d38[_0x128a11(0x57c)]();return _0x33e0f9==='POST'||_0x33e0f9==='PUT'||_0x33e0f9===_0x128a11(0x58b)||_0x33e0f9===_0x128a11(0x554);}function _0x3fa7c2(_0x49be6b){const _0x3c0931=_0xf8ecb6;if(_0x49be6b[_0x3c0931(0x98f)]===_0x3c0931(0x30e))return!![];return _0x23f53f(_0x49be6b[_0x3c0931(0x9de)]);}function _0x4e5d78(_0x37e9da,_0x12797a){const _0x29e8aa=_0xf8ecb6;for(const _0x2da570 of _0x12797a){if(_0x2da570[_0x29e8aa(0x3b7)]===0x0)continue;const _0x4ec492=_0x30cc8c(_0x2da570[_0x29e8aa(0x450)](0x0)),_0x3ed876=_0x30cc8c(_0x2da570[_0x29e8aa(0x450)](_0x2da570[_0x29e8aa(0x3b7)]-0x1));let _0x2d1b98=0x0;while(_0x2d1b98<=_0x37e9da[_0x29e8aa(0x3b7)]){const _0x11f45e=_0x37e9da['indexOf'](_0x2da570,_0x2d1b98);if(_0x11f45e<0x0)break;const _0x2c01f9=_0x11f45e+_0x2da570[_0x29e8aa(0x3b7)],_0xcd3887=_0x11f45e===0x0||_0x4ec492||_0x30cc8c(_0x37e9da[_0x29e8aa(0x450)](_0x11f45e-0x1)),_0x4dd3f8=_0x2c01f9===_0x37e9da['length']||_0x3ed876||_0x30cc8c(_0x37e9da['charCodeAt'](_0x2c01f9));if(_0xcd3887&&_0x4dd3f8)return!![];_0x2d1b98=_0x11f45e+0x1;}}return![];}function _0x30cc8c(_0x4e14fc){return _0x4e14fc===0x2f||_0x4e14fc===0x3f||_0x4e14fc===0x23||_0x4e14fc===0x2e;}function _0x598ac1(_0xbe2404){const _0x5f4ea4=_0xf8ecb6;let _0x570239=_0xbe2404;const _0x146aa2=_0x570239['indexOf']('?');if(_0x146aa2>=0x0)_0x570239=_0x570239['slice'](0x0,_0x146aa2);const _0x57104f=_0x570239[_0x5f4ea4(0x4ca)]('#');if(_0x57104f>=0x0)_0x570239=_0x570239['slice'](0x0,_0x57104f);return _0x570239;}function _0x3c0d7e(_0x56f19d,_0x4e95cb,_0x14ca18){const _0x5e3cce=_0xf8ecb6;if(_0x56f19d[_0x5e3cce(0x3b7)]===0x0)return{'entries':[],'truncated':![]};const _0x4d79f3=Array[_0x5e3cce(0x200)](_0x4e95cb)?_0x4e95cb:[],_0x12758b=_0x4d79f3[_0x5e3cce(0x86b)](_0x419180=>typeof _0x419180==='string'?_0x419180[_0x5e3cce(0x5b5)]():'')['filter'](_0x585159=>_0x585159[_0x5e3cce(0x668)]()[_0x5e3cce(0x3b7)]>0x0),_0x1fa813=_0x12758b[_0x5e3cce(0x3b7)]===0x0,_0xd607e=_0x56f19d['map'](_0x658c39=>{const _0x35db45=_0x5e3cce;if(_0x35db45(0x894)===_0x35db45(0x894)){const _0xc479c5=typeof _0x658c39[_0x35db45(0x2c7)]==='string'?_0x658c39['path']:'',_0x1352c7=_0x598ac1(_0xc479c5['toLowerCase']()),_0x4d6f03=_0x1fa813||_0x4e5d78(_0x1352c7,_0x12758b);if(!_0x4d6f03){const {response:_0x3ce892,..._0x10c30c}=_0x658c39;return void _0x3ce892,{'entry':_0x10c30c,'matched':![],'bodyBytes':0x0};}const _0x1009b5=_0x658c39['response']?Buffer['byteLength'](_0x658c39[_0x35db45(0x90e)],'utf8'):0x0;return{'entry':_0x658c39,'matched':!![],'bodyBytes':_0x1009b5};}else{_0x2313dc['statusCode']=0x190,_0x3b9d60['end'](_0x35db45(0x748));return;}});let _0x3ef096=_0xd607e[_0x5e3cce(0xad3)]((_0x3afd48,_0x1a9069)=>_0x3afd48+(_0x1a9069['matched']?_0x1a9069['bodyBytes']:0x0),0x0),_0x54e8be=![];if(_0x3ef096>_0x14ca18)for(let _0x41d998=0x0;_0x41d998<_0xd607e['length']&&_0x3ef096>_0x14ca18;_0x41d998++){const _0x589f5f=_0xd607e[_0x41d998];if(!_0x589f5f[_0x5e3cce(0x804)]||_0x589f5f['bodyBytes']===0x0)continue;const {response:_0x54a5cb,..._0x27a0bf}=_0x589f5f[_0x5e3cce(0x3c9)];void _0x54a5cb,_0x589f5f[_0x5e3cce(0x3c9)]=_0x27a0bf,_0x3ef096-=_0x589f5f['bodyBytes'],_0x589f5f['bodyBytes']=0x0,_0x54e8be=!![];}return{'entries':_0xd607e['map'](_0x14fbde=>_0x14fbde['entry']),'truncated':_0x54e8be};}function _0x4f694f(_0x12a94b){const _0x1e3d08=_0xf8ecb6;return{..._0x12a94b['witnesses']&&_0x12a94b[_0x1e3d08(0x394)][_0x1e3d08(0x3b7)]>0x0?{'witnesses':_0x12a94b[_0x1e3d08(0x394)]}:{},..._0x12a94b['objectiveSignals']&&_0x12a94b['objectiveSignals']['length']>0x0?{'objectiveSignals':_0x12a94b['objectiveSignals']}:{},..._0x12a94b[_0x1e3d08(0x86d)]&&_0x12a94b[_0x1e3d08(0x86d)]['length']>0x0?{'reloadRecoveryWitnesses':_0x12a94b[_0x1e3d08(0x86d)]}:{}};}function _0x6f43f7(_0x3da99e){const _0x168928=_0xf8ecb6;if((_0x3da99e[_0x168928(0x364)]?.['length']??0x0)>0x0){const _0x62405c=_0x3da99e[_0x168928(0x364)][0x0];return _0x62405c['kind']+':\x20'+_0x62405c[_0x168928(0x531)];}for(const _0x373f4d of _0x3da99e['steps']){if(!_0x373f4d[_0x168928(0x6d0)]){const _0x19b794=_0x373f4d[_0x168928(0x5a0)],_0x19631d=_0x373f4d['error']??_0x168928(0x6f5);return _0x19b794+_0x168928(0x252)+_0x19631d;}}return _0x168928(0x40b);}import{z}from'zod';var _0x90f27e=z['object']({'text':z['string']()['optional'](),'accessibilityLabel':z['string']()['optional'](),'type':z[_0xf8ecb6(0x30d)]()['optional'](),'index':z[_0xf8ecb6(0x2af)]()['int']()['nonnegative']()['optional']()});function _0x1f04e8(_0x1d258d){const _0x129e85=_0xf8ecb6;if(!_0x1d258d[_0x129e85(0x3e0)]&&!_0x1d258d['accessibilityLabel']&&!_0x1d258d[_0x129e85(0x45e)]&&_0x1d258d[_0x129e85(0x977)]===void 0x0)return'Each\x20query\x20needs\x20at\x20least\x20one\x20of\x20text,\x20accessibilityLabel,\x20type,\x20or\x20index.';return null;}function _0x948d06(_0x46b97c,_0x59cc25){const _0x45f036=_0xf8ecb6,{screenManager:_0x508a9f,toolErrorContent:_0x2f844f,jsonText:_0x353614,requireWDA:_0x15cbff}=_0x59cc25;_0x46b97c['tool']('screen_tap_and_verify','Compound\x20primitive:\x20find\x20an\x20element\x20by\x20text/accessibilityLabel/type,\x20tap\x20its\x20center,\x20and\x20optionally\x20assert\x20a\x20follow-up\x20selector\x20becomes\x20visible\x20—\x20all\x20in\x20one\x20logical\x20step.\x20Sends\x20the\x20tap\x20via\x20the\x20W3C\x20bulk-actions\x20endpoint\x20when\x20WDA\x20supports\x20it\x20(batched:\x20true)\x20and\x20falls\x20back\x20to\x20the\x20legacy\x20serial\x20tap\x20path\x20otherwise\x20(batched:\x20false).',{'text':z[_0x45f036(0x30d)]()[_0x45f036(0x768)](),'accessibilityLabel':z['string']()[_0x45f036(0x768)](),'type':z['string']()[_0x45f036(0x768)](),'index':z[_0x45f036(0x2af)]()[_0x45f036(0x732)]()[_0x45f036(0x8b3)]()['optional'](),'verifySelector':_0x90f27e['optional']()[_0x45f036(0x3f0)]('Optional\x20follow-up\x20assertion.\x20The\x20tool\x20reports\x20the\x20visibility\x20of\x20this\x20selector\x20in\x20`verifyResult`\x20after\x20the\x20tap.\x20Omit\x20to\x20perform\x20the\x20tap\x20only.')},async _0x54295b=>{const _0x556648=_0x45f036;try{const _0x177deb=await _0x15cbff();if(!_0x177deb['ok'])return{..._0x353614(_0x177deb['payload']),'isError':!![]};const _0x4a555b=_0x54295b,_0x13dc35=_0x1f04e8(_0x4a555b);if(_0x13dc35)return{..._0x353614({'success':![],'error':_0x13dc35}),'isError':!![]};const _0x41cd22={'text':_0x4a555b['text'],'accessibilityLabel':_0x4a555b[_0x556648(0x444)],'type':_0x4a555b['type'],'index':_0x4a555b['index']},_0x13be2b=_0x4a555b['verifySelector'];if(_0x13be2b){const _0x3aa8ae=_0x1f04e8(_0x13be2b);if(_0x3aa8ae){if(_0x556648(0x451)===_0x556648(0xb1b)){const _0x5dff77=_0x4e19e1;if(_0x5dff77?.['name']===_0x556648(0xace))throw new _0x497d82(_0x556648(0x651),0x0,_0x556648(0x823)+_0x39fc62+_0x556648(0x8ea),_0x4cb530);throw new _0x6667a0(_0x556648(0x651),0x0,_0x556648(0x900),_0x10e57c);}else return{..._0x353614({'success':![],'error':'verifySelector:\x20'+_0x3aa8ae}),'isError':!![]};}}const _0x4b77d8=await _0x508a9f['tapAndVerify'](_0x41cd22,{'verifySelector':_0x13be2b});return{..._0x353614(_0x4b77d8),'isError':!_0x4b77d8[_0x556648(0x6d0)]};}catch(_0x954de1){return _0x2f844f(_0x556648(0xa04),_0x954de1);}}),_0x46b97c[_0x45f036(0x34e)](_0x45f036(0x57f),'Compound\x20primitive:\x20focus\x20an\x20input\x20field\x20matched\x20by\x20text/accessibilityLabel/type\x20and\x20type\x20into\x20it.\x20Sends\x20the\x20tap-to-focus\x20and\x20per-character\x20keypresses\x20as\x20ONE\x20W3C\x20actions\x20call\x20when\x20WDA\x20supports\x20it\x20(batched:\x20true);\x20falls\x20back\x20to\x20serial\x20findAndTap\x20+\x20wda/keys\x20otherwise\x20(batched:\x20false).\x20Set\x20`clearFirst:\x20true`\x20to\x20clear\x20an\x20existing\x20value\x20before\x20typing\x20—\x20off\x20by\x20default\x20so\x20we\x20never\x20silently\x20overwrite\x20form\x20state.',{'fieldQuery':_0x90f27e['describe']('Query\x20identifying\x20the\x20input\x20field\x20to\x20focus.'),'text':z[_0x45f036(0x30d)]()[_0x45f036(0x3f0)](_0x45f036(0x6e7)),'clearFirst':z[_0x45f036(0xa6d)]()['optional']()['describe'](_0x45f036(0x92b))},async _0xc700c0=>{const _0xbccec4=_0x45f036;try{const _0x380295=await _0x15cbff();if(!_0x380295['ok'])return{..._0x353614(_0x380295['payload']),'isError':!![]};const _0x574d66=_0xc700c0,_0x2ed3ba=_0x1f04e8(_0x574d66[_0xbccec4(0x849)]);if(_0x2ed3ba)return{..._0x353614({'success':![],'error':'fieldQuery:\x20'+_0x2ed3ba}),'isError':!![]};const _0x5b1297=await _0x508a9f[_0xbccec4(0x38c)](_0x574d66['fieldQuery'],_0x574d66['text'],{'clearFirst':_0x574d66[_0xbccec4(0x9f8)]});return{..._0x353614(_0x5b1297),'isError':!_0x5b1297[_0xbccec4(0x6d0)]};}catch(_0x4959f9){return _0x2f844f(_0xbccec4(0x57f),_0x4959f9);}}),_0x46b97c[_0x45f036(0x34e)]('screen_tap_chain','Compound\x20primitive:\x20tap\x20a\x20sequence\x20of\x20elements\x20as\x20ONE\x20W3C\x20actions\x20call.\x20The\x20AX\x20tree\x20is\x20fetched\x20once;\x20each\x20query\x20resolves\x20against\x20that\x20snapshot.\x20If\x20any\x20query\x20fails\x20to\x20resolve,\x20the\x20chain\x20stops\x20and\x20ZERO\x20gestures\x20are\x20sent\x20(we\x20never\x20partial-tap\x20an\x20intent).\x20On\x20bulk-endpoint\x20failure,\x20falls\x20back\x20to\x20serial\x20taps\x20(batched:\x20false).\x20Useful\x20for\x20short\x20fixed\x20sequences\x20(open\x20menu\x20→\x20pick\x20option\x20→\x20confirm)\x20where\x20each\x20tap\x20doesn\x27t\x20depend\x20on\x20intermediate\x20re-rendering.',{'queries':z[_0x45f036(0x20f)](_0x90f27e)[_0x45f036(0x488)](0x1)['describe']('Ordered\x20list\x20of\x20element\x20queries\x20to\x20tap.\x20Resolved\x20against\x20ONE\x20AX-tree\x20snapshot\x20—\x20don\x27t\x20use\x20this\x20for\x20sequences\x20that\x20require\x20re-rendering\x20between\x20taps.')},async _0x2fd191=>{const _0x4d605d=_0x45f036;try{const _0x23e612=await _0x15cbff();if(!_0x23e612['ok'])return{..._0x353614(_0x23e612['payload']),'isError':!![]};const _0x519874=_0x2fd191;for(let _0x44e6df=0x0;_0x44e6df<_0x519874[_0x4d605d(0xb0d)]['length'];_0x44e6df++){const _0x593570=_0x1f04e8(_0x519874[_0x4d605d(0xb0d)][_0x44e6df]);if(_0x593570)return{..._0x353614({'success':![],'error':_0x4d605d(0xa18)+_0x44e6df+_0x4d605d(0x4f4)+_0x593570}),'isError':!![]};}const _0x2bf9b5=await _0x508a9f[_0x4d605d(0x8fd)](_0x519874[_0x4d605d(0xb0d)]);return{..._0x353614(_0x2bf9b5),'isError':!_0x2bf9b5[_0x4d605d(0x6d0)]};}catch(_0x310c1f){return _0x2f844f(_0x4d605d(0x868),_0x310c1f);}});}import{lstat,mkdir as _0x404880,readdir as _0x2fe032,readFile as _0x3fa777,rename,rm,writeFile as _0x114d2a}from'fs/promises';import{randomBytes}from'crypto';import{dirname,join as _0x37a9a0}from'path';var _0x19a053='.ceraph',_0x2d6c52=_0xf8ecb6(0x631),_0x18ae34=class extends Error{constructor(_0x5bb28b){const _0x42190a=_0xf8ecb6;super(_0x5bb28b),this[_0x42190a(0x9e5)]='InvalidRunArgumentError';}};function _0x5c1bac(_0x47de26){const _0x4febad=_0xf8ecb6;return _0x47de26['toLowerCase']()[_0x4febad(0x42e)](/[^a-z0-9]+/g,'-')[_0x4febad(0x42e)](/^-+|-+$/g,'')['slice'](0x0,0x50)||'flow';}function _0x857296(_0x447c42){const _0x5d0c51=_0xf8ecb6;if(typeof _0x447c42!=='string'||_0x447c42[_0x5d0c51(0x3b7)]===0x0)throw new _0x18ae34(_0x5d0c51(0x504));if(_0x447c42[_0x5d0c51(0x3b7)]>0x80)throw new _0x18ae34('runId\x20exceeds\x20128\x20characters.');if(_0x447c42['startsWith']('.')){if('MzODB'===_0x5d0c51(0xab7))throw new _0x18ae34(_0x5d0c51(0x438)+_0x447c42+_0x5d0c51(0x4ef));else this['targetResolver']=_0x4b7cc5;}if(!/^[A-Za-z0-9._-]+$/[_0x5d0c51(0x8aa)](_0x447c42))throw new _0x18ae34(_0x5d0c51(0x438)+_0x447c42+'\x22\x20must\x20match\x20[A-Za-z0-9._-]+\x20(no\x20separators,\x20control\x20chars,\x20or\x20unicode).');return _0x447c42;}function _0x45fe7a(_0x208798){const _0x19d9d0=_0xf8ecb6;if(typeof _0x208798!=='string'||_0x208798['length']===0x0)throw new _0x18ae34(_0x19d9d0(0x79e));if(_0x208798[_0x19d9d0(0x3b7)]>0x100)throw new _0x18ae34('flow\x20name\x20exceeds\x20256\x20characters.');return _0x208798;}function _0x22561e(_0x5a1cf5){if(typeof _0x5a1cf5!=='number'||!Number['isFinite'](_0x5a1cf5)||!Number['isInteger'](_0x5a1cf5)||_0x5a1cf5<0x0||_0x5a1cf5>0xf4240)throw new _0x18ae34('stepIndex\x20must\x20be\x20a\x20non-negative\x20integer\x20≤\x201000000\x20(got\x20'+String(_0x5a1cf5)+').');return _0x5a1cf5;}var _0x153604=class{[_0xf8ecb6(0x489)];constructor(_0x506ed2){this['root']=_0x37a9a0(_0x506ed2['projectDir'],_0x19a053,_0x2d6c52);}get[_0xf8ecb6(0xae2)](){const _0x1b2925=_0xf8ecb6;return this[_0x1b2925(0x489)];}async[_0xf8ecb6(0x943)](_0x377de3,_0x1820f2,_0x36e530,_0x184e99){const _0x140701=_0xf8ecb6,_0x41c5bc=_0x857296(_0x377de3),_0x21621e=_0x45fe7a(_0x1820f2),_0x54efa8=_0x22561e(_0x36e530),_0x1297c2=this['stepPath'](_0x41c5bc,_0x21621e,_0x54efa8);await _0x404880(dirname(_0x1297c2),{'recursive':!![]});const _0x3a2fbe=Buffer[_0x140701(0x56c)](_0x184e99,_0x140701(0x343));return await _0x4d5d83(_0x1297c2,_0x3a2fbe),{'path':_0x1297c2};}async['saveRunIndex'](_0x5ef124,_0x2b6e17){const _0x16bd39=_0xf8ecb6,_0x1523f7=_0x857296(_0x5ef124),_0x1a02e6=this['runDir'](_0x1523f7);await _0x404880(_0x1a02e6,{'recursive':!![]});const _0x459e40=_0x37a9a0(_0x1a02e6,_0x16bd39(0x7c7));await _0x4d5d83(_0x459e40,Buffer['from'](JSON[_0x16bd39(0x312)](_0x2b6e17,null,0x2)));}async[_0xf8ecb6(0xa27)](_0x1c6364){const _0x232b8e=_0xf8ecb6,_0x395943=_0x857296(_0x1c6364),_0xfaa8f1=_0x37a9a0(this[_0x232b8e(0x819)](_0x395943),'run.json');try{const _0x515c20=await _0x3fa777(_0xfaa8f1,'utf8'),_0x15221d=JSON[_0x232b8e(0x981)](_0x515c20);if(_0x15221d&&typeof _0x15221d[_0x232b8e(0x942)]==='string'&&typeof _0x15221d[_0x232b8e(0x25e)]===_0x232b8e(0x2af)&&Array['isArray'](_0x15221d['flows']))return _0x15221d;return null;}catch(_0x38317b){if('RzTfy'!=='AOTAk'){if(_0x207744(_0x38317b))return null;return null;}else return{'ok':!![],'severity':_0x232b8e(0x799),'message':'ffmpeg\x20not\x20required\x20for\x20simulator\x20targets\x20—\x20`xcrun\x20simctl\x20io\x20recordVideo`\x20(shipped\x20with\x20Xcode)\x20handles\x20video\x20capture.'};}}async[_0xf8ecb6(0xac1)](){const _0x266362=_0xf8ecb6;let _0x2585f7;try{_0x2585f7=await _0x2fe032(this[_0x266362(0x489)]);}catch(_0x1c656f){if(_0x207744(_0x1c656f))return[];throw _0x1c656f;}const _0x245469=[];for(const _0x37c30c of _0x2585f7){try{_0x857296(_0x37c30c);}catch{continue;}const _0x5a711b=_0x37a9a0(this['root'],_0x37c30c);let _0x1a3570;try{_0x1a3570=await lstat(_0x5a711b);}catch{continue;}if(!_0x1a3570['isDirectory']())continue;const _0x45786f=await this['getRunIndex'](_0x37c30c),_0x118700=_0x45786f?.['startedAt']??_0x1a3570['mtime']?.[_0x266362(0xa31)]()??0x0,_0x435053=await this['dirBytes'](_0x5a711b);_0x245469[_0x266362(0x4d1)]({'runId':_0x37c30c,'startedAt':_0x118700,'bytes':_0x435053,'path':_0x5a711b});}return _0x245469['sort']((_0x57db73,_0x26a0d9)=>_0x26a0d9[_0x266362(0x25e)]-_0x57db73[_0x266362(0x25e)]),_0x245469;}async['purgeRun'](_0x4f3fa8){const _0x5e6fe2=_0xf8ecb6,_0x5b9907=_0x857296(_0x4f3fa8),_0x4e3a06=this[_0x5e6fe2(0x819)](_0x5b9907);await rm(_0x4e3a06,{'recursive':!![],'force':!![]});}async['sweepOlderThan'](_0x1985d2){const _0x5d808b=_0xf8ecb6,_0x30d0c8=await this[_0x5d808b(0xac1)](),_0x17818f=Date[_0x5d808b(0x2f8)]()-_0x1985d2,_0x284391=[];let _0x456135=0x0;for(const _0x231eb6 of _0x30d0c8){if(_0x231eb6[_0x5d808b(0x25e)]<_0x17818f)try{await this[_0x5d808b(0x62a)](_0x231eb6[_0x5d808b(0x942)]),_0x284391[_0x5d808b(0x4d1)](_0x231eb6['runId']),_0x456135+=_0x231eb6[_0x5d808b(0x73e)];}catch{}}return{'swept':_0x284391,'freedBytes':_0x456135};}async['enforceCapacityCap'](_0x15d0b1){const _0x17a7d7=_0xf8ecb6,_0x537eec=await this[_0x17a7d7(0xac1)]();let _0x4f5736=_0x537eec[_0x17a7d7(0xad3)]((_0x321521,_0x4beeb7)=>_0x321521+_0x4beeb7['bytes'],0x0);if(_0x4f5736<=_0x15d0b1)return{'evicted':[],'freedBytes':0x0};const _0x2bf3c3=[..._0x537eec]['sort']((_0x5f25fd,_0x266aa1)=>_0x5f25fd['startedAt']-_0x266aa1['startedAt']),_0x4435ab=[];let _0x3b434c=0x0;for(const _0x3a61a6 of _0x2bf3c3){if(_0x4f5736<=_0x15d0b1)break;try{await this[_0x17a7d7(0x62a)](_0x3a61a6['runId']),_0x4435ab['push'](_0x3a61a6[_0x17a7d7(0x942)]),_0x3b434c+=_0x3a61a6['bytes'],_0x4f5736-=_0x3a61a6['bytes'];}catch{}}return{'evicted':_0x4435ab,'freedBytes':_0x3b434c};}[_0xf8ecb6(0x819)](_0x4b29be){const _0x350710=_0xf8ecb6;return _0x37a9a0(this[_0x350710(0x489)],_0x4b29be);}[_0xf8ecb6(0x355)](_0x13360e,_0x895663,_0x484695){const _0x127f70=_0xf8ecb6,_0xa56d29=_0x5c1bac(_0x895663);return _0x37a9a0(this[_0x127f70(0x819)](_0x13360e),_0xa56d29,_0x127f70(0x5c6)+_0x484695+'.png');}async['dirBytes'](_0x36856e){const _0x1dc55d=_0xf8ecb6;let _0x1223a4=0x0,_0x52a6d8;try{_0x52a6d8=await _0x2fe032(_0x36856e);}catch{return 0x0;}for(const _0xc5b8a4 of _0x52a6d8){const _0x329c67=_0x37a9a0(_0x36856e,_0xc5b8a4);let _0x34802c;try{_0x34802c=await lstat(_0x329c67);}catch{continue;}if(_0x34802c['isDirectory']()){if('nzyWW'!==_0x1dc55d(0x891))_0x1223a4+=await this['dirBytes'](_0x329c67);else return{'name':_0x1dc55d(0x55e),'status':_0x1dc55d(0x3dd),'details':{'error':_0x842d53(_0x47a57e)},'remediation':'Dry-run\x20camera\x20preview\x20failed.\x20Re-run\x20without\x20--dry-run\x20after\x20fixing\x20the\x20error\x20above,\x20or\x20pass\x20--project-dir\x20if\x20the\x20path\x20is\x20wrong.'};}else _0x34802c['isFile']()&&(_0x1223a4+=_0x34802c['size']);}return _0x1223a4;}};function _0x207744(_0x5336c2){const _0x37048a=_0xf8ecb6;return typeof _0x5336c2==='object'&&_0x5336c2!==null&&_0x37048a(0x3aa)in _0x5336c2&&_0x5336c2[_0x37048a(0x3aa)]==='ENOENT';}async function _0x4d5d83(_0x3937c5,_0x473ee0){const _0x457121=_0xf8ecb6,_0x4de628=_0x3937c5+'.'+randomBytes(0x8)[_0x457121(0xafa)]('hex')+'.tmp';try{await _0x114d2a(_0x4de628,_0x473ee0),await rename(_0x4de628,_0x3937c5);}catch(_0x50dad8){await rm(_0x4de628,{'force':!![]})['catch'](()=>void 0x0);throw _0x50dad8;}}async function _0x504d31(_0x501075,_0x3c35e6){const _0x58473d=_0xf8ecb6,_0x1d3747=_0x3c35e6['olderThan']??_0x58473d(0x843);if(_0x1d3747===_0x58473d(0x2d4)){const _0x5e3a3d=await _0x501075['listRuns']();let _0x586ee8=0x0,_0x1c2f27=0x0;const _0x214662=[];for(const _0x5889a8 of _0x5e3a3d){try{await _0x501075[_0x58473d(0x62a)](_0x5889a8['runId']),_0x214662['push'](_0x5889a8['runId']),_0x586ee8+=_0x5889a8['bytes'];}catch{_0x1c2f27++;}}const _0x5d705b=(await _0x501075[_0x58473d(0xac1)]())['length'];return{'swept':_0x214662,'freedBytes':_0x586ee8,'remainingRuns':_0x5d705b,'failedToPurge':_0x1c2f27};}const _0x10fa4c=_0x1d3747===_0x58473d(0xa71)?0x1e*0x18*0x3c*0x3c*0x3e8:0xe*0x18*0x3c*0x3c*0x3e8,{swept:_0x3c9daa,freedBytes:_0x589667}=await _0x501075['sweepOlderThan'](_0x10fa4c),_0x5d4618=(await _0x501075['listRuns']())[_0x58473d(0x3b7)];return{'swept':_0x3c9daa,'freedBytes':_0x589667,'remainingRuns':_0x5d4618,'failedToPurge':0x0};}import{spawn as _0x1fd61d}from'child_process';import{readdir as _0x133c7b,readFile as _0x2ac9eb}from'fs/promises';import{join as _0x23e013,relative as _0x4f44fc,sep}from'path';import{spawn as _0x1a43af}from'child_process';import{mkdir as _0x354cd1,rm as _0x5a2381,stat as _0x525a58}from'fs/promises';import{dirname as _0x599cc3,join as _0x50c014}from'path';var _0x58e606=0xbb8,_0x492468=0x1000,_0x252fac=new Map(),_0x4f72d1=_0xf8ecb6(0x1f1),_0x324c91=null;function _0x3ce50b(){return _0x4f72d1;}var _0x5cf829=class{['resolver'];[_0xf8ecb6(0x922)];['spawnFn'];['setTimeoutFn'];['mkdirFn'];[_0xf8ecb6(0x357)];[_0xf8ecb6(0x991)];['child']=null;['childExit']=null;['hasStarted']=![];['hasStopped']=![];constructor(_0x1a86e0){const _0x13657c=_0xf8ecb6;this[_0x13657c(0x4fe)]=_0x1a86e0[_0x13657c(0x4fe)],this[_0x13657c(0x922)]=_0x1a86e0['outputPath'],this[_0x13657c(0x7f6)]=_0x1a86e0[_0x13657c(0x7f6)]??_0x1a43af,this['setTimeoutFn']=_0x1a86e0['setTimeoutFn']??setTimeout,this[_0x13657c(0x575)]=_0x1a86e0['mkdirFn']??_0x354cd1,this[_0x13657c(0x357)]=_0x1a86e0[_0x13657c(0x357)]??_0x525a58,this['rmFn']=_0x1a86e0['rmFn']??_0x5a2381;}async[_0xf8ecb6(0x7b1)](_0xd91741){return _0x152bfa(_0xd91741,{'statFn':this['statFn'],'rmFn':this['rmFn']});}async[_0xf8ecb6(0x5cf)](){const _0x136f74=_0xf8ecb6;if(this[_0x136f74(0x6b3)])return{'ok':![],'error':'VideoRecorder.start()\x20called\x20twice\x20on\x20the\x20same\x20instance.'};if(this[_0x136f74(0x89c)]){if('cThXQ'!=='cThXQ'){if(_0x550182['nonInteractive']!==void 0x0)return _0x1c5b87[_0x136f74(0x3a1)];if(_0x1e7b5d.env.CERAPH_NON_INTERACTIVE==='1')return!![];return!_0x4d7b7e['stdin'][_0x136f74(0x4b9)];}else return{'ok':![],'error':'VideoRecorder\x20already\x20stopped;\x20construct\x20a\x20fresh\x20recorder.'};}this['hasStarted']=!![];try{await this[_0x136f74(0x575)](_0x599cc3(this['outputPath']),{'recursive':!![]});}catch(_0x4b3252){return{'ok':![],'error':_0x136f74(0x7ef)+_0x3ef2fe(_0x4b3252)};}const _0x3bde1c=await this['resolver']['resolve']()[_0x136f74(0x48b)](_0x1dceac=>{const _0x248c1e=_0x136f74;if('vIrJf'!==_0x248c1e(0x53d))return{'error':_0x3ef2fe(_0x1dceac)};else switch(_0x36c0ee){case'pnpm':return{'bin':'pnpm','args':['add',_0x3e703d]};case'yarn':return{'bin':_0x248c1e(0x2d0),'args':[_0x248c1e(0x856),_0x102d2c]};case _0x248c1e(0x524):return{'bin':'bun','args':[_0x248c1e(0x856),_0x52d853]};case'npm':return{'bin':_0x248c1e(0x26d),'args':['install',_0x25014f]};}});if(_0x136f74(0x3dd)in _0x3bde1c)return{'ok':![],'error':'Failed\x20to\x20resolve\x20target:\x20'+_0x3bde1c[_0x136f74(0x3dd)]};const _0x4d357b=await this[_0x136f74(0x63e)](_0x3bde1c);if(!_0x4d357b['ok'])return{'ok':![],'error':_0x4d357b['error']};let _0x15d5e8;try{_0x15d5e8=this['spawnFn'](_0x4d357b[_0x136f74(0x43d)],_0x4d357b['args'],{'stdio':[_0x136f74(0x9fa),_0x136f74(0x9e1),_0x136f74(0x9e1)]});}catch(_0xd86ad1){return{'ok':![],'error':'Failed\x20to\x20spawn\x20'+_0x4d357b['argv0']+':\x20'+_0x3ef2fe(_0xd86ad1)};}return this['child']=_0x15d5e8,this[_0x136f74(0xaf2)]=new Promise(_0x39da0f=>{const _0x1ccbf2=_0x136f74,_0x1b7d80=()=>_0x39da0f();_0x15d5e8['once']('exit',_0x1b7d80),_0x15d5e8[_0x1ccbf2(0x6b8)](_0x1ccbf2(0x3dd),_0x1b7d80);}),{'ok':!![],'path':this[_0x136f74(0x922)]};}async['stop'](){const _0x1d23b3=_0xf8ecb6;if(!this['hasStarted']){this['hasStopped']=!![];return;}if(this[_0x1d23b3(0x89c)])return;this[_0x1d23b3(0x89c)]=!![];const _0xd29fab=this[_0x1d23b3(0x618)],_0x168839=this['childExit'];this['child']=null,this[_0x1d23b3(0xaf2)]=null;if(!_0xd29fab||_0xd29fab['exitCode']!==null)return;try{if(_0x1d23b3(0x220)===_0x1d23b3(0x220))_0xd29fab['kill'](_0x1d23b3(0x8b8));else{if(_0x32f952[_0x1d23b3(0x979)](_0xe3632b))return!![];}}catch{}let _0x82934e=null;const _0x16f39d=new Promise(_0x2124fa=>{const _0x4d5758=_0x1d23b3;_0x82934e=this[_0x4d5758(0x267)](()=>{const _0x2d4d55=_0x4d5758;try{_0xd29fab['kill'](_0x2d4d55(0x58f));}catch{}_0x2124fa();},_0x58e606),_0x82934e?.['unref']?.();});try{await Promise[_0x1d23b3(0x37c)]([_0x168839??Promise['resolve'](),_0x16f39d]);if(_0x168839)await _0x168839;}finally{if(_0x82934e)clearTimeout(_0x82934e);}}async[_0xf8ecb6(0x63e)](_0x5f52d5){const _0x18a03f=_0xf8ecb6;if(_0x5f52d5['target']===_0x18a03f(0x25a)){const _0x347217=this['resolver'][_0x18a03f(0x687)]()??_0x5f52d5[_0x18a03f(0x5a2)]??null;if(!_0x347217)return{'ok':![],'error':_0x18a03f(0x6a3)};return{'ok':!![],'argv0':_0x18a03f(0x244),'args':[_0x18a03f(0x825),'io',_0x347217,'recordVideo','--type=mp4',this[_0x18a03f(0x922)]]};}const _0x4bd6ab=_0x5f52d5['udid'];if(!_0x4bd6ab)return{'ok':![],'error':'Real-device\x20UDID\x20unavailable\x20—\x20plug\x20in\x20your\x20iPhone\x20and\x20trust\x20this\x20Mac,\x20then\x20retry.'};const _0x2d841f=await _0x3281ae(_0x4bd6ab);if(_0x2d841f===null)return{'ok':![],'error':'Could\x20not\x20resolve\x20AVFoundation\x20index\x20for\x20device\x20'+_0x4bd6ab+'.\x20The\x20device\x20may\x20not\x20appear\x20in\x20ffmpeg\x27s\x20device\x20list\x20yet\x20—\x20unplug\x20and\x20replug\x20the\x20USB-C\x20cable,\x20accept\x20the\x20\x22Trust\x20This\x20Computer\x22\x20prompt,\x20and\x20retry.'};return{'ok':!![],'argv0':'ffmpeg','args':['-f',_0x18a03f(0x46f),_0x18a03f(0x870),'30','-i',_0x2d841f+':',_0x18a03f(0x361),'h264','-y',this['outputPath']]};}},_0x15cdbf={'spawnFn':_0x1a43af};async function _0x3281ae(_0x3a0f2b){const _0x161137=_0xf8ecb6,_0x274c20=_0x252fac['get'](_0x3a0f2b);if(_0x274c20!==void 0x0)return _0x274c20;const _0x3b77b8=await _0x51851d()['catch'](()=>[]);if(_0x3b77b8[_0x161137(0x3b7)]===0x0)return null;const _0x54d1ff=await _0x7e650a(_0x3a0f2b)[_0x161137(0x48b)](()=>null);if(!_0x54d1ff)return null;const _0x6fc00a=_0x54d1ff['name']['toLowerCase']();let _0xa0e75e=_0x3b77b8[_0x161137(0x415)](_0x56b3cd=>_0x56b3cd[_0x161137(0x9e5)]===_0x54d1ff[_0x161137(0x9e5)]);!_0xa0e75e&&(_0xa0e75e=_0x3b77b8['find'](_0x50da3f=>_0x50da3f['name']['toLowerCase']()===_0x6fc00a));if(!_0xa0e75e)return null;return _0x252fac[_0x161137(0x93e)](_0x3a0f2b,_0xa0e75e['index']),_0xa0e75e[_0x161137(0x977)];}async function _0x51851d(){const _0x5e578f=_0xf8ecb6,_0xf603a=await _0x5f4c9d(_0x5e578f(0x219),['-hide_banner','-f',_0x5e578f(0x46f),_0x5e578f(0x97c),'true','-i','']),_0x501f48=_0xf603a[_0x5e578f(0x910)]||_0xf603a[_0x5e578f(0x790)];return _0x4a613c(_0x501f48);}function _0x4a613c(_0x544163){const _0x336b72=_0xf8ecb6,_0x375853=[];let _0x36001f=![];const _0x2f9f76=/^(?:\[AVFoundation[^\]]*\]\s+)?\[(\d+)\]\s+(.+?)\s*$/;for(const _0x5ad2a8 of _0x544163[_0x336b72(0x51a)](/\r?\n/)){const _0x5c9d5e=_0x5ad2a8[_0x336b72(0x668)]();if(/AVFoundation\s+video\s+devices/i[_0x336b72(0x8aa)](_0x5c9d5e)){_0x36001f=!![];continue;}if(/AVFoundation\s+audio\s+devices/i[_0x336b72(0x8aa)](_0x5c9d5e)){_0x36001f=![];continue;}if(!_0x36001f)continue;const _0x190a0b=_0x2f9f76['exec'](_0x5c9d5e);if(!_0x190a0b)continue;_0x375853['push']({'index':_0x190a0b[0x1],'name':_0x190a0b[0x2]});}return _0x375853;}async function _0x7e650a(_0x4599a0){const _0x28917c=_0xf8ecb6,_0x174063=await _0x5f4c9d(_0x28917c(0x1fb),[_0x28917c(0x817),'-json']);if(_0x174063['code']!==0x0&&!_0x174063[_0x28917c(0x790)])return null;try{const _0x5a0e07=JSON[_0x28917c(0x981)](_0x174063['stdout']);return _0x4292c7(_0x5a0e07[_0x28917c(0x817)],_0x4599a0);}catch{return null;}}function _0x4292c7(_0x361bf5,_0x278f6a){const _0x5cc056=_0xf8ecb6;if(_0x361bf5===null||_0x361bf5===void 0x0)return null;if(Array[_0x5cc056(0x200)](_0x361bf5)){for(const _0x554018 of _0x361bf5){const _0x50fd7d=_0x4292c7(_0x554018,_0x278f6a);if(_0x50fd7d)return _0x50fd7d;}return null;}if(typeof _0x361bf5!==_0x5cc056(0x9e3))return null;const _0x4b6d13=_0x361bf5,_0x229ac8=_0x4b6d13[_0x5cc056(0x48e)];if(typeof _0x229ac8===_0x5cc056(0x30d)&&_0x229ac8[_0x5cc056(0x5b5)]()===_0x278f6a[_0x5cc056(0x5b5)]()){const _0x3847df=typeof _0x4b6d13[_0x5cc056(0x68d)]==='string'?_0x4b6d13[_0x5cc056(0x68d)]:_0x278f6a;return{'name':_0x3847df,'serial':_0x229ac8};}for(const _0x365dd3 of Object['values'](_0x4b6d13)){if(Array[_0x5cc056(0x200)](_0x365dd3)||typeof _0x365dd3==='object'&&_0x365dd3!==null){if('rWVmG'!=='rWVmG')return{'name':'claude-hooks','status':'error','details':{'error':_0x44f5d1(_0x11e798),'dryRun':!![]}};else{const _0x16882e=_0x4292c7(_0x365dd3,_0x278f6a);if(_0x16882e)return _0x16882e;}}}return null;}async function _0x152bfa(_0x8143c8,_0x60622d={}){const _0x14e901=_0xf8ecb6;if(_0x4f72d1==='granted')return _0x14e901(0xafc)==='KhdSH'?{'status':_0x14e901(0x368),'message':''}:this[_0x14e901(0x82e)](_0x2c1c4b,_0x2594ba);if(_0x4f72d1==='denied')return{'status':'denied','message':_0x85c37a};if(_0x324c91){const _0x9c6dfd=await _0x324c91;return{'status':_0x9c6dfd,'message':_0x9c6dfd===_0x14e901(0x368)?'':_0x85c37a};}const _0x4049fb=((async()=>{try{return await _0x56b579(_0x8143c8,_0x60622d);}finally{_0x324c91=null;}})());_0x324c91=_0x4049fb;const _0x59e41c=await _0x4049fb;return _0x4f72d1=_0x59e41c,{'status':_0x59e41c,'message':_0x59e41c===_0x14e901(0x368)?'':_0x85c37a};}var _0x85c37a=_0xf8ecb6(0x31b);async function _0x56b579(_0x4a1795,_0x10a23b={}){const _0x2c0f67=_0xf8ecb6,_0x853726=_0x10a23b[_0x2c0f67(0x357)]??_0x525a58,_0x56485d=_0x10a23b['rmFn']??_0x5a2381,_0x2de189=await _0x3281ae(_0x4a1795);if(_0x2de189===null)return'denied';const _0x5e1d5e=_0x50c014('/tmp','ceraph-permission-dryrun-'+process['pid']+'-'+Date['now']()+'.mp4'),_0x5a4535=await _0x5f4c9d('ffmpeg',[_0x2c0f67(0x733),'-f',_0x2c0f67(0x46f),'-framerate','30','-i',_0x2de189+':','-c:v','h264','-t','1','-y',_0x5e1d5e]);let _0x3e1edd=![];if(_0x5a4535['code']===0x0)try{const _0x44dbe6=await _0x853726(_0x5e1d5e);_0x3e1edd=_0x44dbe6[_0x2c0f67(0x952)]>=_0x492468;}catch{_0x3e1edd=![];}return await _0x56485d(_0x5e1d5e,{'force':!![]})[_0x2c0f67(0x48b)](()=>void 0x0),_0x3e1edd?_0x2c0f67(0x368):_0x2c0f67(0x576);}async function _0x5f4c9d(_0x3a2e67,_0x29f532){return new Promise(_0x41aff4=>{const _0x443dae=_0xc050;let _0x4f59d2='',_0x52d6fd='',_0x4442c4;try{if(_0x443dae(0x40c)!=='gIXGi')_0x4442c4=_0x15cdbf['spawnFn'](_0x3a2e67,_0x29f532,{'stdio':[_0x443dae(0x9fa),_0x443dae(0x9e1),_0x443dae(0x9e1)]});else return{'status':'seeded','flavor':_0x98ae54['flavor'],'screenCount':_0x39c146[_0x443dae(0x984)],'layoutCount':_0x3490c9['layoutCount'],'bundleId':_0x496fff[_0x443dae(0x369)]??null,'persisted':_0x577d9f['persisted']===!![]};}catch(_0x3058d2){_0x41aff4({'code':0x7f,'stdout':'','stderr':_0x3ef2fe(_0x3058d2)});return;}const _0x12cc52=setTimeout(()=>{const _0x3e5541=_0x443dae;try{_0x4442c4[_0x3e5541(0x6ee)]('SIGKILL');}catch{}},0x2710);_0x12cc52[_0x443dae(0x2d6)]?.(),_0x4442c4[_0x443dae(0x790)]?.['on']('data',_0x29cd0e=>{const _0x1adb48=_0x443dae;_0x4f59d2+=typeof _0x29cd0e===_0x1adb48(0x30d)?_0x29cd0e:_0x29cd0e[_0x1adb48(0xafa)]();}),_0x4442c4['stderr']?.['on'](_0x443dae(0x78f),_0x3b76ae=>{const _0x22cbf7=_0x443dae;_0x52d6fd+=typeof _0x3b76ae==='string'?_0x3b76ae:_0x3b76ae[_0x22cbf7(0xafa)]();});let _0x927474=![];const _0x37c13a=_0x3f818b=>{if(_0x927474)return;_0x927474=!![],clearTimeout(_0x12cc52),_0x41aff4({'code':_0x3f818b,'stdout':_0x4f59d2,'stderr':_0x52d6fd});};_0x4442c4['on']('error',_0x3c244e=>{const _0x5aa2e2=_0x443dae;_0x52d6fd+=_0x3c244e[_0x5aa2e2(0x531)]??String(_0x3c244e),_0x37c13a(0x7f);}),_0x4442c4['on'](_0x443dae(0x68c),_0x3b8d47=>{_0x37c13a(_0x3b8d47??0x1);});});}function _0x3ef2fe(_0x547ec4){const _0x4f8183=_0xf8ecb6;if(_0x547ec4 instanceof Error)return _0x547ec4[_0x4f8183(0x531)];return String(_0x547ec4);}import{readdir as _0x549bf5,readFile as _0x5d8575,writeFile as _0x5f5476,mkdir as _0x34f1e9,stat as _0x45c60a}from'fs/promises';import{join as _0x41dc83,relative}from'path';var _0x572612=['.jpg',_0xf8ecb6(0x78c),_0xf8ecb6(0xa39),_0xf8ecb6(0x6c5),'.heic'],_0x51e11a='_registry.ts',_0x33bb6a=_0x41dc83(_0xf8ecb6(0x4b1),_0xf8ecb6(0x80d));function _0x1d65b2(_0x2ad57d){return _0x572612['includes'](_0x2ad57d);}function _0xd9ee33(_0x7e8ac9){return _0x572612['indexOf'](_0x7e8ac9);}function _0x4c07a9(_0x15f79f){const _0x3e7bd0=_0xf8ecb6,_0x429339=_0x15f79f[_0x3e7bd0(0x95b)]('.');if(_0x429339<=0x0)return null;const _0xdc5db2=_0x15f79f[_0x3e7bd0(0x795)](0x0,_0x429339),_0x37468f=_0x15f79f['slice'](_0x429339)['toLowerCase']();if(!_0x1d65b2(_0x37468f))return null;if(_0xdc5db2[_0x3e7bd0(0x3b7)]===0x0)return null;return{'stem':_0xdc5db2,'ext':_0x37468f};}function _0x3b6a85(_0x463f4a){const _0x591095=_0xf8ecb6,_0x1e8976='//\x20AUTO-GENERATED\x20by\x20@ceraph/react-native-mcp\x20—\x20do\x20not\x20edit\x20by\x20hand.\x0a//\x20Re-run\x20`rn_sync_camera_registry`\x20after\x20adding\x20or\x20removing\x20images.\x0aimport\x20{\x20configureTestImage\x20}\x20from\x20\x22@ceraph/react-native-mcp/shim\x22;\x0a\x0aexport\x20function\x20applyCameraImageRegistry():\x20void\x20{\x0a';if(_0x463f4a[_0x591095(0x3b7)]===0x0)return _0x1e8976+'\x20\x20//\x20No\x20images\x20registered\x20yet.\x20Drop\x20files\x20into\x20.ceraph/camera-images/\x0a\x20\x20//\x20and\x20re-run\x20`rn_sync_camera_registry`.\x0a}\x0a';const _0x33cae4=Math[_0x591095(0x553)](..._0x463f4a['map'](_0x475310=>_0x475310[_0x591095(0x88a)][_0x591095(0x3b7)]+0x2)),_0x30969f=_0x463f4a['map'](_0x599e3b=>{const _0x126a00=_0x591095;if('uEzte'==='uEzte'){const _0x419817='\x22'+_0x599e3b[_0x126a00(0x88a)]+'\x22,',_0x510471=_0x419817[_0x126a00(0xaf7)](_0x33cae4+0x1,'\x20');return _0x126a00(0x9bf)+_0x510471+_0x126a00(0x7ae)+_0x599e3b[_0x126a00(0x3a3)]+'\x22));';}else _0x8bfb0b(_0x29f97a('Skipped\x20installCeraph()\x20injection.\x20Re-run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20to\x20wire\x20it.'));});return _0x1e8976+_0x30969f[_0x591095(0x4ec)]('\x0a')+_0x591095(0x324);}async function _0x112a0a(_0xf6c7b3){const _0x15b98e=_0xf8ecb6,_0x76d021=_0x41dc83(_0xf6c7b3,_0x33bb6a),_0x259b2f=_0x41dc83(_0x76d021,_0x51e11a);let _0x516caa;try{const _0x2df2e2=await _0x45c60a(_0x76d021);if(!_0x2df2e2['isDirectory']())return{'registered':[],'registryPath':_0x259b2f,'writtenOrUnchanged':'missing-dir'};_0x516caa=await _0x549bf5(_0x76d021);}catch{return{'registered':[],'registryPath':_0x259b2f,'writtenOrUnchanged':_0x15b98e(0x737)};}const _0xba1760=new Map();for(const _0x230faa of _0x516caa){if(_0x230faa===_0x51e11a)continue;if(_0x230faa[_0x15b98e(0x746)]('_')||_0x230faa['startsWith']('.'))continue;if(_0x230faa==='README.md')continue;const _0x1cb698=_0x4c07a9(_0x230faa);if(!_0x1cb698)continue;const _0x365696={'key':_0x1cb698['stem'],'relativePath':'./'+_0x230faa,'ext':_0x1cb698[_0x15b98e(0x208)]},_0x3f7253=_0xba1760['get'](_0x1cb698[_0x15b98e(0x4c8)]);if(!_0x3f7253){if('rJiAh'===_0x15b98e(0x6dc)){_0x64507e(_0x1c6cf1);if(_0x318dac)_0x45855e(_0xa4d848);_0x3c2160();}else{_0xba1760[_0x15b98e(0x93e)](_0x1cb698['stem'],_0x365696);continue;}}_0xd9ee33(_0x365696['ext'])<_0xd9ee33(_0x3f7253[_0x15b98e(0x208)])&&_0xba1760['set'](_0x1cb698[_0x15b98e(0x4c8)],_0x365696);}const _0x3777bd=Array['from'](_0xba1760[_0x15b98e(0x32f)]())[_0x15b98e(0x426)]((_0x3e1121,_0x24efec)=>_0x3e1121[_0x15b98e(0x88a)]<_0x24efec['key']?-0x1:_0x3e1121[_0x15b98e(0x88a)]>_0x24efec['key']?0x1:0x0),_0x379e5c=_0x3b6a85(_0x3777bd);let _0x47c8d3=null;try{_0x47c8d3=await _0x5d8575(_0x259b2f,_0x15b98e(0x827));}catch{_0x47c8d3=null;}if(_0x47c8d3===_0x379e5c)return{'registered':_0x3777bd,'registryPath':_0x259b2f,'writtenOrUnchanged':_0x15b98e(0x784)};return await _0x34f1e9(_0x76d021,{'recursive':!![]}),await _0x5f5476(_0x259b2f,_0x379e5c,'utf-8'),{'registered':_0x3777bd,'registryPath':_0x259b2f,'writtenOrUnchanged':'written'};}function _0x1718c0(_0x105c0f,_0x3a5d64){const _0x42f7fd=_0xf8ecb6,_0x36af17=relative(_0x105c0f,_0x3a5d64);return _0x36af17[_0x42f7fd(0x3b7)]>0x0?_0x36af17:_0x3a5d64;}import{spawn as _0x42ae39}from'child_process';import{access as _0x440733}from'fs/promises';import{join as _0x427bf4}from'path';import{spawn as _0x8b2958}from'child_process';import{createRequire}from'module';import{createServer}from'net';import{dirname as _0x4fec64,join as _0x4db89f}from'path';async function _0xf85c4(){return new Promise((_0x1726c5,_0x9e4d9b)=>{const _0x5d077a=_0xc050,_0x17687a=createServer();_0x17687a[_0x5d077a(0x6b8)](_0x5d077a(0x3dd),_0x9e4d9b),_0x17687a['listen'](0x0,'127.0.0.1',()=>{const _0x51058d=_0x5d077a,_0x1e3641=_0x17687a['address']();if(_0x1e3641&&typeof _0x1e3641===_0x51058d(0x9e3)){const _0x3d858b=_0x1e3641['port'];_0x17687a['close'](()=>_0x1726c5(_0x3d858b));}else _0x17687a[_0x51058d(0x716)](()=>_0x9e4d9b(new Error('failed\x20to\x20bind\x20a\x20free\x20port')));});});}function _0x15f5fe(_0x67f6b6){const _0x48c0b8=_0xf8ecb6,_0x47cd75=_0x16e434=>{const _0x3cc538=_0xc050;try{const _0x3b8683=createRequire(_0x16e434),_0x5c0704=_0x3b8683['resolve'](_0x3cc538(0x7c9)),_0x42b794=_0x4fec64(_0x5c0704);return _0x4db89f(_0x42b794,_0x3cc538(0x3d3));}catch{return null;}};if(_0x67f6b6){const _0x1b6da0=_0x47cd75(new URL('package.json',_0x48c0b8(0x691)+(_0x67f6b6[_0x48c0b8(0xaa5)]('/')?_0x67f6b6:_0x67f6b6+'/')));if(_0x1b6da0)return _0x1b6da0;}return _0x47cd75(import.meta.url);}async function _0x266a61(_0x34a8b3){const _0x2f7ed8=_0xf8ecb6,_0x3dc36f=_0x15f5fe(_0x34a8b3['projectDir']);if(!_0x3dc36f)return{'ok':![],'reason':'wda-package-missing','error':_0x2f7ed8(0x84d)};const _0x4379a3=await _0x247e67('xcodebuild');if(!_0x4379a3)return{'ok':![],'reason':_0x2f7ed8(0x495),'error':'`xcodebuild`\x20not\x20found\x20on\x20PATH.\x20Install\x20Xcode\x20(full\x20app,\x20not\x20just\x20Command\x20Line\x20Tools)\x20and\x20accept\x20the\x20license:\x20`sudo\x20xcodebuild\x20-license\x20accept`.'};await _0x1dacae(_0x34a8b3[_0x2f7ed8(0x5a2)]);const _0x1a98db=[_0x2f7ed8(0x8aa),_0x2f7ed8(0x919),_0x3dc36f,_0x2f7ed8(0x2e4),'WebDriverAgentRunner',_0x2f7ed8(0x771),'platform=iOS\x20Simulator,id='+_0x34a8b3['udid']];_0x34a8b3['derivedDataPath']&&_0x1a98db['push'](_0x2f7ed8(0x65a),_0x34a8b3['derivedDataPath']);_0x1a98db['push']('-quiet');const _0x4429d6=await _0xf85c4();let _0x4094fd;try{if('cbfCC'==='xOlOi')return{'status':_0x2f7ed8(0x485),'settingsPath':_0x140823};else _0x4094fd=_0x8b2958(_0x2f7ed8(0x7b8),_0x1a98db,{'stdio':['ignore',_0x2f7ed8(0x9e1),'pipe'],'env':{...process.env,'TEST_RUNNER_USE_PORT':String(_0x4429d6)}});}catch(_0x1f64f5){return{'ok':![],'reason':'xcodebuild-spawn-failed','error':'Failed\x20to\x20spawn\x20xcodebuild:\x20'+(_0x1f64f5 instanceof Error?_0x1f64f5['message']:String(_0x1f64f5))};}try{_0x34a8b3[_0x2f7ed8(0x316)]?.(_0x4094fd);}catch(_0x2abcf9){if('lHsGc'==='lHsGc'){try{_0x4094fd[_0x2f7ed8(0x6ee)](_0x2f7ed8(0x72c));}catch{}return{'ok':![],'reason':_0x2f7ed8(0x3c4),'error':_0x2f7ed8(0x4d4)+(_0x2abcf9 instanceof Error?_0x2abcf9[_0x2f7ed8(0x531)]:String(_0x2abcf9))};}else return{'success':![],'matchCount':0x0,'error':'No\x20element\x20found\x20matching\x20field\x20query:\x20'+_0x179538[_0x2f7ed8(0x312)](_0x1d6732),'batched':![]};}const _0xc9b883=[],_0x51833c=_0xc3b1b2=>{const _0x3cd56e=_0x2f7ed8;for(const _0x3e7f41 of _0xc3b1b2[_0x3cd56e(0x51a)]('\x0a')){if(!_0x3e7f41['trim']())continue;_0xc9b883[_0x3cd56e(0x4d1)](_0x3e7f41);if(_0xc9b883['length']>0xc8)_0xc9b883[_0x3cd56e(0x9a6)]();}};let _0x157e6c=null;const _0x529ca8=_0xfbec82=>{const _0x32da86=_0x2f7ed8;if(_0x157e6c!==null)return;const _0x2751c9=_0x2efbb5(_0xc9b883[_0x32da86(0x4ec)]('\x0a')+'\x0a'+_0xfbec82);if(_0x2751c9!==null)_0x157e6c=_0x2751c9;};_0x4094fd[_0x2f7ed8(0x790)]?.['on'](_0x2f7ed8(0x78f),_0x396e29=>{const _0x30b4cd=_0x2f7ed8,_0x409e75=_0x396e29[_0x30b4cd(0xafa)]();_0x51833c(_0x409e75),_0x529ca8(_0x409e75);}),_0x4094fd[_0x2f7ed8(0x910)]?.['on'](_0x2f7ed8(0x78f),_0x3288a1=>{const _0x570a00=_0x2f7ed8,_0x38247a=_0x3288a1[_0x570a00(0xafa)]();_0x51833c(_0x38247a),_0x529ca8(_0x38247a);});let _0x34a076=![],_0x15837c=null;_0x4094fd['on']('exit',_0x3cec84=>{_0x34a076=!![],_0x15837c=_0x3cec84;});const _0xc1a4c9=_0x34a8b3[_0x2f7ed8(0xab9)]??0x668a0,_0x116638=0xfa,_0x1b5498=Date['now']();while(Date['now']()-_0x1b5498<_0xc1a4c9){if(_0x157e6c!==null)break;if(_0x34a076)break;await new Promise(_0x4e1b6c=>setTimeout(_0x4e1b6c,_0x116638));}if(_0x157e6c!==null&&!_0x34a076){const _0x3667cf=_0x157e6c;return{'ok':!![],'session':_0x5a916a({'port':_0x3667cf,'udid':_0x34a8b3['udid'],'projectPath':_0x3dc36f,'child':_0x4094fd,'output':_0xc9b883})};}if(_0x157e6c!==null&&_0x34a076)return{'ok':![],'reason':'xcodebuild-exited-early','error':'xcodebuild\x20printed\x20the\x20WDA\x20port\x20marker\x20but\x20then\x20exited\x20with\x20code\x20'+_0x15837c+'\x20before\x20the\x20session\x20could\x20be\x20handed\x20off.\x20This\x20usually\x20means\x20the\x20test\x20target\x20crashed\x20during\x20boot\x20(check\x20the\x20simulator\x20logs)\x20or\x20the\x20simulator\x20was\x20shut\x20down\x20mid-build.\x20Last\x2020\x20lines\x20of\x20xcodebuild\x20output\x20below.','output':_0xc9b883[_0x2f7ed8(0x795)](-0x14)};try{_0x4094fd['kill']('SIGTERM');}catch{}if(_0x34a076)return{'ok':![],'reason':'xcodebuild-exited-early','error':'xcodebuild\x20exited\x20with\x20code\x20'+_0x15837c+_0x2f7ed8(0x329)+_0x3dc36f+_0x2f7ed8(0x98c),'output':_0xc9b883[_0x2f7ed8(0x795)](-0x14)};return{'ok':![],'reason':'port-not-detected','error':'The\x20simulator\x20WebDriverAgent\x20build\x20ran\x20for\x20'+Math[_0x2f7ed8(0x281)](_0xc1a4c9/0x3e8)+'s\x20without\x20coming\x20up\x20(no\x20`ServerURLHere->...<-ServerURLHere`\x20marker).\x20This\x20is\x20almost\x20always\x20a\x20cold\x20first\x20build\x20that\x27s\x20still\x20compiling\x20—\x20it\x20can\x20take\x20a\x20few\x20minutes.\x20The\x20compiled\x20output\x20is\x20cached\x20under\x20the\x20project\x27s\x20derivedData,\x20so\x20simply\x20retrying\x20usually\x20succeeds\x20(the\x20next\x20build\x20is\x20incremental).\x20If\x20retries\x20keep\x20timing\x20out,\x20build\x20the\x20runner\x20once\x20in\x20Xcode\x20to\x20surface\x20any\x20setup\x20prompt\x20(`open\x20\x22'+_0x3dc36f+'\x22`,\x20scheme\x20WebDriverAgentRunner).\x20Last\x2020\x20lines\x20of\x20xcodebuild\x20output\x20below.','output':_0xc9b883['slice'](-0x14)};}function _0x5a916a(_0x17893c){const _0x37d1cf=_0xf8ecb6;let _0xbff3c2=![];const _0x42b705=async()=>{const _0x17bc5d=_0xc050;if(_0xbff3c2)return;_0xbff3c2=!![];if(_0x17893c['child']['exitCode']!==null)return;try{_0x17893c[_0x17bc5d(0x618)]['kill']('SIGTERM');}catch{return;}await new Promise(_0x5462bc=>{const _0x425b0f=_0x17bc5d;let _0x13ad2e=![];const _0x3cb272=()=>{if(_0x13ad2e)return;_0x13ad2e=!![],_0x5462bc();};_0x17893c['child']['once'](_0x425b0f(0x68c),_0x3cb272);if(_0x17893c[_0x425b0f(0x618)]['exitCode']!==null){if('HFZZl'===_0x425b0f(0x791)){_0x58ad54+=_0x2980f7[_0x425b0f(0x3b7)];if(_0x3e017c>_0xe39101){_0x10ef56[_0x425b0f(0x3b7)]=0x0,_0x2e055d({'text':'','tooLarge':!![]}),_0x3a2645['removeAllListeners']('data'),_0x1e93b3['removeAllListeners'](_0x425b0f(0x5b3)),_0x2871b0['removeAllListeners']('error'),_0x1a537f['on']('data',()=>void 0x0),_0x529ef9['on'](_0x425b0f(0x5b3),()=>void 0x0),_0x230d44['on'](_0x425b0f(0x3dd),()=>void 0x0);return;}_0x229c16[_0x425b0f(0x4d1)](_0x2eb46f);}else{_0x17893c[_0x425b0f(0x618)][_0x425b0f(0x411)]('exit',_0x3cb272),_0x13ad2e=!![],_0x5462bc();return;}}setTimeout(()=>{const _0x38fac7=_0x425b0f;if(_0x13ad2e)return;try{_0x17893c['child'][_0x38fac7(0x6ee)](_0x38fac7(0x58f));}catch{}setTimeout(()=>{const _0x29c088=_0x38fac7;if(_0x29c088(0x1ef)===_0x29c088(0x1ef)){if(_0x13ad2e)return;_0x17893c['child']['off'](_0x29c088(0x68c),_0x3cb272),_0x13ad2e=!![],_0x5462bc();}else _0x2e8b88[_0x29c088(0x3e7)]();},0x7d0);},0x1388);});};return{'port':_0x17893c['port'],'udid':_0x17893c[_0x37d1cf(0x5a2)],'projectPath':_0x17893c['projectPath'],'process':_0x17893c[_0x37d1cf(0x618)],'output':_0x17893c['output'],'stop':_0x42b705};}async function _0x247e67(_0x1c2b7f){return new Promise(_0x4dce9e=>{const _0x444433=_0xc050;let _0x2b2516;try{_0x2b2516=_0x8b2958(_0x444433(0x91d),[_0x1c2b7f],{'stdio':[_0x444433(0x9fa),'pipe',_0x444433(0x9e1)]});}catch{_0x4dce9e(![]);return;}let _0x7ad099='';_0x2b2516['stdout']?.['on']('data',_0x155322=>{_0x7ad099+=_0x155322['toString']();}),_0x2b2516['on'](_0x444433(0x3dd),()=>_0x4dce9e(![])),_0x2b2516['on']('exit',_0x5ecf7c=>_0x4dce9e(_0x5ecf7c===0x0&&_0x7ad099[_0x444433(0x668)]()[_0x444433(0x3b7)]>0x0));});}async function _0x1dacae(_0x4cc5bc,_0x283c67={}){const _0x1fc1e6=_0xf8ecb6,_0x42ad9f=_0x283c67[_0x1fc1e6(0x2f9)]??0x15f90,_0x34c085=_0x283c67['spawnFn']??_0x8b2958;await new Promise(_0x2b7e4c=>{const _0x5d6af3=_0x1fc1e6;let _0x404669,_0x41244f=![];const _0x5c6f03=()=>{if(_0x41244f)return;_0x41244f=!![],clearTimeout(_0x1f8eb3),_0x2b7e4c();},_0x1f8eb3=setTimeout(()=>{const _0x2ef794=_0xc050;try{_0x404669?.[_0x2ef794(0x6ee)](_0x2ef794(0x58f));}catch{}_0x5c6f03();},_0x42ad9f);try{_0x404669=_0x34c085('xcrun',[_0x5d6af3(0x825),_0x5d6af3(0x5a5),_0x4cc5bc,'-b'],{'stdio':['ignore',_0x5d6af3(0x9fa),'ignore']});}catch{_0x5c6f03();return;}_0x404669['on']('error',()=>_0x5c6f03()),_0x404669['on'](_0x5d6af3(0x68c),()=>_0x5c6f03());});}var _0x22c0d7='appium-webdriveragent',_0x25ce5c=[{'file':'pnpm-lock.yaml','pm':_0xf8ecb6(0x8f6)},{'file':'yarn.lock','pm':'yarn'},{'file':'bun.lockb','pm':_0xf8ecb6(0x524)},{'file':_0xf8ecb6(0xabf),'pm':_0xf8ecb6(0x524)},{'file':'package-lock.json','pm':'npm'}];function _0x379f0d(_0xd2e297){const _0x4909cd=_0xf8ecb6;switch(_0xd2e297){case _0x4909cd(0x26d):return{'bin':_0x4909cd(0x26d),'args':['install','-D',_0x22c0d7]};case _0x4909cd(0x8f6):return{'bin':_0x4909cd(0x8f6),'args':['add','-D',_0x22c0d7]};case _0x4909cd(0x2d0):return{'bin':'yarn','args':['add','-D',_0x22c0d7]};case _0x4909cd(0x524):return{'bin':_0x4909cd(0x524),'args':[_0x4909cd(0x856),'-D',_0x22c0d7]};}}function _0x347458(_0x381bf3){return _0x15f5fe(_0x381bf3)!==null;}async function _0x201b1d(_0x46588a){const _0x114869=_0xf8ecb6;try{return _0x114869(0x46b)!==_0x114869(0xaca)?(await _0x440733(_0x46588a),!![]):{'name':'boot','status':'error','details':{'error':_0x578a5a(_0x4e8e6a)},'remediation':'Boot\x20revert\x20raised.\x20Check\x20the\x20layout\x20file\x20for\x20syntax\x20errors\x20before\x20re-running.'};}catch{return![];}}async function _0x579c8c(_0x2dbc80){for(const {file:_0x534e67,pm:_0x24ebb5}of _0x25ce5c){if(await _0x201b1d(_0x427bf4(_0x2dbc80,_0x534e67)))return _0x24ebb5;}return'npm';}function _0x5aa8aa(_0x2ef747,_0xe229ba){const {bin:_0x551ab1,args:_0x3d8111}=_0x379f0d(_0x2ef747),_0x38ab66=0x5*0xea60;return new Promise(_0x56a278=>{const _0x11b06f=_0xc050;let _0x4b2eb5;try{_0x4b2eb5=_0x42ae39(_0x551ab1,_0x3d8111,{'cwd':_0xe229ba,'stdio':[_0x11b06f(0x9fa),0x2,0x2]});}catch(_0x1703ad){_0x56a278({'ok':![],'error':_0x11b06f(0x2d9)+_0x551ab1+':\x20'+(_0x1703ad instanceof Error?_0x1703ad[_0x11b06f(0x531)]:String(_0x1703ad))});return;}let _0x3ff206=![];const _0x104c89=_0x3b73a9=>{if(_0x3ff206)return;_0x3ff206=!![],clearTimeout(_0x5e7add),_0x56a278(_0x3b73a9);},_0x5e7add=setTimeout(()=>{const _0x50427a=_0x11b06f;try{_0x4b2eb5[_0x50427a(0x6ee)]('SIGKILL');}catch{}_0x104c89({'ok':![],'error':'`'+_0x551ab1+'\x20'+_0x3d8111['join']('\x20')+'`\x20timed\x20out\x20after\x20'+_0x38ab66/0xea60+_0x50427a(0x22b)});},_0x38ab66);_0x4b2eb5['on'](_0x11b06f(0x3dd),_0x5450a1=>_0x104c89({'ok':![],'error':'`'+_0x551ab1+'\x20'+_0x3d8111[_0x11b06f(0x4ec)]('\x20')+_0x11b06f(0x7a2)+_0x5450a1['message']})),_0x4b2eb5['on']('exit',_0x3d2142=>{const _0x238b39=_0x11b06f;_0x3d2142===0x0?_0x104c89({'ok':!![]}):_0x104c89({'ok':![],'error':'`'+_0x551ab1+'\x20'+_0x3d8111['join']('\x20')+_0x238b39(0x53f)+(_0x3d2142??0x1)+'.'});});});}async function _0x3da09e(_0x59413f,_0x5155df={}){const _0x341175=_0xf8ecb6,_0x1ddb11=_0x5155df['isInstalled']??_0x347458,_0x4122bf=_0x5155df[_0x341175(0x710)]??_0x579c8c,_0x37d370=_0x5155df['runInstall']??_0x5aa8aa,_0x2f4896=_0x5155df['log'];try{if(_0x1ddb11(_0x59413f))return{'status':_0x341175(0x3b9)};_0x2f4896?.(_0x341175(0x24e));const _0xcc8b45=await _0x4122bf(_0x59413f),_0xae3a6b=await _0x37d370(_0xcc8b45,_0x59413f);if(_0x1ddb11(_0x59413f))return{'status':_0x341175(0x968)};return{'status':_0x341175(0x2c4),'error':_0xae3a6b['error']??'appium-webdriveragent\x20still\x20isn\x27t\x20resolvable\x20after\x20`'+_0x379f0d(_0xcc8b45)[_0x341175(0x9c1)]+'\x20'+_0x379f0d(_0xcc8b45)['args']['join']('\x20')+'`.'};}catch(_0x54ab1c){return{'status':_0x341175(0x2c4),'error':_0x54ab1c instanceof Error?_0x54ab1c[_0x341175(0x531)]:String(_0x54ab1c)};}}function _0x2b58ea(_0x304fb2,_0x211909,_0x33382c=0xfa0){return new Promise(_0x1d9657=>{const _0x114a02=_0xc050;let _0x1bbe96='',_0x8a0c43='',_0x5f2777;try{_0x5f2777=_0x1fd61d(_0x304fb2,_0x211909,{'stdio':['ignore','pipe','pipe']});}catch(_0x32f08f){_0x1d9657({'code':0x7f,'stdout':'','stderr':_0x32f08f instanceof Error?_0x32f08f[_0x114a02(0x531)]:String(_0x32f08f)});return;}const _0x478e15=setTimeout(()=>{const _0xc3ba57=_0x114a02;try{_0x5f2777[_0xc3ba57(0x6ee)]('SIGKILL');}catch{}},_0x33382c);_0x5f2777['stdout']?.['on'](_0x114a02(0x78f),_0x5863ea=>{const _0x2b2dae=_0x114a02;_0x1bbe96+=_0x5863ea[_0x2b2dae(0xafa)]();}),_0x5f2777['stderr']?.['on']('data',_0xccf5e8=>{const _0xe8b606=_0x114a02;_0x8a0c43+=_0xccf5e8[_0xe8b606(0xafa)]();});let _0x789554=![];_0x5f2777['on']('error',_0x28cb25=>{const _0x9e7bcf=_0x114a02;if(_0x789554)return;_0x789554=!![],clearTimeout(_0x478e15),_0x1d9657({'code':0x7f,'stdout':_0x1bbe96,'stderr':_0x8a0c43+(_0x28cb25[_0x9e7bcf(0x531)]??String(_0x28cb25))});}),_0x5f2777['on']('exit',_0xb58738=>{if(_0x789554)return;_0x789554=!![],clearTimeout(_0x478e15),_0x1d9657({'code':_0xb58738??0x1,'stdout':_0x1bbe96,'stderr':_0x8a0c43});});});}async function _0x36b361(_0x2f5bbd,_0x402a53,_0x14c443){const _0xf1274f=_0xf8ecb6;try{if(_0xf1274f(0xa35)==='fvDly')return 0x0;else{const _0x42294d=await _0x14c443();return{'name':_0x2f5bbd,..._0x42294d};}}catch(_0x314037){return{'name':_0x2f5bbd,'ok':![],'severity':_0x402a53,'message':_0x314037 instanceof Error?_0x314037['message']:String(_0x314037)};}}async function _0x427b5b(_0x248ec1,_0x773ec9){const _0x47f1b5=_0xf8ecb6,_0x2ad915=Date[_0x47f1b5(0x2f8)]()+_0x773ec9[_0x47f1b5(0x2f9)];try{if(await _0x248ec1())return!![];}catch{}while(Date[_0x47f1b5(0x2f8)]()<_0x2ad915){await new Promise(_0x55f168=>setTimeout(_0x55f168,_0x773ec9[_0x47f1b5(0x466)]));try{if(await _0x248ec1())return!![];}catch{}}return![];}async function _0x28338e(){const _0x2c9263=_0xf8ecb6,_0x5b5481=await _0x2b58ea('networksetup',[_0x2c9263(0x31a),'en0']);if(_0x5b5481[_0x2c9263(0x3aa)]!==0x0)return null;const _0x410b07=_0x5b5481[_0x2c9263(0x790)][_0x2c9263(0x2f3)](/Current Wi-Fi Network:\s*(.+)$/m);if(!_0x410b07)return null;const _0x44e24=_0x410b07[0x1][_0x2c9263(0x668)]();if(!_0x44e24||_0x44e24[_0x2c9263(0x5b5)]()['includes'](_0x2c9263(0x40f)))return null;return _0x44e24;}async function _0x5b181e(){const _0x1e3c9d=_0xf8ecb6,_0x5915a1=await _0x2b58ea('ipconfig',[_0x1e3c9d(0x711),_0x1e3c9d(0x35f)]);if(_0x5915a1[_0x1e3c9d(0x3aa)]!==0x0)return null;const _0x5ba0e3=_0x5915a1[_0x1e3c9d(0x790)]['trim']();return _0x5ba0e3[_0x1e3c9d(0x3b7)]>0x0?_0x5ba0e3:null;}var _0x2c38f7=['app','src','screens'],_0x57972a=new Set([_0xf8ecb6(0x540),_0xf8ecb6(0x73b)]),_0x384897=new Set([_0xf8ecb6(0x714),_0xf8ecb6(0xa00),'build','.git','.ceraph',_0xf8ecb6(0x759),'.next','ios','android']);async function _0x50dc92(_0x53fdae){const _0x1f19f7=[];async function _0x4f3f3e(_0x5f299b){const _0x5310f6=_0xc050;let _0x7d042d;try{_0x7d042d=await _0x133c7b(_0x5f299b,{'withFileTypes':!![]});}catch{if('HqdOn'!==_0x5310f6(0x60d))return;else return{'success':![],'errors':[{'file':'','line':0x0,'message':_0x5310f6(0xae5),'type':'build'}],'warnings':[],'output':''};}for(const _0x3620b0 of _0x7d042d){const _0x7f952f=_0x23e013(_0x5f299b,_0x3620b0['name']);if(_0x3620b0['isDirectory']()){if(_0x384897['has'](_0x3620b0[_0x5310f6(0x9e5)]))continue;await _0x4f3f3e(_0x7f952f);continue;}if(!_0x3620b0['isFile']())continue;const _0x4b4d2d=_0x3620b0[_0x5310f6(0x9e5)]['lastIndexOf']('.');if(_0x4b4d2d<0x0)continue;const _0x543b90=_0x3620b0[_0x5310f6(0x9e5)]['slice'](_0x4b4d2d)[_0x5310f6(0x5b5)]();if(!_0x57972a['has'](_0x543b90))continue;let _0xbc210b;try{_0xbc210b=await _0x2ac9eb(_0x7f952f,_0x5310f6(0x827));}catch{continue;}const _0x4fa8f7=_0x4f44fc(_0x53fdae,_0x7f952f)['split'](sep)[_0x5310f6(0x4ec)]('/');_0x1f19f7['push']({'absPath':_0x7f952f,'relPath':_0x4fa8f7,'contents':_0xbc210b});}}for(const _0x15d217 of _0x2c38f7){await _0x4f3f3e(_0x23e013(_0x53fdae,_0x15d217));}return _0x1f19f7;}function _0xa57fc8(_0x451b7d,_0x3d0c81){const _0x29a5f3=_0xf8ecb6,_0x293784=[],_0x2b706b=_0x451b7d[_0x29a5f3(0x1f2)],_0xacea89=_0x3d0c81[_0x29a5f3(0x42e)](/[.*+?^${}()|[\]\\]/g,'\x5c$&'),_0x502400=new RegExp('<'+_0xacea89+_0x29a5f3(0x24f),'g');let _0x2d8c14;while((_0x2d8c14=_0x502400['exec'](_0x2b706b))!==null){const _0x5376f4=_0x2d8c14['index'],_0x42bf16=_0x1f7ab7(_0x2b706b,_0x5376f4+_0x2d8c14[0x0][_0x29a5f3(0x3b7)]);if(_0x42bf16===-0x1)continue;const _0x5dfd4c=_0x2b706b['slice'](_0x5376f4,_0x42bf16+0x1),_0x469796=_0x2b706b['slice'](0x0,_0x5376f4),_0x277c8c=(_0x469796[_0x29a5f3(0x2f3)](/\n/g)?.['length']??0x0)+0x1;_0x293784[_0x29a5f3(0x4d1)]({'file':_0x451b7d,'line':_0x277c8c,'openingTag':_0x5dfd4c});}return _0x293784;}function _0x1f7ab7(_0x3ca285,_0x391e4d){const _0x1a3a00=_0xf8ecb6;let _0x2c40e9=0x0,_0x2f58ef=![],_0xd06fe4=![],_0x34dc94=![];for(let _0x1643e5=_0x391e4d;_0x1643e5<_0x3ca285[_0x1a3a00(0x3b7)];_0x1643e5++){const _0x11c556=_0x3ca285[_0x1643e5];if(_0x2f58ef){if(_0x11c556==='\x22'&&!_0x26ddfd(_0x3ca285,_0x1643e5))_0x2f58ef=![];continue;}if(_0xd06fe4){if(_0x11c556==='\x27'&&!_0x26ddfd(_0x3ca285,_0x1643e5))_0xd06fe4=![];continue;}if(_0x34dc94){if(_0x11c556==='`'&&!_0x26ddfd(_0x3ca285,_0x1643e5))_0x34dc94=![];continue;}if(_0x11c556==='\x22'){if(_0x1a3a00(0x354)===_0x1a3a00(0x272))_0x13a717[_0x1a3a00(0x4d1)](_0x241a53);else{_0x2f58ef=!![];continue;}}if(_0x11c556==='\x27'){_0xd06fe4=!![];continue;}if(_0x11c556==='`'){_0x34dc94=!![];continue;}if(_0x11c556==='{'){_0x2c40e9++;continue;}if(_0x11c556==='}'){_0x2c40e9=Math[_0x1a3a00(0x553)](0x0,_0x2c40e9-0x1);continue;}if(_0x2c40e9===0x0&&_0x11c556==='>')return _0x1643e5;}return-0x1;}function _0x26ddfd(_0x546ba0,_0x5828d4){let _0x24607f=0x0,_0x17e7ae=_0x5828d4-0x1;while(_0x17e7ae>=0x0&&_0x546ba0[_0x17e7ae]==='\x5c'){_0x24607f++,_0x17e7ae--;}return _0x24607f%0x2===0x1;}function _0x74bea0(_0x97bcb7){const _0x1e2367=_0xf8ecb6,_0x99270d=_0x97bcb7['replace'](/\.(tsx|jsx)$/i,''),_0x4ebc86=_0x99270d[_0x1e2367(0x51a)](/[\\/]/)[_0x1e2367(0x529)](_0x5710ad=>_0x5710ad['length']>0x0);if(_0x4ebc86['length']===0x0)return _0x1e2367(0x55e);const _0x5215d8=_0x4ebc86[_0x4ebc86['length']-0x1],_0x3eddbc=_0x4ebc86[_0x1e2367(0x3b7)]>0x1?_0x4ebc86[_0x4ebc86['length']-0x2]:_0x5215d8,_0x5c554e=new Set(['page',_0x1e2367(0x977),_0x1e2367(0x5be),_0x1e2367(0x761),_0x1e2367(0xa33)]),_0x48b658=_0x5c554e['has'](_0x5215d8[_0x1e2367(0x5b5)]())?_0x3eddbc:_0x5215d8,_0x7a8428=_0x48b658[_0x1e2367(0x42e)](/([a-z0-9])([A-Z])/g,'$1-$2')[_0x1e2367(0x5b5)]()['replace'](/[^a-z0-9]+/g,'-')[_0x1e2367(0x42e)](/^-+|-+$/g,'');return _0x7a8428[_0x1e2367(0x3b7)]>0x0?_0x7a8428:'camera';}function _0x133442(_0x44e3fc){const _0x5531bd=_0xf8ecb6,_0x34d9fe=/import\s*\{([^}]*)\}\s*from\s*["']expo-camera["']/g;let _0x432d5a;while((_0x432d5a=_0x34d9fe['exec'](_0x44e3fc))!==null){const _0x3dde21=_0x432d5a[0x1][_0x5531bd(0x51a)](',')['map'](_0x448c10=>_0x448c10[_0x5531bd(0x668)]()[_0x5531bd(0x51a)](/\s+as\s+/)[0x0]['trim']());if(_0x3dde21[_0x5531bd(0x27e)]('CameraView'))return!![];}return![];}function _0x40ff6b(_0x5388bc){const _0x290df9=_0xf8ecb6,_0x546348='imageKey';let _0x530eba=0x0,_0x474037=![],_0x23bc97=![],_0x57937b=![];for(let _0x14b257=0x0;_0x14b257<_0x5388bc['length'];_0x14b257++){const _0xdfeb41=_0x5388bc[_0x14b257];if(_0x474037){if(_0xdfeb41==='\x22'&&!_0x26ddfd(_0x5388bc,_0x14b257))_0x474037=![];continue;}if(_0x23bc97){if(_0xdfeb41==='\x27'&&!_0x26ddfd(_0x5388bc,_0x14b257))_0x23bc97=![];continue;}if(_0x57937b){if(_0xdfeb41==='`'&&!_0x26ddfd(_0x5388bc,_0x14b257))_0x57937b=![];continue;}if(_0xdfeb41==='\x22'){_0x474037=!![];continue;}if(_0xdfeb41==='\x27'){_0x23bc97=!![];continue;}if(_0xdfeb41==='`'){_0x57937b=!![];continue;}if(_0xdfeb41==='{'){_0x530eba++;continue;}if(_0xdfeb41==='}'){_0x530eba=Math['max'](0x0,_0x530eba-0x1);continue;}if(_0x530eba!==0x0)continue;if(_0xdfeb41!=='i')continue;if(_0x5388bc[_0x290df9(0x8dd)](_0x14b257,_0x14b257+_0x546348[_0x290df9(0x3b7)])!==_0x546348)continue;const _0x18e6bf=_0x14b257===0x0?'\x20':_0x5388bc[_0x14b257-0x1];if(/[A-Za-z0-9_$]/['test'](_0x18e6bf))continue;const _0x2d5619=_0x5388bc[_0x14b257+_0x546348['length']]??'';if(_0x2d5619!=='='&&!/\s/[_0x290df9(0x8aa)](_0x2d5619))continue;let _0x2a6566=_0x14b257+_0x546348[_0x290df9(0x3b7)];while(_0x2a6566<_0x5388bc[_0x290df9(0x3b7)]&&/\s/['test'](_0x5388bc[_0x2a6566]))_0x2a6566++;if(_0x5388bc[_0x2a6566]!=='='){_0x14b257=_0x2a6566-0x1;continue;}_0x2a6566++;while(_0x2a6566<_0x5388bc['length']&&/\s/[_0x290df9(0x8aa)](_0x5388bc[_0x2a6566]))_0x2a6566++;const _0x3f7f6d=_0x5388bc[_0x2a6566];if(_0x3f7f6d==='\x22'||_0x3f7f6d==='\x27'){if('BIsor'!=='NdazN'){let _0xc0a8e2=_0x2a6566+0x1;while(_0xc0a8e2<_0x5388bc[_0x290df9(0x3b7)]&&!(_0x5388bc[_0xc0a8e2]===_0x3f7f6d&&!_0x26ddfd(_0x5388bc,_0xc0a8e2))){_0xc0a8e2++;}const _0x4d8e9d=_0x5388bc[_0x290df9(0x795)](_0x2a6566+0x1,_0xc0a8e2);if(_0x4d8e9d['trim']()[_0x290df9(0x3b7)]===0x0)return{'present':![]};return{'present':!![],'value':_0x4d8e9d};}else return{'success':!![],'transport':'simctl'};}if(_0x3f7f6d==='{')return'cbCFc'==='cbCFc'?{'present':!![],'value':null}:{'success':![],'error':_0x290df9(0x28e)};return{'present':![]};}return{'present':![]};}async function _0x3fb793(_0x54f6ec){const _0x3a17e7=_0xf8ecb6,{screen:_0x483492,apps:_0x4bde91,autonomy:_0x45ff12,bundleId:_0x5199e0,requiredEnv:_0x481bf8,expectedNetwork:_0x5d12b9,projectDir:projectDir=process[_0x3a17e7(0x7f5)](),target:_0x2421b3,excludeRuntimeChecks:excludeRuntimeChecks=![],screenRecordingStatus:screenRecordingStatus=_0x3ce50b,ensureAppium:ensureAppium=_0x3da09e}=_0x54f6ec,_0x6723cd=!excludeRuntimeChecks&&_0x2421b3?await _0x2421b3[_0x3a17e7(0x62d)]()['catch'](()=>null):null,_0x55a749=_0x6723cd?.[_0x3a17e7(0xb00)]===_0x3a17e7(0x25a),_0x50799c=_0x112a0a(projectDir),_0x1a5fa4=_0x50799c['then'](_0x29965f=>{const _0x29883b=_0x3a17e7;if(_0x29965f['writtenOrUnchanged']===_0x29883b(0x737))return{'name':_0x29883b(0x457),'ok':!![],'severity':'info','message':'Skipped\x20—\x20no\x20.ceraph/camera-images/\x20directory.\x20Drop\x20test\x20images\x20there\x20to\x20enable\x20the\x20camera\x20shim.'};return{'name':_0x29883b(0x457),'ok':!![],'severity':'info','message':'Camera\x20image\x20registry\x20'+_0x29965f['writtenOrUnchanged']+'\x20('+_0x29965f['registered'][_0x29883b(0x3b7)]+_0x29883b(0x251)+(_0x29965f[_0x29883b(0x4de)]['length']===0x1?'':'s')+')\x20at\x20'+_0x1718c0(projectDir,_0x29965f[_0x29883b(0x5ff)])+'.','details':{'registered':_0x29965f['registered'][_0x29883b(0x86b)](_0x40825d=>_0x40825d['key']),'state':_0x29965f[_0x29883b(0x36a)]}};},_0x47f23d=>({'name':'camera-registry-synced','ok':![],'severity':'warning','message':'Camera\x20registry\x20sync\x20failed:\x20'+(_0x47f23d instanceof Error?_0x47f23d[_0x3a17e7(0x531)]:String(_0x47f23d))})),_0x5c4c99=_0x50dc92(projectDir),_0x52dab4=_0x36b361('camera-views-unwrapped',_0x3a17e7(0x696),async()=>{const _0x3288d3=_0x3a17e7,_0x5e3645=await _0x5c4c99,_0x57881b=[];for(const _0x33b4b5 of _0x5e3645){if(!_0x133442(_0x33b4b5['contents']))continue;const _0x436216=_0xa57fc8(_0x33b4b5,_0x3288d3(0x936));for(const _0x4648df of _0x436216){_0x57881b['push'](_0x4648df['file']['relPath']+':'+_0x4648df['line']);}}if(_0x57881b[_0x3288d3(0x3b7)]===0x0)return{'ok':!![],'severity':_0x3288d3(0x696),'message':_0x3288d3(0x80c)};return{'ok':![],'severity':'warning','message':'Found\x20'+_0x57881b['length']+'\x20<CameraView>\x20usage(s)\x20not\x20wrapped\x20by\x20<CeraphCamera>.','remediation':'Replace\x20each\x20<CameraView\x20/>\x20with\x20<CeraphCamera\x20imageKey=\x22...\x22\x20/>\x20from\x20\x22@ceraph/react-native-mcp/shim\x22.\x20The\x20shim\x20falls\x20through\x20to\x20expo-camera\x20in\x20production\x20builds.','details':{'offenders':_0x57881b}};}),_0x160440=_0x36b361(_0x3a17e7(0x6a8),'info',async()=>{const _0x5c767c=_0x3a17e7,_0x115521=await _0x5c4c99,_0x78a5f7=[];for(const _0xe62158 of _0x115521){const _0xde1e8b=_0xa57fc8(_0xe62158,_0x5c767c(0x902));for(const _0x31a54b of _0xde1e8b){const _0x5445d9=_0x40ff6b(_0x31a54b['openingTag']);!_0x5445d9[_0x5c767c(0x3b9)]&&_0x78a5f7['push']({'location':_0x31a54b['file'][_0x5c767c(0x87a)]+':'+_0x31a54b[_0x5c767c(0x397)],'file':_0x31a54b['file']['relPath'],'line':_0x31a54b['line'],'suggestedKey':_0x74bea0(_0x31a54b[_0x5c767c(0x448)]['relPath'])});}}if(_0x78a5f7['length']===0x0){if(_0x5c767c(0x2c5)!==_0x5c767c(0x4bd))return{'ok':!![],'severity':'info','message':_0x5c767c(0x9d7)};else _0x4d70d9=_0x5c767c(0x654);}return{'ok':!![],'severity':_0x5c767c(0x799),'message':_0x78a5f7[_0x5c767c(0x3b7)]+_0x5c767c(0x3c6)+(_0x78a5f7['length']===0x1?'':'s')+'\x20awaiting\x20imageKey\x20assignment\x20('+_0x78a5f7[_0x5c767c(0x86b)](_0x4e9dd9=>_0x4e9dd9['location'])['join'](',\x20')+').','remediation':'Ask\x20the\x20user\x20about\x20each\x20camera\x20screen\x20and\x20use\x20`ceraph_init_replace_camera`\x20to\x20set\x20the\x20imageKey.\x20Three\x20options\x20per\x20camera:\x20(A)\x20imageKey=\x22default\x22\x20—\x20bundled\x201024x1024\x20black\x20PNG.\x20Right\x20for\x20tests\x20that\x20don\x27t\x20care\x20about\x20image\x20content\x20(most\x20form/upload\x20flows).\x20(B)\x20imageKey=\x22<scenario>\x22\x20—\x20a\x20specific\x20test\x20image.\x20Drop\x20the\x20file\x20at\x20.ceraph/camera-images/<scenario>.{jpg,png,webp}\x20(use\x20`ceraph_add_camera_image`\x20to\x20write\x20it\x20programmatically)\x20and\x20re-run\x20`rn_sync_camera_registry`.\x20(C)\x20imageKey=\x22@runtime\x22\x20—\x20multi-image\x20flows\x20where\x20the\x20planner\x20picks\x20the\x20image\x20per-step\x20at\x20runtime;\x20the\x20shim\x20won\x27t\x20lock\x20the\x20camera\x20to\x20any\x20static\x20key.','details':{'uninitializedCameras':_0x78a5f7}};}),_0x5db645=_0x36b361(_0x3a17e7(0x8f2),_0x3a17e7(0x3dd),async()=>{const _0x3af40a=_0x3a17e7,[_0x305ae6,_0x2ff3de]=await Promise[_0x3af40a(0x2d4)]([_0x50799c,_0x5c4c99]),_0x8de648=new Set(_0x305ae6[_0x3af40a(0x4de)]['map'](_0x7e3027=>_0x7e3027[_0x3af40a(0x88a)])),_0x2a3aa8=[];for(const _0x383c8a of _0x2ff3de){if('aYPXz'==='iPOhk'){try{_0x5b2173();}catch{}_0xb835c6(),this[_0x3af40a(0x34f)]=null;}else{const _0x113d2c=_0xa57fc8(_0x383c8a,_0x3af40a(0x902));for(const _0x21e371 of _0x113d2c){const _0x8386e4=_0x40ff6b(_0x21e371['openingTag']);if(!_0x8386e4[_0x3af40a(0x3b9)])continue;if(_0x8386e4['value']===null)continue;if(_0x8386e4['value']==='default')continue;if(_0x8386e4['value']['startsWith']('@'))continue;!_0x8de648[_0x3af40a(0x979)](_0x8386e4['value'])&&_0x2a3aa8['push']({'location':_0x21e371[_0x3af40a(0x448)]['relPath']+':'+_0x21e371['line'],'key':_0x8386e4['value']});}}}if(_0x2a3aa8[_0x3af40a(0x3b7)]===0x0){if(_0x3af40a(0x38d)!==_0x3af40a(0x59c))return{'ok':!![],'severity':'error','message':_0x3af40a(0x566)};else{for(const _0xf88854 of _0x17b07b)_0x2fc94f(_0xf88854);}}const _0x5dc772=_0x2a3aa8['map'](_0x2db534=>_0x2db534[_0x3af40a(0xab4)]+'\x20(imageKey=\x22'+_0x2db534['key']+'\x22)')['join'](';\x20');return{'ok':![],'severity':'error','message':'Found\x20'+_0x2a3aa8['length']+'\x20orphan\x20imageKey\x20reference(s):\x20'+_0x5dc772+'.','remediation':_0x3af40a(0x877),'details':{'orphans':_0x2a3aa8}};}),_0x15000b=excludeRuntimeChecks?null:_0x2421b3?Promise[_0x3a17e7(0x62d)]({'name':_0x3a17e7(0xa6a),'ok':!![],'severity':_0x3a17e7(0x799),'message':_0x6723cd?'Target:\x20'+_0x6723cd[_0x3a17e7(0xb00)]+'\x20('+_0x6723cd['reason']+_0x3a17e7(0x467)+_0x6723cd[_0x3a17e7(0xa51)]+(_0x6723cd[_0x3a17e7(0x5a2)]?';\x20udid\x20'+_0x6723cd[_0x3a17e7(0x5a2)]:''):_0x3a17e7(0x611),'details':_0x6723cd?{'target':_0x6723cd['target'],'reason':_0x6723cd[_0x3a17e7(0x256)],'baseUrl':_0x6723cd[_0x3a17e7(0xa51)],'udid':_0x6723cd[_0x3a17e7(0x5a2)],'preferenceEnv':process.env.CERAPH_TARGET??null}:void 0x0}):null,_0x41452b=_0x3a17e7(0x5db),_0x18e4d8=_0x3a17e7(0x6d3),_0x1ea35f=_0x6723cd?.[_0x3a17e7(0x441)]??!![],_0x2786f8=_0x1ea35f?_0x6723cd?.['baseUrl']??_0x3a17e7(0xa3c):null;let _0x4bf225,_0x17bc4e;if(excludeRuntimeChecks)_0x4bf225=null,_0x17bc4e=null;else{if(!_0x55a749&&_0x54f6ec['iproxyManager']){const _0x2cd6ba=_0x54f6ec[_0x3a17e7(0x248)],_0x355590=(async()=>{const _0x487a75=_0x3a17e7;let _0x3a2bfa=await _0x483492['isAvailable'](),_0x383cb1,_0x4fea3f=!![],_0x4a71d8,_0x89dbd5;if(_0x3a2bfa)_0x383cb1='WebDriverAgent\x20already\x20reachable\x20—\x20skipped\x20iproxy\x20auto-bridge.';else{if(_0x487a75(0xa95)!=='zKXtl'){const _0x31326e=_0x1f798c['getInitializer']();if(_0x31326e&&_0xdc579e['isArrowFunction'](_0x31326e))return _0x31326e;if(_0x31326e&&_0x1b060d['isFunctionExpression'](_0x31326e))return _0x31326e;}else{const _0x196a8f=await _0x4bde91['getUdid']()['catch'](()=>null);if(!_0x196a8f)_0x487a75(0xa5c)!==_0x487a75(0x9b3)?(_0x4fea3f=![],_0x383cb1='WDA\x20unreachable\x20and\x20no\x20iOS\x20device\x20detected\x20—\x20cannot\x20auto-bridge.',_0x4a71d8='Connect\x20your\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac,\x20then\x20re-run\x20doctor.'):_0x63a674=!![];else{const _0x2a7c85=await _0x2cd6ba[_0x487a75(0x5cf)](_0x196a8f);if(_0x2a7c85['ok'])_0x3a2bfa=await _0x427b5b(()=>_0x483492[_0x487a75(0x3a4)](),{'intervalMs':0xfa,'timeoutMs':0x9c4}),_0x383cb1='iproxy\x20bridge\x20started\x20(pid\x20'+_0x2a7c85['pid']+').',_0x89dbd5={'pid':_0x2a7c85[_0x487a75(0x8e3)],'udid':_0x196a8f};else{if(_0x2a7c85[_0x487a75(0x256)]==='already-running')_0x3a2bfa=await _0x427b5b(()=>_0x483492['isAvailable'](),{'intervalMs':0xfa,'timeoutMs':0x9c4}),_0x383cb1=_0x487a75(0x797);else _0x2a7c85['reason']===_0x487a75(0xacc)?(_0x4fea3f=![],_0x383cb1='iproxy\x20is\x20not\x20installed\x20—\x20cannot\x20auto-bridge\x20WDA.',_0x4a71d8='Install\x20with\x20`brew\x20install\x20libimobiledevice`,\x20then\x20re-run\x20doctor.'):(_0x4fea3f=![],_0x383cb1=_0x487a75(0xae8)+(_0x2a7c85['stderr']?.[0x0]??_0x487a75(0x8b7))+'.',_0x4a71d8=_0x487a75(0x2a0),_0x89dbd5={'stderr':_0x2a7c85[_0x487a75(0x910)]});}}}}const _0xe88dbe={'name':_0x487a75(0x8e9),'ok':_0x4fea3f,'severity':_0x487a75(0x696),'message':_0x383cb1,'remediation':_0x4a71d8,'details':_0x89dbd5},_0x459707=_0x3a2bfa?{'name':'wda-reachable','ok':!![],'severity':_0x487a75(0x3dd),'message':'WebDriverAgent\x20is\x20reachable\x20at\x20'+_0x2786f8+'.'}:{'name':_0x487a75(0x731),'ok':![],'severity':_0x487a75(0x3dd),'message':_0x2786f8?_0x487a75(0x8d6)+_0x2786f8+'.':'WebDriverAgent\x20is\x20not\x20ready\x20(simulator\x20selected,\x20no\x20port\x20captured\x20yet).','remediation':_0x18e4d8};return{'bridge':_0xe88dbe,'wda':_0x459707};})()[_0x3a17e7(0x48b)](_0x3b12cf=>({'bridge':{'name':'iproxy-bridge','ok':![],'severity':_0x3a17e7(0x696),'message':'iproxy\x20auto-bridge\x20threw:\x20'+(_0x3b12cf instanceof Error?_0x3b12cf['message']:String(_0x3b12cf))},'wda':{'name':'wda-reachable','ok':![],'severity':'error','message':'WDA\x20reachability\x20probe\x20threw:\x20'+(_0x3b12cf instanceof Error?_0x3b12cf['message']:String(_0x3b12cf))}}));_0x4bf225=_0x355590['then'](_0x4c7b77=>_0x4c7b77['bridge']),_0x17bc4e=_0x355590[_0x3a17e7(0x9c5)](_0x48559d=>_0x48559d['wda']);}else _0x4bf225=Promise['resolve']({'name':_0x3a17e7(0x8e9),'ok':!![],'severity':'info','message':_0x55a749?_0x3a17e7(0x6da):_0x3a17e7(0x9a3)}),_0x17bc4e=_0x36b361(_0x3a17e7(0x731),_0x3a17e7(0x3dd),async()=>{const _0x118291=_0x3a17e7,_0x36ae75=await _0x483492['isAvailable']();if(_0x36ae75)return{'ok':!![],'severity':'error','message':_0x118291(0x3f9)+_0x2786f8+'.'};return{'ok':![],'severity':'error','message':_0x2786f8?'WebDriverAgent\x20is\x20not\x20reachable\x20at\x20'+_0x2786f8+'.':'WebDriverAgent\x20is\x20not\x20ready\x20(simulator\x20selected,\x20no\x20port\x20captured\x20yet).','remediation':_0x55a749?_0x41452b:_0x18e4d8};});}const _0xb4a22d=_0x55a749?_0x3a17e7(0x696):_0x3a17e7(0x3dd),_0xa945f0=excludeRuntimeChecks?null:_0x36b361(_0x3a17e7(0x28f),_0xb4a22d,async()=>{const _0x1f9fdf=_0x3a17e7,_0x384185=await _0x4bde91[_0x1f9fdf(0x392)]();if(_0x384185)return{'ok':!![],'severity':_0xb4a22d,'message':_0x1f9fdf(0x432)+_0x384185+').','details':{'udid':_0x384185}};if(_0x55a749)return{'ok':!![],'severity':'info','message':_0x1f9fdf(0x56f)};return{'ok':![],'severity':_0xb4a22d,'message':'No\x20iOS\x20target\x20available.','remediation':_0x1f9fdf(0x7e4)};}),_0x122deb=excludeRuntimeChecks?null:_0x36b361('device-awake',_0x3a17e7(0x3dd),async()=>{const _0x234807=_0x3a17e7,_0x2c6160=await _0x45ff12[_0x234807(0x996)]();if(_0x2c6160['awake'])return{'ok':!![],'severity':_0x234807(0x3dd),'message':'Device\x20is\x20awake\x20(lockState:\x20'+_0x2c6160['lockState']+').','details':{'lockState':_0x2c6160[_0x234807(0x35b)]}};return{'ok':![],'severity':_0x234807(0x3dd),'message':'Device\x20is\x20not\x20awake\x20(lockState:\x20'+_0x2c6160[_0x234807(0x35b)]+').','remediation':_0x2c6160[_0x234807(0x638)]??'Unlock\x20the\x20device\x20manually\x20and\x20set\x20Auto-Lock\x20to\x20Never.','details':{'lockState':_0x2c6160['lockState']}};}),_0x38f1ca=excludeRuntimeChecks?null:Promise['resolve']({'name':_0x3a17e7(0x2d3),'ok':!![],'severity':_0x3a17e7(0x799),'message':_0x3a17e7(0x5a9)}),_0x1e9ee1=excludeRuntimeChecks?null:_0x36b361(_0x3a17e7(0x296),'warning',async()=>{const _0x61e675=_0x3a17e7;if(_0x55a749)return{'ok':!![],'severity':_0x61e675(0x799),'message':_0x61e675(0x58c)};const _0x4f9f26=await _0x2b58ea(_0x61e675(0x91d),['ffmpeg']),_0x20605a=_0x4f9f26['code']===0x0&&_0x4f9f26['stdout']['trim']()['length']>0x0;if(_0x20605a)return{'ok':!![],'severity':'info','message':'ffmpeg\x20available\x20at\x20'+_0x4f9f26[_0x61e675(0x790)][_0x61e675(0x668)]()+'\x20—\x20continuous\x20chain-run\x20video\x20capture\x20is\x20wired.','details':{'path':_0x4f9f26[_0x61e675(0x790)]['trim']()}};return{'ok':![],'severity':_0x61e675(0x696),'message':_0x61e675(0x99c),'remediation':_0x61e675(0x2c8)};}),_0x58770d=excludeRuntimeChecks||!_0x55a749?null:_0x36b361(_0x3a17e7(0xa17),_0x3a17e7(0x3dd),async()=>{const _0x41ba6f=_0x3a17e7,_0x35d439=await ensureAppium(projectDir);if(_0x35d439[_0x41ba6f(0x428)]==='present')return{'ok':!![],'severity':'info','message':_0x41ba6f(0xaea),'details':{'status':_0x35d439['status']}};if(_0x35d439[_0x41ba6f(0x428)]===_0x41ba6f(0x968))return{'ok':!![],'severity':_0x41ba6f(0x799),'message':'Installed\x20appium-webdriveragent\x20—\x20simulator\x20WebDriverAgent\x20can\x20build.','details':{'status':_0x35d439['status']}};if(_0x35d439['status']==='skipped-not-needed')return{'ok':!![],'severity':'info','message':_0x41ba6f(0xa06),'details':{'status':_0x35d439['status']}};return{'ok':![],'severity':_0x41ba6f(0x3dd),'message':'Couldn\x27t\x20ensure\x20appium-webdriveragent:\x20'+_0x35d439[_0x41ba6f(0x3dd)],'remediation':'Couldn\x27t\x20auto-install\x20appium-webdriveragent\x20(the\x20optional\x20dep\x20the\x20simulator\x20WebDriverAgent\x20builds\x20from).\x20Install\x20it\x20manually\x20with\x20`npm\x20install\x20-D\x20appium-webdriveragent`\x20(or\x20`pnpm\x20add\x20-D\x20appium-webdriveragent`),\x20then\x20re-run\x20doctor.','details':{'status':_0x35d439['status']}};}),_0x26f8df=excludeRuntimeChecks||!screenRecordingStatus||_0x6723cd?.['target']!==_0x3a17e7(0xad2)?null:_0x36b361(_0x3a17e7(0x393),'warning',async()=>{const _0x4b6919=screenRecordingStatus();if(_0x4b6919==='granted')return{'ok':!![],'severity':'info','message':'Screen\x20Recording\x20granted\x20—\x20session\x20video\x20will\x20record.','details':{'status':_0x4b6919}};const _0x101a76=_0x4b6919==='unverified'?'Screen\x20Recording\x20not\x20yet\x20verified\x20—\x20a\x20macOS\x20dialog\x20appears\x20the\x20first\x20time\x20Ceraph\x20drives\x20the\x20device\x20(click\x20Allow;\x20no\x20Settings\x20navigation\x20needed).\x20Session\x20video\x20only;\x20tests\x20run\x20regardless.':'Screen\x20Recording\x20permission\x20denied\x20—\x20session\x20video\x20won\x27t\x20record\x20(tests\x20run\x20regardless).\x20Click\x20Allow\x20if\x20the\x20dialog\x20reappears,\x20or\x20grant\x20it\x20manually.';return{'ok':![],'severity':'warning','message':_0x101a76,'remediation':_0x85c37a,'details':{'status':_0x4b6919}};}),_0x111ffa=excludeRuntimeChecks?null:_0x5199e0?_0x36b361(_0x3a17e7(0x388),'error',async()=>{const _0x1026a2=_0x3a17e7,_0x9a84b9=await _0x4bde91['listInstalledApps']();if(!_0x9a84b9['success'])return{'ok':![],'severity':'error','message':_0x1026a2(0xb22)+(_0x9a84b9[_0x1026a2(0x3dd)]??'unknown\x20error'),'remediation':'Ensure\x20your\x20device\x20is\x20connected\x20and\x20Xcode\x20is\x20installed\x20(`xcrun\x20devicectl\x20list\x20devices`).'};const _0x2a735d=_0x9a84b9['apps'][_0x1026a2(0x415)](_0x1a708a=>_0x1a708a['bundleId']===_0x5199e0);if(_0x2a735d)return{'ok':!![],'severity':_0x1026a2(0x3dd),'message':_0x1026a2(0x5b6)+_0x5199e0+'\x20is\x20installed\x20('+_0x2a735d[_0x1026a2(0x9e5)]+(_0x2a735d[_0x1026a2(0x332)]?'\x20v'+_0x2a735d[_0x1026a2(0x332)]:'')+').','details':{'bundleId':_0x5199e0,'name':_0x2a735d[_0x1026a2(0x9e5)],'version':_0x2a735d[_0x1026a2(0x332)]}};return{'ok':![],'severity':'error','message':_0x1026a2(0x5b6)+_0x5199e0+_0x1026a2(0x690),'remediation':'Build\x20and\x20install\x20the\x20app:\x20`expo\x20run:ios\x20--device\x20<udid>`\x20or\x20`npx\x20react-native\x20run-ios\x20--udid\x20<udid>`.','details':{'bundleId':_0x5199e0,'installedCount':_0x9a84b9['apps'][_0x1026a2(0x3b7)]}};}):Promise[_0x3a17e7(0x62d)]({'name':'app-installed','ok':!![],'severity':_0x3a17e7(0x799),'message':_0x3a17e7(0x5bd)}),_0x2e1292=excludeRuntimeChecks?null:_0x481bf8&&_0x481bf8['length']>0x0?_0x36b361(_0x3a17e7(0x65f),'error',async()=>{const _0x3efc7e=_0x3a17e7,_0x1dffff=_0x481bf8[_0x3efc7e(0x529)](_0x58a374=>{const _0x3ef9fa=process.env[_0x58a374];return _0x3ef9fa===void 0x0||_0x3ef9fa==='';});if(_0x1dffff[_0x3efc7e(0x3b7)]===0x0)return{'ok':!![],'severity':'error','message':'All\x20'+_0x481bf8[_0x3efc7e(0x3b7)]+_0x3efc7e(0x818),'details':{'required':_0x481bf8}};return{'ok':![],'severity':_0x3efc7e(0x3dd),'message':_0x3efc7e(0x2cb)+_0x1dffff[_0x3efc7e(0x4ec)](',\x20')+'.','remediation':'Set\x20the\x20missing\x20vars\x20before\x20running:\x20'+_0x1dffff[_0x3efc7e(0x86b)](_0x254402=>_0x3efc7e(0x419)+_0x254402+_0x3efc7e(0x8f9))[_0x3efc7e(0x4ec)](';\x20')+'\x20(or\x20add\x20them\x20to\x20.env.local).','details':{'missing':_0x1dffff,'required':_0x481bf8}};}):Promise['resolve']({'name':_0x3a17e7(0x65f),'ok':!![],'severity':'info','message':_0x3a17e7(0x883)}),_0x543128=excludeRuntimeChecks?null:_0x36b361(_0x3a17e7(0xaf6),_0x3a17e7(0x696),async()=>{const _0x29a879=_0x3a17e7,[_0x3c7773,_0x339fb9]=await Promise['all']([_0x28338e(),_0x5b181e()]),_0x11d53c={'ssid':_0x3c7773,'ip':_0x339fb9};if(_0x5d12b9&&_0x3c7773&&_0x3c7773!==_0x5d12b9)return{'ok':![],'severity':'warning','message':'Laptop\x20is\x20on\x20WiFi\x20\x27'+_0x3c7773+_0x29a879(0x520)+(_0x339fb9??'<no\x20IP>')+_0x29a879(0x2e6)+_0x5d12b9+'\x27.','remediation':_0x29a879(0x2fe),'details':_0x11d53c};return{'ok':!![],'severity':'info','message':_0x29a879(0x3de)+(_0x3c7773??'<unknown>')+'\x27\x20at\x20'+(_0x339fb9??_0x29a879(0x9db))+_0x29a879(0x447),'details':_0x11d53c};}),_0x54bb55=excludeRuntimeChecks?null:Promise[_0x3a17e7(0x62d)]({'name':'permission-interceptor-ready','ok':!![],'severity':_0x3a17e7(0x799),'message':_0x3a17e7(0xb01)}),_0x5a1cfd=await Promise[_0x3a17e7(0x2d4)]([_0x1a5fa4,_0x15000b,_0x4bf225,_0x17bc4e,_0xa945f0,_0x122deb,_0x38f1ca,_0x111ffa,_0x2e1292,_0x543128,_0x54bb55,_0x1e9ee1,_0x58770d,_0x26f8df,_0x52dab4,_0x160440,_0x5db645][_0x3a17e7(0x529)](_0x5daedc=>_0x5daedc!==null)),_0x19beb4=!_0x5a1cfd['some'](_0x19521b=>_0x19521b[_0x3a17e7(0x762)]==='error'&&!_0x19521b['ok']),_0x2028a3=_0x5a1cfd['find'](_0x16815c=>_0x16815c[_0x3a17e7(0x9e5)]===_0x3a17e7(0x296));let _0x7c95f3;return _0x2028a3&&(_0x55a749?_0x7c95f3=void 0x0:_0x7c95f3=_0x2028a3['ok']),{'ok':_0x19beb4,'checks':_0x5a1cfd,'ffmpegInstalled':_0x7c95f3};}var _0x34be84=null,_0x39fdce=null;async function _0x20a87a(_0x5a6268){const _0x33b8f0=_0xf8ecb6;if(_0x34be84&&_0x34be84['result']['ok'])return _0x34be84[_0x33b8f0(0x899)];if(_0x39fdce)return'cotgZ'===_0x33b8f0(0x779)?_0x39fdce:!![];return _0x39fdce=_0x5a6268()[_0x33b8f0(0x9c5)](_0x527a3a=>{const _0x292872=_0x33b8f0;if(_0x292872(0x4b3)!==_0x292872(0x4b3)){const _0x271207=_0x2ec821(_0x4959bc,_0x3132b6);if(_0x271207)return _0x271207;}else return _0x34be84={'result':_0x527a3a,'at':Date[_0x292872(0x2f8)]()},_0x39fdce=null,_0x527a3a;},_0x17a5c4=>{_0x39fdce=null;throw _0x17a5c4;}),_0x39fdce;}function _0x17c6c2(_0x521e6a){_0x34be84={'result':_0x521e6a,'at':Date['now']()};}function _0xe3ce9a(_0x1f8f75){const _0x2e245e=_0xf8ecb6;return _0x1f8f75[_0x2e245e(0x9d3)]['filter'](_0x1cf4f1=>{const _0x27d903=_0x2e245e;if(_0x1cf4f1[_0x27d903(0x762)]==='error')return![];if(_0x1cf4f1['severity']===_0x27d903(0x696))return!_0x1cf4f1['ok'];if(_0x1cf4f1['severity']===_0x27d903(0x799))return!_0x1cf4f1['ok']||_0x1cf4f1['remediation']!=null;return![];});}async function _0x21e28d(_0xcf66d9,_0x7e434d={}){const _0x374ea3=_0xf8ecb6,_0x253e73=_0x7e434d[_0x374ea3(0x1ff)]?await((async()=>{const _0x12ba34=await _0xcf66d9();return _0x17c6c2(_0x12ba34),_0x12ba34;})()):await _0x20a87a(_0xcf66d9),_0x1ddb19=_0x253e73['checks']['filter'](_0x229870=>_0x229870[_0x374ea3(0x762)]===_0x374ea3(0x3dd)&&!_0x229870['ok']);if(_0x1ddb19['length']>0x0)return{'kind':'block','response':{'content':[{'type':_0x374ea3(0x3e0),'text':JSON[_0x374ea3(0x312)]({'status':_0x374ea3(0x8dc),'message':'Doctor\x20checks\x20failed.\x20Resolve\x20these\x20before\x20running\x20flows.\x20After\x20fixing,\x20retry\x20—\x20doctor\x20re-runs\x20automatically\x20until\x20it\x20passes.','errors':_0x1ddb19['map'](_0x455bf3=>({'name':_0x455bf3['name'],'message':_0x455bf3['message'],'remediation':_0x455bf3['remediation']})),'hint':'Run\x20`ceraph_doctor`\x20for\x20the\x20full\x20state\x20including\x20warnings\x20+\x20info\x20findings\x20(e.g.\x20camera\x20setup\x20hints).'},null,0x2)}],'isError':!![]}};return{'kind':'pass','advisories':_0xe3ce9a(_0x253e73)};}function _0xd52672(_0x52f6d3){const _0x3dd253=_0xf8ecb6;if(_0x52f6d3[_0x3dd253(0x3b7)]===0x0)return void 0x0;return _0x52f6d3['map'](_0x12b235=>({'name':_0x12b235[_0x3dd253(0x9e5)],'severity':_0x12b235['severity'],'ok':_0x12b235['ok'],'message':_0x12b235[_0x3dd253(0x531)],'remediation':_0x12b235['remediation'],'details':_0x12b235['details']}));}var _0x4b985e=0x1f91,_0x3ffd6e='Could\x20not\x20start\x20WebDriverAgent.\x20For\x20a\x20device:\x20ensure\x20Developer\x20Mode\x20is\x20enabled\x20(Settings\x20>\x20Privacy\x20&\x20Security\x20>\x20Developer\x20Mode),\x20the\x20device\x20is\x20unlocked\x20and\x20trusts\x20this\x20Mac,\x20and\x20it\x27s\x20connected\x20via\x20USB-C.\x20For\x20a\x20simulator:\x20boot\x20one\x20(open\x20-a\x20Simulator).\x20Then\x20call\x20ceraph_start\x20again.';async function _0x382105(_0x5f2360,_0x14b11e={}){const _0xf866bc=_0xf8ecb6,_0xc65176=_0x14b11e['port']??_0x4b985e,_0x4549f5=[],_0x51469c=_0x1416c9=>{const _0x5e8249=_0xc050;if('eyVDt'===_0x5e8249(0x626))_0xb8662d=this['setTimeoutFn'](()=>{const _0x1ffa45=_0x5e8249;try{_0x536985[_0x1ffa45(0x6ee)](_0x1ffa45(0x58f));}catch{}_0x24a2bf();},_0x4e1f44),_0x5dd643?.[_0x5e8249(0x2d6)]?.();else{_0x4549f5['push'](_0x1416c9);if(_0x14b11e['onStep']){if(_0x5e8249(0x5df)===_0x5e8249(0x5df))try{_0x14b11e['onStep'](_0x1416c9);}catch{}else{const _0x16cb0f=_0x2daced();_0x16cb0f[_0x5e8249(0x6b8)](_0x5e8249(0x3dd),_0x565672),_0x16cb0f['listen'](0x0,'127.0.0.1',()=>{const _0x51cbc5=_0x5e8249,_0xcc9f1b=_0x16cb0f['address']();if(_0xcc9f1b&&typeof _0xcc9f1b==='object'){const _0x20a529=_0xcc9f1b[_0x51cbc5(0x21a)];_0x16cb0f['close'](()=>_0x557c82(_0x20a529));}else _0x16cb0f[_0x51cbc5(0x716)](()=>_0x49ce31(new _0x3efee0('failed\x20to\x20bind\x20a\x20free\x20port')));});}}}},_0x570ccd=await _0x5f2360['resolveTarget']()[_0xf866bc(0x48b)](()=>_0xf866bc(0xad2));let _0x1a21e9=![];if(_0x5f2360[_0xf866bc(0x461)]){_0x1a21e9=!![];const _0x54c49d=await _0x5f2360['checkTargetReady']();if(!_0x54c49d['ok'])return _0x51469c({'name':'preflight','status':_0xf866bc(0xa44),'detail':_0x54c49d['detail']}),_0x976e0a(_0x4549f5,_0x570ccd,_0x54c49d['remediation']??'Connect\x20your\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac\x20(or\x20boot\x20a\x20simulator),\x20then\x20call\x20ceraph_start\x20again.');}if(_0x5f2360[_0xf866bc(0x707)]){_0x1a21e9=!![];const _0x55a9f5=_0x5f2360['missingRequiredEnv']();if(_0x55a9f5[_0xf866bc(0x3b7)]>0x0)return _0x51469c({'name':'preflight','status':_0xf866bc(0xa44),'detail':_0xf866bc(0x93b)+(_0x55a9f5[_0xf866bc(0x3b7)]===0x1?'':'s')+'\x20not\x20set:\x20'+_0x55a9f5['join'](',\x20')+'.','details':{'missing':_0x55a9f5}}),_0x976e0a(_0x4549f5,_0x570ccd,_0xf866bc(0x8af)+_0x55a9f5[_0xf866bc(0x4ec)](',\x20')+_0xf866bc(0x880));}_0x1a21e9&&_0x51469c({'name':'preflight','status':'ok','detail':_0xf866bc(0xac5)});const _0xf24d77=await _0x5f2360[_0xf866bc(0x2f0)](_0xc65176)[_0xf866bc(0x48b)](()=>![]);if(_0xf24d77)_0x51469c({'name':'metro','status':'up','detail':'Metro\x20is\x20already\x20serving\x20on\x20port\x20'+_0xc65176+'.'});else{const _0x15799e=await _0x5f2360[_0xf866bc(0x1fd)]({'port':_0xc65176});if(!_0x15799e[_0xf866bc(0x6d0)])return _0x51469c({'name':'metro','status':'failed','detail':_0x15799e[_0xf866bc(0x531)]}),_0x976e0a(_0x4549f5,_0x570ccd,_0x15799e[_0xf866bc(0x531)]);_0x51469c({'name':'metro','status':_0xf866bc(0x6db),'detail':_0x15799e[_0xf866bc(0x531)]});}const _0x2130fa=_0x2e16be(_0x5f2360,_0x14b11e),_0x2a7938=_0x5f2360['ensureWda']?_0x5f2360['ensureWda']():Promise[_0xf866bc(0x62d)](null),[_0x689798,_0x38930f]=await Promise[_0xf866bc(0x2d4)]([_0x2130fa,_0x2a7938]);if(_0x689798[_0xf866bc(0xb14)]===_0xf866bc(0xa44))return _0xf866bc(0x881)===_0xf866bc(0x881)?(_0x51469c(_0x689798[_0xf866bc(0x84a)]),_0x976e0a(_0x4549f5,_0x570ccd,_0x689798['nextAction'])):{'success':!![],'matchCount':_0x471e75['length'],'element':_0xda2ab3,'batched':!![]};_0x51469c(_0x689798['step']);if(_0x38930f){if(!_0x38930f['ok'])return'tUiNo'!==_0xf866bc(0xa10)?{'status':_0xf866bc(0x93c),'reason':'existing\x20config\x20at\x20'+_0x48ea4f+'\x20is\x20not\x20a\x20JSON\x20object\x20(got\x20'+(_0x15bb11['isArray'](_0x2b3154)?'array':typeof _0x50d416)+_0xf866bc(0x427)}:(_0x51469c({'name':'wda','status':'failed','detail':_0x38930f[_0xf866bc(0x363)],'details':{'error':_0x38930f[_0xf866bc(0x3dd)]}}),_0x976e0a(_0x4549f5,_0x570ccd,_0x38930f['remediation']??_0x3ffd6e));_0x51469c({'name':'wda','status':_0x38930f['reason']===_0xf866bc(0xaf0)?'up':_0xf866bc(0x6db),'detail':_0x38930f[_0xf866bc(0x363)]});}const _0x4c1c23=await _0x5f2360[_0xf866bc(0x769)]();if(_0x5f2360[_0xf866bc(0x433)])try{_0x5f2360[_0xf866bc(0x433)](_0x4c1c23);}catch{}if(!_0x4c1c23['ok']){const _0xd2b6a6=_0x3d951e(_0x4c1c23['checks']),_0x3ab022=_0x467372(_0xd2b6a6);return _0x51469c({'name':'postflight','status':'failed','detail':'On-device\x20automation\x20isn\x27t\x20ready.\x20'+_0xd2b6a6['length']+_0xf866bc(0x7c3)+(_0xd2b6a6['length']===0x1?'':'s')+_0xf866bc(0x7ff),'details':{'failedChecks':_0xd2b6a6}}),_0x976e0a(_0x4549f5,_0x570ccd,_0x3ab022);}return _0x51469c({'name':'postflight','status':'ok','detail':'On-device\x20automation\x20verified\x20—\x20every\x20postflight\x20check\x20passed.'}),{'ready':!![],'steps':_0x4549f5,'target':_0x570ccd};}async function _0x2e16be(_0x4914fe,_0x5ea0d9){const _0x402cd6=_0xf8ecb6,_0x12d0e5=await _0x4914fe['needsBuild']();let _0x4e757f,_0x1495a6,_0x187033;if(_0x12d0e5[_0x402cd6(0x635)]){const _0x44f324=await _0x4914fe[_0x402cd6(0x537)]({'clean':_0x5ea0d9['clean'],'device':_0x5ea0d9['device']});if(!_0x44f324['success']){const _0x419acd=_0x44f324[_0x402cd6(0x5ac)][0x0]?.['message'];return{'kind':'failed','step':{'name':'build','status':_0x402cd6(0xa44),'detail':_0x419acd??_0x402cd6(0x33c),'details':{'errors':_0x44f324[_0x402cd6(0x5ac)],'output':_0x44f324['output']}},'nextAction':'Fix\x20the\x20native\x20build\x20error\x20above,\x20then\x20call\x20ceraph_start\x20again.'};}_0x4914fe['saveBuildSnapshot']&&await _0x4914fe['saveBuildSnapshot']()[_0x402cd6(0x48b)](()=>{}),_0x187033='built',_0x4e757f=_0x12d0e5[_0x402cd6(0x479)][_0x402cd6(0x3b7)]>0x0?_0x402cd6(0x211)+_0x12d0e5[_0x402cd6(0x479)]['join'](';\x20')+').':_0x402cd6(0x2ac),_0x1495a6=_0x12d0e5[_0x402cd6(0x479)][_0x402cd6(0x3b7)]>0x0?{'reasons':_0x12d0e5[_0x402cd6(0x479)]}:void 0x0;}else _0x187033=_0x402cd6(0x965),_0x4e757f='The\x20installed\x20app\x20is\x20already\x20current\x20—\x20skipped\x20the\x20build.',_0x1495a6=void 0x0;let _0x195a96;if(_0x4914fe['foregroundApp']){const _0x41a7cf=await _0x4914fe[_0x402cd6(0x67b)]()['catch'](_0x348b4c=>({'ok':![],'detail':'Could\x20not\x20foreground\x20the\x20app:\x20'+(_0x348b4c instanceof Error?_0x348b4c[_0x402cd6(0x531)]:String(_0x348b4c))+'.'}));_0x195a96=_0x41a7cf['ok']?'\x20'+_0x41a7cf['detail']:_0x402cd6(0x95a)+_0x41a7cf[_0x402cd6(0x363)]+_0x402cd6(0xa14);}else _0x195a96='';return{'kind':'ok','step':{'name':'build','status':_0x187033,'detail':''+_0x4e757f+_0x195a96,'details':_0x1495a6}};}function _0x976e0a(_0x46ebbc,_0xa1bbcc,_0x158806){return{'ready':![],'steps':_0x46ebbc,'target':_0xa1bbcc,'nextAction':_0x158806};}function _0x3d951e(_0x451715){const _0x3ffd3c=_0xf8ecb6;return _0x451715[_0x3ffd3c(0x529)](_0x16dfb0=>_0x16dfb0[_0x3ffd3c(0x762)]==='error'&&!_0x16dfb0['ok']);}function _0x467372(_0x5cd848){const _0x56f9aa=_0xf8ecb6,_0x7b1dd5=_0x5cd848[0x0];if(!_0x7b1dd5)return _0x56f9aa(0x285);return _0x7b1dd5[_0x56f9aa(0x638)]??_0x7b1dd5[_0x56f9aa(0x531)]??'Re-run\x20`ceraph_doctor`\x20to\x20see\x20what\x27s\x20blocking\x20on-device\x20automation.';}import{join as _0x3a6300}from'path';import{spawn as _0x18fd18}from'child_process';var _0x228f9b=null,_0x191db8=![],_0xf81141=null;function _0x44e369(){const _0x534a5b=_0xf8ecb6;if(process['platform']!=='darwin')return{'applied':![],'reason':'not-darwin'};if(_0x191db8&&_0x228f9b&&!_0x228f9b[_0x534a5b(0x826)])return{'applied':!![],'reason':'already-active'};try{const _0xfed877=_0xf81141??_0x18fd18,_0x59a629=_0xfed877(_0x534a5b(0x9ae),[_0x534a5b(0x359),'-w',String(process[_0x534a5b(0x8e3)])],{'detached':!![],'stdio':'ignore'});typeof _0x59a629[_0x534a5b(0x2d6)]==='function'&&_0x59a629['unref']();_0x228f9b=_0x59a629,_0x191db8=!![];const _0x2d667e=_0x59a629;return _0x59a629['once']('exit',()=>{const _0x4d00ba=_0x534a5b;if('xWajM'==='eXYrf'){if((_0x3aecd3['objectiveSignals']?.['length']??0x0)>0x0){const _0x32fc28=_0x46e430['objectiveSignals'][0x0];return _0x32fc28[_0x4d00ba(0xb14)]+':\x20'+_0x32fc28[_0x4d00ba(0x531)];}for(const _0x35f144 of _0x3dfa33['steps']){if(!_0x35f144['success']){const _0x54a43e=_0x35f144[_0x4d00ba(0x5a0)],_0x1ebaa8=_0x35f144[_0x4d00ba(0x3dd)]??_0x4d00ba(0x6f5);return _0x54a43e+_0x4d00ba(0x252)+_0x1ebaa8;}}return'flow\x20ended\x20without\x20success';}else _0x228f9b===_0x2d667e&&(_0x228f9b=null,_0x191db8=![]);}),{'applied':!![],'reason':'started'};}catch{return{'applied':![],'reason':'spawn-failed'};}}function _0x1fe09d(){const _0xd9e422=_0xf8ecb6;if(!_0x191db8)return;if(_0x228f9b)try{_0x228f9b[_0xd9e422(0x6ee)](_0xd9e422(0x72c));}catch{}_0x228f9b=null,_0x191db8=![];}var _0x36c71a=class{constructor(_0x466f60,_0x41caa4,_0x268e9b){const _0x5b93c2=_0xf8ecb6;this['target']=_0x466f60,this['cacheDir']=_0x41caa4,this[_0x5b93c2(0x9aa)]=_0x268e9b;}[_0xf8ecb6(0x5a3)]=null;[_0xf8ecb6(0x91f)]=null;['inflightChild']=null;['stopGeneration']=0x0;[_0xf8ecb6(0x34f)]=null;['getSession'](){return this['session'];}async[_0xf8ecb6(0x5cf)](_0x33329b={}){const _0x5b63f9=_0xf8ecb6;this[_0x5b63f9(0x34f)]&&await this[_0x5b63f9(0x34f)][_0x5b63f9(0x48b)](()=>void 0x0);if(this[_0x5b63f9(0x5a3)]){const _0x1e2560=this['session']['process']['exitCode']===null,_0x364f97=!_0x33329b['udid']||_0x33329b[_0x5b63f9(0x5a2)]===this['session']['udid'];if(_0x1e2560&&_0x364f97)return{'ok':!![],'port':this[_0x5b63f9(0x5a3)]['port'],'udid':this[_0x5b63f9(0x5a3)]['udid'],'reused':!![],'projectPath':this[_0x5b63f9(0x5a3)]['projectPath']};_0x1e2560&&!_0x364f97?await this['stop']()[_0x5b63f9(0x48b)](()=>void 0x0):(this['session']=null,this[_0x5b63f9(0xb00)]['clearSimulatorWdaPort']());}if(this[_0x5b63f9(0x91f)])return this['inflight'];const _0x1f8631=this[_0x5b63f9(0xa84)],_0x580c0b=((async()=>{const _0x435ae4=_0x5b63f9,_0x59fd08=await _0x3eac78();if(_0x59fd08['length']===0x0)return{'ok':![],'reason':'no-booted-simulator','error':_0x435ae4(0x44c)};let _0x25d40a;if(_0x33329b['udid']){const _0x226590=_0x59fd08['find'](_0x4aa12c=>_0x4aa12c['udid']===_0x33329b[_0x435ae4(0x5a2)]);if(!_0x226590)return{'ok':![],'reason':_0x435ae4(0x2d1),'error':_0x435ae4(0x206)+_0x33329b[_0x435ae4(0x5a2)]+_0x435ae4(0x9df)+_0x59fd08[_0x435ae4(0x86b)](_0x495825=>_0x495825['name']+'\x20('+_0x495825[_0x435ae4(0x5a2)]+')')['join'](',\x20')+'.'};_0x25d40a=_0x226590;}else{if('JuHax'!=='DaulW')_0x25d40a=_0x59fd08[0x0];else{const _0x31652d=_0x49329d?.[_0x435ae4(0x5ac)],_0x37d6d2=_0x54a4b8[_0x435ae4(0x200)](_0x31652d)&&_0x31652d['some'](_0x2248a4=>_0x2248a4?.['code']==='form_identifier_exists');if(_0x37d6d2)throw new _0x3ba345(_0x435ae4(0x869),'Clerk\x20createUser\x20conflict:\x20email\x20already\x20exists',_0x4dbe92);const _0x3e209d=_0x46b9de?.[_0x435ae4(0x531)]??_0x46bfde(_0x3af2bb),_0x671f7a=/already taken|exists|conflict|duplicate/i[_0x435ae4(0x8aa)](_0x3e209d)?'user-exists':_0x435ae4(0x65b);throw new _0x37b2e6(_0x671f7a,_0x435ae4(0x2bf)+_0x3e209d,_0x5e6a1e);}}const _0xc6f36a={'udid':_0x25d40a['udid'],'projectDir':this[_0x435ae4(0x9aa)],'derivedDataPath':_0x33329b['derivedDataPath']??_0x3a6300(this[_0x435ae4(0xa53)],_0x435ae4(0xa85)),'startupTimeoutMs':_0x33329b[_0x435ae4(0xab9)],'onChildSpawned':_0x5b4720=>{const _0x5854f2=_0x435ae4;this[_0x5854f2(0x3ef)]=_0x5b4720;}};let _0x3e7f59;try{_0x3e7f59=await _0x266a61(_0xc6f36a);}finally{this[_0x435ae4(0x3ef)]=null;}if(!_0x3e7f59['ok'])return{'ok':![],'reason':_0x3e7f59['reason'],'error':_0x3e7f59[_0x435ae4(0x3dd)],'output':_0x3e7f59['output']};if(this['stopGeneration']!==_0x1f8631)return await _0x3e7f59[_0x435ae4(0x5a3)]['stop']()[_0x435ae4(0x48b)](()=>void 0x0),{'ok':![],'reason':_0x435ae4(0xa26),'error':_0x435ae4(0x241)};this['session']=_0x3e7f59['session'],this[_0x435ae4(0xb00)]['setSimulatorWdaPort'](_0x3e7f59['session'][_0x435ae4(0x21a)],_0x3e7f59[_0x435ae4(0x5a3)]['udid']);const _0x35b049=_0x3e7f59[_0x435ae4(0x5a3)];_0x35b049[_0x435ae4(0x21b)][_0x435ae4(0x6b8)](_0x435ae4(0x68c),()=>{const _0x4fbc3d=_0x435ae4;if(this['session']===_0x35b049){if('TIEIn'!==_0x4fbc3d(0x6d2)){const _0x2a2445=_0x4ac670['steps'][_0x4fbc3d(0x415)](_0x5930d5=>_0x5930d5[_0x4fbc3d(0x41b)]&&_0x358db0(_0x5930d5[_0x4fbc3d(0x41b)]));if(!_0x2a2445?.['verifyMutation'])return null;const _0x1a355d=_0x1716b9['completed']['map'](_0x2fe9d9=>_0x2fe9d9[_0x4fbc3d(0x8f8)]),_0x47d456=_0x1953a2[_0x4fbc3d(0xa1c)][_0x4fbc3d(0x628)]['slice'](_0x3e785b+0x1)['map']((_0x4cf059,_0x3bbd8d)=>{const _0x2cc18f=_0x4fbc3d,_0x150c0f=_0x6b71ec+0x1+_0x3bbd8d,_0x5d6b56=_0x196ddc[_0x2cc18f(0xa1c)][_0x2cc18f(0x4c0)]?.[_0x150c0f]??[],_0x2563e2=_0x220729[_0x2cc18f(0xa1c)][_0x2cc18f(0xa40)]?.[_0x150c0f],_0x42df06=_0x4115df(_0x4c74a5['accumulatedWriteKeys'],_0x55eeef['accumulatedHasFullyDynamicWrite'],_0x4cf059,_0x5d6b56,_0x1a355d);return{'flow':_0x4cf059['name'],'statedDependencies':_0x5d6b56,..._0x2563e2&&_0x2563e2['length']>0x0?{'mutexWith':_0x2563e2}:{},'staticDecision':_0x42df06};});return{'flow':_0x2fc287['name'],'flowIndex':_0x200afc,'mutation':{'method':_0x2a2445['verifyMutation'][_0x4fbc3d(0x9de)]['toUpperCase'](),'endpoint':_0x2a2445['verifyMutation']['sourceEndpoint'],..._0x2a2445[_0x4fbc3d(0x41b)]['affectedDisplayRoute']?{'affectedDisplayRoute':_0x2a2445[_0x4fbc3d(0x41b)]['affectedDisplayRoute']}:{}},'remainingChain':_0x47d456,'nextFlowStatedDependencies':_0x47d456[0x0]?.['statedDependencies']??[]};}else this['session']=null,this[_0x4fbc3d(0xb00)]['clearSimulatorWdaPort']();}});try{_0x44e369();}catch{}return{'ok':!![],'port':_0x3e7f59['session']['port'],'udid':_0x3e7f59['session']['udid'],'reused':![],'projectPath':_0x3e7f59[_0x435ae4(0x5a3)][_0x435ae4(0x743)]};})());this['inflight']=_0x580c0b;try{return await _0x580c0b;}finally{this['inflight']=null;}}async['stop'](){const _0x2a71f9=_0xf8ecb6;if(this[_0x2a71f9(0x34f)])return await this[_0x2a71f9(0x34f)]['catch'](()=>void 0x0),{'stopped':![]};this['stopGeneration']++;let _0x5439ff;this[_0x2a71f9(0x34f)]=new Promise(_0x1696d4=>{_0x5439ff=_0x1696d4;});try{const _0x106863=this[_0x2a71f9(0x3ef)];this[_0x2a71f9(0x3ef)]=null;if(_0x106863&&_0x106863['exitCode']===null)try{_0x106863[_0x2a71f9(0x6ee)](_0x2a71f9(0x72c));}catch{}this[_0x2a71f9(0x91f)]&&await this['inflight'][_0x2a71f9(0x48b)](()=>void 0x0);if(!this['session'])return{'stopped':![]};const {udid:_0x4e64be,port:_0x45aef7}=this[_0x2a71f9(0x5a3)];try{await this['session']['stop']();}finally{this[_0x2a71f9(0x5a3)]=null,this['target'][_0x2a71f9(0xaf5)]();}return{'stopped':!![],'udid':_0x4e64be,'port':_0x45aef7};}finally{try{_0x1fe09d();}catch{}_0x5439ff(),this[_0x2a71f9(0x34f)]=null;}}};import{spawn as _0x4b1c10}from'child_process';import{readdir as _0x22da67,readFile as _0x1be4e0,stat as _0x524178}from'fs/promises';import{homedir}from'os';import{join as _0x238040}from'path';function _0x7de677(_0x54cef6,_0x46d374,_0x48f743={}){return new Promise(_0x187207=>{const _0x500515=_0xc050;let _0x580cfe='',_0x50ac36='',_0x5f52a5;try{_0x5f52a5=_0x4b1c10(_0x54cef6,_0x46d374,{'stdio':['ignore',_0x500515(0x9e1),_0x500515(0x9e1)]});}catch(_0x23a2db){_0x187207({'code':0x7f,'stdout':'','stderr':_0x23a2db instanceof Error?_0x23a2db[_0x500515(0x531)]:String(_0x23a2db)});return;}let _0x417f3c=![],_0x47228c;const _0x19110c=_0x1d461c=>{if(_0x417f3c)return;_0x417f3c=!![],clearTimeout(_0x47228c),_0x187207(_0x1d461c);};_0x47228c=setTimeout(()=>{const _0x3dc049=_0x500515;try{_0x5f52a5['kill']('SIGKILL');}catch{}_0x19110c({'code':0x7c,'stdout':_0x580cfe,'stderr':_0x50ac36+_0x3dc049(0x226)+(_0x48f743['timeoutMs']??0x1f40)+_0x3dc049(0xaf3)});},_0x48f743[_0x500515(0x2f9)]??0x1f40),_0x5f52a5['stdout']?.['on']('data',_0x16ce74=>{_0x580cfe+=_0x16ce74['toString']();}),_0x5f52a5['stderr']?.['on']('data',_0x67f439=>{const _0x23fb2a=_0x500515;_0x50ac36+=_0x67f439[_0x23fb2a(0xafa)]();}),_0x5f52a5['on']('error',_0x4fb007=>{_0x19110c({'code':0x7f,'stdout':_0x580cfe,'stderr':_0x50ac36+(_0x4fb007['message']??String(_0x4fb007))});}),_0x5f52a5['on'](_0x500515(0x68c),_0xe320c2=>{const _0xa23a73=_0x500515;_0xa23a73(0x822)==='oFwTt'?_0x19110c({'code':_0xe320c2??0x1,'stdout':_0x580cfe,'stderr':_0x50ac36}):_0x22df05=![];});});}async function _0x5504b2(_0x3e8317,_0x188570=0x7d0){const _0x2b0375=_0xf8ecb6,_0x431f57=new AbortController(),_0x4e4c3d=setTimeout(()=>_0x431f57[_0x2b0375(0x95c)](),_0x188570);try{const _0x33c7f7=await fetch(_0x2b0375(0x9f4)+_0x3e8317+_0x2b0375(0xa5d),{'signal':_0x431f57['signal']});return _0x33c7f7['ok'];}catch{return![];}finally{clearTimeout(_0x4e4c3d);}}var _0x1f0e84={'readEnv':_0x2d181a=>process.env[_0x2d181a],'homeDir':()=>homedir(),'pathExists':async _0x3ea2ea=>{try{return await _0x524178(_0x3ea2ea),!![];}catch{return![];}},'listDir':async _0x1cff15=>{const _0x3dfe32=_0xf8ecb6;try{return _0x3dfe32(0x362)!=='dgVdj'?{'path':_0x1bc3ad,'status':'no-changes'}:await _0x22da67(_0x1cff15);}catch{return[];}},'readFileUtf8':async _0x402b7c=>{const _0x39e45c=_0xf8ecb6;try{return await _0x1be4e0(_0x402b7c,_0x39e45c(0x827));}catch{return null;}},'mtimeMs':async _0x20c254=>{const _0x1d0fd1=_0xf8ecb6;try{const _0x522b62=await _0x524178(_0x20c254);return _0x522b62[_0x1d0fd1(0x398)];}catch{return 0x0;}},'run':(_0x3d6a81,_0x1208f5,_0x24e3ae)=>_0x7de677(_0x3d6a81,_0x1208f5,{'timeoutMs':_0x24e3ae}),'probeStatus':_0x5504b2,'spawn':_0x4b1c10},_0xbdd983=0x1fa4;async function _0x155cce(_0x3b4be9=_0x1f0e84){const _0x812fbb=_0xf8ecb6,_0x1db328=_0x3b4be9[_0x812fbb(0x646)](_0x812fbb(0x5cb))?.['trim']();if(_0x1db328&&await _0x3b4be9['pathExists'](_0x1db328))return{'ok':!![],'projectPath':_0x1db328,'source':_0x812fbb(0x52a)};const _0x46e087=await _0x3178fc(_0x3b4be9);if(_0x46e087)return{'ok':!![],'projectPath':_0x46e087,'source':_0x812fbb(0x203)};const _0x2d3d3a=_0x238040(_0x3b4be9['homeDir'](),_0x812fbb(0x8be),'WebDriverAgent',_0x812fbb(0x3d3));if(await _0x3b4be9['pathExists'](_0x2d3d3a))return{'ok':!![],'projectPath':_0x2d3d3a,'source':_0x812fbb(0x9ed)};return{'ok':![],'remediation':_0x812fbb(0x96c)};}async function _0x3178fc(_0x154861){const _0x1914ca=_0xf8ecb6,_0x44e9e0=_0x238040(_0x154861[_0x1914ca(0x93d)](),_0x1914ca(0x957),'Developer','Xcode','DerivedData'),_0x5665d9=await _0x154861[_0x1914ca(0x77a)](_0x44e9e0),_0x21e151=_0x5665d9['filter'](_0xcc96a=>_0xcc96a['startsWith'](_0x1914ca(0x712)));if(_0x21e151['length']===0x0)return null;const _0x3e05eb=await Promise[_0x1914ca(0x2d4)](_0x21e151['map'](async _0x410db2=>{const _0x373627=_0x1914ca,_0x3b0e4d=_0x238040(_0x44e9e0,_0x410db2);return{'dir':_0x3b0e4d,'mtime':await _0x154861[_0x373627(0x398)](_0x3b0e4d)};}));_0x3e05eb['sort']((_0xdc9ed4,_0x565959)=>_0x565959[_0x1914ca(0x8bb)]-_0xdc9ed4[_0x1914ca(0x8bb)]);for(const {dir:_0x23a27a}of _0x3e05eb){const _0x419a8=_0x238040(_0x23a27a,'info.plist'),_0xb6ebe5=await _0x154861[_0x1914ca(0x5e6)](_0x419a8);if(!_0xb6ebe5)continue;const _0x454d39=_0x3e10c4(_0xb6ebe5);if(!_0x454d39)continue;if(await _0x154861['pathExists'](_0x454d39))return _0x454d39;}return null;}function _0x3e10c4(_0x4d4255){const _0x3849d8=_0xf8ecb6,_0x2bf7f6=/<key>\s*WorkspacePath\s*<\/key>\s*<string>([\s\S]*?)<\/string>/,_0x544b5d=_0x2bf7f6['exec'](_0x4d4255);if(!_0x544b5d)return null;const _0x354db1=_0x544b5d[0x1][_0x3849d8(0x668)]();return _0x354db1['length']>0x0?_0x11145e(_0x354db1):null;}function _0x11145e(_0x565a87){const _0x7639a6=_0xf8ecb6;return _0x565a87[_0x7639a6(0x42e)](/&/g,'&')['replace'](/</g,'<')[_0x7639a6(0x42e)](/>/g,'>')[_0x7639a6(0x42e)](/'/g,'\x27')['replace'](/"/g,'\x22');}async function _0x1b6966(_0x472f4f,_0x492871=_0x1f0e84){const _0x1aa468=_0xf8ecb6,_0x3a4946=_0x492871[_0x1aa468(0x646)]('CERAPH_DEVICE_HARDWARE_UDID')?.['trim']();if(_0x3a4946)return _0x44442b(_0x3a4946)??_0x3a4946;const _0x2c3773=await _0x12d183(_0x492871);if(_0x2c3773)return _0x2c3773;const _0x5a9fc7=await _0x5ebd9e(_0x492871);if(_0x5a9fc7)return _0x5a9fc7;const _0x425a8a=await _0x285f08(_0x492871);if(_0x425a8a)return _0x425a8a;return _0x44442b(_0x472f4f);}function _0x44442b(_0x3c7072){const _0x3839ca=_0xf8ecb6;if(!_0x3c7072)return null;const _0x4fdc98=_0x3c7072['trim']();if(/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{16}$/[_0x3839ca(0x8aa)](_0x4fdc98))return _0x4fdc98;if(/^[0-9A-Fa-f]{24}$/[_0x3839ca(0x8aa)](_0x4fdc98))return _0x4fdc98[_0x3839ca(0x795)](0x0,0x8)+'-'+_0x4fdc98['slice'](0x8);if(/^[0-9A-Fa-f]{40}$/[_0x3839ca(0x8aa)](_0x4fdc98))return _0x4fdc98;return null;}async function _0x5ebd9e(_0x50fcb9){const _0x8eaea5=_0xf8ecb6;for(const _0xd8de5b of[_0x8eaea5(0x404),'iPad']){const _0x5a8bd7=await _0x50fcb9['run'](_0x8eaea5(0x2ed),['-p',_0x8eaea5(0x443),'-r','-n',_0xd8de5b,'-l',_0x8eaea5(0x2ef)],0x1f40);if(_0x5a8bd7[_0x8eaea5(0x3aa)]!==0x0||!_0x5a8bd7['stdout']['trim']())continue;const _0x305243=_0x5a8bd7['stdout']['match'](/"USB Serial Number"\s*=\s*"([0-9A-Fa-f]{20,})"/),_0x564283=_0x44442b(_0x305243?.[0x1]??null);if(_0x564283)return _0x564283;}return null;}async function _0x285f08(_0x336a4e){const _0x34feaf=_0xf8ecb6,_0x12e607=await _0x336a4e[_0x34feaf(0x7f0)]('xcrun',[_0x34feaf(0x83d),_0x34feaf(0x5d6),'devices'],0x3a98);if(_0x12e607['code']!==0x0||!_0x12e607['stdout'][_0x34feaf(0x668)]())return null;for(const _0x13f902 of _0x12e607['stdout'][_0x34feaf(0x51a)]('\x0a')){if(/^==\s*Simulators/i['test'](_0x13f902))break;if(/simulator/i[_0x34feaf(0x8aa)](_0x13f902))continue;const _0x505b77=_0x13f902[_0x34feaf(0x2f3)](/\(([0-9A-Fa-f]{8}-[0-9A-Fa-f]{16}|[0-9A-Fa-f]{40})\)\s*$/),_0x39549d=_0x44442b(_0x505b77?.[0x1]??null);if(_0x39549d)return _0x39549d;}return null;}async function _0x12d183(_0x199dd0){const _0x58f240=_0xf8ecb6,_0x4fde2b=await _0x199dd0[_0x58f240(0x7f0)](_0x58f240(0x1fb),['SPUSBDataType',_0x58f240(0x9b2)],0x1f40);if(_0x4fde2b['code']!==0x0||!_0x4fde2b[_0x58f240(0x790)][_0x58f240(0x668)]())return null;try{const _0x55bf48=JSON['parse'](_0x4fde2b[_0x58f240(0x790)]);return _0x44442b(_0x4bba0d(_0x55bf48['SPUSBDataType']));}catch{return null;}}function _0x4bba0d(_0x3d3112){const _0x3b19b3=_0xf8ecb6;if(_0x3d3112===null||_0x3d3112===void 0x0)return null;if(Array['isArray'](_0x3d3112)){for(const _0x426793 of _0x3d3112){const _0x105be6=_0x4bba0d(_0x426793);if(_0x105be6)return _0x105be6;}return null;}if(typeof _0x3d3112!==_0x3b19b3(0x9e3))return null;const _0x5d450b=_0x3d3112,_0x2bf277=typeof _0x5d450b[_0x3b19b3(0x68d)]==='string'?_0x5d450b['_name']:'',_0xae2d41=_0x5d450b['serial_num'],_0x5ce9d8=/iphone|ipad/i['test'](_0x2bf277);if(_0x5ce9d8&&typeof _0xae2d41===_0x3b19b3(0x30d)&&/^[0-9A-Fa-f-]{20,}$/[_0x3b19b3(0x8aa)](_0xae2d41))return _0xae2d41;for(const _0xa82a7e of Object['values'](_0x5d450b)){if(Array['isArray'](_0xa82a7e)||typeof _0xa82a7e===_0x3b19b3(0x9e3)&&_0xa82a7e!==null){const _0x3c6e83=_0x4bba0d(_0xa82a7e);if(_0x3c6e83)return _0x3c6e83;}}return null;}function _0x5b780a(_0x334314){const _0x436fc2=_0xf8ecb6,_0xd21ae3=[_0x436fc2(0x8aa),_0x436fc2(0x919),_0x334314['projectPath'],'-scheme','WebDriverAgentRunner','-destination','id='+_0x334314[_0x436fc2(0x4e8)]];return _0x334314[_0x436fc2(0x69b)]&&_0xd21ae3[_0x436fc2(0x4d1)](_0x436fc2(0x65a),_0x334314['derivedDataPath']),_0xd21ae3;}function _0x3df849(_0x38f7b6){const _0x183902=_0xf8ecb6,_0x25200d=_0x38f7b6['toLowerCase']();if(_0x25200d['includes'](_0x183902(0x5e2))||_0x25200d[_0x183902(0x27e)]('failed\x20to\x20initialize\x20for\x20ui\x20testing'))return{'summary':_0x183902(0x770),'remediation':'This\x20happens\x20when\x20the\x20iPhone\x20is\x20asleep/locked\x20when\x20the\x20test\x20runner\x20starts,\x20OR\x20the\x20WebDriverAgentRunner\x20isn\x27t\x20trusted\x20yet.\x20First:\x20unlock\x20the\x20device\x20and\x20keep\x20it\x20awake\x20(set\x20Settings\x20→\x20Display\x20&\x20Brightness\x20→\x20Auto-Lock\x20→\x20Never),\x20then\x20retry.\x20If\x20it\x20still\x20fails,\x20establish\x20trust\x20once:\x20open\x20~/.mobile-mcp/WebDriverAgent/WebDriverAgent.xcodeproj\x20in\x20Xcode,\x20Run\x20the\x20WebDriverAgentRunner\x20scheme\x20on\x20the\x20iPhone,\x20accept\x20the\x20trust\x20prompt\x20(and\x20Settings\x20→\x20General\x20→\x20VPN\x20&\x20Device\x20Management).\x20After\x20that\x20the\x20cached\x20authentication\x20is\x20reused.'};if(_0x25200d[_0x183902(0x27e)]('requires\x20a\x20development\x20team')||_0x25200d[_0x183902(0x27e)](_0x183902(0x4f6))||_0x25200d['includes']('code\x20signing\x20error')||_0x25200d['includes']('code\x20sign\x20error')||_0x25200d[_0x183902(0x27e)](_0x183902(0x3ac))||_0x25200d[_0x183902(0x27e)](_0x183902(0x5d1))||_0x25200d['includes']('no\x20profiles\x20for')||_0x25200d[_0x183902(0x27e)]('no\x20provisioning\x20profile')||_0x25200d[_0x183902(0x27e)]('requires\x20a\x20provisioning\x20profile')||_0x25200d['includes']('failed\x20to\x20create\x20provisioning\x20profile')||_0x25200d['includes']('doesn\x27t\x20include\x20a\x20valid\x20provisioning'))return{'summary':_0x183902(0x7b6),'remediation':_0x183902(0x6c3)};if(_0x25200d['includes']('could\x20not\x20locate\x20device\x20support')||_0x25200d[_0x183902(0x27e)](_0x183902(0x958))||_0x25200d['includes']('preparing\x20the\x20device')||_0x25200d[_0x183902(0x27e)](_0x183902(0xa9d)))return{'summary':_0x183902(0xae6),'remediation':_0x183902(0xaa7)};if(_0x25200d[_0x183902(0x27e)]('developer\x20mode'))return{'summary':'Developer\x20Mode\x20is\x20disabled\x20on\x20the\x20device','remediation':_0x183902(0x6cb)};if(_0x25200d[_0x183902(0x27e)](_0x183902(0x676))||_0x25200d['includes'](_0x183902(0x2a3))||_0x25200d['includes'](_0x183902(0x406)))return{'summary':_0x183902(0x487),'remediation':_0x183902(0x6f6)};if(_0x25200d['includes'](_0x183902(0x3cf)))return{'summary':_0x183902(0x8db),'remediation':'Usually\x20the\x20device\x20slept/locked\x20mid-build.\x20Unlock\x20it,\x20set\x20Auto-Lock\x20to\x20Never,\x20and\x20retry.'};return null;}var _0x482f2a=class{constructor(_0x546508=_0x1f0e84){const _0x408739=_0xf8ecb6;this[_0x408739(0x7af)]=_0x546508;}['child']=null;[_0xf8ecb6(0x743)]=null;['inflight']=null;[_0xf8ecb6(0x21a)]=_0xbdd983;['isRunning'](){const _0x306f03=_0xf8ecb6;return this['child']!==null&&this['child'][_0x306f03(0x2c3)]===null;}[_0xf8ecb6(0xa51)](){const _0x487339=_0xf8ecb6;return _0x487339(0x9f4)+this[_0x487339(0x21a)];}async['start'](_0x4da634={}){const _0x41a8ff=_0xf8ecb6;if(this[_0x41a8ff(0x91f)])return this[_0x41a8ff(0x91f)];const _0x58911d=this[_0x41a8ff(0x376)](_0x4da634);this[_0x41a8ff(0x91f)]=_0x58911d;try{return await _0x58911d;}finally{this['inflight']=null;}}async['startInner'](_0x4e5950){const _0x4700dd=_0xf8ecb6;if(await this[_0x4700dd(0x7af)][_0x4700dd(0x585)](this[_0x4700dd(0x21a)],0x7d0))return{'ok':!![],'reason':_0x4700dd(0xaf0),'baseUrl':this[_0x4700dd(0xa51)](),'port':this['port'],'projectPath':this['projectPath']??void 0x0};const _0x17371f=await _0x155cce(this[_0x4700dd(0x7af)]);if(!_0x17371f['ok'])return{'ok':![],'reason':_0x4700dd(0x8a4),'error':_0x17371f['remediation']};const _0x2316af=await _0x1b6966(_0x4e5950[_0x4700dd(0xa8a)]??null,this['deps']);if(!_0x2316af)return{'ok':![],'reason':_0x4700dd(0xb18),'error':'Could\x20not\x20resolve\x20the\x20device\x20hardware\x20UDID\x20for\x20the\x20xcodebuild\x20destination.\x20Plug\x20in\x20your\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac,\x20then\x20retry.\x20To\x20pin\x20it\x20explicitly,\x20set\x20CERAPH_DEVICE_HARDWARE_UDID\x20to\x20the\x20device\x20UDID\x20(the\x20value\x20`iproxy\x20-u`\x20uses,\x20e.g.\x2000008140-001958943A78801C\x20—\x20NOT\x20the\x20CoreDevice\x20id\x20devicectl\x20prints).'};const _0x10dfd7=await this['deps']['run'](_0x4700dd(0x91d),[_0x4700dd(0x7b8)],0xfa0);if(_0x10dfd7['code']!==0x0||_0x10dfd7['stdout'][_0x4700dd(0x668)]()[_0x4700dd(0x3b7)]===0x0)return{'ok':![],'reason':_0x4700dd(0x495),'error':_0x4700dd(0x7a5)};const _0x11ffce=_0x5b780a({'projectPath':_0x17371f[_0x4700dd(0x743)],'hardwareUdid':_0x2316af,'derivedDataPath':_0x4e5950['derivedDataPath']});let _0x501997='';const _0x46f89d=_0x1f6a22=>{const _0x23d468=_0x4700dd;_0x501997+=_0x1f6a22[_0x23d468(0xafa)](),_0x501997['length']>0x5dc0&&(_0x501997=_0x501997[_0x23d468(0x795)](-0x5dc0));};let _0x56cd86;try{_0x56cd86=this['deps'][_0x4700dd(0x21d)](_0x4700dd(0x7b8),_0x11ffce,{'stdio':[_0x4700dd(0x9fa),_0x4700dd(0x9e1),_0x4700dd(0x9e1)]});}catch(_0x25aa29){return{'ok':![],'reason':'xcodebuild-spawn-failed','error':'Failed\x20to\x20spawn\x20xcodebuild:\x20'+(_0x25aa29 instanceof Error?_0x25aa29['message']:String(_0x25aa29))};}this['child']=_0x56cd86,this[_0x4700dd(0x743)]=_0x17371f['projectPath'],_0x56cd86[_0x4700dd(0x790)]?.['on'](_0x4700dd(0x78f),_0x46f89d),_0x56cd86[_0x4700dd(0x910)]?.['on'](_0x4700dd(0x78f),_0x46f89d);const _0x2d0f93=_0x4e5950['readinessTimeoutMs']??0x15f90,_0x5b450a=_0x4e5950[_0x4700dd(0x82b)]??0x3e8,_0x36b8c0=Date[_0x4700dd(0x2f8)]()+_0x2d0f93;let _0x1a3cdc=![];_0x56cd86[_0x4700dd(0x6b8)]('exit',()=>{if(this['child']===_0x56cd86)this['child']=null;_0x1a3cdc=!![];});while(Date[_0x4700dd(0x2f8)]()<_0x36b8c0){if(_0x1a3cdc)break;const _0x431550=await this['deps']['probeStatus'](this[_0x4700dd(0x21a)],0x7d0);if(_0x1a3cdc)break;if(_0x431550)return{'ok':!![],'reason':'started','baseUrl':this['baseUrl'](),'port':this[_0x4700dd(0x21a)],'projectPath':_0x17371f[_0x4700dd(0x743)],'hardwareUdid':_0x2316af};await new Promise(_0x55016e=>setTimeout(_0x55016e,_0x5b450a));}await this['stop']()[_0x4700dd(0x48b)](()=>void 0x0);const _0x55be1f=_0x3df849(_0x501997);if(_0x55be1f)return{'ok':![],'reason':_0x4700dd(0x20a),'error':'WebDriverAgent\x20could\x20not\x20start\x20—\x20'+_0x55be1f['summary']+'.','remediation':_0x55be1f[_0x4700dd(0x638)]};return{'ok':![],'reason':'wda-not-ready','error':_0x1a3cdc?_0x4700dd(0x7a7):'WebDriverAgent\x20did\x20not\x20become\x20reachable\x20on\x20:8100\x20within\x20'+_0x2d0f93+'ms.\x20If\x20this\x20is\x20the\x20first\x20relaunch\x20since\x20a\x20reboot\x20it\x20may\x20just\x20be\x20slow\x20—\x20retry.\x20Otherwise\x20check\x20the\x20device\x20is\x20unlocked\x20and\x20the\x20WDA\x20runner\x20is\x20signed\x20for\x20it.'};}async['stop'](){const _0x937101=_0xf8ecb6,_0x4ab56b=this[_0x937101(0x618)];this['child']=null;if(!_0x4ab56b||_0x4ab56b[_0x937101(0x2c3)]!==null)return{'stopped':![]};try{_0x4ab56b[_0x937101(0x6ee)]('SIGTERM');}catch{return{'stopped':![]};}return await new Promise(_0x2e7f0f=>{const _0x50b7b2=_0x937101;let _0x3657b1=![],_0x854996=null,_0x360119=null;const _0x4cd44b=()=>{if(_0x3657b1)return;_0x3657b1=!![];if(_0x854996)clearTimeout(_0x854996);if(_0x360119)clearTimeout(_0x360119);_0x2e7f0f();};_0x4ab56b['once'](_0x50b7b2(0x68c),_0x4cd44b);if(_0x4ab56b[_0x50b7b2(0x2c3)]!==null){_0x4ab56b[_0x50b7b2(0x411)]('exit',_0x4cd44b),_0x4cd44b();return;}_0x854996=setTimeout(()=>{const _0xbfd621=_0x50b7b2;if(_0x3657b1)return;try{_0x4ab56b['kill'](_0xbfd621(0x58f));}catch{}_0x360119=setTimeout(()=>{const _0x6acab3=_0xbfd621;if(_0x3657b1)return;_0x4ab56b[_0x6acab3(0x411)](_0x6acab3(0x68c),_0x4cd44b),_0x4cd44b();},0x7d0);},0x1388);}),{'stopped':!![]};}};import{spawn as _0x255eff}from'child_process';import*as _0x512d38 from'net';import*as _0x4a2514 from'plist';async function _0x6aefce(_0x484863,_0x3841d8,_0x623b15=0x3a98){return new Promise(_0x47fe88=>{const _0x367da1=_0xc050;if('DAZhk'!=='DAZhk'){if(typeof _0x59355a!=='string'||!_0xf24573(_0x34b1a6))return![];if(typeof _0x592ff0!=='object'||_0x4493b6===null||_0x167d0f[_0x367da1(0x200)](_0x185865))return![];for(const [_0xce086a]of _0x4380ae[_0x367da1(0x42a)](_0xf38fe9)){if(typeof _0xce086a!=='string'||!_0x3b94be(_0xce086a))return![];}}else{let _0x9e7001='',_0x517eef='',_0x546266;try{_0x546266=_0x255eff(_0x484863,_0x3841d8,{'stdio':['ignore',_0x367da1(0x9e1),'pipe']});}catch(_0x18736e){_0x47fe88({'code':0x7f,'stdout':'','stderr':_0x18736e instanceof Error?_0x18736e['message']:String(_0x18736e)});return;}const _0x2be74e=setTimeout(()=>{const _0xf6b563=_0x367da1;try{_0x546266[_0xf6b563(0x6ee)]('SIGKILL');}catch{}},_0x623b15);_0x546266['stdout']?.['on'](_0x367da1(0x78f),_0x2024a5=>{_0x9e7001+=_0x2024a5['toString']();}),_0x546266['stderr']?.['on']('data',_0x426ed3=>{_0x517eef+=_0x426ed3['toString']();});let _0x29c5d6=![];_0x546266['on'](_0x367da1(0x3dd),_0x3dd71b=>{const _0x4fc7d7=_0x367da1;if(_0x29c5d6)return;_0x29c5d6=!![],clearTimeout(_0x2be74e),_0x47fe88({'code':0x7f,'stdout':_0x9e7001,'stderr':_0x517eef+(_0x3dd71b[_0x4fc7d7(0x531)]??String(_0x3dd71b))});}),_0x546266['on'](_0x367da1(0x68c),_0x2b6424=>{if(_0x29c5d6)return;_0x29c5d6=!![],clearTimeout(_0x2be74e),_0x47fe88({'code':_0x2b6424??0x1,'stdout':_0x9e7001,'stderr':_0x517eef});});}});}function _0x4b361e(_0x37ed2f,_0x331543){return new Promise((_0x50693d,_0xba8773)=>{const _0x813302=_0xc050;if(_0x331543?.[_0x813302(0x652)]){_0xba8773(new Error('aborted'));return;}const _0x1cb953=setTimeout(()=>{const _0x43e3e8=_0x813302;if(_0x43e3e8(0x706)==='VQBcW'){if(_0x39e9ad)return;_0x36a636=!![];if(_0x5e6ded)_0x17bfc3(_0xdc0505);if(_0x531893)_0x2e3793(_0x3985f0);_0x249b53();}else _0x331543?.[_0x43e3e8(0x3e6)]('abort',_0x91e2ed),_0x50693d();},_0x37ed2f),_0x91e2ed=()=>{const _0x15d7a6=_0x813302;if('RmhXy'==='RmhXy')clearTimeout(_0x1cb953),_0x331543?.[_0x15d7a6(0x3e6)]('abort',_0x91e2ed),_0xba8773(new Error('aborted'));else throw new _0x377e50(_0x15d7a6(0x852));};_0x331543?.[_0x813302(0x86f)](_0x813302(0x95c),_0x91e2ed,{'once':!![]});});}function _0x53efb2(){return new Promise((_0x30ead2,_0xa4d7bb)=>{const _0x299ff9=_0xc050,_0x5bd0ee=_0x512d38['createConnection'](_0x299ff9(0x263));let _0x498de5=![];_0x5bd0ee[_0x299ff9(0x6b8)](_0x299ff9(0x4eb),()=>{const _0x448a89=_0x299ff9;if(_0x498de5)return;_0x498de5=!![],_0x5bd0ee[_0x448a89(0x5fb)](_0x448a89(0x3dd),_0x27b811),_0x30ead2(_0x5bd0ee);});const _0x27b811=_0x5ae780=>{if(_0x498de5)return;_0x498de5=!![];try{_0x5bd0ee['destroy']();}catch{}_0xa4d7bb(_0x5ae780);};_0x5bd0ee[_0x299ff9(0x6b8)](_0x299ff9(0x3dd),_0x27b811);});}var _0x34394b={'runner':_0x6aefce,'sleep':_0x4b361e,'now':()=>Date['now'](),'openSocket':_0x53efb2},_0x3f7957=0x1,_0x2f16d4=0x8,_0x581038=0x10;function _0xa065e6(_0x965fc=0x1){const _0x3575e9=_0xf8ecb6,_0x381552=_0x4a2514[_0x3575e9(0xb1a)]({'MessageType':_0x3575e9(0x837),'ClientVersionString':'ceraph-react-native-mcp','ProgName':_0x3575e9(0xacd),'kLibUSBMuxVersion':0x3}),_0x8aad8e=Buffer[_0x3575e9(0x56c)](_0x381552,_0x3575e9(0x483)),_0x1cd434=Buffer[_0x3575e9(0x202)](_0x581038);return _0x1cd434['writeUInt32LE'](_0x581038+_0x8aad8e[_0x3575e9(0x3b7)],0x0),_0x1cd434['writeUInt32LE'](_0x3f7957,0x4),_0x1cd434[_0x3575e9(0xaaf)](_0x2f16d4,0x8),_0x1cd434['writeUInt32LE'](_0x965fc,0xc),Buffer['concat']([_0x1cd434,_0x8aad8e]);}var _0xba521c=class{['buf']=Buffer[_0xf8ecb6(0x202)](0x0);[_0xf8ecb6(0x974)](_0x12c8b9){const _0x477984=_0xf8ecb6;this['buf']=this['buf'][_0x477984(0x3b7)]===0x0?_0x12c8b9:Buffer[_0x477984(0x6b1)]([this[_0x477984(0x3dc)],_0x12c8b9]);const _0xd45e29=[];while(this[_0x477984(0x3dc)][_0x477984(0x3b7)]>=_0x581038){const _0x3ac15a=this[_0x477984(0x3dc)]['readUInt32LE'](0x0);if(_0x3ac15a<_0x581038||_0x3ac15a>0x100000)return this[_0x477984(0x3dc)]=Buffer['alloc'](0x0),_0xd45e29;if(this['buf'][_0x477984(0x3b7)]<_0x3ac15a)return _0xd45e29;const _0x737b1=this['buf'][_0x477984(0x8fa)](_0x581038,_0x3ac15a);this[_0x477984(0x3dc)]=this['buf']['subarray'](_0x3ac15a);const _0x2286d8=_0x5cefa3(_0x737b1);if(_0x2286d8)_0xd45e29[_0x477984(0x4d1)]({'payload':_0x2286d8});}return _0xd45e29;}};function _0x5cefa3(_0x46fcfd){const _0x337e6c=_0xf8ecb6;try{const _0x59fab4=_0x46fcfd['toString'](_0x337e6c(0x483)),_0x3755f0=_0x4a2514[_0x337e6c(0x981)](_0x59fab4);if(_0x3755f0&&typeof _0x3755f0==='object'&&!Array['isArray'](_0x3755f0))return _0x3755f0;return null;}catch{return _0x337e6c(0x636)!=='lnpEo'?null:'\x20\x20'+_0x5ae4ce+'\x0a';}}function _0x4aa1c9(_0x6b4e1b){const _0x41dd88=_0xf8ecb6,_0x51ce53=_0x6b4e1b[_0x41dd88(0x899)]?.['devices']??[];if(_0x51ce53['length']===0x0)return null;const _0x48af66=_0x56d7a0=>(_0x56d7a0[_0x41dd88(0x47b)]?.[_0x41dd88(0x729)]?.['toLowerCase']()??'')[_0x41dd88(0x27e)]('ios'),_0x53f587=_0x51ce53['find'](_0x4bb8a2=>{const _0x2e855b=_0x41dd88,_0x462f53=_0x4bb8a2[_0x2e855b(0x8ad)]?.['tunnelState']?.[_0x2e855b(0x5b5)]()??'';return _0x48af66(_0x4bb8a2)&&_0x462f53==='connected';}),_0x4e6aa9=_0x53f587??_0x51ce53[_0x41dd88(0x415)](_0x48af66);if(!_0x4e6aa9?.[_0x41dd88(0x9c9)])return null;return{'udid':_0x4e6aa9[_0x41dd88(0x9c9)],'name':_0x4e6aa9['deviceProperties']?.[_0x41dd88(0x9e5)]??_0x4e6aa9['identifier']};}async function _0x3959c5(_0x247bce){const _0x2db255=_0xf8ecb6,_0x4807f3=await _0x247bce['runner']('xcrun',['devicectl','list',_0x2db255(0x6e2),'--json-output','-'],0x1f40);if(_0x4807f3[_0x2db255(0x3aa)]!==0x0)return null;try{const _0x35508d=JSON['parse'](_0x4807f3[_0x2db255(0x790)]);return _0x4aa1c9(_0x35508d);}catch{return null;}}function _0x39d2de(_0x2506bb){const _0x3547a6=_0xf8ecb6;if(_0x2506bb[_0x3547a6(0x70a)]!=='Attached')return null;const _0x5c343f=_0x2506bb[_0x3547a6(0x48a)];if(!_0x5c343f||typeof _0x5c343f!=='object')return null;const _0x279182=_0x5c343f['SerialNumber'];if(typeof _0x279182!==_0x3547a6(0x30d)||_0x279182[_0x3547a6(0x3b7)]===0x0)return null;const _0x23cee6=_0x5c343f['DeviceName'],_0x3952cd=typeof _0x23cee6==='string'&&_0x23cee6[_0x3547a6(0x3b7)]>0x0?_0x23cee6:void 0x0;return{'udid':_0x279182,'name':_0x3952cd};}async function _0x510e3c(_0x5e4ea7={},_0x4b5260=_0x34394b){const _0x384cf5=_0xf8ecb6,_0x8e17d9=_0x5e4ea7['signal'],_0x980e83=_0x4b5260[_0x384cf5(0x2f8)]??(()=>Date[_0x384cf5(0x2f8)]());if(_0x8e17d9?.['aborted'])throw new Error('aborted');const _0x2909b1=_0x980e83(),_0x1f1bfd=await _0x3959c5(_0x4b5260);if(_0x1f1bfd)return{'deviceFound':!![],'udid':_0x1f1bfd[_0x384cf5(0x5a2)],'name':_0x1f1bfd['name'],'waitedMs':0x0,'source':_0x384cf5(0x22c)};if(_0x8e17d9?.['aborted'])throw new Error(_0x384cf5(0x652));const _0x222efb=_0x4b5260['openSocket']??_0x53efb2;let _0x45a376;try{_0x45a376=await _0x222efb();}catch{return process['stderr']['write']('[ceraph][rn_wait_for_device]\x20usbmuxd\x20socket\x20unavailable;\x20falling\x20back\x20to\x20polling.\x20Install\x20Xcode\x20for\x20sub-second\x20device\x20detection.\x0a'),_0x3b7ecd(_0x5e4ea7,_0x4b5260,_0x2909b1);}return _0x343101(_0x45a376,_0x5e4ea7,_0x4b5260,_0x2909b1);}function _0x343101(_0x45a354,_0x4cfb22,_0x37da5d,_0x5c2415){const _0x571a16=_0xf8ecb6,_0x491dd3=_0x4cfb22['signal'],_0x24cf36=_0x37da5d[_0x571a16(0x2f8)]??(()=>Date[_0x571a16(0x2f8)]());return new Promise((_0x2c73e1,_0x372cd7)=>{const _0x1654e3=_0x571a16;if('XnHBD'!==_0x1654e3(0x5dd)){const _0x287544=new _0xba521c();let _0x4f82fe=![],_0x552daf;const _0x507052=()=>{const _0x347108=_0x1654e3;_0x4f82fe=!![];if(_0x552daf)clearTimeout(_0x552daf);if(_0x491dd3)_0x491dd3['removeEventListener']('abort',_0x48c4d4);try{if(_0x347108(0x7d1)==='FXGUW')throw new _0x2454c6(_0x347108(0x937),_0x347108(0x229)+_0x121260+'\x27\x20is\x20longer\x20than\x2064\x20characters.','Use\x20a\x20short,\x20single-segment\x20subdirectory\x20name.');else _0x45a354['destroy']();}catch{}},_0x35f8d3=_0x3a66c9=>{if(_0x4f82fe)return;_0x507052(),_0x2c73e1(_0x3a66c9);},_0x18c063=_0x44c1fa=>{if(_0x4f82fe)return;_0x507052(),_0x372cd7(_0x44c1fa);},_0x48c4d4=()=>_0x18c063(new Error(_0x1654e3(0x652))),_0x4b35d8=_0x4157b7=>{if(_0x4f82fe)return;_0x507052(),_0x3b7ecd(_0x4cfb22,_0x37da5d,_0x5c2415)['then'](_0x2c73e1,_0x372cd7);},_0x58601c=()=>{if(_0x4f82fe)return;_0x507052(),_0x3b7ecd(_0x4cfb22,_0x37da5d,_0x5c2415)['then'](_0x2c73e1,_0x372cd7);},_0x2d873d=_0x53f5b5=>{const _0xffedd6=_0x1654e3;if(_0x4f82fe)return;const _0x2e34d0=_0x287544[_0xffedd6(0x974)](_0x53f5b5);for(const _0x3c81fc of _0x2e34d0){if('EubQq'!=='EubQq'){if(_0x2873f0['trim']())_0x534e8d[_0xffedd6(0x4d1)](_0x2ba0c1);}else{const _0x4ffd48=_0x39d2de(_0x3c81fc[_0xffedd6(0x35c)]);if(_0x4ffd48){_0x35f8d3({'deviceFound':!![],'udid':_0x4ffd48['udid'],'name':_0x4ffd48['name'],'waitedMs':_0x24cf36()-_0x5c2415,'source':_0xffedd6(0x22c)});return;}}}};_0x45a354['on'](_0x1654e3(0x78f),_0x2d873d),_0x45a354['on']('error',_0x4b35d8),_0x45a354['on']('close',_0x58601c);_0x491dd3&&_0x491dd3[_0x1654e3(0x86f)]('abort',_0x48c4d4,{'once':!![]});if(typeof _0x4cfb22['timeoutMs']==='number'&&_0x4cfb22['timeoutMs']>0x0){const _0x16e0db=_0x4cfb22['timeoutMs']-(_0x24cf36()-_0x5c2415),_0x26ffaa=Math['max'](_0x16e0db,0x0);_0x552daf=setTimeout(()=>{const _0x10cf89=_0x1654e3;_0x18c063(new Error(_0x381efa(_0x4cfb22[_0x10cf89(0x2f9)])));},_0x26ffaa);}try{_0x45a354[_0x1654e3(0xaac)](_0xa065e6());}catch(_0x237245){if(_0x4f82fe)return;_0x507052(),_0x3b7ecd(_0x4cfb22,_0x37da5d,_0x5c2415)[_0x1654e3(0x9c5)](_0x2c73e1,_0x372cd7);}}else _0x3ecab6=0x1f4,_0x459e33=0x3e8;});}function _0x381efa(_0x52dc32){const _0x2d94c1=_0xf8ecb6,_0x129c05=Math['round'](_0x52dc32/0xea60),_0x2c9e56=_0x129c05===0x1?_0x2d94c1(0x864):_0x129c05+_0x2d94c1(0x372);return _0x2d94c1(0x49f)+_0x2c9e56+'.\x20Connect\x20your\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac,\x20then\x20re-run\x20the\x20original\x20tool.';}async function _0x3b7ecd(_0x3e24bb,_0x1829f0,_0x34b572){const _0x36dfc3=_0xf8ecb6,_0x1722d4=_0x3e24bb['fallbackPollIntervalMs']??0x2710,_0x63e46=_0x3e24bb[_0x36dfc3(0x773)],_0x1c6610=_0x1829f0[_0x36dfc3(0x26a)]??_0x4b361e,_0x2fb654=_0x1829f0['now']??(()=>Date['now']());while(!![]){if(_0x63e46?.['aborted'])throw new Error('aborted');if(typeof _0x3e24bb[_0x36dfc3(0x2f9)]==='number'&&_0x3e24bb['timeoutMs']>0x0){if(_0x36dfc3(0xb0a)!=='POFyw'){const _0x482085=_0x2fb654()-_0x34b572,_0x180db1=_0x3e24bb['timeoutMs']-_0x482085;if(_0x180db1<=0x0)throw new Error(_0x381efa(_0x3e24bb['timeoutMs']));const _0x52b832=Math[_0x36dfc3(0x488)](_0x1722d4,_0x180db1);try{await _0x1c6610(_0x52b832,_0x63e46);}catch(_0x2e743f){if(_0x2e743f instanceof Error&&_0x2e743f[_0x36dfc3(0x531)]===_0x36dfc3(0x652))throw _0x2e743f;throw new Error('wait-for-device\x20sleep\x20failed:\x20'+(_0x2e743f instanceof Error?_0x2e743f['message']:String(_0x2e743f)));}}else _0x271870[_0x36dfc3(0x716)]();}else try{if(_0x36dfc3(0x9f3)!==_0x36dfc3(0x9f3))return _0x2fc797[_0x36dfc3(0x39d)];else await _0x1c6610(_0x1722d4,_0x63e46);}catch(_0x165fe1){if(_0x165fe1 instanceof Error&&_0x165fe1[_0x36dfc3(0x531)]==='aborted')throw _0x165fe1;throw new Error(_0x36dfc3(0x3c5)+(_0x165fe1 instanceof Error?_0x165fe1['message']:String(_0x165fe1)));}if(_0x63e46?.[_0x36dfc3(0x652)])throw new Error('aborted');const _0x409439=await _0x3959c5(_0x1829f0);if(_0x409439)return{'deviceFound':!![],'udid':_0x409439['udid'],'name':_0x409439[_0x36dfc3(0x9e5)],'waitedMs':_0x2fb654()-_0x34b572,'source':_0x36dfc3(0x994)};}}import{readdir as _0x3dcd85,rename as _0x4db407,unlink,writeFile as _0x59f795,mkdir as _0x28d6eb,stat as _0x58d22e}from'fs/promises';import{isAbsolute,join as _0x13dac6,relative as _0x3cefbb}from'path';var _0x7bbc80=[_0xf8ecb6(0x79c),'jpeg','png','webp',_0xf8ecb6(0x53b)],_0x17bbb1=_0x13dac6(_0xf8ecb6(0x4b1),'camera-images'),_0x5bf890=0x5*0x400*0x400,_0x136c12=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,_0x33e72e=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,_0x12b47f=class extends Error{[_0xf8ecb6(0x3aa)];[_0xf8ecb6(0x638)];constructor(_0xc8364d,_0xd0d214,_0x266275){const _0x4c17fa=_0xf8ecb6;super(_0xd0d214),this[_0x4c17fa(0x9e5)]='AddCameraImageError',this['code']=_0xc8364d,this[_0x4c17fa(0x638)]=_0x266275;}};function _0x375471(_0x1ad9cf){const _0x5b950f=_0xf8ecb6;if(typeof _0x1ad9cf!=='string'||_0x1ad9cf['length']===0x0){if(_0x5b950f(0x5bc)===_0x5b950f(0x5bc))throw new _0x12b47f('invalid-image-key','imageKey\x20is\x20required.',_0x5b950f(0x6d8));else throw new _0x50aef1('unsupported-image-format',_0x5b950f(0x375),_0x5b950f(0xabe));}if(_0x1ad9cf[_0x5b950f(0x3b7)]>0x40)throw new _0x12b47f(_0x5b950f(0x3f2),_0x5b950f(0x90c)+_0x1ad9cf+_0x5b950f(0x62b),'Keep\x20imageKey\x20short\x20and\x20descriptive\x20(lowercase,\x20hyphen-separated).');if(!_0x136c12['test'](_0x1ad9cf))throw new _0x12b47f('invalid-image-key','imageKey\x20\x27'+_0x1ad9cf+_0x5b950f(0x9b6),'Use\x20only\x20[a-z0-9-],\x20no\x20leading/trailing/consecutive\x20hyphens,\x20no\x20spaces,\x20no\x20uppercase.\x20Example:\x20`handwriting-sample-1`.');}function _0x3c7753(_0x1274e6){const _0x25367d=_0xf8ecb6;if(typeof _0x1274e6!=='string'||_0x1274e6['length']===0x0)throw new _0x12b47f(_0x25367d(0x937),'subDir\x20was\x20provided\x20but\x20is\x20empty.','Either\x20omit\x20`subDir`\x20or\x20pass\x20a\x20single\x20safe\x20path\x20segment\x20(lowercase,\x20hyphen-separated,\x20no\x20slashes).');if(_0x1274e6[_0x25367d(0x3b7)]>0x40)throw new _0x12b47f(_0x25367d(0x937),_0x25367d(0x229)+_0x1274e6+_0x25367d(0x62b),_0x25367d(0x874));if(!_0x33e72e['test'](_0x1274e6))throw new _0x12b47f(_0x25367d(0x937),'subDir\x20\x27'+_0x1274e6+'\x27\x20must\x20be\x20a\x20single\x20lowercase\x20segment.',_0x25367d(0x5de));}function _0x427820(_0x2d023f){const _0x56d19e=_0xf8ecb6;if(_0x2d023f[_0x56d19e(0x3b7)]<0xc)return null;if(_0x2d023f[0x0]===0xff&&_0x2d023f[0x1]===0xd8&&_0x2d023f[0x2]===0xff)return{'ext':_0x56d19e(0x79c),'mime':_0x56d19e(0x850)};if(_0x2d023f[0x0]===0x89&&_0x2d023f[0x1]===0x50&&_0x2d023f[0x2]===0x4e&&_0x2d023f[0x3]===0x47&&_0x2d023f[0x4]===0xd&&_0x2d023f[0x5]===0xa&&_0x2d023f[0x6]===0x1a&&_0x2d023f[0x7]===0xa)return{'ext':'png','mime':'image/png'};if(_0x2d023f[0x0]===0x52&&_0x2d023f[0x1]===0x49&&_0x2d023f[0x2]===0x46&&_0x2d023f[0x3]===0x46&&_0x2d023f[0x8]===0x57&&_0x2d023f[0x9]===0x45&&_0x2d023f[0xa]===0x42&&_0x2d023f[0xb]===0x50)return{'ext':'webp','mime':'image/webp'};if(_0x2d023f[0x4]===0x66&&_0x2d023f[0x5]===0x74&&_0x2d023f[0x6]===0x79&&_0x2d023f[0x7]===0x70){const _0x4ae34c=String['fromCharCode'](_0x2d023f[0x8]??0x0,_0x2d023f[0x9]??0x0,_0x2d023f[0xa]??0x0,_0x2d023f[0xb]??0x0),_0xe76829=new Set(['heic','heix',_0x56d19e(0x921),_0x56d19e(0x7d0),'heim',_0x56d19e(0x234),_0x56d19e(0x334),_0x56d19e(0x3b0)]);if(_0xe76829[_0x56d19e(0x979)](_0x4ae34c))return{'ext':'heic','mime':_0x56d19e(0x6a4)};}return null;}function _0x24ca8d(_0x2358e1){const _0x18f0c0=_0xf8ecb6;if(!_0x2358e1||typeof _0x2358e1!==_0x18f0c0(0x30d))return null;const _0x4f5ed=_0x2358e1[_0x18f0c0(0x668)]()['toLowerCase']();if(_0x4f5ed[_0x18f0c0(0x3b7)]===0x0)return null;let _0x2f4380=_0x4f5ed;if(_0x2f4380['startsWith'](_0x18f0c0(0x816)))_0x2f4380=_0x2f4380['slice'](_0x18f0c0(0x816)[_0x18f0c0(0x3b7)]);if(_0x2f4380[_0x18f0c0(0x746)]('.'))_0x2f4380=_0x2f4380[_0x18f0c0(0x795)](0x1);const _0x49e466=_0x2f4380['indexOf'](';');if(_0x49e466>=0x0)_0x2f4380=_0x2f4380[_0x18f0c0(0x795)](0x0,_0x49e466)['trim']();if(_0x2f4380==='jpeg'||_0x2f4380===_0x18f0c0(0x79c))return _0x18f0c0(0x79c);if(_0x2f4380==='png')return'png';if(_0x2f4380===_0x18f0c0(0x660))return _0x18f0c0(0x660);if(_0x2f4380==='heic'||_0x2f4380==='heif')return'heic';return null;}async function _0x417f2(_0x183ec9,_0x45be6b){let _0xe1bb19;try{const _0x4404cf=await _0x58d22e(_0x183ec9);if(!_0x4404cf['isDirectory']())return null;_0xe1bb19=await _0x3dcd85(_0x183ec9);}catch{return null;}const _0x562099=_0x45be6b['toLowerCase']();for(const _0xa875b4 of _0xe1bb19){const _0xf6c185=_0xa875b4['lastIndexOf']('.');if(_0xf6c185<=0x0)continue;const _0x7273da=_0xa875b4['slice'](0x0,_0xf6c185);if(_0x7273da['toLowerCase']()!==_0x562099)continue;const _0x126b64=_0xa875b4['slice'](_0xf6c185)['toLowerCase'](),_0x4d3414=_0x126b64['startsWith']('.')?_0x126b64['slice'](0x1):_0x126b64;if(!_0x7bbc80['includes'](_0x4d3414))continue;return{'absolutePath':_0x13dac6(_0x183ec9,_0xa875b4),'ext':_0x4d3414};}return null;}async function _0x164c0b(_0x4a7a14,_0x907683,_0x38af38={}){const _0x31b290=_0xf8ecb6,{imageKey:_0x15bde5,imageBase64:_0x988066,contentType:_0x58632e,overwrite:_0x2a37f4,subDir:_0x5bc884}=_0x907683,_0x2cfa2c=_0x38af38[_0x31b290(0x210)]??_0x112a0a;_0x375471(_0x15bde5);_0x5bc884!==void 0x0&&_0x5bc884!==''&&_0x3c7753(_0x5bc884);if(typeof _0x988066!==_0x31b290(0x30d)||_0x988066['length']===0x0)throw new _0x12b47f(_0x31b290(0x641),'imageBase64\x20is\x20required\x20and\x20must\x20be\x20a\x20non-empty\x20string.','Pass\x20the\x20base64-encoded\x20image\x20bytes\x20(without\x20a\x20`data:`\x20prefix).');const _0x3865f5=_0x988066[_0x31b290(0x746)](_0x31b290(0x544))?_0x988066['slice'](_0x988066['indexOf'](',')+0x1):_0x988066,_0x3f5b4e=Math['ceil'](_0x5bf890*0x4/0x3)+0x20;if(_0x3865f5[_0x31b290(0x3b7)]>_0x3f5b4e){if(_0x31b290(0x384)!==_0x31b290(0xa82)){const _0x2e1568=(_0x3865f5['length']*0x3/0x4/(0x400*0x400))[_0x31b290(0x5c0)](0x2);throw new _0x12b47f(_0x31b290(0x87e),'Encoded\x20payload\x20is\x20~'+_0x2e1568+'\x20MB\x20which\x20exceeds\x20the\x205\x20MB\x20cap.',_0x31b290(0x39a));}else _0x56b2d2=![];}const _0x130c62=Buffer['from'](_0x3865f5,'base64');if(_0x130c62[_0x31b290(0x3b7)]===0x0)throw new _0x12b47f('invalid-base64','imageBase64\x20decoded\x20to\x20zero\x20bytes.',_0x31b290(0x430));if(_0x130c62[_0x31b290(0x3b7)]>_0x5bf890){const _0xf3b704=(_0x130c62['length']/(0x400*0x400))['toFixed'](0x2);throw new _0x12b47f(_0x31b290(0x87e),_0x31b290(0x23e)+_0xf3b704+_0x31b290(0x8d0),_0x31b290(0x698));}const _0x5c336e=_0x427820(new Uint8Array(_0x130c62[_0x31b290(0x5c9)],_0x130c62[_0x31b290(0x947)],_0x130c62['byteLength']));if(!_0x5c336e)throw new _0x12b47f(_0x31b290(0x596),'Could\x20not\x20detect\x20a\x20supported\x20image\x20format\x20from\x20the\x20decoded\x20bytes.','Supported\x20formats:\x20JPEG,\x20PNG,\x20WebP,\x20HEIC.\x20Re-export\x20the\x20image\x20in\x20one\x20of\x20these\x20and\x20try\x20again.');const _0x7be041=[];if(_0x58632e!==void 0x0&&_0x58632e!==''){const _0x54d3d2=_0x24ca8d(_0x58632e);if(_0x54d3d2===null)_0x7be041[_0x31b290(0x4d1)]({'code':_0x31b290(0x53e),'message':'contentType\x20\x27'+_0x58632e+_0x31b290(0x50e)+_0x5c336e[_0x31b290(0x8e2)]+_0x31b290(0x9fb)});else _0x54d3d2!==_0x5c336e[_0x31b290(0x208)]&&_0x7be041['push']({'code':_0x31b290(0xaf9),'message':'Declared\x20contentType\x20\x27'+_0x58632e+'\x27\x20does\x20not\x20match\x20detected\x20\x27'+_0x5c336e['mime']+_0x31b290(0xb0f)});}if(_0x130c62['length']>0x1*0x400*0x400){const _0x5bb47b=(_0x130c62['length']/(0x400*0x400))['toFixed'](0x2);_0x7be041['push']({'code':_0x31b290(0x4f3),'message':_0x31b290(0x23e)+_0x5bb47b+_0x31b290(0x79d)});}const _0x582d08=_0x13dac6(_0x4a7a14,_0x17bbb1),_0x4a2f5a=_0x5bc884!==void 0x0&&_0x5bc884!==''?_0x13dac6(_0x582d08,_0x5bc884):_0x582d08,_0x5538e9=_0x3cefbb(_0x582d08,_0x4a2f5a);if(_0x5538e9['startsWith']('..')||isAbsolute(_0x5538e9)||_0x5538e9['includes']('\x00'))throw new _0x12b47f('path-traversal',_0x31b290(0xa4e)+_0x4a2f5a,'Pass\x20a\x20single\x20safe\x20segment\x20for\x20subDir\x20(lowercase,\x20hyphens,\x20no\x20slashes,\x20no\x20`..`).');const _0x308f7d=_0x5c336e[_0x31b290(0x208)],_0x500ec8=_0x13dac6(_0x4a2f5a,_0x15bde5+'.'+_0x308f7d),_0x4bf88c=await _0x417f2(_0x4a2f5a,_0x15bde5);let _0x1f3ba4,_0x4b5986=![];if(_0x4bf88c){if(!_0x2a37f4){const _0x36253a=_0x3cefbb(_0x4a7a14,_0x4bf88c['absolutePath']);throw new _0x12b47f('collision','The\x20imageKey\x20\x27'+_0x15bde5+_0x31b290(0x658)+_0x36253a+'.','Pass\x20`overwrite:\x20true`\x20to\x20replace\x20it,\x20or\x20pick\x20a\x20different\x20imageKey.');}_0x4b5986=!![];}await _0x28d6eb(_0x4a2f5a,{'recursive':!![]});if(_0x4bf88c&&_0x4bf88c['ext']===_0x308f7d&&_0x4bf88c[_0x31b290(0x75c)]!==_0x500ec8&&_0x4bf88c[_0x31b290(0x75c)][_0x31b290(0x5b5)]()===_0x500ec8[_0x31b290(0x5b5)]())try{if(_0x31b290(0x66e)!=='XoPpp')return{'changed':![],'previousScheme':void 0x0,'nextScheme':void 0x0};else await _0x4db407(_0x4bf88c['absolutePath'],_0x500ec8);}catch(_0x3f2460){void _0x3f2460;}await _0x59f795(_0x500ec8,_0x130c62);if(_0x4bf88c){if('ReVmS'!==_0x31b290(0x414)){const _0x4dec99=_0x4bf88c['absolutePath'],_0x232965=_0x500ec8,_0xcf4b00=_0x4dec99[_0x31b290(0x5b5)]()===_0x232965['toLowerCase'](),_0xd470a3=_0x4bf88c[_0x31b290(0x208)]!==_0x308f7d,_0x3a240d=!_0xcf4b00&&_0x4dec99!==_0x232965;if(!_0xcf4b00&&(_0xd470a3||_0x3a240d))try{await unlink(_0x4dec99),_0x1f3ba4=_0x3cefbb(_0x4a7a14,_0x4dec99);}catch(_0xa94427){throw new _0x12b47f('unlink-failed','New\x20image\x20was\x20written\x20but\x20failed\x20to\x20remove\x20stale\x20'+_0x3cefbb(_0x4a7a14,_0x4dec99)+':\x20'+(_0xa94427 instanceof Error?_0xa94427[_0x31b290(0x531)]:String(_0xa94427)),'Remove\x20the\x20stale\x20file\x20manually\x20so\x20the\x20imageKey\x20is\x20not\x20backed\x20by\x20two\x20files.');}}else return _0x153bee(_0x58d535);}let _0x446f50;try{_0x446f50=await _0x2cfa2c(_0x4a7a14);}catch(_0x5eaafb){throw new _0x12b47f('registry-sync-failed','Image\x20was\x20written\x20but\x20registry\x20sync\x20failed:\x20'+(_0x5eaafb instanceof Error?_0x5eaafb[_0x31b290(0x531)]:String(_0x5eaafb)),_0x31b290(0xb1c));}return{'written':_0x3cefbb(_0x4a7a14,_0x500ec8),'registry':_0x1718c0(_0x4a7a14,_0x446f50['registryPath']),'registered':_0x446f50['registered'][_0x31b290(0x86b)](_0xa8cb1f=>_0xa8cb1f['key']),'detectedContentType':_0x5c336e[_0x31b290(0x8e2)],'detectedExt':_0x5c336e[_0x31b290(0x208)],'replaced':_0x4b5986,'removedSiblingPath':_0x1f3ba4,'bytes':_0x130c62['length'],'warnings':_0x7be041,'registryState':_0x446f50[_0x31b290(0x36a)]};}import{createServer as _0x52e31b}from'http';var _0x4029aa=0x1fa5,_0xfadaa9=0x80*0x400,_0x325e65=0x40*0x400,_0x28a6e2=0x100*0x400,_0x302ded=0xc8,_0x176953=new Set([_0xf8ecb6(0x87f),_0xf8ecb6(0xa25),_0xf8ecb6(0x215),'network-error',_0xf8ecb6(0x763),'mutation-fired','optimistic-rollback',_0xf8ecb6(0x858),_0xf8ecb6(0x60c)]),_0x229267='boot-request',_0x1b8de6=_0xf8ecb6(0x699),_0x35f448=_0xf8ecb6(0x9f0),_0x2cebe6=_0xf8ecb6(0x510),_0x17c290=0x64,_0x194dfe=_0xf8ecb6(0x2f1);function _0x3f573f(_0x4c0095){const _0x4ae5a9=_0xf8ecb6;if(_0x4c0095['ok'])return{'message':'Signal\x20listener\x20bound\x20on\x20port\x20'+_0x4c0095[_0x4ae5a9(0x21a)],'fatal':![],'status':_0x4ae5a9(0x609)};if(_0x4c0095['errorCode']==='EADDRINUSE')return{'message':_0x4ae5a9(0x55f)+_0x4c0095['port']+_0x4ae5a9(0x723)+_0x4c0095[_0x4ae5a9(0x21a)]+_0x4ae5a9(0x571),'fatal':![],'status':'port-conflict'};return{'message':_0x4ae5a9(0x3c2)+_0x4c0095['port']+':\x20'+_0x4c0095['error']+_0x4ae5a9(0x2bc),'fatal':![],'status':'bind-failed'};}var _0x198939=0x1f40,_0x2fdbde=class{constructor(_0x5c1101,_0x222bc0={}){const _0xfffc65=_0xf8ecb6;this['rnManager']=_0x5c1101,this[_0xfffc65(0x21a)]=_0x222bc0[_0xfffc65(0x21a)]??_0x4029aa,this['hostOverride']=_0x222bc0['host']??null,this[_0xfffc65(0x4b6)]=_0x222bc0[_0xfffc65(0x4b6)];}[_0xf8ecb6(0x99d)]=null;[_0xf8ecb6(0x21a)];['hostOverride'];['bootCaptureMode']=![];['bootBuffer']=[];['bootBufferBytes']=0x0;['asyncStorageReadBuffer']=[];['bootWriteCount']=0x0;['pendingStorageAckResolver']=null;['pendingStorageAckResolvers']=new Map();['latestTestIdSentinel']=null;[_0xf8ecb6(0x4b6)];[_0xf8ecb6(0x978)]=[];['pendingCommandAcks']=new Map();[_0xf8ecb6(0x983)]=0x0;[_0xf8ecb6(0xa1a)]=null;['setOnSignal'](_0x4db4af){this['onSignal']=_0x4db4af;}[_0xf8ecb6(0x47e)](_0x3f044b){const _0x294fca=_0xf8ecb6;this[_0x294fca(0x983)]+=0x1;const _0xf0e092='cmd-'+this[_0x294fca(0x983)]+'-'+_0x3f044b;return this[_0x294fca(0x978)][_0x294fca(0x4d1)]({'id':_0xf0e092,'type':_0x3f044b}),new Promise(_0x183cf2=>{const _0x45119d=_0x294fca,_0x554a6b=setTimeout(()=>{this['pendingCommandAcks']['delete'](_0xf0e092),this['commandQueue']=this['commandQueue']['filter'](_0x3164f2=>_0x3164f2['id']!==_0xf0e092),_0x183cf2({'acked':![]});},_0x198939);_0x554a6b[_0x45119d(0x2d6)]?.(),this[_0x45119d(0x6f3)][_0x45119d(0x93e)](_0xf0e092,{'resolve':_0x49ebc9=>_0x183cf2({'acked':!![],'ok':_0x49ebc9['ok'],'detail':_0x49ebc9[_0x45119d(0x363)]}),'timer':_0x554a6b});});}[_0xf8ecb6(0xad0)](){const _0x2e1c41=this['commandQueue'];return this['commandQueue']=[],_0x2e1c41;}[_0xf8ecb6(0x50d)](_0x47f50f){const _0x4b09b0=_0xf8ecb6,_0x3024ba=this[_0x4b09b0(0x6f3)]['get'](_0x47f50f['id']);if(!_0x3024ba)return;clearTimeout(_0x3024ba['timer']),this['pendingCommandAcks']['delete'](_0x47f50f['id']),_0x3024ba['resolve'](_0x47f50f);}[_0xf8ecb6(0x972)](_0x4c8df6){const _0x507391=_0xf8ecb6;if(_0x4c8df6){this['bootBuffer']=[],this['bootBufferBytes']=0x0,this['bootWriteCount']=0x0,this['asyncStorageReadBuffer']=[],this[_0x507391(0x814)]=!![];return;}this[_0x507391(0x814)]=![];}[_0xf8ecb6(0x5c4)](){const _0x7c7e96=_0xf8ecb6;return this['asyncStorageReadBuffer'][_0x7c7e96(0x795)]();}async[_0xf8ecb6(0x679)](_0x53c0ae){const _0x471fe9=_0xf8ecb6;await this['rnManager'][_0x471fe9(0x564)](_0x53c0ae);if(this[_0x471fe9(0x4b6)])try{this[_0x471fe9(0x4b6)](_0x53c0ae);}catch{}}['getLatestTestIdSentinel'](){return this['latestTestIdSentinel'];}[_0xf8ecb6(0xaef)](){return this['bootWriteCount'];}[_0xf8ecb6(0x9dd)](){const _0x253964=_0xf8ecb6;return this[_0x253964(0x4e7)][_0x253964(0x795)]();}['clearBootRequests'](){const _0x1854f4=_0xf8ecb6;this[_0x1854f4(0x4e7)]=[],this[_0x1854f4(0x6ca)]=0x0,this[_0x1854f4(0x8a0)]=[];}async[_0xf8ecb6(0x5cf)](){const _0x59485c=this['hostOverride']??_0x194dfe;return new Promise(_0x4288ae=>{const _0x3fd826=_0xc050,_0x5f4d13=_0x52e31b((_0x1f68f2,_0x1b2e57)=>this['handle'](_0x1f68f2,_0x1b2e57));_0x5f4d13[_0x3fd826(0x6b8)]('error',_0x6969d=>{const _0xcb539c=_0x3fd826;_0x5f4d13[_0xcb539c(0x716)](()=>{}),_0x4288ae({'ok':![],'port':this['port'],'error':_0x6969d['message']??_0x6969d[_0xcb539c(0x3aa)]??'listen\x20failed','errorCode':_0x6969d[_0xcb539c(0x3aa)]});}),_0x5f4d13['listen'](this['port'],_0x59485c,()=>{const _0x22e9f9=_0x3fd826;this[_0x22e9f9(0x99d)]=_0x5f4d13,_0x4288ae({'ok':!![],'port':this[_0x22e9f9(0x21a)]});});});}[_0xf8ecb6(0x775)](){const _0x247a42=_0xf8ecb6;return this[_0x247a42(0xa1a)]!==null;}[_0xf8ecb6(0x74c)](){return this['server']!==null;}async['ensureListening'](){if(this['server']!==null)return{'ok':!![],'port':this['port']};return this['start']();}async['stop'](){const _0x54d9d9=_0xf8ecb6,_0x1bfdf4=this['server'];if(!_0x1bfdf4)return;this[_0x54d9d9(0x99d)]=null,await new Promise(_0x867b82=>_0x1bfdf4['close'](()=>_0x867b82()));}async[_0xf8ecb6(0x71a)](_0x3179a7){return this['appendIfValid'](_0x3179a7);}[_0xf8ecb6(0xa96)](){const _0x39a5f8=_0xf8ecb6;return this[_0x39a5f8(0xad0)]();}['ackForTesting'](_0x45e6d7){const _0x4ffef9=_0xf8ecb6;this[_0x4ffef9(0x50d)](_0x45e6d7);}async[_0xf8ecb6(0x6c2)](_0x68343,_0x546780){const _0x55ee9b=_0xf8ecb6;this[_0x55ee9b(0xa1a)]=Date['now']();if(_0x68343[_0x55ee9b(0x33a)]==='GET'&&_0x68343['url']==='/commands'){const _0x449343=this['drainCommands']();_0x546780[_0x55ee9b(0x66c)]=0xc8,_0x546780[_0x55ee9b(0x96a)](_0x55ee9b(0x2dc),'application/json'),_0x546780[_0x55ee9b(0x5b3)](JSON['stringify']({'commands':_0x449343}));return;}if(_0x68343['method']==='POST'&&_0x68343['url']===_0x55ee9b(0x30c)){const _0xf451c9=await this['readBody'](_0x68343)[_0x55ee9b(0x48b)](_0x2dc84c=>({'tooLarge':![],'err':_0x2dc84c}));if('err'in _0xf451c9||_0xf451c9['tooLarge']){_0x546780[_0x55ee9b(0x66c)]=0x190,_0x546780[_0x55ee9b(0x5b3)](JSON['stringify']({'ok':![]}));return;}try{const _0x2ba3d3=JSON[_0x55ee9b(0x981)](_0xf451c9[_0x55ee9b(0x3e0)]);typeof _0x2ba3d3['id']==='string'&&this['resolveCommandAck']({'id':_0x2ba3d3['id'],'ok':_0x2ba3d3['ok']===!![],'detail':typeof _0x2ba3d3['detail']==='string'?_0x2ba3d3['detail']:void 0x0});}catch{}_0x546780['statusCode']=0xcc,_0x546780['end']();return;}if(_0x68343[_0x55ee9b(0x33a)]!==_0x55ee9b(0x513)||_0x68343[_0x55ee9b(0x269)]!==_0x55ee9b(0xb08)){_0x546780['statusCode']=0x194,_0x546780['end']();return;}const _0x2e0436=await this['readBody'](_0x68343)[_0x55ee9b(0x48b)](_0x49ae01=>({'tooLarge':![],'err':_0x49ae01}));if('err'in _0x2e0436){_0x546780['statusCode']=0x190,_0x546780['end'](JSON[_0x55ee9b(0x312)]({'ok':![],'error':_0x2e0436['err']['message']}));return;}if(_0x2e0436['tooLarge']){_0x546780[_0x55ee9b(0x66c)]=0x19d,_0x546780['end'](JSON['stringify']({'ok':![],'error':_0x55ee9b(0x884)}));return;}let _0x2044bf;try{_0x2044bf=JSON[_0x55ee9b(0x981)](_0x2e0436['text']);}catch(_0x1021d4){if(_0x55ee9b(0xa69)!=='qwTKj')_0x3bb9c6=_0x534fb8['tier'];else{_0x546780['statusCode']=0x190,_0x546780[_0x55ee9b(0x5b3)](JSON[_0x55ee9b(0x312)]({'ok':![],'error':_0x1021d4[_0x55ee9b(0x531)]}));return;}}const _0x14ce19=await this['appendIfValid'](_0x2044bf);if(!_0x14ce19['ok']){_0x546780[_0x55ee9b(0x66c)]=0x190,_0x546780[_0x55ee9b(0x5b3)](JSON['stringify'](_0x14ce19));return;}_0x546780['statusCode']=0xcc,_0x546780['end']();}async[_0xf8ecb6(0x56b)](_0x20223d){const _0x155bec=_0xf8ecb6;if(!_0x20223d||typeof _0x20223d!=='object'){if('BYXGH'!=='ExJgs')return{'ok':![],'error':'payload\x20must\x20be\x20an\x20object'};else{const _0x3d7a37=_0x5c127f[_0x155bec(0x981)](_0xc3d550[_0x155bec(0x790)]),_0x25961c=(_0x3d7a37['result']?.[_0x155bec(0x508)]??[])['filter'](_0x20528e=>!!_0x20528e[_0x155bec(0x476)])[_0x155bec(0x86b)](_0x2cbeb1=>({'bundleId':_0x2cbeb1['bundleIdentifier'],'name':_0x2cbeb1[_0x155bec(0x9e5)]??_0x2cbeb1[_0x155bec(0x476)],'version':_0x2cbeb1['shortVersionString']??_0x2cbeb1['version']}));return this['installedAppsCache']={'at':_0x38f2bd[_0x155bec(0x2f8)](),'key':_0x1b43c0,'apps':_0x25961c},{'success':!![],'apps':_0x25961c};}}const _0x27e959=_0x20223d;if(_0x27e959['kind']===_0x229267)return this['recordBootRequest'](_0x27e959);if(_0x27e959['kind']===_0x1b8de6)return this['recordAsyncStorageRead'](_0x27e959);if(_0x27e959[_0x155bec(0xb14)]===_0x35f448)return this[_0x155bec(0x9e6)](_0x27e959);if(_0x27e959['kind']===_0x2cebe6)return this[_0x155bec(0x66a)]={'pluginVersion':typeof _0x27e959[_0x155bec(0x371)]==='string'?_0x27e959['pluginVersion']:void 0x0,'babelConfigHash':typeof _0x27e959['babelConfigHash']===_0x155bec(0x30d)?_0x27e959['babelConfigHash']:void 0x0,'timestampMs':Date[_0x155bec(0x2f8)]()},{'ok':!![]};if(typeof _0x27e959[_0x155bec(0x531)]!==_0x155bec(0x30d)||_0x27e959[_0x155bec(0x531)]['length']===0x0)return{'ok':![],'error':_0x155bec(0x99f)};if(typeof _0x27e959[_0x155bec(0xb14)]!=='string'||!_0x176953[_0x155bec(0x979)](_0x27e959['kind']))return{'ok':![],'error':_0x155bec(0x32d)+String(_0x27e959['kind'])};const _0x11761f=typeof _0x27e959[_0x155bec(0x719)]===_0x155bec(0x2af)&&Number['isFinite'](_0x27e959[_0x155bec(0x719)])?new Date(_0x27e959['timestampMs'])[_0x155bec(0x471)]():new Date()[_0x155bec(0x471)](),_0x511bec={'message':_0x27e959[_0x155bec(0x531)],'stack':typeof _0x27e959['stack']==='string'?_0x27e959['stack']:'','timestamp':_0x11761f,'kind':_0x27e959['kind'],'url':typeof _0x27e959[_0x155bec(0x269)]==='string'?_0x27e959[_0x155bec(0x269)]:void 0x0,'status':typeof _0x27e959[_0x155bec(0x428)]==='number'?_0x27e959[_0x155bec(0x428)]:void 0x0,'method':typeof _0x27e959[_0x155bec(0x33a)]===_0x155bec(0x30d)?_0x27e959['method']:void 0x0,'durationMs':typeof _0x27e959[_0x155bec(0x270)]===_0x155bec(0x2af)?_0x27e959['durationMs']:void 0x0,'elementKey':typeof _0x27e959[_0x155bec(0xa9a)]===_0x155bec(0x30d)?_0x27e959[_0x155bec(0xa9a)]:void 0x0,'prevText':typeof _0x27e959[_0x155bec(0x9a5)]==='string'?_0x27e959['prevText']:void 0x0,'nextText':typeof _0x27e959['nextText']==='string'?_0x27e959['nextText']:void 0x0};await this['rnManager']['appendShimSignal'](_0x511bec);if(this['onSignal'])try{this['onSignal'](_0x511bec);}catch{}return{'ok':!![]};}[_0xf8ecb6(0xabd)](_0x309f37){const _0x57260b=_0xf8ecb6;if(!this['bootCaptureMode'])return{'ok':!![]};if(typeof _0x309f37[_0x57260b(0x269)]!=='string'||_0x309f37[_0x57260b(0x269)][_0x57260b(0x3b7)]===0x0)return{'ok':![],'error':_0x57260b(0x597)};const _0x9bc288=typeof _0x309f37[_0x57260b(0x33a)]===_0x57260b(0x30d)&&_0x309f37[_0x57260b(0x33a)][_0x57260b(0x3b7)]>0x0?_0x309f37[_0x57260b(0x33a)][_0x57260b(0x57c)]():_0x57260b(0x685),_0x164316=typeof _0x309f37[_0x57260b(0x719)]===_0x57260b(0x2af)&&Number['isFinite'](_0x309f37[_0x57260b(0x719)])?new Date(_0x309f37[_0x57260b(0x719)])[_0x57260b(0x471)]():new Date()['toISOString'](),_0x12dc59=_0x325758(_0x309f37[_0x57260b(0x269)]);let _0x543f5d;if(typeof _0x309f37[_0x57260b(0x686)]==='string'&&_0x309f37[_0x57260b(0x686)][_0x57260b(0x3b7)]>0x0){const _0x190dd9=Buffer['byteLength'](_0x309f37[_0x57260b(0x686)],'utf8');if(_0x190dd9<=_0x325e65)'TYiWr'!=='TYiWr'?this['inflight']=null:_0x543f5d=_0x309f37[_0x57260b(0x686)];else{const _0x4f5d9b='…',_0x5dce81=Buffer[_0x57260b(0x901)](_0x4f5d9b,_0x57260b(0x483)),_0x2c8de0=Buffer['from'](_0x309f37[_0x57260b(0x686)],'utf8')[_0x57260b(0x8fa)](0x0,_0x325e65-_0x5dce81)['toString'](_0x57260b(0x483))['replace'](/�+$/,'');_0x543f5d=''+_0x2c8de0+_0x4f5d9b;}}const _0x418683={'method':_0x9bc288,'path':_0x12dc59,...typeof _0x309f37[_0x57260b(0x428)]==='number'?{'status':_0x309f37['status']}:{},...typeof _0x309f37[_0x57260b(0x270)]===_0x57260b(0x2af)?{'durationMs':_0x309f37['durationMs']}:{},..._0x543f5d?{'response':_0x543f5d}:{},'timestamp':_0x164316},_0x544778=_0x543f5d?Buffer[_0x57260b(0x901)](_0x543f5d,_0x57260b(0x483)):0x0;this['bootBuffer']['push'](_0x418683),this[_0x57260b(0x6ca)]+=_0x544778,this[_0x57260b(0xb1e)]+=0x1;while(this['bootBuffer'][_0x57260b(0x3b7)]>_0x302ded||this['bootBufferBytes']>_0x28a6e2){const _0x543b07=this['bootBuffer'][_0x57260b(0x9a6)]();if(!_0x543b07)break;this['bootBufferBytes']-=_0x543b07[_0x57260b(0x90e)]?Buffer[_0x57260b(0x901)](_0x543b07['response'],_0x57260b(0x483)):0x0;if(this[_0x57260b(0x6ca)]<0x0)this['bootBufferBytes']=0x0;}return{'ok':!![]};}['recordAsyncStorageRead'](_0x3b2eff){const _0x5f2d33=_0xf8ecb6;if(!this[_0x5f2d33(0x814)])return{'ok':!![]};if(typeof _0x3b2eff['key']!=='string'||_0x3b2eff[_0x5f2d33(0x88a)][_0x5f2d33(0x3b7)]===0x0)return{'ok':![],'error':'async-storage-read\x20requires\x20`key`'};const _0x4c18e4=typeof _0x3b2eff[_0x5f2d33(0x719)]==='number'&&Number['isFinite'](_0x3b2eff['timestampMs'])?new Date(_0x3b2eff[_0x5f2d33(0x719)])[_0x5f2d33(0x471)]():new Date()['toISOString'](),_0x358278=typeof _0x3b2eff[_0x5f2d33(0x531)]===_0x5f2d33(0x30d)&&_0x3b2eff[_0x5f2d33(0x531)]['length']>0x0?_0x3b2eff[_0x5f2d33(0x531)]:'unknown',_0x4145b8={'key':_0x3b2eff['key'],'valueShape':_0x358278,'timestamp':_0x4c18e4,...typeof _0x3b2eff['valueHash']==='string'&&_0x3b2eff[_0x5f2d33(0x670)][_0x5f2d33(0x3b7)]>0x0?{'valueHash':_0x3b2eff[_0x5f2d33(0x670)]}:{}};this['asyncStorageReadBuffer'][_0x5f2d33(0x4d1)](_0x4145b8);while(this['asyncStorageReadBuffer']['length']>_0x17c290){this[_0x5f2d33(0x8a0)]['shift']();}return{'ok':!![]};}['recordStorageAck'](_0x2c41d6){const _0x1b8e69=_0xf8ecb6;if(typeof _0x2c41d6['storageAckSuccess']!==_0x1b8e69(0xa6d)){if(_0x1b8e69(0x45b)!==_0x1b8e69(0x45b))_0x29e0fe=_0x85c277[_0x1b8e69(0x981)](_0x32bf2c[_0x1b8e69(0x3e0)]);else return{'ok':![],'error':_0x1b8e69(0x20e)};}if(typeof _0x2c41d6[_0x1b8e69(0x470)]!==_0x1b8e69(0x2af)||!Number['isFinite'](_0x2c41d6[_0x1b8e69(0x470)]))return{'ok':![],'error':_0x1b8e69(0x9c8)};const _0x3f4972={'success':_0x2c41d6[_0x1b8e69(0x24a)],'count':_0x2c41d6[_0x1b8e69(0x470)],...Array[_0x1b8e69(0x200)](_0x2c41d6['storageAckKeys'])?{'keys':_0x2c41d6[_0x1b8e69(0xa0c)][_0x1b8e69(0x529)](_0x58a287=>typeof _0x58a287===_0x1b8e69(0x30d))}:{}},_0x5496ef=typeof _0x2c41d6[_0x1b8e69(0x9ec)]==='string'&&_0x2c41d6['storageAckRequestId']['length']>0x0?_0x2c41d6['storageAckRequestId']:void 0x0;if(_0x5496ef){const _0x24a0e5=this['pendingStorageAckResolvers']['get'](_0x5496ef);return _0x24a0e5&&(this[_0x1b8e69(0xa47)]['delete'](_0x5496ef),_0x24a0e5(_0x3f4972)),{'ok':!![]};}const _0x34831b=this['pendingStorageAckResolver'];return _0x34831b&&(this['pendingStorageAckResolver']=null,_0x34831b(_0x3f4972)),{'ok':!![]};}[_0xf8ecb6(0x49a)](_0x547e6e,_0x2a72e6){return new Promise((_0x16d594,_0x258240)=>{const _0x374833=_0xc050;let _0x4bb249=null;const _0x4ce6fd=setTimeout(()=>{const _0x3ff8c5=_0xc050;if(_0x2a72e6)this['pendingStorageAckResolvers'][_0x3ff8c5(0x3fd)](_0x2a72e6)===_0x4bb249&&this['pendingStorageAckResolvers'][_0x3ff8c5(0x265)](_0x2a72e6);else{if(this['pendingStorageAckResolver']===_0x4bb249){if(_0x3ff8c5(0x938)===_0x3ff8c5(0x5cc)){_0x361bae('Claude\x20Code\x20hook:\x20'+_0x233ba0+'\x20`hooks`\x20is\x20not\x20a\x20JSON\x20object\x20—\x20preserving\x20it.');return;}else this['pendingStorageAckResolver']=null;}}_0x258240(new Error(_0x3ff8c5(0xa1e)+_0x547e6e+'ms'));},_0x547e6e);_0x4bb249=_0xd76b99=>{clearTimeout(_0x4ce6fd),_0x16d594(_0xd76b99);},_0x2a72e6?this['pendingStorageAckResolvers']['set'](_0x2a72e6,_0x4bb249):this[_0x374833(0x7f1)]=_0x4bb249;});}['readBody'](_0x2d44df){return new Promise((_0x381883,_0x2b6506)=>{const _0x1e2615=_0xc050;let _0x3af6c7=0x0;const _0x1f9291=[];_0x2d44df['on']('data',_0x545713=>{const _0x4c242c=_0xc050;_0x3af6c7+=_0x545713[_0x4c242c(0x3b7)];if(_0x3af6c7>_0xfadaa9){_0x1f9291['length']=0x0,_0x381883({'text':'','tooLarge':!![]}),_0x2d44df[_0x4c242c(0xa37)](_0x4c242c(0x78f)),_0x2d44df[_0x4c242c(0xa37)](_0x4c242c(0x5b3)),_0x2d44df[_0x4c242c(0xa37)](_0x4c242c(0x3dd)),_0x2d44df['on'](_0x4c242c(0x78f),()=>void 0x0),_0x2d44df['on'](_0x4c242c(0x5b3),()=>void 0x0),_0x2d44df['on'](_0x4c242c(0x3dd),()=>void 0x0);return;}_0x1f9291['push'](_0x545713);}),_0x2d44df['on'](_0x1e2615(0x5b3),()=>_0x381883({'text':Buffer[_0x1e2615(0x6b1)](_0x1f9291)['toString']('utf-8'),'tooLarge':![]})),_0x2d44df['on'](_0x1e2615(0x3dd),_0x2b6506);});}};function _0x325758(_0x657558){const _0x3f92c4=_0xf8ecb6;try{if(_0x3f92c4(0xa4b)===_0x3f92c4(0x9bb))_0x478e74++;else{const _0x4f2f76=new URL(_0x657558,'http://localhost');return''+_0x4f2f76[_0x3f92c4(0x667)]+_0x4f2f76[_0x3f92c4(0x4d2)];}}catch{return _0x657558;}}var _0x102bfa='No\x20runtime\x20signals\x20have\x20reached\x20Ceraph\x20from\x20the\x20device\x20this\x20session\x20—\x20in-app\x20runtime\x20errors\x20(uncaught\x20JS\x20exceptions,\x20failed\x20network\x20requests)\x20are\x20NOT\x20being\x20captured\x20in\x20your\x20results.\x20If\x20you\x20added\x20the\x20Ceraph\x20shim\x20(installCeraph),\x20the\x20device\x20can\x27t\x20reach\x20port\x208101\x20on\x20this\x20Mac:\x20check\x20your\x20firewall\x20and\x20that\x20the\x20device\x20and\x20Mac\x20are\x20on\x20the\x20same\x20network\x20(the\x20shim\x20posts\x20to\x20the\x20Mac\x27s\x20LAN\x20IP\x20discovered\x20from\x20the\x20Metro\x20dev-server\x20URL).\x20Fix\x20that\x20and\x20re-run\x20to\x20capture\x20them.\x20If\x20you\x20haven\x27t\x20added\x20the\x20shim,\x20you\x20can\x20ignore\x20this.',_0x4377d1='No\x20runtime\x20signals\x20are\x20being\x20captured\x20this\x20session:\x20Ceraph\x27s\x20device-signal\x20listener\x20could\x20not\x20start\x20(port\x208101\x20failed\x20to\x20bind\x20—\x20e.g.\x20a\x20permission\x20error,\x20or\x20an\x20invalid\x20CERAPH_SIGNAL_HOST).\x20In-app\x20runtime\x20errors\x20(uncaught\x20JS\x20exceptions,\x20failed\x20network\x20requests)\x20will\x20NOT\x20appear\x20in\x20your\x20results\x20until\x20it\x20binds.\x20Check\x20CERAPH_SIGNAL_HOST\x20and\x20that\x20port\x208101\x20is\x20free\x20and\x20permitted,\x20then\x20restart\x20Ceraph.',_0x3686ac=_0xf8ecb6(0x380);function _0x12b624(_0x58dd5c,_0x11a276,_0x477b1d){const _0x1513f2=_0xf8ecb6;if(_0x58dd5c)return{'entry':null,'advisedStatus':_0x11a276};if(_0x11a276===_0x477b1d)return{'entry':null,'advisedStatus':_0x11a276};const _0xb31d1c=_0x477b1d==='port-conflict'?_0x3686ac:_0x477b1d===_0x1513f2(0x264)?_0x4377d1:_0x102bfa;return{'entry':{'type':_0x1513f2(0x3e0),'text':_0xb31d1c},'advisedStatus':_0x477b1d};}var _0x515691=0.12,_0x2d3545=0x3a98;function _0x510090(_0x2a68e9){const _0x5c4777=_0xf8ecb6;if(!_0x2a68e9)return![];const _0x3da631=[_0x2a68e9];while(_0x3da631['length']>0x0){const _0x452c66=_0x3da631[_0x5c4777(0x253)](),_0x4e37bf=_0x452c66['rawIdentifier'];if(typeof _0x4e37bf===_0x5c4777(0x30d)&&_0x4e37bf['toLowerCase']()['includes']('redbox'))return!![];if(Array[_0x5c4777(0x200)](_0x452c66[_0x5c4777(0x4e3)])){for(const _0x3727c1 of _0x452c66['children'])_0x3da631[_0x5c4777(0x4d1)](_0x3727c1);}}return![];}var _0x57b45e=new Set([_0xf8ecb6(0x9d5),'reload',_0xf8ecb6(0x3e1),_0xf8ecb6(0x967)]),_0x36ac30=0xfa0;function _0x1d2039(_0x4a1955){const _0x15c826=_0xf8ecb6;if(!_0x4a1955)return null;const _0x102fca=[],_0x21edd7=new Set(),_0x4ce579=[{'node':_0x4a1955,'inRedbox':![]}];while(_0x4ce579[_0x15c826(0x3b7)]>0x0){const {node:_0x264ea0,inRedbox:_0x1b7bf2}=_0x4ce579['pop'](),_0x26f773=_0x264ea0[_0x15c826(0x5eb)],_0xe4645d=_0x1b7bf2||typeof _0x26f773===_0x15c826(0x30d)&&_0x26f773['toLowerCase']()['includes'](_0x15c826(0x60c));if(_0xe4645d)for(const _0x96687d of[_0x264ea0[_0x15c826(0x39d)],_0x264ea0[_0x15c826(0x960)],_0x264ea0[_0x15c826(0x9e5)]]){const _0x553446=typeof _0x96687d===_0x15c826(0x30d)?_0x96687d[_0x15c826(0x668)]():'';if(!_0x553446||_0x57b45e['has'](_0x553446['toLowerCase']())||_0x21edd7['has'](_0x553446))continue;_0x21edd7[_0x15c826(0x856)](_0x553446),_0x102fca[_0x15c826(0x4d1)](_0x553446);}if(Array['isArray'](_0x264ea0['children']))for(const _0x14171e of _0x264ea0[_0x15c826(0x4e3)]){_0x4ce579[_0x15c826(0x4d1)]({'node':_0x14171e,'inRedbox':_0xe4645d});}}if(_0x102fca[_0x15c826(0x3b7)]===0x0)return null;const _0x2f1b47=_0x102fca[_0x15c826(0x4ec)]('\x0a')[_0x15c826(0x668)]();if(!_0x2f1b47)return null;return _0x2f1b47[_0x15c826(0x3b7)]>_0x36ac30?_0x2f1b47['slice'](0x0,_0x36ac30)+'…':_0x2f1b47;}var _0x3396cb=class{constructor(_0x4578ae,_0x480af2={}){const _0x4f1e7d=_0xf8ecb6;this['screen']=_0x4578ae,this[_0x4f1e7d(0x466)]=_0x480af2[_0x4f1e7d(0x466)]??_0x2d3545,this['onRedbox']=_0x480af2[_0x4f1e7d(0xaed)];}[_0xf8ecb6(0x3d7)]=null;['ticking']=![];['intervalMs'];[_0xf8ecb6(0xaed)];[_0xf8ecb6(0x306)]=null;[_0xf8ecb6(0x5cf)](){const _0x2c09e6=_0xf8ecb6;if(this['timer'])return;this['timer']=setInterval(()=>{void this['tick']();},this['intervalMs']),this[_0x2c09e6(0x3d7)][_0x2c09e6(0x2d6)]?.();}[_0xf8ecb6(0x8bc)](){const _0x4374f7=_0xf8ecb6;this['timer']&&(clearInterval(this[_0x4374f7(0x3d7)]),this['timer']=null);}async[_0xf8ecb6(0x77b)](){const _0x6b329a=_0xf8ecb6;if(this[_0x6b329a(0x3bb)])return![];this['ticking']=!![];try{if(!await this[_0x6b329a(0x5be)][_0x6b329a(0x3a4)]())return![];const _0x34c0ec=await this[_0x6b329a(0x5be)][_0x6b329a(0x491)]();if(!_0x510090(_0x34c0ec))return this[_0x6b329a(0x306)]=null,![];if(this[_0x6b329a(0xaed)]){const _0x22561d=_0x1d2039(_0x34c0ec);if(_0x22561d&&_0x22561d!==this['lastRedboxSignature']){this['lastRedboxSignature']=_0x22561d;try{await this['onRedbox'](_0x22561d);}catch{}}}const {width:_0x13e52a,height:_0x1b652a}=await this['screen'][_0x6b329a(0x22d)](),_0x5fe072=await this[_0x6b329a(0x5be)][_0x6b329a(0x2cd)](Math[_0x6b329a(0x281)](_0x13e52a/0x2),Math['round'](_0x1b652a*_0x515691),![]);return _0x5fe072[_0x6b329a(0x6d0)];}catch{return![];}finally{'WbbKW'!=='WbbKW'?_0x5e440f=_0x6b329a(0x255):this[_0x6b329a(0x3bb)]=![];}}},_0x2ee2ce=[{'id':_0xf8ecb6(0x55e),'titlePattern':/Would Like to Access the Camera/i,'acceptButtons':['OK','Allow']},{'id':'microphone','titlePattern':/Would Like to Access the Microphone/i,'acceptButtons':['OK',_0xf8ecb6(0x209)]},{'id':_0xf8ecb6(0x1f5),'titlePattern':/Would Like to Access Your Photos/i,'acceptButtons':['Allow\x20Access\x20to\x20All\x20Photos',_0xf8ecb6(0xaa9),_0xf8ecb6(0x209)]},{'id':_0xf8ecb6(0xab4),'titlePattern':/Allow .* to Use Your Location\??/i,'acceptButtons':[_0xf8ecb6(0x829),_0xf8ecb6(0x7ab),'Allow']},{'id':'notifications','titlePattern':/Would Like to Send You Notifications/i,'acceptButtons':[_0xf8ecb6(0x209)]},{'id':_0xf8ecb6(0xb12),'titlePattern':/Would Like to Find and Connect to Devices on Your Local Network/i,'acceptButtons':[_0xf8ecb6(0x209),'OK']},{'id':_0xf8ecb6(0xa72),'titlePattern':/Would Like to Use Bluetooth/i,'acceptButtons':['OK','Allow']},{'id':'tracking','titlePattern':/Allow .* to track your activity|would like permission to track/i,'acceptButtons':['Allow']},{'id':'faceid','titlePattern':/Would Like to Use Face ID/i,'acceptButtons':['OK','Allow']}],_0x3e50e6=[/XCUIElementTypeAlert/i,/SBAlertController/i];function _0x33f1a9(_0x579604){const _0x41795b=_0xf8ecb6,_0x480e66=String(_0x579604[_0x41795b(0x45e)]??'');return _0x3e50e6[_0x41795b(0x275)](_0x2ef17d=>_0x2ef17d['test'](_0x480e66));}function _0x233393(_0x54344c){const _0x4d78ee=_0xf8ecb6;if(_0x33f1a9(_0x54344c))return _0x54344c;const _0x3fb08b=_0x54344c[_0x4d78ee(0x4e3)];if(Array['isArray'](_0x3fb08b))for(const _0x216cd6 of _0x3fb08b){const _0x30a3f3=_0x233393(_0x216cd6);if(_0x30a3f3)return _0x30a3f3;}return null;}function _0x30edfc(_0x1f03f8){const _0x53077f=[],_0x225235=[],_0x518ad8=_0x41c33d=>{const _0x55fea3=_0xc050,_0x4d070f=String(_0x41c33d[_0x55fea3(0x45e)]??''),_0x22b7e1=String(_0x41c33d[_0x55fea3(0x960)]??_0x41c33d[_0x55fea3(0x9e5)]??''),_0x160fea=String(_0x41c33d['value']??'');if(/XCUIElementTypeStaticText/i['test'](_0x4d070f)){const _0x6e0071=_0x22b7e1||_0x160fea;if(_0x6e0071)_0x53077f[_0x55fea3(0x4d1)](_0x6e0071);}else{if(/XCUIElementTypeButton/i[_0x55fea3(0x8aa)](_0x4d070f)){if(_0x22b7e1)_0x225235['push']({'label':_0x22b7e1,'element':_0x41c33d});}else{if(!_0x4d070f){}}}const _0x5f5d9b=_0x41c33d[_0x55fea3(0x4e3)];if(Array['isArray'](_0x5f5d9b)){for(const _0x20eacd of _0x5f5d9b)_0x518ad8(_0x20eacd);}};return _0x518ad8(_0x1f03f8),{'texts':_0x53077f,'buttons':_0x225235};}var _0x3e768a=class{[_0xf8ecb6(0x5be)];['mode'];[_0xf8ecb6(0x6d1)];constructor(_0x4bf9c6){const _0x2b2126=_0xf8ecb6;this['screen']=_0x4bf9c6[_0x2b2126(0x5be)],this['mode']=_0x4bf9c6['mode'],this['onDialog']=_0x4bf9c6['onDialog'];}['getMode'](){const _0x1e193b=_0xf8ecb6;return this[_0x1e193b(0x315)];}['setMode'](_0xcf5c8c){const _0x14ea10=_0xf8ecb6;this[_0x14ea10(0x315)]=_0xcf5c8c;}async['checkAndHandle'](){const _0x2b4010=_0xf8ecb6;if(this['mode']===_0x2b4010(0x411))return{'handled':![]};const _0x94b053=await this[_0x2b4010(0x5be)][_0x2b4010(0x67e)]()['catch'](()=>void 0x0);if(!_0x94b053?.['success']||!_0x94b053['source'])return{'handled':![]};const _0x124fd5=_0x233393(_0x94b053[_0x2b4010(0x40e)]);if(!_0x124fd5)return{'handled':![]};const {texts:_0x2a9d95,buttons:_0x19cc47}=_0x30edfc(_0x124fd5);if(_0x2a9d95['length']===0x0&&_0x19cc47[_0x2b4010(0x3b7)]===0x0)return{'handled':![]};const _0x68f4d9=_0x2a9d95[0x0]??'',_0x4eb411=_0x2a9d95[_0x2b4010(0x795)](0x1)[_0x2b4010(0x4ec)]('\x20'),_0x269466=_0x2ee2ce['find'](_0x48e709=>_0x48e709['titlePattern'][_0x2b4010(0x8aa)](_0x68f4d9));if(!_0x269466)return{'handled':![]};let _0x275c2a='accept';if(this[_0x2b4010(0x315)]==='ask'){if(this['onDialog'])try{_0x275c2a=await this[_0x2b4010(0x6d1)]({'title':_0x68f4d9,'body':_0x4eb411});}catch{_0x275c2a=_0x2b4010(0x89e);}}const _0x2d4f37=_0x275c2a===_0x2b4010(0x89e)?_0x269466['acceptButtons']:_0x269466[_0x2b4010(0xada)]??['Don\x27t\x20Allow','Cancel'],_0xdbeab4=_0x2d4f37['map'](_0xcbc9c6=>_0x19cc47['find'](_0xd65992=>_0xd65992[_0x2b4010(0x960)][_0x2b4010(0x5b5)]()===_0xcbc9c6['toLowerCase']()))['find'](_0x29e5ed=>!!_0x29e5ed);if(!_0xdbeab4)return{'handled':![],'dialog':{'title':_0x68f4d9,'body':_0x4eb411,'action':_0x275c2a}};const _0x7a6ee=await this[_0x2b4010(0x5be)][_0x2b4010(0x31f)]({'accessibilityLabel':_0xdbeab4[_0x2b4010(0x960)]});if(!_0x7a6ee['success'])return{'handled':![],'dialog':{'title':_0x68f4d9,'body':_0x4eb411,'action':_0x275c2a}};return{'handled':!![],'dialog':{'title':_0x68f4d9,'body':_0x4eb411,'action':_0x275c2a}};}};function _0x5daebe(_0x1362f1){const _0x5e232f=_0xf8ecb6,_0x50a876=(_0x1362f1??'')['toLowerCase']();if(_0x50a876===_0x5e232f(0x411)||_0x50a876==='false'||_0x50a876==='0')return _0x5e232f(0x411);if(_0x50a876==='ask')return'ask';return'auto-accept';}import{promises as _0x4708b2}from'fs';import{homedir as _0x3a86a5}from'os';import{join as _0xb31dfd}from'path';var _0x1393b3=_0xf8ecb6(0x374);function _0x13969c(){const _0x192275=_0xf8ecb6;return _0xb31dfd(_0x3a86a5(),'.ceraph',_0x192275(0xa19));}function _0x5e35cd(_0x4cc822){const _0xcef85e=_0xf8ecb6;if(!_0x4cc822||typeof _0x4cc822!=='object')return![];const _0x12c9b0=_0x4cc822;if(typeof _0x12c9b0[_0xcef85e(0x73c)]!=='string'||_0x12c9b0[_0xcef85e(0x73c)]['length']===0x0)return![];if(typeof _0x12c9b0['expiresAt']!=='number')return![];if(_0x12c9b0['githubUser']!==void 0x0){if(!_0x12c9b0['githubUser']||typeof _0x12c9b0['githubUser']!==_0xcef85e(0x9e3))return![];const _0x5d73cc=_0x12c9b0[_0xcef85e(0x58e)];if(typeof _0x5d73cc[_0xcef85e(0x7fc)]!==_0xcef85e(0x30d)||typeof _0x5d73cc['id']!=='number')return![];}if(typeof _0x12c9b0['storedAt']!=='string')return![];return!![];}function _0x4a1e0a(_0x1880a6){if(_0x1880a6['githubUser'])return _0x1880a6;return{..._0x1880a6,'githubUser':{'login':'','id':0x0}};}async function _0x1be651(_0x224be4={}){const _0x1c105b=_0xf8ecb6,_0x396b86=_0x224be4[_0x1c105b(0x538)]??_0x13969c();let _0xd10a4e;try{_0xd10a4e=await _0x4708b2['readFile'](_0x396b86,_0x1c105b(0x827));}catch{return null;}let _0x44a5d3;try{_0x44a5d3=JSON[_0x1c105b(0x981)](_0xd10a4e);}catch{return null;}if(!_0x5e35cd(_0x44a5d3))return null;if(_0x44a5d3[_0x1c105b(0xaf1)]>0x0&&_0x44a5d3['expiresAt']<Date['now']())return null;const _0x858c=_0x4a1e0a(_0x44a5d3);if(_0x858c[_0x1c105b(0x73c)]===_0x1393b3)return null;return _0x858c;}var _0x126fc6=new Set([_0xf8ecb6(0x806),'127.0.0.1','[::1]',_0xf8ecb6(0x74d),_0xf8ecb6(0x802),'::ffff:7f00:1']);function _0x364e6a(_0x517292){const _0x2f5a65=_0xf8ecb6;let _0x4bb80b;try{_0x4bb80b=new URL(_0x517292);}catch{if('lUopV'===_0x2f5a65(0xa7a))return null;else throw new Error(_0x2f5a65(0x44a)+_0x517292+_0x2f5a65(0x8bd));}if(_0x4bb80b['protocol']===_0x2f5a65(0x5d8))return _0x517292;if(_0x4bb80b[_0x2f5a65(0xb03)]==='http:'){const _0x2ab40a=_0x4bb80b['hostname']['toLowerCase']();if(_0x126fc6[_0x2f5a65(0x979)](_0x2ab40a))return _0x517292;throw new Error('Refusing\x20to\x20send\x20your\x20Ceraph\x20token\x20over\x20plaintext\x20HTTP\x20to\x20a\x20non-local\x20host:\x20\x22'+_0x517292+'\x22.\x20Use\x20https://\x20for\x20remote\x20endpoints\x20(http://\x20is\x20only\x20allowed\x20for\x20localhost\x20/\x20127.0.0.1).');}throw new Error(_0x2f5a65(0x48d)+_0x4bb80b['protocol']+'\x22\x20URL:\x20\x22'+_0x517292+'\x22.\x20Only\x20https://\x20(or\x20http://\x20for\x20localhost\x20/\x20127.0.0.1)\x20endpoints\x20are\x20allowed.');}var _0x331bdf=process.env.CERAPH_CATALOG_ENDPOINT??_0xf8ecb6(0x5f2),_0x1993c8=process.env.CERAPH_CATALOG_PUBLIC_KEY_ENDPOINT??'https://ceraph.dev/api/catalog/public-key';async function _0x3d8a92(_0x491af0={}){const _0x46c163=_0xf8ecb6,_0xfa11bd=_0x491af0['log']??(_0x30811c=>process['stderr']['write'](_0x30811c+'\x0a'));try{const _0x42b6a1=_0x491af0[_0x46c163(0x327)]??_0x331bdf,_0x1e5ed3=_0x491af0['publicKeyEndpoint']??_0x1993c8;let _0x4cf41d=null;try{_0x364e6a(_0x42b6a1),_0x364e6a(_0x1e5ed3);}catch(_0x29b8ce){if('OogOe'!=='RUKDL')_0x4cf41d=_0x29b8ce instanceof Error?_0x29b8ce[_0x46c163(0x531)]:String(_0x29b8ce);else return _0x410839(_0x2654f5,_0x46c163(0x2e2));}const _0x100e3d=_0x4cf41d?null:await((async()=>{const _0x13f24e=_0x46c163,_0x1dea3c=_0x491af0['publicKey']??await _0x26b288({'fetchImpl':_0x491af0['fetchImpl'],'timeoutMs':_0x491af0[_0x13f24e(0x2f9)]??0x1388,'log':_0xfa11bd,'endpoint':_0x1e5ed3});return _0xb1badd({'endpoint':_0x42b6a1,'publicKey':_0x1dea3c,'timeoutMs':_0x491af0[_0x13f24e(0x2f9)]??0x1388,'fetchImpl':_0x491af0[_0x13f24e(0x5d0)]});})());_0x4cf41d&&_0xfa11bd(_0x46c163(0x2c2)+_0x4cf41d+')');if(_0x100e3d){_0x2e9203(_0x100e3d,_0xfa11bd);const _0x293597=Object['keys'](_0x100e3d['catalog'])[_0x46c163(0x3b7)],_0x5bca8e=_0x100e3d[_0x46c163(0x314)]?Object[_0x46c163(0x8c1)](_0x100e3d[_0x46c163(0x314)])['length']:0x0,_0x2fe2ca=_0x100e3d['extendedCatalog']?Object[_0x46c163(0x8c1)](_0x100e3d[_0x46c163(0x951)])[_0x46c163(0x3b7)]:0x0;_0xfa11bd(_0x46c163(0x37e)+_0x293597+'\x20versioned,\x20'+_0x5bca8e+_0x46c163(0x3ba)+_0x2fe2ca+_0x46c163(0x429));if(_0x100e3d[_0x46c163(0x421)]){const {droppedCount:_0x1fef91,samples:_0x4413e7}=_0x100e3d['droppedEntries'];_0xfa11bd(_0x46c163(0xa1b)+_0x1fef91+_0x46c163(0x587)+_0x4413e7['join'](',\x20'));}return _0x100e3d[_0x46c163(0xaff)];}return _0xfa11bd(_0x46c163(0x8c8)),_0x3b6c12(null),_0x50a1b6(null),null;}catch{return null;}}function _0x2e9203(_0x1d4a3c,_0x459468){const _0x33176f=_0xf8ecb6;try{'bqvTq'===_0x33176f(0x2b6)?(_0x3b6c12(_0x1d4a3c[_0x33176f(0x314)]??null),_0x50a1b6(_0x1d4a3c[_0x33176f(0x951)]??null)):_0x228c4b[_0x33176f(0x2b0)]=(..._0x15181c)=>{const _0x280c1b=_0x33176f;_0x540b95[_0x280c1b(0x910)][_0x280c1b(0xaac)](_0x15181c[_0x280c1b(0x86b)](_0x124d94=>typeof _0x124d94===_0x280c1b(0x30d)?_0x124d94:_0x4480dc(_0x124d94))[_0x280c1b(0x4ec)]('\x20')+'\x0a');};}catch(_0x52f069){_0x459468(_0x33176f(0x4aa)+(_0x52f069 instanceof Error?_0x52f069[_0x33176f(0x531)]:String(_0x52f069)));}}async function _0x26b288(_0x4d305d){const _0x2cf097=_0xf8ecb6,_0x5b8caa=_0x4d305d['endpoint']??_0x1993c8;try{_0x364e6a(_0x5b8caa);}catch(_0x370e3d){return _0x4d305d[_0x2cf097(0x2b0)](_0x2cf097(0x442)+(_0x370e3d instanceof Error?_0x370e3d['message']:String(_0x370e3d))+_0x2cf097(0x481)),_0x1c7a97;}const _0x1a5dca=await _0x4bae0d({'endpoint':_0x5b8caa,'timeoutMs':_0x4d305d[_0x2cf097(0x2f9)]??0x1388,'fetchImpl':_0x4d305d['fetchImpl']});if(_0x1a5dca)return _0x1a5dca;return _0x1c7a97;}var _0x27ee0f=null;function _0x258be2(_0x43badb){_0x27ee0f=_0x43badb;}var _0x43b35b=_0xf8ecb6(0x347),_0x375735=0x7530,_0x3eb20a=class extends Error{['kind'];['status'];[_0xf8ecb6(0x847)];['details'];constructor(_0x382a86,_0x2e7207,_0x2a6592,_0x3eb0d0,_0x3c4898){const _0xe15591=_0xf8ecb6;super(_0x2a6592),this['name']='CeraphServerError',this['kind']=_0x382a86,this[_0xe15591(0x428)]=_0x2e7207,this[_0xe15591(0x847)]=_0x2a6592;if(_0x3eb0d0!==void 0x0)this['cause']=_0x3eb0d0;if(_0x3c4898!==void 0x0)this[_0xe15591(0x65d)]=_0x3c4898;}};async function _0xdb0b95(_0x1f61fd){const _0xfb8d3e=_0xf8ecb6,_0x4a0981=_0x1f61fd[_0xfb8d3e(0x428)];if(_0x4a0981===0x191)return new _0x3eb20a(_0xfb8d3e(0x800),0x191,_0xfb8d3e(0x563));if(_0x4a0981===0x192||_0x4a0981===0x193)return new _0x3eb20a(_0xfb8d3e(0xb21),_0x4a0981,'Flow\x20intelligence\x20(rn_list_flows\x20/\x20rn_find_flows\x20/\x20rn_test_flows)\x20is\x20a\x20Pro\x20feature\x20—\x20upgrade\x20at\x20https://ceraph.dev/#pricing.\x20If\x20you\x20just\x20upgraded,\x20re-run\x20this\x20—\x20your\x20Pro\x20access\x20refreshes\x20automatically.');if(_0x4a0981===0x1ad)return new _0x3eb20a(_0xfb8d3e(0x477),0x1ad,_0xfb8d3e(0x328));if(_0x4a0981>=0x1f4)return new _0x3eb20a(_0xfb8d3e(0x57e),_0x4a0981,'Ceraph\x20server\x20is\x20having\x20a\x20moment\x20(HTTP\x20'+_0x4a0981+').\x20Try\x20again\x20in\x20a\x20few\x20seconds.');let _0x228e51,_0x403a0c;try{const _0xf3b016=await _0x1f61fd[_0xfb8d3e(0x2ea)]();if(_0xf3b016&&typeof _0xf3b016==='object'){_0x403a0c=_0xf3b016;const _0x209cbc=_0xf3b016,_0x3afce1=typeof _0x209cbc['message']==='string'&&_0x209cbc[_0xfb8d3e(0x531)]||typeof _0x209cbc[_0xfb8d3e(0x3dd)]===_0xfb8d3e(0x30d)&&_0x209cbc['error']||void 0x0;if(_0x3afce1)_0x228e51=_0x3afce1;}}catch{}return new _0x3eb20a('bad-response',_0x4a0981,'Ceraph\x20request\x20failed\x20(HTTP\x20'+_0x4a0981+(_0x228e51?':\x20'+_0x228e51:'')+').',void 0x0,_0x403a0c);}function _0x3980d8(_0x1bba44){const _0x237480=_0xf8ecb6,_0x4ae461=_0x1bba44?.['apiBase']?.[_0x237480(0x668)]()||process.env.CERAPH_API_URL?.['trim']()||_0x43b35b;return _0x364e6a(_0x4ae461),_0x4ae461[_0x237480(0x42e)](/\/+$/,'');}async function _0x4e6fa7(_0x3f200c,_0x11c2e4,_0xb72165,_0x2c6ba0){const _0x3bf31d=_0xf8ecb6;if(!_0xb72165)throw new _0x3eb20a(_0x3bf31d(0x800),0x191,_0x3bf31d(0x563));const _0x400732=_0x2c6ba0?.['timeoutMs']??_0x375735,_0x235f29=_0x3980d8(_0x2c6ba0),_0x4d500c=''+_0x235f29+(_0x3f200c[_0x3bf31d(0x746)]('/')?_0x3f200c:'/'+_0x3f200c),_0x62535c=new AbortController(),_0x4da29e=setTimeout(()=>_0x62535c[_0x3bf31d(0x95c)](),_0x400732);let _0x49dae9;try{_0x49dae9=await fetch(_0x4d500c,{'method':'POST','headers':{'Content-Type':_0x3bf31d(0x22a),'Authorization':'Bearer\x20'+_0xb72165['accessToken']},'body':JSON[_0x3bf31d(0x312)](_0x11c2e4??{}),'signal':_0x62535c['signal']});}catch(_0x53b229){const _0x1215a7=_0x53b229;if(_0x1215a7?.[_0x3bf31d(0x9e5)]===_0x3bf31d(0xace)){if(_0x3bf31d(0x3b8)==='Jfrjb')_0x125aaa=_0x3c97c2['filter'](_0x1dad43=>_0x1dad43['id']===_0x129b2e['id']&&_0x1dad43[_0x3bf31d(0x69a)]===_0x3bf31d(0xa45));else throw new _0x3eb20a(_0x3bf31d(0x651),0x0,_0x3bf31d(0x823)+_0x400732+_0x3bf31d(0x8ea),_0x53b229);}throw new _0x3eb20a('network-error',0x0,_0x3bf31d(0x900),_0x53b229);}finally{clearTimeout(_0x4da29e);}if(!_0x49dae9['ok']){if(_0x3bf31d(0x8c0)!=='eeRgT')throw await _0xdb0b95(_0x49dae9);else return{'kind':_0x3bf31d(0xacf),'filePath':_0x161331};}let _0x7a7f90;try{_0x7a7f90=await _0x49dae9['json']();}catch(_0x2605b6){if(_0x3bf31d(0x454)!=='tgoLB'){const _0x2cdde2=_0x2605b6;throw new _0x3eb20a(_0x3bf31d(0x4a9),_0x49dae9['status'],'Ceraph\x20server\x20returned\x20malformed\x20JSON\x20for\x20'+_0x3f200c+':\x20'+(_0x2cdde2?.[_0x3bf31d(0x531)]??String(_0x2605b6)),_0x2605b6);}else{if(_0x10a264[_0x3bf31d(0x5a0)]==='launch'||_0x9a499['action']==='terminate'||_0x36be47[_0x3bf31d(0x5a0)]==='reset')return!![];if(_0xce0a5d['action']==='pressKey'&&_0x3bddd3['key']===_0x3bf31d(0xa4a))return!![];if(_0x35e546['action']==='tap')return!![];if(_0xc38b69['action']==='type'&&_0x6f5bd9['into'])return!![];if(_0x5d01dd['verifyNavigation'])return!![];if(_0xe03f21['verifyProfileTransition'])return!![];if(_0x32e880[_0x3bf31d(0x41b)]){if(_0x3ad68e[_0x3bf31d(0x41b)][_0x3bf31d(0x98f)]==='storage')return!![];const _0x11af1d=_0x4b26b4['verifyMutation'][_0x3bf31d(0x9de)]['toUpperCase']();return _0x11af1d==='POST'||_0x11af1d===_0x3bf31d(0x594)||_0x11af1d==='PATCH'||_0x11af1d==='DELETE';}return![];}}if(!_0x7a7f90||typeof _0x7a7f90!==_0x3bf31d(0x9e3)||Array[_0x3bf31d(0x200)](_0x7a7f90))throw new _0x3eb20a('bad-response',_0x49dae9[_0x3bf31d(0x428)],'Ceraph\x20server\x20returned\x20an\x20unexpected\x20response\x20shape\x20for\x20'+_0x3f200c+_0x3bf31d(0x44b));return _0x7a7f90;}var _0x2a7d77=0x5*0x3c*0x3e8,_0x12fa01=null,_0x4c06a0=null;function _0x409a76(){_0x12fa01=null,_0x4c06a0=null;}var _0x304c87=_0xf8ecb6(0x347);function _0x39e8c6(_0x1b41b6){const _0x1f34e4=_0xf8ecb6,_0x50ee41=_0x1b41b6[_0x1f34e4(0xb06)]?.['trim']()||process.env.CERAPH_API_URL?.[_0x1f34e4(0x668)]()||_0x304c87;return _0x50ee41[_0x1f34e4(0x42e)](/\/+$/,'')+'/tier-check';}async function _0x2a0a26(_0xd0d9a7={}){return _0x2cd7fc(_0xd0d9a7,'isPro');}async function _0x4faaf3(_0x55ea36={}){return _0x2cd7fc(_0x55ea36,'mobilePro');}function _0xc050(_0x287309,_0xfb26ba){_0x287309=_0x287309-0x1ec;const _0x3e8879=_0x3e88();let _0xc050ac=_0x3e8879[_0x287309];return _0xc050ac;}async function _0x2cd7fc(_0x40f5c6,_0x23d330){const _0x99d240=_0xf8ecb6,_0x26cc9e=_0x40f5c6['ttlMs']??_0x2a7d77,_0x3f5c93=_0x40f5c6[_0x99d240(0x2f8)]??Date['now'],_0x29b56a=_0x40f5c6['loadAuth']??_0x1be651,_0x4d5a1b=_0x40f5c6[_0x99d240(0x772)]??((_0x584f2c,_0x2cef3e)=>globalThis[_0x99d240(0x2ce)](_0x584f2c,_0x2cef3e)),_0x3622c8=()=>_0x23d330===_0x99d240(0x2e2)?_0x4c06a0:_0x12fa01,_0x27a440=_0x472fc7=>{const _0x126f55=_0x99d240;if(_0x23d330===_0x126f55(0x2e2))_0x4c06a0=_0x472fc7;else _0x12fa01=_0x472fc7;},_0x3bbcb4=_0x3622c8();if(_0x3bbcb4&&_0x3f5c93()-_0x3bbcb4['fetchedAt']<_0x26cc9e)return _0x3bbcb4[_0x99d240(0x39d)];let _0x2a8db5=![];try{const _0x6bee02=await _0x29b56a();if(!_0x6bee02?.[_0x99d240(0x73c)])return _0x27a440({'value':![],'fetchedAt':_0x3f5c93()}),![];const _0x1fd298=_0x39e8c6(_0x40f5c6),_0x4c00d4=await _0x4d5a1b(_0x1fd298,{'headers':{'Authorization':'Bearer\x20'+_0x6bee02[_0x99d240(0x73c)],'Accept':'application/json'}});if(!_0x4c00d4['ok'])return _0x27a440({'value':![],'fetchedAt':_0x3f5c93()}),![];const _0x17074f=await _0x4c00d4['json']();_0x2a8db5=_0x17074f!==null&&typeof _0x17074f==='object'&&_0x17074f[_0x23d330]===!![];}catch{'vpoWO'===_0x99d240(0x86c)?this[_0x99d240(0xa01)]=null:_0x2a8db5=![];}return _0x27a440({'value':_0x2a8db5,'fetchedAt':_0x3f5c93()}),_0x2a8db5;}import{promises as _0x6d8dfe}from'fs';import{join as _0x3ab963}from'path';import{execFile}from'child_process';import{constants as _0x2bd48f,promises as _0x2e20ae}from'fs';import{isAbsolute as _0x589d70,join as _0x4ad26b,normalize,relative as _0x50619e}from'path';import{promisify}from'util';var _0x1b1611=promisify(execFile),_0x1a0ea1=0xc8,_0x2b521b=0x7a120,_0x407c84=new Set(['.tsx','.ts',_0xf8ecb6(0x73b),'.js',_0xf8ecb6(0xa70),'.mjs',_0xf8ecb6(0x584)]),_0x2c6b44=[/(^|\/)\.env(\.|$)/,/\.pem$/,/\.key$/,/\.p12$/,/\.pfx$/,/\.keystore$/,/\.jks$/,/\.mobileprovision$/,/(^|\/)credentials?\b/,/(^|\/)secrets?\b/,/private[_-]?key/];function _0xcc4120(_0x13f1d0){const _0x5baca5=_0xf8ecb6,_0xf7459a=_0x13f1d0[_0x5baca5(0x5b5)]();for(const _0x3afc4f of _0x2c6b44){if(_0x3afc4f['test'](_0xf7459a))return![];}const _0x3406cc=_0xf7459a['split']('/')['pop']()??'';if(/[._-]tokens?($|[._-])/[_0x5baca5(0x8aa)](_0x3406cc))return![];const _0x1074f5=_0x13f1d0['lastIndexOf']('.');if(_0x1074f5<0x0)return![];const _0x4e0ba0=_0x13f1d0['slice'](_0x1074f5)[_0x5baca5(0x5b5)]();return _0x407c84['has'](_0x4e0ba0);}async function _0x511969(_0x499f7f,_0x3d3a30){const _0x3ddecf=_0xf8ecb6;try{return await _0x1b1611(_0x3ddecf(0x490),['rev-parse',_0x3ddecf(0xa36),_0x3ddecf(0x278),_0x3d3a30],{'cwd':_0x499f7f}),!![];}catch{return![];}}var _0x4c0ab0=new Map();function _0x9c174(_0x32abc4){const _0x21a479=_0xf8ecb6,_0xda9672=_0x4c0ab0[_0x21a479(0x3fd)](_0x32abc4);if(_0xda9672)return _0xda9672;const _0x5a646f=_0x20bed6(_0x32abc4);return _0x4c0ab0[_0x21a479(0x93e)](_0x32abc4,_0x5a646f),_0x5a646f;}async function _0x20bed6(_0xa0afd6){const _0x9d4e3b=_0xf8ecb6;try{const {stdout:_0x18187b}=await _0x1b1611(_0x9d4e3b(0x490),[_0x9d4e3b(0x6f2),_0x9d4e3b(0x595),_0x9d4e3b(0x4f9)],{'cwd':_0xa0afd6}),_0x1c9a43=_0x18187b[_0x9d4e3b(0x668)]();if(_0x1c9a43){const _0xe912cd=_0x1c9a43['replace'](/^origin\//,'');if(_0xe912cd&&await _0x511969(_0xa0afd6,_0xe912cd))return _0xe912cd;if(await _0x511969(_0xa0afd6,_0x1c9a43))return _0x1c9a43;if(_0xe912cd)return _0xe912cd;}}catch{}for(const _0x509b12 of['main','master']){if(await _0x511969(_0xa0afd6,_0x509b12))return _0x509b12;}return'HEAD';}async function _0x4aa79c(_0x3f4f84){const _0x142b11=_0xf8ecb6;try{const {stdout:_0x34a384}=await _0x1b1611(_0x142b11(0x490),['rev-parse',_0x142b11(0x201),'HEAD'],{'cwd':_0x3f4f84});return _0x34a384[_0x142b11(0x668)]();}catch{return _0x142b11(0x6b2);}}async function _0x1f644c(_0x1dfa33,_0x4c8966){const _0x57da21=_0xf8ecb6;try{const {stdout:_0x36a371}=await _0x1b1611(_0x57da21(0x490),['rev-parse',_0x4c8966],{'cwd':_0x1dfa33});return _0x36a371['trim']();}catch{return _0x57da21(0xae0)!=='XILED'?this['appendIfValid'](_0xa498d2):_0x4c8966;}}async function _0x4f2a26(_0x355841,_0x21839d){const _0x244cce=_0xf8ecb6;try{const {stdout:_0x91b5c0}=await _0x1b1611('git',['diff','--relative',_0x21839d],{'cwd':_0x355841,'maxBuffer':0x20*0x400*0x400});return _0x91b5c0;}catch(_0x195298){const _0x4a688c=_0x195298 instanceof Error?_0x195298[_0x244cce(0x531)]:String(_0x195298);if(_0x4a688c['includes']('unknown\x20revision')){const {stdout:_0x43d621}=await _0x1b1611(_0x244cce(0x490),['diff',_0x244cce(0x2fd),_0x244cce(0xa12)],{'cwd':_0x355841,'maxBuffer':0x20*0x400*0x400});return _0x43d621;}throw _0x195298;}}async function _0x48efab(_0x29623e){const _0x4fc8fd=_0xf8ecb6;try{const {stdout:_0x5d14d4}=await _0x1b1611(_0x4fc8fd(0x490),[_0x4fc8fd(0x6b6)],{'cwd':_0x29623e,'maxBuffer':0x8*0x400*0x400});return _0x5d14d4[_0x4fc8fd(0x51a)]('\x0a')['map'](_0x2955bf=>_0x2955bf['trim']())['filter'](Boolean)[_0x4fc8fd(0x529)](_0xcc4120);}catch{return[];}}async function _0x4748b8(_0x5ecb6a,_0x4788d7){const _0x1f00c1=_0xf8ecb6;try{const {stdout:_0x47bfbc}=await _0x1b1611('git',[_0x1f00c1(0x7d6),_0x1f00c1(0x77d),_0x1f00c1(0x2fd),_0x4788d7],{'cwd':_0x5ecb6a,'maxBuffer':0x8*0x400*0x400});return _0x47bfbc['split']('\x0a')[_0x1f00c1(0x86b)](_0x4b2471=>_0x4b2471['trim']())['filter'](_0x50e237=>_0x50e237[_0x1f00c1(0x3b7)]>0x0);}catch(_0x2cb1df){const _0x40b94=_0x2cb1df instanceof Error?_0x2cb1df[_0x1f00c1(0x531)]:String(_0x2cb1df);if(_0x40b94[_0x1f00c1(0x27e)](_0x1f00c1(0x64b))){const {stdout:_0x1b1887}=await _0x1b1611('git',[_0x1f00c1(0x7d6),'--name-only','--relative','HEAD'],{'cwd':_0x5ecb6a,'maxBuffer':0x8*0x400*0x400});return _0x1b1887['split']('\x0a')['map'](_0x2c1bae=>_0x2c1bae[_0x1f00c1(0x668)]())['filter'](_0x1f4763=>_0x1f4763['length']>0x0);}throw _0x2cb1df;}}async function _0x26a76c(_0x32b7ee,_0x286cf1){const _0x28b7d0=_0xf8ecb6,_0x1bd21f={},_0x1c4cd2=new Set();let _0x173964;try{_0x173964=await _0x2e20ae[_0x28b7d0(0x6f7)](_0x32b7ee);}catch{return _0x1bd21f;}for(const _0x2f25e8 of _0x286cf1){if(_0x28b7d0(0x6eb)!==_0x28b7d0(0x6eb)){const _0x5f34e8=[];if(_0x1ddec2[_0x28b7d0(0xa9a)])_0x5f34e8[_0x28b7d0(0x4d1)]('key='+_0x25c8b2['elementKey']);if(typeof _0x6db70d[_0x28b7d0(0x9a5)]===_0x28b7d0(0x30d))_0x5f34e8[_0x28b7d0(0x4d1)](_0x28b7d0(0x74f)+_0x33c41a(_0x4fe0ee[_0x28b7d0(0x9a5)],0x50));if(typeof _0x4385d6['nextText']==='string')_0x5f34e8[_0x28b7d0(0x4d1)]('next='+_0x1a0550(_0x1333e6['nextText'],0x50));if(typeof _0x5815ff[_0x28b7d0(0x270)]==='number')_0x5f34e8['push'](_0x28b7d0(0x27d)+_0x1546de['durationMs']);return _0x5f34e8['length']>0x0?_0x5f34e8['join']('\x20'):void 0x0;}else{if(_0x1c4cd2['size']>=_0x1a0ea1)break;if(_0x589d70(_0x2f25e8)||_0x2f25e8[_0x28b7d0(0x27e)]('..'))continue;const _0x2df54e=normalize(_0x4ad26b(_0x32b7ee,_0x2f25e8)),_0x1401ec=_0x50619e(_0x32b7ee,_0x2df54e);if(_0x1401ec[_0x28b7d0(0x746)]('..')||_0x589d70(_0x1401ec))continue;if(_0x1c4cd2['has'](_0x1401ec))continue;_0x1c4cd2[_0x28b7d0(0x856)](_0x1401ec);if(!_0xcc4120(_0x1401ec))continue;let _0x5b8243;try{'GHzJh'!=='GHzJh'?_0x4f9703[_0x28b7d0(0x6ee)](_0x28b7d0(0x72c)):_0x5b8243=await _0x2e20ae[_0x28b7d0(0x6f7)](_0x2df54e);}catch(_0x2663f7){const _0x351c30=_0x2663f7;if(_0x351c30['code']===_0x28b7d0(0x5a8)||_0x351c30['code']==='ELOOP'||_0x351c30[_0x28b7d0(0x3aa)]===_0x28b7d0(0x235)||_0x351c30[_0x28b7d0(0x3aa)]==='EPERM'){if('avzrd'!=='PMjIK')continue;else return _0x384947(_0x28b7d0(0xad8)),null;}throw _0x2663f7;}const _0x522114=_0x50619e(_0x173964,_0x5b8243);if(_0x522114[_0x28b7d0(0x746)]('..')||_0x589d70(_0x522114))continue;let _0x5610ee;try{_0x5610ee=await _0x2e20ae['open'](_0x2df54e,_0x2bd48f[_0x28b7d0(0x586)]|_0x2bd48f['O_NOFOLLOW']);const _0x1de76e=await _0x5610ee['stat']();if(_0x1de76e[_0x28b7d0(0x926)]())continue;if(_0x1de76e[_0x28b7d0(0x952)]>_0x2b521b)continue;const _0x504896=await _0x5610ee['readFile']('utf-8');_0x1bd21f[_0x1401ec]=_0x504896;}catch(_0x5d0d03){const _0x568c74=_0x5d0d03;if(_0x568c74[_0x28b7d0(0x3aa)]==='ENOENT'||_0x568c74['code']==='EISDIR'||_0x568c74[_0x28b7d0(0x3aa)]===_0x28b7d0(0x739)||_0x568c74[_0x28b7d0(0x3aa)]===_0x28b7d0(0x235)||_0x568c74['code']===_0x28b7d0(0x915))continue;throw _0x5d0d03;}finally{await _0x5610ee?.['close']();}}}return _0x1bd21f;}import{execFile as _0x24b644}from'child_process';import{promisify as _0xb24c57}from'util';var _0x587d94=_0xb24c57(_0x24b644);async function _0x2e0c69(_0x2fd782){const _0x244fd8=_0xf8ecb6,{stdout:_0x470afc}=await _0x587d94(_0x244fd8(0x490),[_0x244fd8(0x2f7),'--get',_0x244fd8(0xac7)],{'cwd':_0x2fd782,'encoding':_0x244fd8(0x827)}),_0x1259d9=_0x470afc[_0x244fd8(0x668)](),_0x427e10=_0x1259d9['replace'](/\.git$/,''),_0x128d7a=_0x427e10['match'](/^(?:https?:\/\/(?:[^/@]+@)?github\.com(?::\d+)?\/|git@github\.com:|ssh:\/\/git@github\.com(?::\d+)?\/)([^/]+)\/([^/]+?)$/);if(!_0x128d7a)throw new Error('Could\x20not\x20resolve\x20GitHub\x20repo\x20from\x20git\x20remote.');return{'owner':_0x128d7a[0x1],'repo':_0x128d7a[0x2]};}var _0x1d993a=0x7a120,_0x5c09e3=0x1f4,_0xcd601f=0x8*0x400*0x400;async function _0xb5d385(_0x498862,_0x34d088={}){const _0x457506=_0xf8ecb6,_0x67b599=_0x34d088['fetcher']??_0x4e6fa7,_0x44771d=_0x34d088[_0x457506(0x9c7)]??_0x48efab,_0x2b7fff=_0x34d088[_0x457506(0x7c0)]??(async _0x135842=>{try{return await _0x2e0c69(_0x135842);}catch{return null;}}),_0x3917a6=_0x34d088['resolveSha']??_0x1f644c,_0x297637=_0x34d088[_0x457506(0x612)]??_0x4aa79c,_0x223091=_0x34d088[_0x457506(0x4e4)]??(_0x25c010=>_0x6d8dfe[_0x457506(0x4e4)](_0x25c010,_0x457506(0x827))),_0x23293b=await _0x2b7fff(_0x498862[_0x457506(0x288)])[_0x457506(0x48b)](()=>null);if(!_0x23293b)return{'status':_0x457506(0x965),'reason':'no-github-remote','message':'No\x20GitHub\x20remote\x20detected\x20—\x20graph\x20cache\x20seed\x20skipped.\x20First\x20rn_test_*\x20call\x20will\x20build\x20the\x20graph\x20from\x20scratch.'};const _0x706d21=await _0x297637(_0x498862['workingDir']),_0x5898bc=await _0x3917a6(_0x498862[_0x457506(0x288)],_0x457506(0xa12));if(_0x5898bc===_0x457506(0xa12)||_0x5898bc['length']<0x7||_0x706d21===_0x457506(0x6b2))return{'status':_0x457506(0x965),'reason':_0x457506(0x7da),'message':_0x457506(0x31c)};const _0x137b68=await _0x44771d(_0x498862['workingDir']);if(_0x137b68['length']===0x0)return{'status':_0x457506(0x965),'reason':_0x457506(0x973),'message':'No\x20graph-relevant\x20files\x20found\x20in\x20the\x20repo\x20—\x20nothing\x20to\x20seed.'};const _0x3f727f={};let _0x16a8f5=![],_0x3ebe5e=0x0;for(const _0x3f3dc9 of _0x137b68){if(!_0xcc4120(_0x3f3dc9))continue;if(Object[_0x457506(0x8c1)](_0x3f727f)['length']>=_0x5c09e3){_0x16a8f5=!![];break;}let _0x2a4d16;try{_0x2a4d16=await _0x223091(_0x3ab963(_0x498862[_0x457506(0x288)],_0x3f3dc9));}catch{continue;}const _0x5e7acb=Buffer[_0x457506(0x901)](_0x2a4d16);if(_0x5e7acb>_0x1d993a)continue;if(_0x3ebe5e+_0x5e7acb>_0xcd601f){_0x16a8f5=!![];break;}_0x3f727f[_0x3f3dc9]=_0x2a4d16,_0x3ebe5e+=_0x5e7acb;}if(Object['keys'](_0x3f727f)['length']===0x0)return{'status':'skipped','reason':_0x457506(0x973),'message':'No\x20readable\x20graph-relevant\x20files\x20in\x20the\x20repo\x20—\x20nothing\x20to\x20seed.'};let _0x5d5959;if(_0x3f727f[_0x457506(0x8fb)]){if('btDtC'==='xORUE'){let _0x455055=_0x2345ab['trim']();if(_0x455055['endsWith'](';'))_0x455055=_0x455055['slice'](0x0,-0x1)['trim']();return(_0x455055[_0x457506(0x746)]('\x22')&&_0x455055[_0x457506(0xaa5)]('\x22')||_0x455055[_0x457506(0x746)]('\x27')&&_0x455055['endsWith']('\x27'))&&(_0x455055=_0x455055['slice'](0x1,-0x1)),_0x455055;}else _0x5d5959=_0x3f727f[_0x457506(0x8fb)];}try{const _0x58ebf8=await _0x67b599('/rn-init-graph',{'repoOwner':_0x23293b['owner'],'repoName':_0x23293b['repo'],'branch':_0x706d21,'headSha':_0x5898bc,'appFiles':_0x3f727f,..._0x5d5959?{'appJsonContent':_0x5d5959}:{}},_0x498862[_0x457506(0x309)]);if(_0x58ebf8['ok']&&_0x58ebf8['flavor']&&typeof _0x58ebf8[_0x457506(0x984)]===_0x457506(0x2af)&&typeof _0x58ebf8['layoutCount']===_0x457506(0x2af))return{'status':'seeded','flavor':_0x58ebf8['flavor'],'screenCount':_0x58ebf8[_0x457506(0x984)],'layoutCount':_0x58ebf8[_0x457506(0xa7f)],'bundleId':_0x58ebf8[_0x457506(0x369)]??null,'persisted':_0x58ebf8[_0x457506(0x6ae)]===!![]};return{'status':'skipped','reason':'server-error','message':'Graph\x20cache\x20seed\x20returned\x20an\x20unexpected\x20response\x20shape.'};}catch(_0x31f628){if(_0x31f628 instanceof _0x3eb20a){const _0x3d8549=_0x31f628['kind']===_0x457506(0x4a9)&&_0x31f628[_0x457506(0x847)]['includes']('no-mobile-graph')?_0x457506(0x914):'server-error';return{'status':_0x457506(0x965),'reason':_0x3d8549,'message':_0x16a8f5?_0x31f628['agentMessage']+'\x20(payload\x20was\x20capped\x20at\x20'+_0x5c09e3+_0x457506(0x941):_0x31f628[_0x457506(0x847)]};}return{'status':_0x457506(0x965),'reason':_0x457506(0x57e),'message':_0x31f628 instanceof Error?_0x31f628[_0x457506(0x531)]:'Graph\x20cache\x20seed\x20failed\x20(unknown\x20error).'};}}var _0x5c32c3=null;function _0x25cdf3(_0x448b05={}){if(_0x5c32c3)return _0x5c32c3;const _0x4856f4=_0x2fd8c7(_0x448b05)['catch'](()=>null);return _0x5c32c3=_0x4856f4['then'](_0x41abc2=>{return _0x41abc2===null&&(_0x5c32c3=null),_0x41abc2;}),_0x5c32c3;}async function _0x2fd8c7(_0x264088){const _0x482585=_0xf8ecb6,_0x181e72=_0x264088[_0x482585(0x288)]??process[_0x482585(0x7f5)](),_0x56d13b=_0x264088[_0x482585(0x2c1)]??(()=>_0x1be651()),_0x43197e=_0x264088['checkMobilePro']??(()=>_0x4faaf3()),_0x4a9552=_0x264088['seedMobileGraph']??_0xb5d385,_0x18740a=await _0x56d13b()[_0x482585(0x48b)](()=>null);if(!_0x18740a?.[_0x482585(0x73c)])return null;const _0x1af6cb=await _0x43197e()['catch'](()=>![]);if(!_0x1af6cb)return null;return _0x4a9552({'workingDir':_0x181e72,'auth':_0x18740a});}import{promises as _0x8fffa5}from'fs';import{homedir as _0x10cdf6}from'os';import{join as _0x2f4eff,dirname as _0x4234b9}from'path';function _0x17c6cf(){return _0x2f4eff(_0x10cdf6(),'.ceraph','init-tier.json');}async function _0x31acfa(_0x2a2182){const _0x2709b1=_0xf8ecb6,_0x3a13f9=_0x2a2182??_0x17c6cf();let _0x28d8e7;try{_0x28d8e7=await _0x8fffa5[_0x2709b1(0x4e4)](_0x3a13f9,_0x2709b1(0x827));}catch{return null;}let _0x4b1ef9;try{_0x4b1ef9=JSON['parse'](_0x28d8e7);}catch{return null;}if(!_0x4b1ef9||typeof _0x4b1ef9!=='object'||Array[_0x2709b1(0x200)](_0x4b1ef9)){if(_0x2709b1(0x2bb)===_0x2709b1(0x2bb))return null;else _0x31f40c[_0x3f6c8b]=_0x2ad001(_0x25af3e[_0xbd3acb]);}const _0x224dec=_0x4b1ef9,_0x5e1a8e=_0x224dec['tier'];if(_0x5e1a8e!==_0x2709b1(0x7a4)&&_0x5e1a8e!==_0x2709b1(0x2a1))return null;const _0x1e4ffe=typeof _0x224dec['selectedAt']===_0x2709b1(0x30d)&&_0x224dec['selectedAt']['length']>0x0?_0x224dec[_0x2709b1(0x1f8)]:new Date(0x0)[_0x2709b1(0x471)]();return{'tier':_0x5e1a8e,'selectedAt':_0x1e4ffe};}async function _0x29339f(_0x402e2c,_0x431c0d,_0x291f52=Date['now']){const _0x2a64d2=_0xf8ecb6,_0x1d4ebf=_0x431c0d??_0x17c6cf(),_0x51b388={'tier':_0x402e2c,'selectedAt':new Date(_0x291f52())[_0x2a64d2(0x471)]()};return await _0x8fffa5[_0x2a64d2(0x243)](_0x4234b9(_0x1d4ebf),{'recursive':!![],'mode':0x1c0}),await _0x8fffa5['writeFile'](_0x1d4ebf,JSON[_0x2a64d2(0x312)](_0x51b388,null,0x2)+'\x0a',_0x2a64d2(0x827)),_0x51b388;}import{promises as _0x549cd8,constants as _0x754901}from'fs';import{homedir as _0x28d99a,platform}from'os';import{join as _0x89c0d9,dirname as _0x35ced3}from'path';import{spawn as _0x4185f9}from'child_process';import{randomBytes as _0x53ee8f}from'crypto';import{createServer as _0x218d09}from'http';import{createInterface}from'readline';var _0x31b07f=0x5*0x3c*0x3e8;function _0x435104(){const _0x245922=_0xf8ecb6,_0x400a6d=process.env.CERAPH_WEB_BASE_URL?.['trim']();if(_0x400a6d)return _0x400a6d;const _0x57b559=process.env.CERAPH_API_URL?.['trim']();if(_0x57b559){const _0x5d2771=_0x57b559[_0x245922(0x42e)](/\/+$/,'')[_0x245922(0x42e)](/\/api\/mcp$/,'');if(_0x5d2771&&_0x5d2771!==_0x57b559['replace'](/\/+$/,''))return _0x5d2771;}return'https://ceraph.dev';}function _0x5a3230(_0x172d4c={}){const _0x178e63=_0xf8ecb6,_0x1656b8=_0x435104()['replace'](/\/+$/,''),_0x31bc48=_0x172d4c['intent']===_0x178e63(0x2a1)?_0x178e63(0x64f):'';return _0x1656b8+_0x178e63(0x3b4)+_0x31bc48;}async function _0x57ae5f(_0x309cec={}){const _0x4a2dce=_0xf8ecb6,_0x4a0903=_0x309cec['token']?.['trim']()||process.env.CERAPH_AUTH_TOKEN?.[_0x4a2dce(0x668)]();if(_0x4a0903)return _0x4d47b8(_0x4a0903,void 0x0,_0x309cec['authFilePath']);const _0xeb97bb=_0x309cec['timeoutMs']??_0x31b07f,_0x28b037=(_0x309cec[_0x4a2dce(0x27f)]??_0x435104())[_0x4a2dce(0x42e)](/\/+$/,''),_0x583d63=_0x53ee8f(0x10)[_0x4a2dce(0xafa)]('base64url'),_0x3dd81f=await _0xe01f12(_0x583d63,_0x28b037),_0x85b1ac=_0x309cec[_0x4a2dce(0x31e)]===_0x4a2dce(0x2a1)?'&intent=pro':'',_0x4b0695=_0x28b037+'/cli-auth?port='+_0x3dd81f[_0x4a2dce(0x21a)]+'&state='+encodeURIComponent(_0x583d63)+_0x85b1ac,_0x2d86ae=new AbortController();if(_0x309cec[_0x4a2dce(0x773)]){if('kHPaO'===_0x4a2dce(0x51d)){const _0x48a1f6=_0x28e901();return{'status':_0x4a2dce(0x396),'verificationUri':_0x48a1f6,'url':_0x48a1f6,'message':'Sign\x20in\x20to\x20run\x20the\x20complete\x20init.\x20Open\x20the\x20verificationUri,\x20sign\x20in,\x20copy\x20the\x20token\x20it\x20issues,\x20and\x20re-call\x20ceraph_init\x20with\x20that\x20value\x20as\x20`token`.\x20The\x20project\x20is\x20left\x20untouched\x20until\x20you\x20do.'};}else{if(_0x309cec[_0x4a2dce(0x773)][_0x4a2dce(0x652)]){_0x3dd81f['close']();throw new DOMException('aborted',_0x4a2dce(0xace));}_0x309cec[_0x4a2dce(0x773)]['addEventListener'](_0x4a2dce(0x95c),()=>{const _0x5814a7=_0x4a2dce;if('rVXHZ'!==_0x5814a7(0xa81))_0x3dd81f['abort'](new DOMException(_0x5814a7(0x652),'AbortError')),_0x2d86ae[_0x5814a7(0x95c)]();else{if(_0x401ae1['ok'])return{'message':_0x5814a7(0x249)+_0x3d603e['port'],'fatal':![],'status':'bound'};if(_0x52af81[_0x5814a7(0x583)]==='EADDRINUSE')return{'message':_0x5814a7(0x55f)+_0x352529['port']+'\x20is\x20held\x20by\x20another\x20process\x20—\x20usually\x20a\x20second\x20Ceraph\x20MCP\x20(a\x20different\x20project,\x20or\x20a\x20stale/orphaned\x20session),\x20but\x20possibly\x20an\x20unrelated\x20server.\x20This\x20Ceraph\x20server\x20runs\x20with\x20all\x20tools,\x20but\x20it\x20doesn\x27t\x20own\x20the\x20device-signal\x20listener:\x20runtime-error\x20capture\x20reaches\x20this\x20session\x20only\x20if\x20the\x20holder\x20is\x20a\x20Ceraph\x20instance\x20on\x20the\x20SAME\x20project\x20(shared\x20.rn-errors.json)\x20—\x20otherwise\x20errors\x20won\x27t\x20appear\x20here.\x20Free\x20the\x20port\x20(lsof\x20-nP\x20-iTCP:'+_0x413095['port']+')\x20and\x20this\x20session\x20reclaims\x20it\x20automatically.','fatal':![],'status':_0x5814a7(0x4d0)};return{'message':_0x5814a7(0x3c2)+_0x5e8c48['port']+':\x20'+_0x3bbe87[_0x5814a7(0x3dd)]+'.\x20Shim-side\x20signals\x20(JS\x20errors,\x20unhandled\x20rejections,\x20network\x20failures)\x20will\x20be\x20dropped.','fatal':![],'status':'bind-failed'};}},{'once':!![]});}}_0x3bda54(_0x4b0695),process['stderr'][_0x4a2dce(0xaac)](_0x4a2dce(0x2c9)+_0x28b037+'/cli-auth\x20in\x20your\x20browser\x20to\x20sign\x20in.\x20If\x20the\x20browser\x20didn\x27t\x20open,\x20visit\x20the\x20URL\x20manually:\x0a\x20\x20'+_0x4b0695+'\x0a');try{const _0x51783e=await _0x31a21d(_0x3dd81f['tokenPromise'],_0xeb97bb);return _0x4d47b8(_0x51783e[_0x4a2dce(0x1f0)],_0x51783e['email'],_0x309cec['authFilePath']);}catch(_0x34f89e){if(_0x34f89e instanceof _0x3f34b6){process[_0x4a2dce(0x910)][_0x4a2dce(0xaac)](_0x4a2dce(0x4ae));const _0x38b4a4=await Promise['race']([_0x3dd81f['tokenPromise'][_0x4a2dce(0x9c5)](_0x1eed5e=>({'kind':_0x4a2dce(0xaf8),'payload':_0x1eed5e})),_0x102f07(_0x2d86ae[_0x4a2dce(0x773)])['then'](_0x97ba97=>({'kind':_0x4a2dce(0x908),'line':_0x97ba97}))]);if(_0x38b4a4['kind']==='listener')return _0x2d86ae['abort'](),_0x4d47b8(_0x38b4a4[_0x4a2dce(0x35c)][_0x4a2dce(0x1f0)],_0x38b4a4['payload']['email'],_0x309cec['authFilePath']);if(!_0x38b4a4['line']){if('FwgUD'!==_0x4a2dce(0x38e)){if(_0x309cec['signal']?.['aborted'])throw new DOMException(_0x4a2dce(0x652),_0x4a2dce(0xace));throw new Error(_0x4a2dce(0x7a0));}else{if(_0x2ede57)return;_0x58ce14(),_0x1d5b9d(_0x54cebe);}}return _0x4d47b8(_0x38b4a4['line'],void 0x0,_0x309cec['authFilePath']);}throw _0x34f89e;}finally{_0x3dd81f['close']();}}var _0x326cb7=0x10*0x400;async function _0x2ff780(_0x91f8e){return new Promise(_0x134610=>{const _0x58c787=_0xc050;let _0x51c914=0x0;const _0x13c8f4=[];_0x91f8e['on']('data',_0x44236d=>{const _0x5b9cf5=_0xc050;_0x51c914+=_0x44236d['length'];if(_0x51c914>_0x326cb7){_0x91f8e[_0x5b9cf5(0x26c)](),_0x134610(null);return;}_0x13c8f4['push'](_0x44236d);}),_0x91f8e['on']('end',()=>{const _0x256fa1=_0xc050,_0x1bfccc=Buffer[_0x256fa1(0x6b1)](_0x13c8f4)['toString'](_0x256fa1(0x483));if(!_0x1bfccc){_0x134610(null);return;}try{const _0x104f3e=JSON[_0x256fa1(0x981)](_0x1bfccc);_0x104f3e&&typeof _0x104f3e==='object'?_0x134610(_0x104f3e):_0x134610(null);}catch{_0x134610(null);}}),_0x91f8e['on'](_0x58c787(0x3dd),()=>_0x134610(null));});}async function _0xe01f12(_0x46a82a,_0x5a5a40){const _0x4a46bd=_0xf8ecb6;let _0x1b842c,_0x166afb;const _0x1ec15b=new Promise((_0x1667e6,_0x12cff9)=>{_0x1b842c=_0x1667e6,_0x166afb=_0x12cff9;});let _0x8e7323=![],_0x24a706=![],_0x23acad,_0xe10e44;try{_0xe10e44=new URL(_0x5a5a40)['origin'];}catch(_0x5d19f2){throw new Error('Invalid\x20CERAPH_WEB_BASE_URL\x20or\x20CERAPH_API_URL:\x20\x22'+_0x5a5a40+'\x22\x20—\x20must\x20be\x20a\x20valid\x20URL\x20with\x20scheme\x20(e.g.\x20https://ceraph.dev\x20or\x20http://localhost:3000).\x20Original\x20error:\x20'+(_0x5d19f2 instanceof Error?_0x5d19f2[_0x4a46bd(0x531)]:String(_0x5d19f2)));}_0x23acad=_0x218d09((_0x2ca291,_0x3c2e91)=>{const _0x19f5b1=_0x4a46bd;_0x3c2e91[_0x19f5b1(0x96a)](_0x19f5b1(0x44d),_0xe10e44),_0x3c2e91[_0x19f5b1(0x96a)]('Access-Control-Allow-Methods','POST,\x20GET,\x20OPTIONS'),_0x3c2e91[_0x19f5b1(0x96a)](_0x19f5b1(0x527),_0x19f5b1(0x307));if(_0x2ca291['method']==='OPTIONS'){_0x3c2e91[_0x19f5b1(0x66c)]=0xcc,_0x3c2e91[_0x19f5b1(0x5b3)]();return;}const _0x4c8826=new URL(_0x2ca291['url']??'/','http://127.0.0.1:'+_0x2f6a16);if(_0x4c8826[_0x19f5b1(0x667)]!=='/callback'){if('SDRzj'===_0x19f5b1(0x622)){_0x3c2e91['statusCode']=0x194,_0x3c2e91['end']('not\x20found');return;}else _0x1b1909['videoRecorder']=null,void _0x1d9363[_0x19f5b1(0x8bc)]()[_0x19f5b1(0x48b)](_0x221e35=>{const _0x195ee3=_0x19f5b1;_0x3c9e1e['stderr'][_0x195ee3(0xaac)](_0x195ee3(0x94e)+(_0x221e35 instanceof _0xdeca80?_0x221e35[_0x195ee3(0x531)]:_0x3eacc4(_0x221e35))+'\x0a');});}const _0x5980c8=_0x4c8826['searchParams']['get']('state')??'';if(_0x5980c8!==_0x46a82a){_0x3c2e91['statusCode']=0x190,_0x3c2e91[_0x19f5b1(0x5b3)](_0x19f5b1(0x748));return;}if(_0x24a706||_0x8e7323){_0x3c2e91['statusCode']=0x199,_0x3c2e91['end'](_0x24a706?'already-handled':'in-flight');return;}if(_0x2ca291[_0x19f5b1(0x33a)]!=='POST'){_0x3c2e91[_0x19f5b1(0x66c)]=0x195,_0x3c2e91[_0x19f5b1(0x5b3)](_0x19f5b1(0x2da));return;}_0x8e7323=!![],void _0x2ff780(_0x2ca291)['then'](_0x1d7bc4=>{const _0x3a93d9=_0x19f5b1;if('uUYmc'!==_0x3a93d9(0x9bd))return{'ok':!![],'severity':'info','message':'No\x20real\x20iOS\x20device\x20detected\x20—\x20target\x20is\x20simulator,\x20so\x20this\x20is\x20fine.'};else{const _0x49aea4=_0x1d7bc4&&typeof _0x1d7bc4['token']===_0x3a93d9(0x30d)?_0x1d7bc4['token']['trim']():'',_0x5b608b=_0x1d7bc4&&typeof _0x1d7bc4['email']==='string'?_0x1d7bc4['email']:'';if(!_0x49aea4){_0x8e7323=![],_0x3c2e91[_0x3a93d9(0x66c)]=0x190,_0x3c2e91['end'](_0x3a93d9(0xb17));return;}_0x24a706=!![],_0x3c2e91['statusCode']=0xc8,_0x3c2e91[_0x3a93d9(0x96a)](_0x3a93d9(0x307),'text/html;\x20charset=utf-8'),_0x3c2e91[_0x3a93d9(0x5b3)]('<!doctype\x20html><html><body\x20style=\x22font-family:system-ui;padding:32px;background:#0b0f14;color:#e6edf3;\x22><h1>CLI\x20signed\x20in</h1><p>You\x20can\x20close\x20this\x20tab.</p></body></html>');try{_0x23acad[_0x3a93d9(0x716)]();}catch{}_0x1b842c({'token':_0x49aea4,'email':_0x5b608b||void 0x0});}});return;});const _0x2f6a16=await new Promise((_0x53e2a0,_0x4cac68)=>{const _0x110d0d=_0x4a46bd;_0x23acad[_0x110d0d(0x6b8)]('error',_0x4cac68),_0x23acad['listen'](0x0,_0x110d0d(0x2f1),()=>{const _0x5416cc=_0x110d0d,_0x17f7b2=_0x23acad[_0x5416cc(0x506)]();if(!_0x17f7b2||typeof _0x17f7b2===_0x5416cc(0x30d)||typeof _0x17f7b2[_0x5416cc(0x21a)]!=='number'){try{_0x23acad[_0x5416cc(0x716)]();}catch{}_0x4cac68(new Error('Could\x20not\x20bind\x20a\x20free\x20port\x20for\x20the\x20auth\x20listener.'));return;}_0x53e2a0(_0x17f7b2['port']);});});return _0x23acad['on'](_0x4a46bd(0x3dd),_0x4bde04=>_0x166afb(_0x4bde04)),{'port':_0x2f6a16,'tokenPromise':_0x1ec15b,'close':()=>{try{_0x23acad['close']();}catch{}},'abort':_0x56c591=>{const _0x163043=_0x4a46bd;_0x166afb(_0x56c591);try{'CkYtx'!==_0x163043(0x60b)?_0x23acad['close']():void _0x52163d();}catch{}}};}function _0x3bda54(_0x4ade88){const _0x4d4dc2=_0xf8ecb6;try{const _0x1ef233=platform();let _0x539cd4,_0x28d69e;if(_0x1ef233===_0x4d4dc2(0x5ad))_0x539cd4=_0x4d4dc2(0xad9),_0x28d69e=[_0x4ade88];else _0x1ef233===_0x4d4dc2(0xb0c)?(_0x539cd4='cmd',_0x28d69e=['/c','start','',_0x4ade88]):(_0x539cd4=_0x4d4dc2(0x862),_0x28d69e=[_0x4ade88]);const _0x12f43e=_0x4185f9(_0x539cd4,_0x28d69e,{'stdio':'ignore','detached':!![]});_0x12f43e['on']('error',()=>{}),_0x12f43e[_0x4d4dc2(0x2d6)]();}catch{}}var _0x3f34b6=class extends Error{constructor(){const _0x48dff2=_0xf8ecb6;super('listener-timeout'),this['name']=_0x48dff2(0x4a3);}};function _0x31a21d(_0x2f9fdb,_0x1e6039){return new Promise((_0x14afb3,_0x51a4dc)=>{const _0x481dfd=setTimeout(()=>_0x51a4dc(new _0x3f34b6()),_0x1e6039);_0x2f9fdb['then'](_0x12a41a=>{clearTimeout(_0x481dfd),_0x14afb3(_0x12a41a);},_0x532172=>{clearTimeout(_0x481dfd),_0x51a4dc(_0x532172);});});}function _0x102f07(_0x563e8b){return new Promise(_0x5b9bc8=>{const _0x40cd65=_0xc050,_0x2f694d=createInterface({'input':process[_0x40cd65(0x908)],'crlfDelay':Infinity});let _0x3eda29=![];const _0x17d603=_0x2a0821=>{const _0x7304bf=_0x40cd65;if(_0x3eda29)return;_0x3eda29=!![];try{_0x2f694d[_0x7304bf(0x716)]();}catch{}_0x5b9bc8(_0x2a0821);};_0x2f694d[_0x40cd65(0x6b8)]('line',_0x5ed032=>_0x17d603(_0x5ed032['trim']()||null)),_0x2f694d['once']('close',()=>_0x17d603(null));if(_0x563e8b[_0x40cd65(0x652)]){_0x17d603(null);return;}_0x563e8b['addEventListener'](_0x40cd65(0x95c),()=>_0x17d603(null),{'once':!![]});});}function _0x5ab5b6(_0x5e0f26){const _0x580dde=_0xf8ecb6;return _0x5e0f26??_0x89c0d9(_0x28d99a(),_0x580dde(0x4b1),_0x580dde(0xa19));}async function _0x4d47b8(_0x525249,_0x3c31e3,_0x3cce51){const _0x59744a=_0xf8ecb6,_0x145193={'accessToken':_0x525249,'expiresAt':0x0,'githubUser':{'login':'','id':0x0},'storedAt':new Date()[_0x59744a(0x471)](),..._0x3c31e3?{'email':_0x3c31e3}:{}};return await _0x3fb635(_0x145193,_0x3cce51),{'token':_0x525249,..._0x3c31e3?{'email':_0x3c31e3}:{}};}async function _0x3fb635(_0xb31a5b,_0x502d3a){const _0x527a4b=_0xf8ecb6,_0x4c2978=_0x5ab5b6(_0x502d3a);await _0x549cd8[_0x527a4b(0x243)](_0x35ced3(_0x4c2978),{'recursive':!![],'mode':0x1c0});const _0x179236=JSON[_0x527a4b(0x312)](_0xb31a5b,null,0x2)+'\x0a',_0x109b19=_0x4c2978+_0x527a4b(0xa56)+process['pid']+'.'+Math[_0x527a4b(0xafe)]()[_0x527a4b(0xafa)](0x24)[_0x527a4b(0x795)](0x2);try{const _0x2814a0=await _0x549cd8['open'](_0x109b19,_0x754901['O_CREAT']|_0x754901[_0x527a4b(0x985)]|_0x754901[_0x527a4b(0x8d4)],0x180);try{await _0x2814a0['writeFile'](_0x179236);}finally{await _0x2814a0[_0x527a4b(0x716)]();}await _0x549cd8[_0x527a4b(0x661)](_0x109b19,_0x4c2978);}catch(_0x191733){try{await _0x549cd8['unlink'](_0x109b19);}catch{}throw _0x191733;}try{await _0x549cd8[_0x527a4b(0x4d7)](_0x35ced3(_0x4c2978),0x1c0);}catch{}}import{join as _0x3d20c5}from'path';import{readFile as _0x20d412,writeFile as _0x15e27a,access as _0x19e282,mkdir as _0x18a594}from'fs/promises';import{createHash}from'crypto';import{join as _0x9d958}from'path';import{readFile as _0x1da03f}from'fs/promises';import{Project,Node,SyntaxKind}from'ts-morph';var _0xe66411=_0xf8ecb6(0xa5f),_0x33f2a4=[_0xf8ecb6(0x1fc),'babel.config.cjs','.babelrc.js'];function _0xd0b03f(_0x32900e){const _0x42dd0e=_0xf8ecb6;return createHash('sha256')[_0x42dd0e(0x5fd)](_0x32900e)[_0x42dd0e(0xabb)]('hex')[_0x42dd0e(0x795)](0x0,0x10);}async function _0x5169fa(_0x393ec,_0x52bb32=_0x44a683=>_0x1da03f(_0x44a683,'utf-8')){const _0x5d2591=_0xf8ecb6;for(const _0x198c27 of _0x33f2a4){if('zzklm'!=='eMmUg'){const _0x48091b=_0x9d958(_0x393ec,_0x198c27);try{const _0x3286c8=await _0x52bb32(_0x48091b);return{'path':_0x48091b,'text':_0x3286c8};}catch{}}else{const _0x254de2=_0x257957[_0x5d2591(0x3dd)]?':\x20'+_0x155933[_0x5d2591(0x3dd)]:'';_0x18748c['push'](_0x5d2591(0x904)+_0x254de2);}}return null;}function _0x5019e6(_0x26725b,_0x445a9e){const _0x21171d=_0xf8ecb6;if(Node[_0x21171d(0x54b)](_0x26725b)||Node[_0x21171d(0x7cd)](_0x26725b))return _0x26725b['getLiteralText']()===_0x445a9e;if(Node[_0x21171d(0x3ea)](_0x26725b)){const _0x557cac=_0x26725b[_0x21171d(0x912)]()[0x0];return!!_0x557cac&&_0x5019e6(_0x557cac,_0x445a9e);}if(Node[_0x21171d(0x503)](_0x26725b)){const _0x1f179a=_0x26725b[_0x21171d(0x708)]();if(Node['isIdentifier'](_0x1f179a)&&_0x1f179a[_0x21171d(0x3a0)]()===_0x21171d(0x94a)){const _0x52c7b9=_0x26725b['getArguments']()[0x0];return!!_0x52c7b9&&_0x5019e6(_0x52c7b9,_0x445a9e);}}return![];}function _0x101725(_0x22aae1){const _0x2e184a=_0xf8ecb6,_0x4515ce=new Project({'useInMemoryFileSystem':!![],'compilerOptions':{'allowJs':!![]}}),_0x4bb463=_0x4515ce['createSourceFile']('babel.config.js',_0x22aae1);for(const _0x3e9e61 of _0x4bb463['getDescendantsOfKind'](SyntaxKind[_0x2e184a(0x2ba)])){if(_0x3e9e61['getName']()!=='plugins')continue;const _0x41f755=_0x3e9e61[_0x2e184a(0x7b9)]();if(_0x41f755&&Node[_0x2e184a(0x3ea)](_0x41f755))return{'array':_0x41f755,'sourceText':_0x4bb463[_0x2e184a(0x8e7)]()};}return null;}function _0x5b5efa(_0x10b85f){const _0x304309=_0xf8ecb6,_0x354e05=_0x101725(_0x10b85f);if(!_0x354e05)return![];return _0x354e05[_0x304309(0x20f)][_0x304309(0x912)]()['some'](_0x247b59=>_0x5019e6(_0x247b59,_0xe66411));}var _0x5ddcab='react-native-reanimated/plugin';function _0x339bd1(_0xd9f614){const _0x507c1d=_0xf8ecb6;return _0x507c1d(0x602)+_0xd9f614+'\x27],\x0a\x20\x20\x20\x20plugins:\x20[\x27'+_0xe66411+_0x507c1d(0x5d4);}async function _0x4c8152(_0x144163){const _0x53cea8=_0xf8ecb6;try{return await _0x19e282(_0x144163),!![];}catch{return _0x53cea8(0x4e1)===_0x53cea8(0x4e1)?![]:(_0x516c29+=0x1,_0x53cea8(0x2b3)+_0x2cadf3[_0x53cea8(0x2f8)]()[_0x53cea8(0xafa)](0x24)+'-'+_0x46bd1d['toString'](0x24));}}async function _0x4d599f(_0x559e1b,_0x27f136){for(const _0x507eed of _0x33f2a4){const _0x3bcdb6=_0x3d20c5(_0x559e1b,_0x507eed);if(await _0x27f136(_0x3bcdb6))return _0x3bcdb6;}return null;}async function _0x20bee7(_0xe71a1a,_0x29603d={}){const _0x376d3a=_0xf8ecb6,_0x5b4bb9=_0x29603d['readFile']??(_0x3de3e5=>_0x20d412(_0x3de3e5,_0x376d3a(0x827))),_0x3ef792=_0x29603d['writeFile']??((_0x444873,_0x19bd73)=>_0x15e27a(_0x444873,_0x19bd73,'utf-8')),_0x4c120d=_0x29603d[_0x376d3a(0x753)]??_0x4c8152,_0x4f02c6=await _0x4d599f(_0xe71a1a,_0x4c120d);if(!_0x4f02c6){let _0x5a8c7a=_0x376d3a(0x47c);try{const _0x305644=JSON[_0x376d3a(0x981)](await _0x5b4bb9(_0x3d20c5(_0xe71a1a,'package.json'))),_0x1d4d0f={..._0x305644[_0x376d3a(0x8b4)],..._0x305644[_0x376d3a(0xb2a)]};if(!_0x1d4d0f['expo'])_0x5a8c7a=_0x376d3a(0x6ea);}catch{}const _0x58d8eb=_0x3d20c5(_0xe71a1a,'babel.config.js'),_0x3724f2=_0x339bd1(_0x5a8c7a);return await _0x3ef792(_0x58d8eb,_0x3724f2),await _0x296a92(_0xe71a1a,_0x3724f2,_0x29603d,_0x3ef792),{'kind':_0x376d3a(0x8f4),'path':_0x58d8eb,'preset':_0x5a8c7a};}let _0x367c65;try{_0x367c65=await _0x5b4bb9(_0x4f02c6);}catch{return{'kind':_0x376d3a(0x50a),'path':_0x4f02c6,'reason':'could\x20not\x20read\x20the\x20file'};}const _0x475af2=_0x101725(_0x367c65);if(_0x475af2){const _0x5e8893=_0x475af2[_0x376d3a(0x20f)]['getElements']();if(_0x5e8893['some'](_0x38a1a3=>_0x5019e6(_0x38a1a3,_0xe66411)))return await _0x296a92(_0xe71a1a,_0x367c65,_0x29603d,_0x3ef792),{'kind':'already-present','path':_0x4f02c6};const _0x3a21f8=_0x5e8893[_0x376d3a(0x713)](_0x52531b=>_0x5019e6(_0x52531b,_0x5ddcab)),_0x360900=_0x3a21f8>=0x0?_0x3a21f8:_0x5e8893['length'];_0x475af2[_0x376d3a(0x20f)]['insertElement'](_0x360900,'\x22'+_0xe66411+'\x22');const _0xdcb840=_0x475af2[_0x376d3a(0x20f)][_0x376d3a(0x400)]()[_0x376d3a(0x8e7)]();return await _0x3ef792(_0x4f02c6,_0xdcb840),await _0x296a92(_0xe71a1a,_0xdcb840,_0x29603d,_0x3ef792),{'kind':_0x376d3a(0x7ed),'path':_0x4f02c6,'beforeReanimated':_0x3a21f8>=0x0};}return{'kind':'needs-manual','path':_0x4f02c6,'reason':'no\x20`plugins:\x20[...]`\x20array\x20found\x20to\x20edit\x20safely\x20(dynamic\x20config?).\x20Add\x20\x22'+_0xe66411+'\x22\x20to\x20your\x20babel\x20plugins,\x20before\x20any\x20\x22'+_0x5ddcab+_0x376d3a(0x3ad)};}async function _0x296a92(_0x566c76,_0x220bab,_0x5a2ee5,_0x480aaa){const _0x473ad8=_0xf8ecb6,_0x2455c5=_0x3d20c5(_0x566c76,_0x473ad8(0x4b1));if(!_0x5a2ee5['writeFile'])try{await _0x18a594(_0x2455c5,{'recursive':!![]});}catch{}const _0x149640={'pluginVersion':_0x5a2ee5[_0x473ad8(0x371)]??_0x373cd1,'babelConfigHash':_0xd0b03f(_0x220bab)};await _0x480aaa(_0x3d20c5(_0x2455c5,'testid-config.json'),JSON['stringify'](_0x149640,null,0x2)+'\x0a');}var _0x373cd1=_0xf8ecb6(0x20d);async function _0x316cc9(_0x4343d7){const _0x2dd160=_0xf8ecb6,{projectDir:_0x4463b0,sentinel:_0xf72ebe,readFile:_0x434e74}=_0x4343d7;if(!_0xf72ebe)return{'ready':![],'reason':'no-sentinel-received'};if(typeof _0xf72ebe[_0x2dd160(0x371)]!=='string'||typeof _0xf72ebe[_0x2dd160(0x726)]!=='string')return{'ready':![],'reason':'no-sentinel-received'};const _0x2b1944=await _0x5169fa(_0x4463b0,_0x434e74);if(!_0x2b1944)return{'ready':![],'reason':'no-local-babel-config'};if(!_0x5b5efa(_0x2b1944['text']))return{'ready':![],'reason':_0x2dd160(0x3e8)};if(_0xf72ebe[_0x2dd160(0x371)]!==_0x373cd1)return{'ready':![],'reason':_0x2dd160(0x499)};if(_0xf72ebe[_0x2dd160(0x726)]!==_0xd0b03f(_0x2b1944[_0x2dd160(0x3e0)]))return{'ready':![],'reason':_0x2dd160(0x876)};return{'ready':!![]};}import{rename as _0x46cae0,unlink as _0x15af31,writeFile as _0x39617a}from'fs/promises';import{join as _0x29d6aa}from'path';function _0x417aee(_0x547b53){const _0x155b79=_0x29d6aa(_0x547b53,'.rn-flow-progress.json'),_0x74a973=async _0x35ccf3=>{const _0x5077c7=_0xc050,_0x3afabf=_0x155b79+'.tmp.'+process[_0x5077c7(0x8e3)]+'.'+Math['random']()[_0x5077c7(0xafa)](0x24)[_0x5077c7(0x795)](0x2);try{await _0x39617a(_0x3afabf,_0x35ccf3,_0x5077c7(0x827)),await _0x46cae0(_0x3afabf,_0x155b79);}catch(_0x45fab5){try{await _0x15af31(_0x3afabf);}catch{}throw _0x45fab5;}};return{async 'write'(_0x154c0a){try{await _0x74a973(JSON['stringify']({'timestamp':_0x154c0a['timestamp'],'entry':_0x154c0a},null,0x2));}catch{}},async 'clear'(){const _0x269b91=_0xc050;try{await _0x74a973(JSON[_0x269b91(0x312)]({'timestamp':new Date()['toISOString'](),'entry':null},null,0x2));}catch{}}};}import{spawn as _0x1abfff}from'child_process';import{mkdir as _0x475a69,readFile as _0x4248c2,access as _0x29f8f2}from'fs/promises';import{join as _0x17e7d3}from'path';import{readFile as _0x3dbb34,access as _0x4be249}from'fs/promises';import{join as _0x31c7a9}from'path';var _0x549207=[{'file':'pnpm-lock.yaml','pm':_0xf8ecb6(0x8f6)},{'file':_0xf8ecb6(0x66b),'pm':_0xf8ecb6(0x2d0)},{'file':'bun.lockb','pm':_0xf8ecb6(0x524)},{'file':'bun.lock','pm':_0xf8ecb6(0x524)},{'file':_0xf8ecb6(0x3c3),'pm':'npm'}];async function _0x5211f4(_0x4eeace){const _0x299fc4=_0xf8ecb6;try{return await _0x4be249(_0x4eeace),!![];}catch{return'sShtq'===_0x299fc4(0x54c)?![]:{'ok':!![],'severity':_0x299fc4(0x799),'message':'All\x20<CeraphCamera>\x20components\x20have\x20an\x20explicit\x20imageKey\x20(or\x20use\x20a\x20runtime\x20sentinel).'};}}async function _0x20b434(_0xdb38da){const _0x5856f7=_0xf8ecb6;for(const {file:_0x3ec943,pm:_0x18b104}of _0x549207){if(await _0x5211f4(_0x31c7a9(_0xdb38da,_0x3ec943)))return _0x18b104;}return _0x5856f7(0x26d);}function _0x46ad3b(_0x546337,_0x81481=_0xf8ecb6(0x28d)){const _0x58fb71=_0xf8ecb6;switch(_0x546337){case _0x58fb71(0x8f6):return{'bin':_0x58fb71(0x8f6),'args':['add',_0x81481]};case'yarn':return{'bin':_0x58fb71(0x2d0),'args':[_0x58fb71(0x856),_0x81481]};case'bun':return{'bin':'bun','args':['add',_0x81481]};case _0x58fb71(0x26d):return{'bin':'npm','args':[_0x58fb71(0x639),_0x81481]};}}async function _0x47e59c(_0x581cbb,_0x188679='@ceraph/react-native-mcp'){const _0x9ab5b6=_0xf8ecb6;let _0x2f192c;try{_0x2f192c=await _0x3dbb34(_0x31c7a9(_0x581cbb,_0x9ab5b6(0x2a8)),_0x9ab5b6(0x827));}catch{return![];}let _0x1ad5c3;try{_0x1ad5c3=JSON['parse'](_0x2f192c);}catch{return![];}if(!_0x1ad5c3||typeof _0x1ad5c3!==_0x9ab5b6(0x9e3))return![];const _0x1cb9f1=_0x1ad5c3,_0x5159e4=_0x1cb9f1[_0x9ab5b6(0x8b4)],_0x195fb5=_0x1cb9f1[_0x9ab5b6(0xb2a)];return Boolean(_0x5159e4?.[_0x188679]||_0x195fb5?.[_0x188679]);}import{chmod,rename as _0x42c49e,stat as _0x356e3d,unlink as _0x437a3b,writeFile as _0x11ed44}from'fs/promises';import{dirname as _0x20b344,join as _0xcc6a6}from'path';async function _0x18b8bb(_0x15bc3f,_0x565d92){const _0x52f3a2=_0xf8ecb6,_0x5ca37d=_0x20b344(_0x15bc3f),_0x1ca4a1=_0xcc6a6(_0x5ca37d,_0x15bc3f['slice'](_0x5ca37d['length']+0x1)+'.tmp.'+process[_0x52f3a2(0x8e3)]+'.'+Math[_0x52f3a2(0xafe)]()['toString'](0x24)['slice'](0x2));let _0xbc61c4;try{const _0x13169b=await _0x356e3d(_0x15bc3f);_0xbc61c4=_0x13169b[_0x52f3a2(0x315)]&0x1ff;}catch{}try{await _0x11ed44(_0x1ca4a1,_0x565d92,'utf-8'),_0xbc61c4!==void 0x0&&await chmod(_0x1ca4a1,_0xbc61c4),await _0x42c49e(_0x1ca4a1,_0x15bc3f);}catch(_0x16ae56){try{await _0x437a3b(_0x1ca4a1);}catch{}throw _0x16ae56;}}import{readFile as _0x12b993}from'fs/promises';async function _0x354490(_0x2c6dd9){const _0x1f384c=_0xf8ecb6;let _0x2c4b0e;try{_0x2c4b0e=await _0x12b993(_0x2c6dd9,'utf-8');}catch(_0x1aace8){const _0x5eb686=_0x1aace8;if(_0x5eb686&&_0x5eb686['code']===_0x1f384c(0x5a8))return{'kind':_0x1f384c(0x934)};throw _0x1aace8;}try{return{'kind':'ok','value':JSON[_0x1f384c(0x981)](_0x2c4b0e)};}catch(_0x58be5a){return{'kind':'malformed','raw':_0x2c4b0e,'error':_0x58be5a};}}function _0x29787e(_0x25f834){const _0x347ea6=_0xf8ecb6;return _0x25f834!=null&&typeof _0x25f834===_0x347ea6(0x9e3)&&!Array[_0x347ea6(0x200)](_0x25f834);}import{mkdir as _0xe8bde8}from'fs/promises';import{join as _0x1d9beb}from'path';var _0x3c3e94='react-native-mcp',_0x49cf2c=['.claude',_0xf8ecb6(0x5ea)];async function _0x3031b6(_0x1b2bef){const _0x5119b0=_0xf8ecb6,_0x4b83d9=_0x1d9beb(_0x1b2bef,..._0x49cf2c),_0x1807a6=await _0x354490(_0x4b83d9);if(_0x1807a6[_0x5119b0(0xb14)]==='malformed')return{'status':'preserved','settingsPath':_0x4b83d9,'reason':'existing\x20settings\x20at\x20'+_0x4b83d9+'\x20is\x20malformed\x20JSON\x20—\x20preserved;\x20fix\x20it\x20manually\x20then\x20re-run'};if(_0x1807a6['kind']==='ok'&&!_0x29787e(_0x1807a6[_0x5119b0(0x39d)]))return{'status':_0x5119b0(0x93c),'settingsPath':_0x4b83d9,'reason':_0x5119b0(0x6df)+_0x4b83d9+_0x5119b0(0x2ca)+(Array[_0x5119b0(0x200)](_0x1807a6[_0x5119b0(0x39d)])?'array':typeof _0x1807a6['value'])+')\x20—\x20preserved'};const _0x1b8f4a=_0x1807a6['kind']==='ok'?_0x1807a6['value']:{};if(_0x1b8f4a['enableAllProjectMcpServers']===!![])return{'status':_0x5119b0(0x485),'settingsPath':_0x4b83d9};const _0xb94d2d=_0x1b8f4a['enabledMcpjsonServers'];if(_0xb94d2d!==void 0x0){if(!Array[_0x5119b0(0x200)](_0xb94d2d)||!_0xb94d2d[_0x5119b0(0xaad)](_0x4f02be=>typeof _0x4f02be==='string'))return{'status':_0x5119b0(0x93c),'settingsPath':_0x4b83d9,'reason':'existing\x20enabledMcpjsonServers\x20in\x20'+_0x4b83d9+'\x20is\x20not\x20an\x20array\x20of\x20strings\x20—\x20preserved'};if(_0xb94d2d['includes'](_0x3c3e94))return{'status':'already-approved','settingsPath':_0x4b83d9};}const _0xc6bc3e=Array[_0x5119b0(0x200)](_0xb94d2d)?[..._0xb94d2d,_0x3c3e94]:[_0x3c3e94];return _0x1b8f4a['enabledMcpjsonServers']=_0xc6bc3e,await _0xe8bde8(_0x1d9beb(_0x1b2bef,_0x5119b0(0x3fe)),{'recursive':!![]}),await _0x18b8bb(_0x4b83d9,JSON[_0x5119b0(0x312)](_0x1b8f4a,null,0x2)+'\x0a'),{'status':'approved','settingsPath':_0x4b83d9};}import{readFile as _0xf0c9eb,unlink as _0x4eba49,access as _0x35a3bd}from'fs/promises';import{homedir as _0x13a7d7}from'os';import{join as _0x3e7cb3}from'path';var _0x1e62a8=[_0xf8ecb6(0x5ec),_0x3e7cb3(_0xf8ecb6(0x85a),'mcp.json'),_0x3e7cb3('.vscode',_0xf8ecb6(0xab3))],_0x355c1c=[_0x3e7cb3('.codex','config.toml')],_0x89e7d2=_0x3e7cb3('.claude','settings.local.json'),_0x3246c9=[{'label':'Windsurf','dir':['.codeium',_0xf8ecb6(0x28c)],'file':['.codeium','windsurf','mcp_config.json']},{'label':_0xf8ecb6(0x6e9),'dir':[_0xf8ecb6(0xaec),'antigravity'],'file':[_0xf8ecb6(0xaec),_0xf8ecb6(0x601),_0xf8ecb6(0xac0)]}];function _0x3c12ca(_0xed4c1f){const _0x3700ad=_0xf8ecb6,_0x4e5609=_0xed4c1f??_0x13a7d7();return _0x3246c9['map'](_0x4633f=>({'label':_0x4633f['label'],'path':_0x3e7cb3(_0x4e5609,..._0x4633f[_0x3700ad(0x448)])}));}var _0x249835=['mobile-mcp','react-native-mcp'],_0x5b996d=[_0xf8ecb6(0x7df)];async function _0x3846cd(_0x18e1fc){try{return await _0x35a3bd(_0x18e1fc),!![];}catch{return![];}}async function _0x53f87e(_0x43ea54,_0x187a90={}){const _0x1435a1=_0xf8ecb6,_0x58b417=_0x187a90[_0x1435a1(0x4e4)]??(_0x4f778e=>_0xf0c9eb(_0x4f778e,'utf-8')),_0x445c40=_0x187a90['writeFile']??_0x18b8bb,_0xb7978b=_0x187a90['unlink']??(_0xc0444=>_0x4eba49(_0xc0444)),_0x478320=_0x187a90['fileExists']??_0x3846cd,_0x12ee3e=[];for(const _0x3e2ad9 of _0x1e62a8){const _0x1ac79a=_0x3e7cb3(_0x43ea54,_0x3e2ad9);if(!await _0x478320(_0x1ac79a)){_0x12ee3e['push']({'path':_0x1ac79a,'status':_0x1435a1(0x28b)});continue;}_0x12ee3e[_0x1435a1(0x4d1)](await _0x4edf65(_0x1ac79a,{'read':_0x58b417,'write':_0x445c40,'unlink':_0xb7978b}));}for(const _0xe636f5 of _0x355c1c){const _0x5af817=_0x3e7cb3(_0x43ea54,_0xe636f5);if(!await _0x478320(_0x5af817)){_0x12ee3e['push']({'path':_0x5af817,'status':_0x1435a1(0x28b)});continue;}_0x12ee3e['push'](await _0x5846ca(_0x5af817,{'read':_0x58b417,'write':_0x445c40,'unlink':_0xb7978b}));}const _0x3e4a14=_0x3e7cb3(_0x43ea54,_0x89e7d2);if(!await _0x478320(_0x3e4a14)){if(_0x1435a1(0x866)==='RAEvP')return _0x480e80('screen_screenshot',_0x2698cd);else _0x12ee3e['push']({'path':_0x3e4a14,'status':_0x1435a1(0x28b)});}else _0x12ee3e[_0x1435a1(0x4d1)](await _0x51ef7f(_0x3e4a14,{'read':_0x58b417,'write':_0x445c40,'unlink':_0xb7978b}));return{'files':_0x12ee3e};}async function _0x4edf65(_0x145345,_0x16efda){const _0x2be643=_0xf8ecb6,_0x402478=await _0x16efda[_0x2be643(0xad6)](_0x145345);let _0x19e3d9;try{_0x19e3d9=JSON['parse'](_0x402478);}catch{return{'path':_0x145345,'status':'malformed'};}if(!_0x19e3d9||typeof _0x19e3d9!==_0x2be643(0x9e3)||Array['isArray'](_0x19e3d9))return{'path':_0x145345,'status':'malformed'};const _0x1da193=_0x19e3d9,_0x734e32=_0x1da193['mcpServers'];if(!_0x734e32||typeof _0x734e32!==_0x2be643(0x9e3)||Array[_0x2be643(0x200)](_0x734e32))return{'path':_0x145345,'status':_0x2be643(0x5d9)};const _0x51a58b=_0x734e32,_0x5a0b22=[];for(const _0x7bad90 of _0x249835){_0x7bad90 in _0x51a58b&&(delete _0x51a58b[_0x7bad90],_0x5a0b22[_0x2be643(0x4d1)](_0x7bad90));}if(_0x5a0b22[_0x2be643(0x3b7)]===0x0)return{'path':_0x145345,'status':_0x2be643(0x5d9)};const _0x1d7f1a=Object[_0x2be643(0x8c1)](_0x1da193)[_0x2be643(0x529)](_0x469308=>_0x469308!==_0x2be643(0x67f)),_0x444e5f=Object['keys'](_0x51a58b)[_0x2be643(0x3b7)]===0x0;if(_0x444e5f&&_0x1d7f1a['length']===0x0)return await _0x16efda[_0x2be643(0xa91)](_0x145345),{'path':_0x145345,'status':'deleted-file','removedKeys':_0x5a0b22};const _0xb58344=_0x402478[_0x2be643(0x2f3)](/\n(\s+)"/),_0x48e16b=_0xb58344?.[0x1]??'\x20\x20',_0x3b58eb=_0x402478[_0x2be643(0xaa5)]('\x0a'),_0x73018d=JSON[_0x2be643(0x312)](_0x1da193,null,_0x48e16b);return await _0x16efda['write'](_0x145345,_0x3b58eb?_0x73018d+'\x0a':_0x73018d),{'path':_0x145345,'status':'removed-entries','removedKeys':_0x5a0b22};}async function _0x51ef7f(_0x38babd,_0x2b8991){const _0x3ee2e1=_0xf8ecb6,_0x5b4867=await _0x2b8991[_0x3ee2e1(0xad6)](_0x38babd);let _0x4d60b2;try{_0x4d60b2=JSON[_0x3ee2e1(0x981)](_0x5b4867);}catch{return{'path':_0x38babd,'status':'malformed'};}if(!_0x4d60b2||typeof _0x4d60b2!==_0x3ee2e1(0x9e3)||Array['isArray'](_0x4d60b2))return{'path':_0x38babd,'status':_0x3ee2e1(0xa16)};const _0x55bc8e=_0x4d60b2,_0x13448e=_0x55bc8e['enabledMcpjsonServers'];if(!Array['isArray'](_0x13448e)||!_0x13448e[_0x3ee2e1(0x27e)](_0x3c3e94))return{'path':_0x38babd,'status':'no-changes'};const _0x356df0=_0x13448e[_0x3ee2e1(0x529)](_0x35c524=>_0x35c524!==_0x3c3e94);_0x356df0['length']===0x0?delete _0x55bc8e['enabledMcpjsonServers']:_0x55bc8e['enabledMcpjsonServers']=_0x356df0;if(Object['keys'](_0x55bc8e)['length']===0x0)return await _0x2b8991['unlink'](_0x38babd),{'path':_0x38babd,'status':_0x3ee2e1(0x518),'removedKeys':[_0x3c3e94]};const _0x1ea203=_0x5b4867['match'](/\n(\s+)"/),_0x525d28=_0x1ea203?.[0x1]??'\x20\x20',_0x4a0f75=_0x5b4867['endsWith']('\x0a'),_0x57892b=JSON['stringify'](_0x55bc8e,null,_0x525d28);return await _0x2b8991['write'](_0x38babd,_0x4a0f75?_0x57892b+'\x0a':_0x57892b),{'path':_0x38babd,'status':_0x3ee2e1(0x63d),'removedKeys':[_0x3c3e94]};}function _0x896b90(_0x3a234d,_0x14f30e){const _0x4263ad=_0xf8ecb6,_0x353149=_0x3a234d[_0x4263ad(0x51a)](/\r?\n/),_0x54d106=_0x3a234d['endsWith']('\x0a');if(_0x54d106&&_0x353149[_0x4263ad(0x3b7)]>0x0&&_0x353149[_0x353149[_0x4263ad(0x3b7)]-0x1]===''){if(_0x4263ad(0x3ab)!==_0x4263ad(0x767))_0x353149[_0x4263ad(0x253)]();else{if(_0x54a7b8[_0x4263ad(0x746)](_0x1953a6))return _0x4263ad(0x79a);}}const _0x178066=[],_0x3f1eb9=[];let _0x3a9b59=![],_0x15f751=![];for(let _0x141e43=0x0;_0x141e43<_0x353149['length'];_0x141e43++){const _0x39747e=_0x353149[_0x141e43],_0x2a74d9=_0x39747e[_0x4263ad(0x668)](),_0x4fff5b=_0x2a74d9[_0x4263ad(0x746)]('[')&&_0x2a74d9['endsWith'](']');if(_0x4fff5b){if(_0x4263ad(0x6de)!=='BbEau'){const _0x47858e=_0x2a74d9['slice'](0x1,-0x1)[_0x4263ad(0x668)](),_0x5e0afd=_0x14f30e[_0x4263ad(0x979)](_0x47858e);if(_0x5e0afd){_0x178066['length']>0x0&&_0x178066[_0x178066['length']-0x1]===''&&_0x178066[_0x4263ad(0x253)]();const _0x4b095f=_0x47858e['startsWith'](_0x4263ad(0x8a2))?_0x47858e[_0x4263ad(0x795)]('mcp_servers.'[_0x4263ad(0x3b7)]):_0x47858e;_0x3f1eb9['push'](_0x4b095f),_0x3a9b59=!![],_0x15f751=![];continue;}(_0x3a9b59||_0x15f751)&&_0x178066['length']>0x0&&_0x178066[_0x178066['length']-0x1]!==''&&_0x178066[_0x4263ad(0x4d1)]('');_0x3a9b59=![],_0x15f751=![],_0x178066[_0x4263ad(0x4d1)](_0x39747e);continue;}else this['projectDir']=_0x469014,this['cacheDir']=_0x420f8e,this[_0x4263ad(0x3a6)]=_0x1b7539(_0x50edda,'last-build-snapshot.json');}if(_0x3a9b59){_0x15f751=!![];continue;}if(_0x15f751){if(_0x2a74d9==='')continue;_0x178066['length']>0x0&&_0x178066[_0x178066['length']-0x1]!==''&&_0x178066['push']('');_0x15f751=![],_0x178066['push'](_0x39747e);continue;}_0x178066[_0x4263ad(0x4d1)](_0x39747e);}while(_0x178066['length']>0x0&&_0x178066[_0x178066['length']-0x1]===''){_0x178066['pop']();}const _0x4378b7=_0x178066[_0x4263ad(0x4ec)]('\x0a'),_0x1a22cf=_0x54d106&&_0x4378b7['length']>0x0?_0x4378b7+'\x0a':_0x4378b7;return{'next':_0x1a22cf,'removedKeys':_0x3f1eb9};}async function _0x5846ca(_0x2c54c9,_0x2cdc82){const _0x555a00=_0xf8ecb6,_0x40ffae=await _0x2cdc82[_0x555a00(0xad6)](_0x2c54c9),_0xf51dc5=new Set(_0x249835['map'](_0x494c7c=>'mcp_servers.'+_0x494c7c)),{next:_0x1825be,removedKeys:_0x32aac6}=_0x896b90(_0x40ffae,_0xf51dc5);if(_0x32aac6[_0x555a00(0x3b7)]===0x0)return{'path':_0x2c54c9,'status':'no-changes'};if(_0x1825be['trim']()[_0x555a00(0x3b7)]===0x0)return await _0x2cdc82['unlink'](_0x2c54c9),{'path':_0x2c54c9,'status':_0x555a00(0x518),'removedKeys':_0x32aac6};return await _0x2cdc82[_0x555a00(0xaac)](_0x2c54c9,_0x1825be),{'path':_0x2c54c9,'status':_0x555a00(0x63d),'removedKeys':_0x32aac6};}async function _0xebaef1(_0x7185a={}){const _0x129db5=_0xf8ecb6,_0xc2aca7=_0x7185a['readFile']??(_0x5e39cc=>_0xf0c9eb(_0x5e39cc,'utf-8')),_0x53afb1=_0x7185a[_0x129db5(0x865)]??_0x18b8bb,_0x62b246=_0x7185a[_0x129db5(0xa91)]??(_0xeb90cd=>_0x4eba49(_0xeb90cd)),_0x1071e8=_0x7185a['fileExists']??_0x3846cd,_0x2ee372=[];for(const {path:_0x20315c}of _0x3c12ca(_0x7185a['home'])){if(!await _0x1071e8(_0x20315c)){_0x2ee372['push']({'path':_0x20315c,'status':'not-found'});continue;}_0x2ee372[_0x129db5(0x4d1)](await _0x4edf65(_0x20315c,{'read':_0xc2aca7,'write':_0x53afb1,'unlink':_0x62b246}));}return{'files':_0x2ee372};}import{readFile as _0x1489a0,writeFile as _0x119e20,readdir as _0x47e980}from'fs/promises';import{basename,dirname as _0x315efe,join as _0x52da00,relative as _0x35952a,sep as _0x1957bf}from'path';var _0x3cc529,_0x5d51c4,_0x8d83c2,_0x164504,_0x4cad3c=![];async function _0x252b24(){const _0x59c0f6=_0xf8ecb6;if(_0x4cad3c)return;const _0x17c8c4=await import(_0x59c0f6(0x74a));({IndentationText:_0x3cc529,Project:_0x5d51c4,SyntaxKind:_0x8d83c2,Node:_0x164504}=_0x17c8c4,_0x4cad3c=!![]);}var _0x3f22d5=[_0xf8ecb6(0x7b4),'src',_0xf8ecb6(0x9b8)],_0x52136a=new Set(['.tsx','.jsx']),_0x1184a8=new Set(['node_modules','dist',_0xf8ecb6(0xb1a),'.git',_0xf8ecb6(0x4b1),_0xf8ecb6(0x759),_0xf8ecb6(0x2fb),_0xf8ecb6(0x6c9),'android']),_0x5e27f2='@ceraph/react-native-mcp/shim',_0x315fe5='CeraphCamera';function _0x5c24db(_0x19f125){const _0x4e244c=_0xf8ecb6,_0x104aad=basename(_0x19f125)[_0x4e244c(0x42e)](/\.(tsx|jsx)$/i,''),_0x5aaef1=basename(_0x315efe(_0x19f125)),_0xe82195=new Set([_0x4e244c(0x87c),'index','screen',_0x4e244c(0x761),'layout']),_0x98f36c=_0xe82195['has'](_0x104aad[_0x4e244c(0x5b5)]())?_0x5aaef1:_0x104aad,_0x131731=_0x98f36c[_0x4e244c(0x42e)](/([a-z0-9])([A-Z])/g,_0x4e244c(0x855))['toLowerCase']()[_0x4e244c(0x42e)](/[^a-z0-9]+/g,'-')['replace'](/^-+|-+$/g,'');return _0x131731['length']>0x0?_0x131731:_0x4e244c(0x55e);}async function _0x462a91(_0xbe0870){const _0x478bf1=_0xf8ecb6,_0x30495c=[];async function _0x2c0ab2(_0x3ad015){const _0x5a093a=_0xc050;let _0x41a730;try{_0x41a730=await _0x47e980(_0x3ad015,{'withFileTypes':!![]});}catch{return;}for(const _0x2a7412 of _0x41a730){const _0x4d6a61=_0x52da00(_0x3ad015,_0x2a7412['name']);if(_0x2a7412['isDirectory']()){if(_0x1184a8[_0x5a093a(0x979)](_0x2a7412[_0x5a093a(0x9e5)]))continue;await _0x2c0ab2(_0x4d6a61);continue;}if(!_0x2a7412[_0x5a093a(0x237)]())continue;const _0x1c5ba1=_0x2a7412['name']['lastIndexOf']('.');if(_0x1c5ba1<0x0)continue;const _0x54762e=_0x2a7412['name'][_0x5a093a(0x795)](_0x1c5ba1)['toLowerCase']();if(!_0x52136a[_0x5a093a(0x979)](_0x54762e))continue;_0x30495c['push'](_0x4d6a61);}}for(const _0x27891f of _0x3f22d5){await _0x2c0ab2(_0x52da00(_0xbe0870,_0x27891f));}for(const _0x4a8a10 of['App.tsx',_0x478bf1(0x46e)]){_0x30495c[_0x478bf1(0x4d1)](_0x52da00(_0xbe0870,_0x4a8a10));}return _0x30495c;}function _0x544759(_0x3c7b60){const _0x40b956=_0xf8ecb6,_0x5a7f14=new _0x5d51c4({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1},'manipulationSettings':{'indentationText':_0x3cc529[_0x40b956(0x76e)]}});for(const _0x2d775b of _0x3c7b60){try{_0x5a7f14[_0x40b956(0x8d8)](_0x2d775b);}catch{}}return _0x5a7f14;}function _0x4b5155(_0x3f5627,_0x3712b9){const _0x1e5349=_0xf8ecb6,_0x3915dc=[];return _0x3f5627[_0x1e5349(0x6f8)](_0x1cd3ea=>{const _0x18947a=_0x1e5349;if(_0x164504[_0x18947a(0x4e5)](_0x1cd3ea)||_0x164504[_0x18947a(0x1f4)](_0x1cd3ea)){const _0x5be95d=_0x1cd3ea['getTagNameNode']();_0x5be95d[_0x18947a(0x3a0)]()===_0x3712b9&&_0x3915dc['push'](_0x1cd3ea);}}),_0x3915dc;}function _0xd38ecb(_0x5d5f23){const _0x420ed0=_0xf8ecb6,_0x5a555a=_0x5d5f23[_0x420ed0(0x8c7)]();for(const _0x17d12b of _0x5a555a){if(_0x164504[_0x420ed0(0x7fd)](_0x17d12b)){const _0xfcff42=_0x17d12b[_0x420ed0(0x879)]();if(_0xfcff42[_0x420ed0(0x3a0)]()===_0x420ed0(0x8d5))return!![];}}return![];}async function _0xfb1f2(_0x27f51a){const _0x2cf9e8=_0xf8ecb6;await _0x252b24();const _0x476dd9=await _0x462a91(_0x27f51a),_0x13423b=_0x544759(_0x476dd9),_0x1911f4=[];for(const _0x5643e7 of _0x13423b['getSourceFiles']()){const _0x406400=_0x4b5155(_0x5643e7,'CameraView');if(_0x406400['length']===0x0)continue;for(const _0x317af6 of _0x406400){const _0x3844e8=_0x317af6[_0x2cf9e8(0x70d)](),_0xc0144b=_0x5643e7['getLineAndColumnAtPos'](_0x3844e8);_0x1911f4[_0x2cf9e8(0x4d1)]({'filePath':_0x5643e7[_0x2cf9e8(0x9a8)](),'relPath':_0x35952a(_0x27f51a,_0x5643e7['getFilePath']())[_0x2cf9e8(0x51a)](_0x1957bf)['join']('/'),'line':_0xc0144b[_0x2cf9e8(0x397)],'suggestedKey':_0x5c24db(_0x5643e7['getFilePath']()),'alreadyHasImageKey':_0xd38ecb(_0x317af6)});}}return _0x1911f4['sort']((_0x192c31,_0x2d3d0f)=>_0x192c31['relPath']===_0x2d3d0f['relPath']?_0x192c31[_0x2cf9e8(0x397)]-_0x2d3d0f[_0x2cf9e8(0x397)]:_0x192c31[_0x2cf9e8(0x87a)]<_0x2d3d0f['relPath']?-0x1:0x1),{'edits':_0x1911f4,'filesScanned':_0x13423b['getSourceFiles']()['length']};}async function _0x5934f3(_0x48f23e,_0xe26ab3,_0x3a4f10={}){const _0x54a071=_0xf8ecb6;await _0x252b24();const _0x59ff8f=new Map();for(const _0x2f90a0 of _0xe26ab3){const _0x53b192=_0x59ff8f['get'](_0x2f90a0[_0x54a071(0x538)])??[];_0x53b192[_0x54a071(0x4d1)](_0x2f90a0),_0x59ff8f['set'](_0x2f90a0['filePath'],_0x53b192);}const _0x48b2e0=_0x544759(Array[_0x54a071(0x56c)](_0x59ff8f[_0x54a071(0x8c1)]())),_0x1419b3=[];let _0x40a430=0x0;for(const [_0x42bda4,_0x46add8]of _0x59ff8f){const _0x222489=_0x48b2e0[_0x54a071(0x400)](_0x42bda4);if(!_0x222489)continue;let _0x2a969b=0x0;for(const _0x3d8039 of _0x46add8){if('oqAwV'!=='oqAwV')return _0x428da3(_0x32fafa+_0x54a071(0x98d)+_0x2d3e68+_0x54a071(0x47f)),![];else{const _0x1337d3=_0x4b5155(_0x222489,'CameraView'),_0x79b27d=_0x1337d3[_0x54a071(0x415)](_0x38b401=>{const _0xa23cd=_0x54a071,_0x4b221b=_0x222489[_0xa23cd(0x623)](_0x38b401[_0xa23cd(0x70d)]());return _0x4b221b['line']===_0x3d8039['line'];});if(!_0x79b27d)continue;_0x79b27d['getTagNameNode']()[_0x54a071(0x9ea)](_0x54a071(0x902));if(_0x164504[_0x54a071(0x4e5)](_0x79b27d)){const _0x4f92af=_0x79b27d['getParentIfKind'](_0x8d83c2['JsxElement']);if(_0x4f92af){const _0xe8044f=_0x4f92af['getClosingElement']();_0xe8044f[_0x54a071(0x2ae)]()[_0x54a071(0x9ea)](_0x54a071(0x902));}}!_0x3d8039['alreadyHasImageKey']&&!_0x3a4f10['omitImageKey']&&_0x79b27d['addAttribute']({'name':_0x54a071(0x8d5),'initializer':'\x22'+_0x3d8039[_0x54a071(0x6e6)]+'\x22'}),_0x2a969b++,_0x40a430++;}}const _0xc33f12=_0x222489[_0x54a071(0x560)](_0x5e27f2);if(_0xc33f12){const _0x14869c=_0xc33f12['getNamedImports']();!_0x14869c['some'](_0x180491=>_0x180491[_0x54a071(0x385)]()===_0x315fe5)&&_0xc33f12['addNamedImport'](_0x315fe5);}else _0x222489[_0x54a071(0x7d4)]({'moduleSpecifier':_0x5e27f2,'namedImports':[_0x315fe5]});const _0x1d9715=_0x222489[_0x54a071(0x560)](_0x54a071(0x632));if(_0x1d9715){const _0x34709e=_0x4b5155(_0x222489,_0x54a071(0x936));if(_0x34709e[_0x54a071(0x3b7)]===0x0){const _0x1cc223=_0x1d9715[_0x54a071(0x3d5)](),_0x16f76a=_0x1cc223['find'](_0x4374f8=>_0x4374f8[_0x54a071(0x385)]()==='CameraView');if(_0x16f76a){_0x16f76a[_0x54a071(0x38a)]();const _0x4bd780=_0x1d9715[_0x54a071(0x3d5)](),_0x160e53=_0x1d9715['getDefaultImport']()!=null;_0x4bd780['length']===0x0&&!_0x160e53&&_0x1d9715['remove']();}}}if(_0x2a969b>0x0){const _0x4ca1ac=_0x222489[_0x54a071(0x8e7)]();await _0x119e20(_0x42bda4,_0x4ca1ac,_0x54a071(0x827)),_0x1419b3['push'](_0x42bda4);}}return{'filesEdited':_0x1419b3,'totalReplacements':_0x40a430};}async function _0x19c198(_0x53a5c3,_0x14d145,_0x4517d0){const _0x389e42=_0xf8ecb6;await _0x252b24();const _0x487a7e=_0x544759([_0x53a5c3]),_0x1d366b=_0x487a7e[_0x389e42(0x400)](_0x53a5c3);if(!_0x1d366b)return{'applied':![],'reason':_0x389e42(0x1fe)+_0x53a5c3};const _0x3c1805=_0x4b5155(_0x1d366b,'CeraphCamera'),_0x4178fa=_0x3c1805['find'](_0xcc1547=>{const _0x4d58a7=_0x389e42;if(_0x4d58a7(0x80e)==='dSCvI')return _0x31ab2e('sha256')[_0x4d58a7(0x5fd)](_0x54bc98)['digest'](_0x4d58a7(0x992))['slice'](0x0,0x10);else{const _0x227955=_0x1d366b['getLineAndColumnAtPos'](_0xcc1547[_0x4d58a7(0x70d)]());return _0x227955[_0x4d58a7(0x397)]===_0x14d145;}});if(!_0x4178fa)return{'applied':![],'reason':_0x389e42(0xae1)+_0x53a5c3+':'+_0x14d145};let _0x44d539=null,_0x579aa7=![];for(const _0x25277d of _0x4178fa['getAttributes']()){if(_0x164504['isJsxAttribute'](_0x25277d)){const _0x4092ee=_0x25277d['getNameNode']();if(_0x4092ee[_0x389e42(0x3a0)]()===_0x389e42(0x8d5)){_0x579aa7=!![];const _0x283c91=_0x25277d['getInitializer']();_0x283c91&&_0x164504['isStringLiteral'](_0x283c91)&&(_0x44d539=_0x283c91[_0x389e42(0x722)]());_0x25277d['setInitializer']('\x22'+_0x4517d0+'\x22');break;}}}!_0x579aa7&&_0x4178fa[_0x389e42(0x23a)]({'name':'imageKey','initializer':'\x22'+_0x4517d0+'\x22'});if(_0x44d539===_0x4517d0)return{'applied':![],'previousValue':_0x44d539,'reason':_0x389e42(0xa07)};return await _0x119e20(_0x53a5c3,_0x1d366b[_0x389e42(0x8e7)](),'utf-8'),{'applied':!![],'previousValue':_0x44d539};}async function _0x1558ea(_0x57129b){const _0x55587a=_0xf8ecb6;try{return await _0x1489a0(_0x57129b,_0x55587a(0x827));}catch{return null;}}async function _0x4c580e(_0x34f7da,_0x1e342d){await _0x119e20(_0x34f7da,_0x1e342d,'utf-8');}import{readFile as _0x4ab85c,writeFile as _0xc69d6c}from'fs/promises';import{dirname as _0xe784c,join as _0x53a149,relative as _0x3695c2,sep as _0x1f9ba7}from'path';var _0x2b28d0,_0x2c9fdb,_0x3091bc,_0x3c0632,_0x267924=![];async function _0x1c8008(){const _0x2682b6=_0xf8ecb6;if(_0x267924)return;const _0x1a2d62=await import(_0x2682b6(0x74a));({IndentationText:_0x2b28d0,Project:_0x2c9fdb,Node:_0x3091bc,SyntaxKind:_0x3c0632}=_0x1a2d62,_0x267924=!![]);}var _0xe8fe16='@ceraph/react-native-mcp/shim',_0x3ebd32=_0xf8ecb6(0xa93),_0x1449ad=_0x53a149('.ceraph',_0xf8ecb6(0x5c3));function _0x1d89df(_0x124073){const _0x415500=_0xf8ecb6,_0x50b978=_0xe784c(_0x124073['filePath']),_0x39e721=_0x124073[_0x415500(0xb14)]===_0x415500(0x6a7)?_0xe784c(_0x50b978):_0x50b978,_0x105664=_0x53a149(_0x39e721,_0x1449ad);let _0x59a948=_0x3695c2(_0x50b978,_0x105664);if(_0x1f9ba7!=='/')_0x59a948=_0x59a948['split'](_0x1f9ba7)['join']('/');if(!_0x59a948[_0x415500(0x746)]('./')&&!_0x59a948['startsWith']('../'))_0x59a948='./'+_0x59a948;return _0x59a948;}function _0x1b07f5(_0x123933){const _0x332712=_0xf8ecb6,_0x46a05e=_0x1d89df(_0x123933);return _0x3ebd32+'({\x20readTestidConfig:\x20()\x20=>\x20{\x20try\x20{\x20return\x20require(\x22'+_0x46a05e+_0x332712(0x482);}async function _0x2585c1(_0x56a2ef){const _0x9ff322=_0xf8ecb6;try{return await _0x4ab85c(_0x56a2ef,_0x9ff322(0x827)),!![];}catch{return![];}}async function _0x5ea314(_0x127535){const _0xd436fc=_0xf8ecb6,_0x5f0e78=_0x53a149(_0x127535,_0xd436fc(0x7b4),'_layout.tsx');if(await _0x2585c1(_0x5f0e78))return{'kind':'expo-router','filePath':_0x5f0e78};const _0x4c9452=_0x53a149(_0x127535,'app','_layout.jsx');if(await _0x2585c1(_0x4c9452))return{'kind':'expo-router','filePath':_0x4c9452};for(const _0x4228b6 of[_0xd436fc(0x7b7),_0xd436fc(0x46e)]){const _0x4f736a=_0x53a149(_0x127535,_0x4228b6);if(await _0x2585c1(_0x4f736a))return{'kind':'bare-rn','filePath':_0x4f736a};}return null;}function _0x51f1ce(_0x5c3c94){const _0x4383f1=_0xf8ecb6;for(const _0x375b8e of _0x5c3c94['getFunctions']()){if(_0x375b8e['isDefaultExport']())return _0x375b8e;}const _0x1a118e=_0x5c3c94[_0x4383f1(0x6a9)]()['find'](_0x9abffe=>_0x3091bc['isExportAssignment'](_0x9abffe));if(_0x1a118e&&_0x3091bc['isExportAssignment'](_0x1a118e)){const _0x1a6c92=_0x1a118e[_0x4383f1(0x708)]();if(_0x3091bc[_0x4383f1(0x9ce)](_0x1a6c92)){const _0x7e3341=_0x1a6c92['getSymbol']();if(_0x7e3341){const _0x21ab61=_0x7e3341[_0x4383f1(0x91a)]()[0x0];if(_0x21ab61&&_0x3091bc['isVariableDeclaration'](_0x21ab61)){const _0xe7ce1=_0x21ab61['getInitializer']();if(_0xe7ce1&&_0x3091bc['isArrowFunction'](_0xe7ce1))return _0xe7ce1;if(_0xe7ce1&&_0x3091bc['isFunctionExpression'](_0xe7ce1))return _0xe7ce1;}}}if(_0x3091bc[_0x4383f1(0x282)](_0x1a6c92))return _0x1a6c92;if(_0x3091bc[_0x4383f1(0x2df)](_0x1a6c92))return _0x1a6c92;}return null;}function _0x547865(_0x591dc6){const _0x43fb1e=_0xf8ecb6,_0x485680=_0x591dc6[_0x43fb1e(0x560)](_0x43fb1e(0x8cb));if(!_0x485680)return _0x591dc6[_0x43fb1e(0x7d4)]({'moduleSpecifier':'react','namedImports':[_0x43fb1e(0x5da)]}),!![];const _0x530fd0=_0x485680[_0x43fb1e(0x3d5)]();if(!_0x530fd0['some'](_0x571f15=>_0x571f15['getName']()==='useEffect'))return _0x485680[_0x43fb1e(0xab6)]('useEffect'),!![];return![];}function _0x5ea1dd(_0x1f8228){const _0x1566e4=_0xf8ecb6,_0x21e890=_0x1f8228['getImportDeclaration'](_0xe8fe16);if(!_0x21e890)return _0x1f8228['addImportDeclaration']({'moduleSpecifier':_0xe8fe16,'namedImports':[_0x3ebd32]}),!![];const _0x4a01d9=_0x21e890['getNamedImports']();if(!_0x4a01d9['some'](_0xb0b977=>_0xb0b977[_0x1566e4(0x385)]()===_0x3ebd32))return _0x21e890['addNamedImport'](_0x3ebd32),!![];return![];}function _0xf6ec8d(_0x47a7ac){const _0x431034=_0x47a7ac['getBody']();if(!_0x431034||!_0x3091bc['isBlock'](_0x431034))return null;let _0x4d3661=null,_0x1431cb=null;return _0x431034['forEachDescendant']((_0x2fca1,_0x386951)=>{const _0x133280=_0xc050;if(_0x1431cb){_0x386951[_0x133280(0x8bc)]();return;}if(_0x3091bc['isCallExpression'](_0x2fca1)){const _0x4f61f6=_0x2fca1[_0x133280(0x708)]();if(_0x3091bc['isIdentifier'](_0x4f61f6)&&_0x4f61f6[_0x133280(0x3a0)]()===_0x3ebd32){if(_0x4d3661===null)_0x4d3661=_0x2fca1;_0x2fca1[_0x133280(0x27a)]()['length']===0x0&&(_0x1431cb=_0x2fca1,_0x386951['stop']());}}}),_0x1431cb??_0x4d3661;}function _0x45b4c7(_0x456907){return _0xf6ec8d(_0x456907)!==null;}function _0x419b59(_0x3bef64,_0x28b3e1){const _0x3424e9=_0xf8ecb6;if(_0x3bef64[_0x3424e9(0x27a)]()[_0x3424e9(0x3b7)]>0x0)return![];const _0xade3e2=_0x1d89df(_0x28b3e1);return _0x3bef64[_0x3424e9(0x730)]('{\x20readTestidConfig:\x20()\x20=>\x20{\x20try\x20{\x20return\x20require(\x22'+_0xade3e2+_0x3424e9(0x4c5)),!![];}async function _0x2dff89(_0x23d607){const _0x2816da=_0xf8ecb6;await _0x1c8008();let _0x4a8114;try{const _0x25c64c=new _0x2c9fdb({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1}});_0x4a8114=_0x25c64c[_0x2816da(0x8d8)](_0x23d607);}catch{return _0x2816da(0x41a);}const _0x570b9e=_0x51f1ce(_0x4a8114);if(!_0x570b9e)return _0x2816da(0x41a);const _0x336a79=_0xf6ec8d(_0x570b9e);if(!_0x336a79)return'none';return _0x336a79[_0x2816da(0x27a)]()['length']===0x0?'bare':_0x2816da(0x8a6);}function _0x297781(_0x2eed00,_0x4fec04){const _0x265884=_0xf8ecb6;if(_0x45b4c7(_0x2eed00))return![];if(_0x3091bc[_0x265884(0x282)](_0x2eed00)){const _0x2b1096=_0x2eed00[_0x265884(0x468)]();if(!_0x3091bc[_0x265884(0x44e)](_0x2b1096)){const _0x4416a5=_0x2b1096[_0x265884(0x3a0)]();_0x2b1096['replaceWithText'](_0x265884(0x9d2)+_0x4416a5+';\x20}');}}const _0x23cabb=_0x2eed00[_0x265884(0x468)]();if(!_0x23cabb||!_0x3091bc[_0x265884(0x44e)](_0x23cabb))return![];return _0x23cabb['insertStatements'](0x0,'useEffect(()\x20=>\x20{\x20'+_0x1b07f5(_0x4fec04)+';\x20},\x20[]);'),!![];}async function _0x2175ac(_0xe4d5d1){const _0x3db3a2=_0xf8ecb6;await _0x1c8008();const _0x791546=new _0x2c9fdb({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1},'manipulationSettings':{'indentationText':_0x2b28d0[_0x3db3a2(0x76e)]}}),_0x20e77c=_0x791546[_0x3db3a2(0x8d8)](_0xe4d5d1[_0x3db3a2(0x538)]),_0x63d9b=_0x51f1ce(_0x20e77c);if(!_0x63d9b)return{'applied':![],'alreadyPresent':![],'reason':'Could\x20not\x20locate\x20the\x20default-exported\x20function\x20component.\x20Manually\x20add\x20the\x20following\x20near\x20the\x20top\x20of\x20your\x20root\x20component\x20in\x20'+_0xe4d5d1[_0x3db3a2(0x538)]+_0x3db3a2(0x30f)+_0xe8fe16+_0x3db3a2(0x522)+_0x1b07f5(_0xe4d5d1)+_0x3db3a2(0xa4f)};const _0x4f3286=_0xf6ec8d(_0x63d9b);if(_0x4f3286){const _0x5b1181=_0x419b59(_0x4f3286,_0xe4d5d1),_0x165f1d=_0x5ea1dd(_0x20e77c),_0x3c842f=_0x547865(_0x20e77c),_0x3bf255=_0x5b1181||_0x165f1d||_0x3c842f;return _0x3bf255&&await _0xc69d6c(_0xe4d5d1['filePath'],_0x20e77c['getFullText'](),'utf-8'),{'applied':_0x3bf255,'alreadyPresent':!![],'reason':_0x5b1181?'Upgraded\x20existing\x20installCeraph()\x20with\x20the\x20testID\x20sentinel\x20seam.':_0x3bf255?'Already\x20wired\x20—\x20added\x20missing\x20import(s).':_0x3db3a2(0x3f1)};}const _0x108ac5=_0x297781(_0x63d9b,_0xe4d5d1);if(!_0x108ac5)return{'applied':![],'alreadyPresent':![],'reason':'Default\x20export\x20is\x20not\x20a\x20block-bodied\x20function.\x20Manually\x20add\x20the\x20following\x20at\x20the\x20top\x20of\x20your\x20root\x20component\x20in\x20'+_0xe4d5d1[_0x3db3a2(0x538)]+':\x0a\x20\x20import\x20{\x20installCeraph\x20}\x20from\x20\x22'+_0xe8fe16+'\x22;\x0a\x20\x20useEffect(()\x20=>\x20{\x20'+_0x1b07f5(_0xe4d5d1)+';\x20},\x20[]);'};_0x5ea1dd(_0x20e77c),_0x547865(_0x20e77c);const _0x741775=_0x20e77c['getFullText']();return await _0xc69d6c(_0xe4d5d1[_0x3db3a2(0x538)],_0x741775,'utf-8'),{'applied':!![],'alreadyPresent':![]};}async function _0x5b2f2b(_0xd3dd98){const _0x16eb60=_0xf8ecb6;try{return _0x16eb60(0x2e5)===_0x16eb60(0x6e0)?{'kind':'block','response':{'content':[{'type':_0x16eb60(0x3e0),'text':_0x710f77['stringify']({'status':'doctor-failed','message':'Doctor\x20checks\x20failed.\x20Resolve\x20these\x20before\x20running\x20flows.\x20After\x20fixing,\x20retry\x20—\x20doctor\x20re-runs\x20automatically\x20until\x20it\x20passes.','errors':_0x203875['map'](_0x149fdb=>({'name':_0x149fdb[_0x16eb60(0x9e5)],'message':_0x149fdb[_0x16eb60(0x531)],'remediation':_0x149fdb['remediation']})),'hint':_0x16eb60(0x976)},null,0x2)}],'isError':!![]}}:await _0x4ab85c(_0xd3dd98[_0x16eb60(0x538)],_0x16eb60(0x827));}catch{return null;}}async function _0x2b12e3(_0x2bfbc4,_0x6598a8){await _0xc69d6c(_0x2bfbc4['filePath'],_0x6598a8,'utf-8');}import{readFile as _0x457b28,writeFile as _0x319b71,access as _0x60b34a}from'fs/promises';import{join as _0x12d72f}from'path';var _0x111e44='ceraph';async function _0x34f188(_0x4d1fbb){try{return await _0x60b34a(_0x4d1fbb),!![];}catch{return![];}}async function _0x263689(_0xf5ada,_0x965f7c={}){const _0x51cda3=_0xf8ecb6,_0x64a892=_0x965f7c[_0x51cda3(0x753)]??_0x34f188,_0x508acb=_0x965f7c[_0x51cda3(0x4e4)]??(_0x1eadf4=>_0x457b28(_0x1eadf4,'utf-8')),_0x31df0e=_0x965f7c['writeFile']??((_0x15ec25,_0x4a6b2a)=>_0x319b71(_0x15ec25,_0x4a6b2a,_0x51cda3(0x827))),_0x33ec60=_0x12d72f(_0xf5ada,'app.json'),_0x5c240a=_0x12d72f(_0xf5ada,_0x51cda3(0x3d4)),_0x51a2cf=_0x12d72f(_0xf5ada,_0x51cda3(0x892)),_0x236ef0=_0x12d72f(_0xf5ada,'ios'),_0x1ea38c=_0x12d72f(_0xf5ada,'android'),_0x389df2=await _0x64a892(_0x5c240a),_0x18d53f=await _0x64a892(_0x51a2cf);if(_0x389df2||_0x18d53f)return{'kind':_0x51cda3(0x781),'path':_0x18d53f?_0x51a2cf:_0x5c240a};if(await _0x64a892(_0x33ec60)){const _0x3674fa=await _0x508acb(_0x33ec60),_0x38366d=_0x2cc4b7(_0x3674fa);if(!_0x38366d['ok'])return{'kind':_0x51cda3(0x781),'path':_0x33ec60};const _0x265ab2=_0x3c9cb7(_0x38366d['parsed'],_0x111e44);if(_0x265ab2['action']===_0x51cda3(0x5c2)){if('MWQfq'!==_0x51cda3(0x5f4))return{'kind':_0x51cda3(0x4ab),'scheme':_0x265ab2[_0x51cda3(0xb27)],'path':_0x33ec60};else this['cached']=null,this['inflight']=null,this['simulatorWdaPort']=null,this['simulatorWdaUdid']=null,this[_0x51cda3(0x3af)]['clear'](),this[_0x51cda3(0xa62)]['clear'](),this['stateVersion']++;}return await _0x31df0e(_0x33ec60,_0x3e7df9(_0x38366d[_0x51cda3(0x3da)],_0x3674fa)),{'kind':_0x51cda3(0x9a9),'previousScheme':_0x265ab2['previousScheme'],'nextScheme':_0x265ab2['nextScheme'],'path':_0x33ec60};}if(await _0x64a892(_0x236ef0)||await _0x64a892(_0x1ea38c))return{'kind':'bare-rn-needs-manual'};return{'kind':_0x51cda3(0x9ab)};}function _0x2cc4b7(_0xee86b6){const _0x116d61=_0xf8ecb6;try{const _0x25d136=JSON[_0x116d61(0x981)](_0xee86b6);if(!_0x25d136||typeof _0x25d136!=='object'||Array['isArray'](_0x25d136))return{'ok':![],'parsed':{}};return{'ok':!![],'parsed':_0x25d136};}catch{return{'ok':![],'parsed':{}};}}function _0x3e7df9(_0x4685a2,_0x24dbb0){const _0x2f7705=_0xf8ecb6,_0x1e778d=_0x24dbb0[_0x2f7705(0x2f3)](/\n(\s+)"/),_0x272f47=_0x1e778d?.[0x1]??'\x20\x20',_0xe68577=_0x24dbb0[_0x2f7705(0xaa5)]('\x0a'),_0x20bda4=JSON['stringify'](_0x4685a2,null,_0x272f47);return _0xe68577?_0x20bda4+'\x0a':_0x20bda4;}function _0x3c9cb7(_0x1f8685,_0x12ed6f){const _0x11fe2e=_0xf8ecb6;(!_0x1f8685[_0x11fe2e(0x982)]||typeof _0x1f8685['expo']!==_0x11fe2e(0x9e3))&&(_0x1f8685['expo']={});const _0x21a940=_0x1f8685['expo'],_0x425973=_0x21a940[_0x11fe2e(0xb27)];if(typeof _0x425973==='string'&&_0x425973===_0x12ed6f)return{'action':_0x11fe2e(0x5c2),'scheme':_0x425973,'previousScheme':_0x425973,'nextScheme':[_0x425973]};if(Array[_0x11fe2e(0x200)](_0x425973)&&_0x425973['includes'](_0x12ed6f))return{'action':'already','scheme':_0x425973,'previousScheme':_0x425973,'nextScheme':[..._0x425973]};if(_0x425973===void 0x0)return _0x21a940[_0x11fe2e(0xb27)]=_0x12ed6f,{'action':'added','scheme':_0x12ed6f,'previousScheme':void 0x0,'nextScheme':[_0x12ed6f]};if(typeof _0x425973===_0x11fe2e(0x30d)){const _0x3799a5=[_0x425973,_0x12ed6f];return _0x21a940[_0x11fe2e(0xb27)]=_0x3799a5,{'action':_0x11fe2e(0x7ed),'scheme':_0x3799a5,'previousScheme':_0x425973,'nextScheme':_0x3799a5};}if(Array['isArray'](_0x425973)){const _0x36c9ef=[..._0x425973,_0x12ed6f];return _0x21a940['scheme']=_0x36c9ef,{'action':'added','scheme':_0x36c9ef,'previousScheme':_0x425973,'nextScheme':_0x36c9ef};}return _0x21a940['scheme']=_0x12ed6f,{'action':'added','scheme':_0x12ed6f,'previousScheme':_0x425973,'nextScheme':[_0x12ed6f]};}function _0x5c9d06(){const _0x19923c=_0xf8ecb6;return'\x0aAdd\x20Ceraph\x27s\x20custom\x20URL\x20scheme\x20so\x20deep\x20links\x20(ceraph://reload,\x0aceraph://reset,\x20ceraph://storage)\x20reach\x20the\x20running\x20app.\x0a\x0aiOS\x20—\x20edit\x20ios/<YourApp>/Info.plist:\x0a\x0a\x20\x20<key>CFBundleURLTypes</key>\x0a\x20\x20<array>\x0a\x20\x20\x20\x20<dict>\x0a\x20\x20\x20\x20\x20\x20<key>CFBundleURLName</key>\x0a\x20\x20\x20\x20\x20\x20<string>com.yourcompany.yourapp</string>\x0a\x20\x20\x20\x20\x20\x20<key>CFBundleURLSchemes</key>\x0a\x20\x20\x20\x20\x20\x20<array>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<string>ceraph</string>\x0a\x20\x20\x20\x20\x20\x20</array>\x0a\x20\x20\x20\x20</dict>\x0a\x20\x20</array>\x0a\x0aAndroid\x20—\x20edit\x20android/app/src/main/AndroidManifest.xml\x20inside\x20the\x0aMainActivity\x20<activity>\x20block:\x0a\x0a\x20\x20<intent-filter>\x0a\x20\x20\x20\x20<action\x20android:name=\x22android.intent.action.VIEW\x22\x20/>\x0a\x20\x20\x20\x20<category\x20android:name=\x22android.intent.category.DEFAULT\x22\x20/>\x0a\x20\x20\x20\x20<category\x20android:name=\x22android.intent.category.BROWSABLE\x22\x20/>\x0a\x20\x20\x20\x20<data\x20android:scheme=\x22ceraph\x22\x20/>\x0a\x20\x20</intent-filter>\x0a\x0aThen\x20rebuild\x20the\x20native\x20app\x20(pod\x20install\x20+\x20xcodebuild\x20on\x20iOS,\x20./gradlew\x0aassembleDebug\x20on\x20Android).\x20Existing\x20JS-only\x20reloads\x20do\x20not\x20pick\x20up\x0anative\x20config\x20changes.\x0a'[_0x19923c(0x313)]();}function _0x8d4874(_0x40e47f){const _0x6f8ce8=_0xf8ecb6;return('\x0aYour\x20project\x20uses\x20'+_0x40e47f+_0x6f8ce8(0x5f1))[_0x6f8ce8(0x313)]();}import{readFile as _0x38c482,readdir as _0x90cb29,stat as _0x54b2d6}from'fs/promises';import{join as _0x5264bd,relative as _0xbe8ea5,sep as _0x24785a}from'path';async function _0x42ebc7(_0x52b30d){try{return await _0x54b2d6(_0x52b30d),!![];}catch{return![];}}async function _0x5a35e9(_0x5a0fc2){const _0x210a86=_0xf8ecb6;try{const _0x22308b=await _0x38c482(_0x5a0fc2,'utf-8'),_0x2f41cd=JSON['parse'](_0x22308b);if(!_0x2f41cd||typeof _0x2f41cd!==_0x210a86(0x9e3))return null;return _0x2f41cd;}catch{return null;}}function _0x5cb79f(_0x1a47cb){const _0x1cbc74=_0xf8ecb6;if(!_0x1a47cb)return{'expo':![],'rn':![]};const _0x48454a=_0x1a47cb['dependencies']??{},_0x2a2622=_0x1a47cb[_0x1cbc74(0xb2a)]??{},_0x375c95={..._0x48454a,..._0x2a2622};return{'expo':Boolean(_0x375c95[_0x1cbc74(0x982)]||_0x375c95['expo-router']),'rn':Boolean(_0x375c95['react-native'])};}async function _0x676dc6(_0x4585f1){const _0x3150ac=_0x5264bd(_0x4585f1,'pnpm-workspace.yaml');let _0x1d267c;try{_0x1d267c=await _0x38c482(_0x3150ac,'utf-8');}catch{return null;}return _0x2b43b2(_0x1d267c);}function _0x2b43b2(_0x3ec997){const _0x37b192=_0xf8ecb6,_0x2452f5=[];let _0x598e19=![];for(const _0x11f8ab of _0x3ec997['split'](/\r?\n/)){const _0x292d01=_0x11f8ab[_0x37b192(0x42e)](/#.*$/,'')['trimEnd']();if(_0x292d01[_0x37b192(0x3b7)]===0x0)continue;if(/^packages\s*:\s*$/['test'](_0x292d01)){_0x598e19=!![];continue;}if(!_0x11f8ab['startsWith']('\x20')&&!_0x11f8ab['startsWith']('-')&&_0x292d01[_0x37b192(0xaa5)](':')){_0x598e19=![];continue;}if(!_0x598e19)continue;const _0x39a6f9=_0x292d01[_0x37b192(0x2f3)](/^\s*-\s*['"]?([^'"]+?)['"]?\s*$/);if(_0x39a6f9&&_0x39a6f9[0x1])_0x2452f5['push'](_0x39a6f9[0x1]);}return _0x2452f5;}async function _0x98e744(_0x5d743a,_0x421d29){const _0x1590bb=_0xf8ecb6,_0x3a5179=_0x421d29[_0x1590bb(0x42e)](/^\.\//,'')[_0x1590bb(0x42e)](/\/+$/,'');if(_0x3a5179['length']===0x0)return[];if(!_0x3a5179['includes']('*')){if(_0x1590bb(0x6a6)!=='XuicZ'){const _0x3122b6=new _0x2a7906({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1},'manipulationSettings':{'indentationText':_0x4b7463['TwoSpaces']}});for(const _0x1b96db of _0x1561ec){try{_0x3122b6['addSourceFileAtPath'](_0x1b96db);}catch{}}return _0x3122b6;}else{const _0x5ab167=_0x5264bd(_0x5d743a,_0x3a5179),_0x4e0e2d=await _0x42ebc7(_0x5ab167);return _0x4e0e2d?[_0x5ab167]:[];}}const _0x31102c=_0x3a5179[_0x1590bb(0x2f3)](/^([^*]+)\/\*$/);if(!_0x31102c||!_0x31102c[0x1])return[];const _0x1696e6=_0x31102c[0x1]['replace'](/\/+$/,''),_0x589cde=_0x5264bd(_0x5d743a,_0x1696e6);let _0x65fff1;try{_0x65fff1=await _0x90cb29(_0x589cde,{'withFileTypes':!![]});}catch{return[];}const _0x191e7d=[];for(const _0xe4b896 of _0x65fff1){if(!_0xe4b896['isDirectory']())continue;if(_0xe4b896['name'][_0x1590bb(0x746)]('.'))continue;_0x191e7d[_0x1590bb(0x4d1)](_0x5264bd(_0x589cde,_0xe4b896[_0x1590bb(0x9e5)]));}return _0x191e7d;}async function _0x3835b8(_0x5ecfcd){const _0xf05184=_0xf8ecb6,_0x91828e=new Set();let _0x2b0805=![];const _0x5cb1c8=await _0x5a35e9(_0x5264bd(_0x5ecfcd,'package.json'));if(_0x5cb1c8?.[_0xf05184(0x593)]){_0x2b0805=!![];if(Array[_0xf05184(0x200)](_0x5cb1c8[_0xf05184(0x593)])){for(const _0x535fdc of _0x5cb1c8['workspaces'])_0x91828e[_0xf05184(0x856)](_0x535fdc);}else{if(_0x5cb1c8['workspaces']&&typeof _0x5cb1c8['workspaces']===_0xf05184(0x9e3)&&Array['isArray'](_0x5cb1c8['workspaces']['packages'])){if(_0xf05184(0xa5e)!=='TFSrw')return{'success':![],'tappedAt':{'x':_0x4dc9a5,'y':_0x5efb71},'pixelRatio':this[_0xf05184(0x547)]??0x0,'correction':'Failed\x20before\x20correction\x20could\x20be\x20applied','error':_0xe35fe7 instanceof _0x37c5cd?_0x25c23c['message']:_0xf05184(0x64c)};else for(const _0x21ad00 of _0x5cb1c8['workspaces'][_0xf05184(0x824)]){'CDsLh'===_0xf05184(0xae7)?_0x91828e[_0xf05184(0x856)](_0x21ad00):this['metroWarnings']['push'](..._0x48638f[_0xf05184(0x7a8)]);}}}}const _0x12fec1=await _0x676dc6(_0x5ecfcd);if(_0x12fec1!=null){_0x2b0805=!![];for(const _0x23a131 of _0x12fec1)_0x91828e[_0xf05184(0x856)](_0x23a131);}const _0x5d4c61=await _0x5a35e9(_0x5264bd(_0x5ecfcd,_0xf05184(0x94c)));if(_0x5d4c61){const _0x1c946b=_0x5d4c61['packages'];if(Array['isArray'](_0x1c946b)){_0x2b0805=!![];for(const _0x3c5ecc of _0x1c946b){if(typeof _0x3c5ecc==='string')_0x91828e['add'](_0x3c5ecc);}}else await _0x42ebc7(_0x5264bd(_0x5ecfcd,'lerna.json'))&&(_0x2b0805=!![]);}if(!_0x2b0805)return null;return Array[_0xf05184(0x56c)](_0x91828e);}async function _0x534210(_0x160d06){const _0x29eb1f=_0xf8ecb6,_0x439e82=await _0x5a35e9(_0x5264bd(_0x160d06,_0x29eb1f(0x2a8))),_0x1ebf97=_0x5cb79f(_0x439e82);if(_0x1ebf97['expo']||_0x1ebf97['rn']){if(_0x29eb1f(0x501)!=='mMjMI')return{'kind':'none','matches':[],'rootIsRnApp':!![],'isMonorepo':await _0x3835b8(_0x160d06)!=null};else _0x277bc8();}const _0x25e201=await _0x3835b8(_0x160d06);if(_0x25e201==null)return{'kind':'none','matches':[],'rootIsRnApp':![],'isMonorepo':![]};const _0x34bed4=new Set();for(const _0x568c9e of _0x25e201){for(const _0x2bcc22 of await _0x98e744(_0x160d06,_0x568c9e)){_0x34bed4['add'](_0x2bcc22);}}const _0x5536a3=[];for(const _0x3716f8 of _0x34bed4){const _0x3cb598=_0x5264bd(_0x3716f8,'package.json'),_0x29f64b=await _0x5a35e9(_0x3cb598),_0x4bd372=_0x5cb79f(_0x29f64b),_0x4d837a=await _0x42ebc7(_0x5264bd(_0x3716f8,'app.json')),_0x3e24ce=[];if(_0x4bd372[_0x29eb1f(0x982)])_0x3e24ce[_0x29eb1f(0x4d1)](_0x29eb1f(0x982));if(_0x4bd372['rn'])_0x3e24ce[_0x29eb1f(0x4d1)](_0x29eb1f(0x9f5));if(_0x4d837a)_0x3e24ce['push'](_0x29eb1f(0x8fb));if(_0x3e24ce[_0x29eb1f(0x3b7)]===0x0)continue;const _0x141138=_0xbe8ea5(_0x160d06,_0x3716f8)['split'](_0x24785a)['join']('/');_0x5536a3[_0x29eb1f(0x4d1)]({'absPath':_0x3716f8,'relPath':_0x141138[_0x29eb1f(0x3b7)]>0x0?_0x141138:'.','signals':_0x3e24ce});}_0x5536a3[_0x29eb1f(0x426)]((_0x177745,_0x453e0e)=>_0x177745['relPath']<_0x453e0e['relPath']?-0x1:_0x177745['relPath']>_0x453e0e[_0x29eb1f(0x87a)]?0x1:0x0);const _0x2a1013=_0x5536a3[_0x29eb1f(0x3b7)]===0x0?_0x29eb1f(0x41a):_0x5536a3['length']===0x1?_0x29eb1f(0x65e):'multi';return{'kind':_0x2a1013,'matches':_0x5536a3,'rootIsRnApp':![],'isMonorepo':!![]};}async function _0x208c82(){return _0x1be651();}async function _0x464e89(_0x57f140,_0x2e3972=_0x57f140){const _0x43b3b6=_0xf8ecb6,[_0x2f0d8c,_0x434910,_0x5d12d1,_0x444cac,_0x4f6ac2]=await Promise['all']([_0x47e59c(_0x57f140),_0x208c82(),_0x58274e(_0x57f140),_0xfb1f2(_0x57f140),_0x5ea314(_0x57f140)]),_0x5aae19=_0x4f6ac2?await _0x2dff89(_0x4f6ac2[_0x43b3b6(0x538)]):null,_0x57ac82=_0x5aae19===null?null:_0x5aae19===_0x43b3b6(0x8a6),_0x353010=_0x5d12d1['kind']==='expo-json-already-registered'?!![]:_0x5d12d1[_0x43b3b6(0xb14)]==='expo-json-added'?![]:null,_0x17b358=_0x5d12d1['kind']==='expo-json-added'||_0x5d12d1[_0x43b3b6(0xb14)]==='expo-json-already-registered'?'expo-json':_0x5d12d1[_0x43b3b6(0xb14)]==='expo-config-needs-manual'?_0x43b3b6(0x808):_0x5d12d1['kind']===_0x43b3b6(0x895)?_0x43b3b6(0xacf):_0x43b3b6(0x41a);return{'workingDir':_0x57f140,'packageInstalled':_0x2f0d8c,'authenticated':_0x434910!=null,'schemeRegistered':_0x353010,'projectKind':_0x17b358,'cameraScanResults':_0x444cac[_0x43b3b6(0x7be)]['map'](_0xda386=>({'relPath':_0xda386['relPath'],'line':_0xda386['line'],'alreadyHasImageKey':_0xda386['alreadyHasImageKey'],'suggestedKey':_0xda386['suggestedKey']})),'bootInjected':_0x57ac82,'bootSeamState':_0x5aae19,'bootTarget':_0x4f6ac2,'mcpClientsPresent':{'claudeCode':await _0x141e0b(_0x17e7d3(_0x2e3972,_0x43b3b6(0x5ec))),'cursor':await _0x141e0b(_0x17e7d3(_0x2e3972,'.cursor','mcp.json')),'codex':await _0x141e0b(_0x17e7d3(_0x2e3972,'.codex',_0x43b3b6(0x9e2))),'vscode':await _0x141e0b(_0x17e7d3(_0x2e3972,'.vscode','mcp.json'))}};}async function _0x58274e(_0x47175c){return _0x263689(_0x47175c,{'writeFile':async()=>void 0x0});}async function _0x170983(_0x25f53a={}){const _0x5b731c=_0xf8ecb6;try{const _0x315b32=await _0x57ae5f({'signal':_0x25f53a['signal'],'token':_0x25f53a['token'],'intent':_0x25f53a['intent']});return _0x315b32[_0x5b731c(0x41e)]?{'status':'ok','email':_0x315b32[_0x5b731c(0x41e)]}:{'status':'ok'};}catch(_0x54c571){if(_0x54c571 instanceof Error&&(_0x54c571[_0x5b731c(0x9e5)]==='AbortError'||typeof DOMException!=='undefined'&&_0x54c571 instanceof DOMException))return{'status':'aborted'};const _0xe544d2=_0x54c571 instanceof Error?_0x54c571[_0x5b731c(0x531)]:String(_0x54c571);return{'status':'error','error':_0xe544d2};}}async function _0x9cda3f(_0x15dc20){const _0x1d3147=_0xf8ecb6,_0x578c50=await _0xfb1f2(_0x15dc20),_0x5751f9=[],_0x507b7c=new Map();for(const _0x5aad24 of _0x578c50[_0x1d3147(0x7be)]){let _0x52d4ed=_0x507b7c[_0x1d3147(0x3fd)](_0x5aad24[_0x1d3147(0x538)]);_0x52d4ed===void 0x0&&(_0x52d4ed=await _0x4248c2(_0x5aad24[_0x1d3147(0x538)],'utf-8')['catch'](()=>''),_0x507b7c['set'](_0x5aad24[_0x1d3147(0x538)],_0x52d4ed)),_0x5751f9[_0x1d3147(0x4d1)]({'filePath':_0x5aad24['filePath'],'relPath':_0x5aad24['relPath'],'line':_0x5aad24['line'],'suggestedKey':_0x5aad24[_0x1d3147(0x6e6)],'alreadyHasImageKey':_0x5aad24['alreadyHasImageKey'],'surroundingCode':_0x3b1fe6(_0x52d4ed,_0x5aad24['line'],0xf)});}return{'usages':_0x5751f9,'filesScanned':_0x578c50['filesScanned']};}function _0x3b1fe6(_0x4d7ac0,_0x119e9f,_0x21eb69){const _0x56de65=_0xf8ecb6,_0x42b39a=_0x4d7ac0['split'](/\r?\n/),_0x1d2e8e=Math['max'](0x0,_0x119e9f-0x1-_0x21eb69),_0x3c38e6=Math['min'](_0x42b39a['length'],_0x119e9f-0x1+_0x21eb69+0x1);return _0x42b39a[_0x56de65(0x795)](_0x1d2e8e,_0x3c38e6)['join']('\x0a');}async function _0x3252d9(_0x27e6ed,_0x1850de){const _0x3c81da=_0xf8ecb6,_0x467060=await _0xfb1f2(_0x27e6ed),_0x38cd52=_0x467060[_0x3c81da(0x7be)]['find'](_0xe83130=>_0xe83130[_0x3c81da(0x538)]===_0x1850de[_0x3c81da(0x538)]&&_0xe83130['line']===_0x1850de['line']);if(!_0x38cd52){if(_0x3c81da(0x95d)!=='eYSTm'){const _0x5a65d2=await _0x4248c2(_0x1850de['filePath'],_0x3c81da(0x827))[_0x3c81da(0x48b)](()=>null);if(_0x5a65d2==null)return{'success':![],'reason':'File\x20not\x20found:\x20'+_0x1850de[_0x3c81da(0x538)]};if(_0x5a65d2[_0x3c81da(0x27e)](_0x3c81da(0x902))){const _0x3d136c=await _0x19c198(_0x1850de['filePath'],_0x1850de['line'],_0x1850de[_0x3c81da(0x8d5)]);if(_0x3d136c['applied']){if(_0x3c81da(0x4ee)!==_0x3c81da(0x8ff)){const _0x394c4b=await _0x4248c2(_0x1850de['filePath'],'utf-8');return{'success':!![],'newContent':_0x394c4b};}else{_0x154803[_0x3c81da(0x4d1)](_0x3c81da(0x2f4)+_0x5191d8['name']+':\x20'+_0xfb468d[_0x3c81da(0x531)]);if(_0x23f1b7['remediation'])_0x4eb68c[_0x3c81da(0x4d1)](_0x3c81da(0xa79)+_0x1a8e3d['remediation']);}}if(_0x3d136c['reason']==='imageKey\x20unchanged')return{'success':!![],'already':!![],'newContent':_0x5a65d2};return{'success':![],'reason':_0x3d136c['reason']??'No\x20<CeraphCamera>\x20at\x20'+_0x1850de['filePath']+':'+_0x1850de[_0x3c81da(0x397)]};}return{'success':![],'reason':_0x3c81da(0x909)+_0x1850de[_0x3c81da(0x538)]+':'+_0x1850de[_0x3c81da(0x397)]};}else return _0x3c81da(0x365);}const _0x50e0ff={'filePath':_0x38cd52[_0x3c81da(0x538)],'relPath':_0x38cd52[_0x3c81da(0x87a)],'line':_0x38cd52['line'],'suggestedKey':_0x1850de['imageKey'],'alreadyHasImageKey':_0x38cd52[_0x3c81da(0x695)]};await _0x5934f3(_0x27e6ed,[_0x50e0ff]);const _0x2bc1fe=await _0x4248c2(_0x1850de['filePath'],_0x3c81da(0x827));return{'success':!![],'newContent':_0x2bc1fe};}async function _0x1ebf34(_0x5cc00d){const _0x2bf151=_0xf8ecb6,_0x6d8559=await _0x20bee7(_0x5cc00d),_0x3e7783=await _0x5ea314(_0x5cc00d);if(!_0x3e7783)return{'applied':![],'reason':'Could\x20not\x20find\x20app/_layout.tsx\x20or\x20App.tsx.\x20Add\x20this\x20to\x20your\x20root\x20component\x20manually\x20(the\x20require\x20path\x20is\x20relative\x20to\x20that\x20file\x20—\x20`./.ceraph/testid-config.json`\x20from\x20a\x20root\x20App.tsx,\x20`../.ceraph/testid-config.json`\x20from\x20app/_layout.tsx):\x0a\x20\x20useEffect(()\x20=>\x20{\x20installCeraph({\x20readTestidConfig:\x20()\x20=>\x20{\x20try\x20{\x20return\x20require(\x22./.ceraph/testid-config.json\x22);\x20}\x20catch\x20{\x20return\x20null;\x20}\x20}\x20});\x20},\x20[]);','babelConfig':_0x6d8559};const _0xa4b6a8=await _0x2175ac(_0x3e7783);return{'applied':_0xa4b6a8[_0x2bf151(0x1ee)],'filePath':_0x3e7783['filePath'],'already':_0xa4b6a8[_0x2bf151(0x92f)],'reason':_0xa4b6a8[_0x2bf151(0x256)],'babelConfig':_0x6d8559};}async function _0x59c56b(_0xa5325b){const _0x4fa27b=_0xf8ecb6,_0x553f7a=await _0x263689(_0xa5325b);let _0x311882;if(_0x553f7a['kind']===_0x4fa27b(0x781))_0x311882=_0x8d4874(_0x553f7a['path']);else{if(_0x553f7a['kind']===_0x4fa27b(0x895)){if('jxkZC'==='jxkZC')_0x311882=_0x5c9d06();else throw new _0x1ce6a('network-error',0x0,'Could\x20not\x20reach\x20the\x20Ceraph\x20server\x20(request\x20timed\x20out\x20after\x20'+_0x4401d8+_0x4fa27b(0x8ea),_0x433df3);}}return{'action':_0x553f7a,'instructions':_0x311882};}var _0x14762c={'react-native-mcp':{'command':'npx','args':['-y',_0xf8ecb6(0x7c4)]}};async function _0x5d6407(_0x3b8d58){const _0x260634=_0xf8ecb6,_0x44750d=[],_0x4d36c6=[],_0x4b49f9=[],_0x37254f=[{'name':'Claude\x20Code','path':_0x17e7d3(_0x3b8d58,'.mcp.json')},{'name':'Cursor','path':_0x17e7d3(_0x3b8d58,_0x260634(0x85a),'mcp.json')},{'name':'Codex','path':_0x17e7d3(_0x3b8d58,'.codex',_0x260634(0x9e2)),'toml':!![]},{'name':'VS\x20Code','path':_0x17e7d3(_0x3b8d58,'.vscode',_0x260634(0xab3))}];for(const _0x4be3d1 of _0x37254f){if('MendI'!==_0x260634(0xa30)){if(_0x304ca3){this['bootBuffer']=[],this[_0x260634(0x6ca)]=0x0,this['bootWriteCount']=0x0,this['asyncStorageReadBuffer']=[],this['bootCaptureMode']=!![];return;}this['bootCaptureMode']=![];}else{const _0x16de44=_0x4be3d1[_0x260634(0x87d)]?await _0x4ea3f6(_0x4be3d1['path']):await _0x581099(_0x4be3d1[_0x260634(0x2c7)]);if(_0x16de44[_0x260634(0x428)]===_0x260634(0xa97))_0x44750d[_0x260634(0x4d1)](_0x4be3d1['name']);else{if(_0x16de44['status']==='skipped')_0x4d36c6[_0x260634(0x4d1)](_0x4be3d1['name']);else _0x4b49f9[_0x260634(0x4d1)]({'name':_0x4be3d1['name'],'reason':_0x16de44[_0x260634(0x256)]});}}}const _0x3ecc74=await _0x3031b6(_0x3b8d58);return{'written':_0x44750d,'skipped':_0x4d36c6,'preserved':_0x4b49f9,'claudePreApproval':_0x3ecc74};}async function _0x581099(_0x34b36c){const _0x111053=_0xf8ecb6,_0x552194=await _0x354490(_0x34b36c);if(_0x552194[_0x111053(0xb14)]==='malformed')return{'status':'preserved','reason':_0x111053(0x9d8)+_0x34b36c+_0x111053(0x89b)};const _0x29c022=_0x552194['kind']==='ok'?_0x552194[_0x111053(0x39d)]:{};if(_0x552194['kind']==='ok'&&!_0x29787e(_0x29c022))return'hOozS'===_0x111053(0x403)?{'status':_0x111053(0x93c),'reason':_0x111053(0x9d8)+_0x34b36c+_0x111053(0x2ca)+(Array['isArray'](_0x29c022)?_0x111053(0x20f):typeof _0x29c022)+')\x20—\x20preserved'}:{'success':![],'errors':[{'file':'','line':0x0,'message':'prebuild\x20--clean\x20failed:\x0a'+_0xfb01c9[_0x111053(0x9e9)],'type':_0x111053(0xb1a)}],'warnings':[],'output':_0x42140e[_0x111053(0x9e9)]};const _0x5f1640=_0x29787e(_0x29c022)?_0x29c022:{},_0x203682=_0x5f1640[_0x111053(0x67f)];if(_0x203682!==void 0x0&&!_0x29787e(_0x203682))return{'status':'preserved','reason':_0x111053(0x792)+_0x34b36c+'\x20is\x20not\x20a\x20JSON\x20object\x20(got\x20'+(Array[_0x111053(0x200)](_0x203682)?'array':typeof _0x203682)+')\x20—\x20preserved'};const _0x29b649=_0x29787e(_0x203682)?_0x203682:{};let _0x43365d=![];for(const _0x422c05 of _0x5b996d){_0x422c05 in _0x29b649&&(delete _0x29b649[_0x422c05],_0x43365d=!![]);}if(_0x29b649['react-native-mcp']&&!_0x43365d)return{'status':_0x111053(0x965)};return _0x29b649[_0x111053(0x223)]=_0x14762c['react-native-mcp'],_0x5f1640[_0x111053(0x67f)]=_0x29b649,await _0x475a69(_0x17e7d3(_0x34b36c,'..'),{'recursive':!![]}),await _0x18b8bb(_0x34b36c,JSON['stringify'](_0x5f1640,null,0x2)+'\x0a'),{'status':'written'};}async function _0x4ea3f6(_0x28c3e9){const _0x34de62=_0xf8ecb6;let _0x427a83='';try{if(_0x34de62(0x8bf)!==_0x34de62(0x6ef))_0x427a83=await _0x4248c2(_0x28c3e9,'utf-8');else return{'ok':![],'error':_0x34de62(0x416)};}catch{}const _0x85d5f0=new Set(_0x5b996d['map'](_0x2c4442=>'mcp_servers.'+_0x2c4442)),_0xb22936=_0x896b90(_0x427a83,_0x85d5f0);_0x427a83=_0xb22936['next'];const _0x15412a=_0xb22936[_0x34de62(0x63b)]['length']>0x0,_0x4b77f1=_0x427a83[_0x34de62(0x27e)]('[mcp_servers.react-native-mcp]');if(_0x4b77f1&&!_0x15412a)return{'status':'skipped'};if(!_0x4b77f1){const _0x5723f6='\x0a[mcp_servers.react-native-mcp]\x0acommand\x20=\x20\x22npx\x22\x0aargs\x20=\x20[\x22-y\x22,\x20\x22@ceraph/react-native-mcp@latest\x22]\x0a';_0x427a83=_0x427a83+_0x5723f6;}return await _0x475a69(_0x17e7d3(_0x28c3e9,'..'),{'recursive':!![]}),await _0x18b8bb(_0x28c3e9,_0x427a83),{'status':_0x34de62(0xa97)};}async function _0x4367cd(_0x372235){const _0x14d8d6=_0xf8ecb6,_0xca590f=await _0x534210(_0x372235);return{'isMonorepo':_0xca590f[_0x14d8d6(0x673)],'rootIsRnApp':_0xca590f[_0x14d8d6(0xb04)],'matches':_0xca590f[_0x14d8d6(0x764)]};}async function _0x141e0b(_0x17d12f){try{return await _0x29f8f2(_0x17d12f),!![];}catch{return![];}}import{readFile as _0x330453,writeFile as _0x4f66a1,mkdir as _0x2946ce,access as _0x518b77,chmod as _0x44b754}from'fs/promises';import{join as _0x4b16de}from'path';import{spawn as _0x33397f}from'child_process';import{join as _0xd26b69}from'path';import{createInterface as _0xfb0c4f}from'readline';function _0x53987a(_0x137f38){const _0xfc056c=_0xf8ecb6;if(_0x137f38['nonInteractive']!==void 0x0)return _0x137f38['nonInteractive'];if(process.env.CERAPH_NON_INTERACTIVE==='1')return!![];return!process['stdin'][_0xfc056c(0x4b9)];}function _0x5b735b(_0x1392f3){return new Promise(_0x1fddf9=>{const _0x8de014=_0xc050;if(_0x8de014(0x7f2)!==_0x8de014(0x465)){const _0x54e919=_0xfb0c4f({'input':process[_0x8de014(0x908)],'output':process[_0x8de014(0x790)]});_0x54e919[_0x8de014(0xa2b)](_0x1392f3,_0x12d80f=>{const _0x293901=_0x8de014;_0x54e919[_0x293901(0x716)](),_0x1fddf9(_0x12d80f);});}else{const _0x3a80e7={'name':'monorepo','status':_0x8de014(0x3dd),'details':{'matches':_0x140a82['matches']},'remediation':_0x44c6cf[_0x8de014(0x638)]};return _0x474a16(_0x3a80e7),_0x1481de(_0x2c0319['projectDir'],_0x5411d9);}});}async function _0xafbc13(_0x44b5e9,_0x2e4001={}){const _0x58a58d=_0xf8ecb6,_0x1fa0c9=_0x2e4001[_0x58a58d(0x98b)]??!![];if(_0x53987a(_0x2e4001))return _0x1fa0c9;const _0x2f5022=_0x2e4001['ask']??_0x5b735b,_0x24285c=_0x1fa0c9?_0x58a58d(0x66f):_0x58a58d(0x379),_0xfc290=(await _0x2f5022(_0x44b5e9+_0x24285c))['trim']()['toLowerCase']();if(_0xfc290['length']===0x0)return _0x1fa0c9;return _0xfc290==='y'||_0xfc290===_0x58a58d(0x907);}function _0x1405d2(_0x52a750,_0x28c9f5={}){const _0x47538a=_0xf8ecb6,_0x522f2b=_0x28c9f5[_0x47538a(0xaac)]??(_0x5a69a4=>process[_0x47538a(0x790)][_0x47538a(0xaac)](_0x5a69a4));_0x522f2b(_0x52a750);}function _0x2e36f6(_0x1bbca1,_0x195ca6){const _0xe509d7=_0xf8ecb6,_0x59933f=_0x195ca6??_0x1bbca1;if(process['stdout']['isTTY']!==!![]||process[_0xe509d7(0x910)]['isTTY']!==!![]){if(_0xe509d7(0x67a)!=='eLWTF'){const _0x398d74=_0x18d318['getImportDeclaration']('react');if(!_0x398d74)return _0x3312a1['addImportDeclaration']({'moduleSpecifier':_0xe509d7(0x8cb),'namedImports':[_0xe509d7(0x5da)]}),!![];const _0x3ee50e=_0x398d74[_0xe509d7(0x3d5)]();if(!_0x3ee50e['some'](_0x1f5b62=>_0x1f5b62['getName']()==='useEffect'))return _0x398d74['addNamedImport'](_0xe509d7(0x5da)),!![];return![];}else return _0x59933f;}return'\x1b]8;;'+_0x1bbca1+'\x07'+_0x59933f+'\x1b]8;;\x07';}async function _0x3bf280(_0x385eed,_0x514814,_0x2498ef={}){const _0x4dd10b=_0xf8ecb6;if(_0x514814['length']===0x0)return null;if(_0x53987a(_0x2498ef))return 0x0;const _0x1a684e=_0x2498ef[_0x4dd10b(0x8a8)]??_0x5b735b,_0x377334=[_0x385eed];_0x514814['forEach']((_0x5ecc32,_0x45d307)=>{const _0x1f2613=_0x4dd10b;_0x377334[_0x1f2613(0x4d1)]('\x20\x20'+(_0x45d307+0x1)+'.\x20'+_0x5ecc32);}),_0x377334[_0x4dd10b(0x4d1)]('');const _0x522ddc=_0x377334[_0x4dd10b(0x4ec)]('\x0a')+('Select\x20[1-'+_0x514814['length']+']:\x20'),_0x5eba3b=(await _0x1a684e(_0x522ddc))['trim']();if(_0x5eba3b[_0x4dd10b(0x3b7)]===0x0)return 0x0;const _0x43a710=Number['parseInt'](_0x5eba3b,0xa)-0x1;if(Number[_0x4dd10b(0x303)](_0x43a710)||_0x43a710<0x0||_0x43a710>=_0x514814['length'])return null;return _0x43a710;}async function _0x303aef(){return _0x1be651();}var _0x148fa0=_0xf8ecb6(0x231),_0x3a264a=_0xf8ecb6(0x953),_0x1b1989='Which\x20plan?',_0x37698d=_0xf8ecb6(0x277),_0x1ee032=_0xf8ecb6(0x5f3),_0xc4ce02=[_0x37698d,_0x1ee032];function _0x53b27a(_0x20378b){return new Promise(_0x25e6b7=>{const _0x3fb378=_0xc050,_0x122810=_0x33397f(_0x20378b[_0x3fb378(0x9c1)],_0x20378b[_0x3fb378(0x886)],{'cwd':_0x20378b['cwd'],'stdio':_0x20378b[_0x3fb378(0xa0d)]?[_0x3fb378(0x9fa),0x2,0x2]:'inherit'});_0x122810['on'](_0x3fb378(0x3dd),()=>_0x25e6b7({'exitCode':0x7f})),_0x122810['on']('exit',_0x54ef1c=>_0x25e6b7({'exitCode':_0x54ef1c??0x1}));});}function _0x566d0c(_0x567254){return'\x20\x20'+_0x567254+'\x0a';}async function _0x5a9822(_0x2aed8e,_0x1bb6f5={}){const _0xb7251f=_0xf8ecb6,_0x5d33e0=_0x4b428b=>_0x1405d2(_0x4b428b,_0x1bb6f5),_0x3f20fa=()=>{_0x5d33e0('\x0a');},_0x6821f7=await _0x839e1c(_0x2aed8e,_0x1bb6f5),_0x15e59a=await _0x20b434(_0x6821f7),_0x5774df=await _0x47e59c(_0x6821f7);let _0x8124be=_0x5774df;if(!_0x1bb6f5['skipInstall']){_0x3f20fa();const _0x54831c=_0x46ad3b(_0x15e59a,'@ceraph/react-native-mcp@latest');_0x5d33e0(_0x566d0c((_0x5774df?'Updating':'Installing')+'\x20@ceraph/react-native-mcp\x20('+_0x15e59a+')…'));const _0xd0759c=_0x1bb6f5['installPackage']??_0x53b27a,_0x4943e2=await _0xd0759c({'bin':_0x54831c['bin'],'args':_0x54831c['args'],'cwd':_0x6821f7,'stdioToStderr':_0x1bb6f5['installStdioToStderr']===!![]});if(_0x4943e2['exitCode']!==0x0)throw new Error(_0x15e59a+'\x20install\x20exited\x20with\x20code\x20'+_0x4943e2['exitCode']+'.\x20Fix\x20the\x20error\x20above\x20and\x20re-run\x20`npx\x20@ceraph/react-native-mcp\x20init`.');_0x8124be=!![];}let _0x38369b;if(_0x1bb6f5[_0xb7251f(0x69a)])_0x38369b=_0x1bb6f5[_0xb7251f(0x69a)];else{_0x3f20fa(),_0x5d33e0(_0x566d0c(_0xb7251f(0x530)+_0x2e36f6(_0x3a264a))),_0x5d33e0('\x0a');const _0x3d77ba=await _0x3bf280(_0x1b1989,_0xc4ce02,_0x1bb6f5);_0x38369b=_0x3d77ba===0x1?_0xb7251f(0x2a1):'starter';}const _0x585340=_0x1bb6f5[_0xb7251f(0x1fa)]??(_0x1ef2c2=>_0x29339f(_0x1ef2c2)[_0xb7251f(0x9c5)](()=>void 0x0));await _0x585340(_0x38369b)[_0xb7251f(0x48b)](()=>void 0x0);const _0x4bfcb8=_0x1bb6f5['loadAuth']??_0x303aef;let _0x4883f0=null,_0x36e94b=null;_0x3f20fa();if(_0x38369b==='starter'){if(_0xb7251f(0x6d6)==='KOMIZ')try{this['onSignal'](_0x3a4f2b);}catch{}else _0x5d33e0(_0x566d0c(_0xb7251f(0x70c)));}else{const _0x22c4d5=await _0x4bfcb8(),_0x405455=_0x22c4d5!==null&&(_0x22c4d5['githubUser']['id']!==0x0||_0x22c4d5[_0xb7251f(0x58e)]['login']!=='');_0x4883f0=_0x22c4d5;if(_0x22c4d5&&!_0x405455)_0x5d33e0(_0x566d0c(_0x22c4d5[_0xb7251f(0x41e)]?_0xb7251f(0x724)+_0x22c4d5['email']+_0xb7251f(0x4fb):_0xb7251f(0x205)));else{_0x405455&&_0x5d33e0(_0x566d0c('Existing\x20sign-in\x20is\x20from\x20the\x20old\x20GitHub\x20OAuth\x20flow\x20—\x20re-authenticating\x20against\x20the\x20new\x20browser\x20flow.'));_0x5d33e0(_0x566d0c(process.env.CERAPH_AUTH_TOKEN?.[_0xb7251f(0x668)]()?'Signing\x20in\x20with\x20the\x20provided\x20token…':_0xb7251f(0x32c)));const _0x349375=_0x1bb6f5[_0xb7251f(0x228)]??_0x549594;_0x4883f0=await _0x349375(),_0x5d33e0(_0x566d0c(_0x4883f0[_0xb7251f(0x41e)]?_0xb7251f(0x724)+_0x4883f0['email']:_0xb7251f(0x887)));}const _0x3c3808=_0x1bb6f5[_0xb7251f(0x5b1)]??_0x4faaf3,_0x425aa8=await _0x3c3808()[_0xb7251f(0x48b)](()=>![]);_0x36e94b=_0x425aa8?_0xb7251f(0xab2):_0xb7251f(0x885),!_0x425aa8?_0x5d33e0(_0x566d0c(_0xb7251f(0x84f)+_0x2e36f6(_0x3a264a)+'\x20—\x20then\x20re-run\x20init\x20(or\x20any\x20flow\x20tool).\x20Your\x20Pro\x20access\x20refreshes\x20automatically.')):_0x5d33e0(_0x566d0c('Pro\x20is\x20active\x20on\x20this\x20account.'));}const _0x1e68ca=await _0xfb1f2(_0x6821f7),_0x12be95=new Map();let _0x42cb47={'filesEdited':[],'totalReplacements':0x0};_0x3f20fa();if(_0x1e68ca[_0xb7251f(0x7be)]['length']===0x0)_0x5d33e0(_0x566d0c(_0xb7251f(0x4d8)));else{_0x5d33e0(_0x566d0c('Found\x20'+_0x1e68ca['edits'][_0xb7251f(0x3b7)]+_0xb7251f(0x32a)+_0x1e68ca[_0xb7251f(0x5bf)]+_0xb7251f(0xa22)));for(const _0x24b3b4 of _0x1e68ca[_0xb7251f(0x7be)]){_0x5d33e0(_0x566d0c('\x20\x20-\x20'+_0x24b3b4[_0xb7251f(0x87a)]+':'+_0x24b3b4['line']+_0xb7251f(0x60a)+(_0x24b3b4[_0xb7251f(0x695)]?'\x20(existing\x20imageKey\x20preserved)':'')));}_0x5d33e0(_0x566d0c('<CeraphCamera>\x20is\x20a\x20drop-in\x20for\x20<CameraView>\x20(same\x20props):\x20during\x20a\x20flow\x20run\x20it\x20returns\x20your\x20test\x20image;\x20in\x20a\x20production\x20build\x20it\x20renders\x20the\x20real\x20camera.'));const _0x391599=await _0xafbc13(_0xb7251f(0x2f6)+_0x1e68ca['edits']['length']+'\x20<CameraView>\x20to\x20<CeraphCamera>?',{..._0x1bb6f5,'defaultYes':!![]});_0x391599?_0x42cb47=await _0x4e871f(_0x6821f7,_0x1e68ca[_0xb7251f(0x7be)],_0x12be95,_0x1bb6f5,{'omitImageKey':!![]}):_0x5d33e0(_0x566d0c('Skipped\x20<CameraView>\x20rewrite.\x20Re-run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20to\x20apply.'));}const _0x3d6b33=await _0x5ea314(_0x6821f7);let _0x1d8742={'applied':![],'target':_0x3d6b33};const _0x57a0ef=_0x3d6b33?await _0x2dff89(_0x3d6b33['filePath']):'none';_0x3f20fa();if(!_0x3d6b33){if('UlPbD'!==_0xb7251f(0x408))return{'path':_0x37869d,'status':_0xb7251f(0xa16)};else _0x5d33e0(_0x566d0c(_0xb7251f(0x905)));}else{if(_0x57a0ef==='seamed')_0x5d33e0(_0x566d0c(_0xb7251f(0x474)+_0xb70c8e(_0x6821f7,_0x3d6b33['filePath']))),_0x1d8742={'applied':![],'target':_0x3d6b33,'reason':'already-injected'};else{const _0x18b0dd=_0x57a0ef==='bare'?'Upgrade':'Wire';_0x5d33e0(_0x566d0c('installCeraph()\x20registers\x20Ceraph\x27s\x20dev-only\x20test\x20hooks\x20—\x20runtime-error\x20capture,\x20state\x20reset/reload,\x20keep-awake\x20—\x20at\x20app\x20start.\x20No-op\x20in\x20production\x20builds.'));const _0x7124bb=await _0xafbc13(_0x18b0dd+'\x20installCeraph()\x20in\x20'+_0xb70c8e(_0x6821f7,_0x3d6b33[_0xb7251f(0x538)])+'?',{..._0x1bb6f5,'defaultYes':!![]});if(_0x7124bb){const _0x4c1d82=await _0x5b2f2b(_0x3d6b33);try{const _0x28d3df=await _0x2175ac(_0x3d6b33);_0x1d8742={'applied':_0x28d3df[_0xb7251f(0x1ee)],'target':_0x3d6b33,'reason':_0x28d3df['reason']},_0x28d3df['applied']?_0x5d33e0(_0x566d0c(_0xb7251f(0x4fa)+_0xb70c8e(_0x6821f7,_0x3d6b33['filePath']))):_0x5d33e0(_0x566d0c('Skipped\x20(auto-injection):\x20'+(_0x28d3df['reason']??_0xb7251f(0x339))));}catch(_0x132544){if(_0x4c1d82!=null)await _0x2b12e3(_0x3d6b33,_0x4c1d82);throw _0x132544;}}else{if('JNpfz'!=='JNpfz')return;else _0x5d33e0(_0x566d0c(_0xb7251f(0x871)));}}}let _0x46543c=null;const _0x5096f1=_0x1bb6f5['ensureUrlScheme']??_0x263689,_0x1a100a=await _0x5096f1(_0x6821f7);_0x46543c=_0x1a100a;if(_0x1a100a['kind']!==_0xb7251f(0x9ab))_0x3f20fa();switch(_0x1a100a['kind']){case'expo-json-added':{const _0x499466=_0x1a100a['previousScheme'],_0x54d165=_0xb70c8e(_0x6821f7,_0x1a100a[_0xb7251f(0x2c7)]);if(_0x499466===void 0x0)_0x5d33e0(_0x566d0c(_0xb7251f(0x473)+_0x54d165+_0xb7251f(0x2b8)));else{const _0x87b63a=Array[_0xb7251f(0x200)](_0x499466)?_0x499466['join'](',\x20'):_0x499466;_0x5d33e0(_0x566d0c(_0xb7251f(0x5cd)+_0x54d165+'\x20scheme\x20(kept\x20your\x20existing\x20'+_0x87b63a+'\x20→\x20now\x20['+_0x87b63a+',\x20ceraph])'));}break;}case _0xb7251f(0x4ab):_0x5d33e0(_0x566d0c(_0xb7251f(0x290)+_0xb70c8e(_0x6821f7,_0x1a100a[_0xb7251f(0x2c7)])));break;case'expo-config-needs-manual':_0x5d33e0(_0x566d0c('Detected\x20'+_0xb70c8e(_0x6821f7,_0x1a100a[_0xb7251f(0x2c7)])+'\x20(dynamic\x20Expo\x20config).')),_0x5d33e0(_0x8d4874(_0xb70c8e(_0x6821f7,_0x1a100a['path'])));break;case'bare-rn-needs-manual':_0x5d33e0(_0x566d0c(_0xb7251f(0x6ce))),_0x5d33e0(_0x5c9d06());break;case _0xb7251f(0x9ab):break;}let _0x4d4bf4=null;const _0x2837de=_0x1bb6f5[_0xb7251f(0x97d)]??_0x20bee7,_0x854620=await _0x2837de(_0x6821f7);_0x4d4bf4=_0x854620,_0x3f20fa();switch(_0x854620['kind']){case _0xb7251f(0x7ed):_0x5d33e0(_0x566d0c(_0xb7251f(0x76a)+_0xb70c8e(_0x6821f7,_0x854620['path'])+(_0x854620['beforeReanimated']?_0xb7251f(0x647):'')+'.'));break;case'already-present':_0x5d33e0(_0x566d0c('testID\x20injector\x20already\x20wired\x20in\x20'+_0xb70c8e(_0x6821f7,_0x854620['path'])));break;case _0xb7251f(0x50a):_0x5d33e0(_0x566d0c(_0xb7251f(0x5b2)+_0x854620['reason']));break;case _0xb7251f(0x8f4):_0x5d33e0(_0x566d0c(_0xb7251f(0xa55)+_0xb70c8e(_0x6821f7,_0x854620[_0xb7251f(0x2c7)])+'\x20('+_0x854620[_0xb7251f(0xaa1)]+_0xb7251f(0x34d)));break;}let _0x31edc0={'state':_0xb7251f(0x737),'registered':0x0};if(_0x42cb47['totalReplacements']>0x0){_0x3f20fa();const _0x3f2e6c=await _0x112a0a(_0x6821f7);_0x31edc0={'state':_0x3f2e6c[_0xb7251f(0x36a)],'registered':_0x3f2e6c['registered']['length']},_0x3f2e6c[_0xb7251f(0x36a)]===_0xb7251f(0x737)?_0x5d33e0(_0x566d0c('Test\x20images:\x20call\x20`ceraph_add_camera_image`\x20(writes\x20+\x20auto-syncs\x20the\x20registry),\x20or\x20drop\x20files\x20into\x20'+_0xd26b69('.ceraph','camera-images')+_0xb7251f(0x3bd))):'qSkAL'==='qSkAL'?_0x5d33e0(_0x566d0c(_0xb7251f(0xa7c)+_0x3f2e6c[_0xb7251f(0x36a)]+'\x20('+_0x3f2e6c['registered']['length']+_0xb7251f(0xa46)+_0x1718c0(_0x6821f7,_0x3f2e6c['registryPath'])+'.')):_0x4e5a49['wildcard']?_0x400ae1['accumulatedWriteKeys']['add'](_0x53309d[_0xb7251f(0xb14)]+':'+_0x1d3024['key']+':*'):_0x35ee9d[_0xb7251f(0x56a)]['add'](_0x1e8986['kind']+':'+_0x21b9f2[_0xb7251f(0x88a)]);}let _0x472bc=null;if(_0x4883f0&&_0x36e94b===_0xb7251f(0xab2))try{const _0x458b15=_0x1bb6f5['seedMobileGraph']??_0xb5d385;_0x472bc=await _0x458b15({'workingDir':_0x6821f7,'auth':_0x4883f0}),_0x472bc[_0xb7251f(0x428)]===_0xb7251f(0x50c)&&(_0x3f20fa(),_0x5d33e0(_0x566d0c(_0xb7251f(0x705)+_0x472bc['screenCount']+_0xb7251f(0x52d)+_0x472bc[_0xb7251f(0xa7f)]+_0xb7251f(0x478)+_0x472bc[_0xb7251f(0x273)]+').')));}catch{_0x472bc=null;}else _0x4883f0&&_0x36e94b==='pending'&&(_0x472bc={'status':_0xb7251f(0x965),'reason':_0xb7251f(0x4e6),'message':'Pro\x20selected\x20but\x20not\x20yet\x20active\x20—\x20server-side\x20caching\x20is\x20skipped\x20until\x20checkout\x20completes\x20at\x20'+_0x3a264a+'.'});let _0xa9387f=null;if(_0x1bb6f5[_0xb7251f(0x769)]){_0x3f20fa(),_0xa9387f=await _0x1bb6f5['runDoctor'](),_0x5d33e0(_0x566d0c(_0xb7251f(0x9d1)+_0xa9387f[_0xb7251f(0x88b)]+'/'+_0xa9387f[_0xb7251f(0xa58)]+'\x20'+(_0xa9387f['ok']?'passed':_0xb7251f(0xa44))));if(_0xa9387f[_0xb7251f(0x76c)])_0x5d33e0(_0xa9387f[_0xb7251f(0x76c)]);}_0x3f20fa();let _0x8e9313=![];if(_0x38369b===_0xb7251f(0x7a4))_0x5d33e0(_0x566d0c('You\x27re\x20set\x20up\x20on\x20Starter\x20—\x20local\x20build,\x20run,\x20and\x20device\x20tools.')),_0x5d33e0(_0x566d0c(_0xb7251f(0x75d))),_0x5d33e0(_0x566d0c('More\x20about\x20the\x20plans\x20→\x20'+_0x2e36f6(_0x3a264a))),_0x8e9313=!![];else _0x36e94b===_0xb7251f(0x885)&&(!_0x1bb6f5['agentMode']&&process['stdout']['isTTY']===!![]&&_0x3bda54(_0x3a264a),_0x5d33e0(_0x566d0c('Pro\x20selected.\x20Complete\x20checkout\x20at\x20'+_0x2e36f6(_0x3a264a)+_0xb7251f(0xac8))),_0x5d33e0(_0x566d0c(_0xb7251f(0x57b))),_0x8e9313=!![]);if(_0x8e9313)_0x5d33e0('\x0a');_0x5d33e0(_0x566d0c('Restart\x20Claude\x20Code\x20(or\x20your\x20MCP\x20client)\x20to\x20load\x20the\x20Ceraph\x20tools.'));if(_0x1bb6f5[_0xb7251f(0xa57)]){if('Adzep'!=='LNryr')_0x5d33e0(_0x566d0c(_0xb7251f(0xa65)));else{_0x5b895f({'ok':![],'error':'Failed\x20to\x20spawn\x20'+_0x4e9072+':\x20'+(_0x35c284 instanceof _0x27b201?_0x63f5ea['message']:_0x5bdc05(_0x241244))});return;}}_0x5d33e0('\x0a'),_0x5d33e0(_0x566d0c('Next:\x20ask\x20your\x20AI\x20coding\x20assistant\x20(Claude\x20Code,\x20Cursor,\x20Codex,\x20etc.):')),_0x5d33e0(_0x566d0c('\x22Run\x20ceraph_init_status\x20to\x20confirm\x20the\x20project\x20is\x20wired\x20up.\x22')),_0x5d33e0('\x0a');const _0x3ce293=_0x1e68ca['edits']['map'](_0x3ddd2f=>({'file':_0x3ddd2f[_0xb7251f(0x87a)],'line':_0x3ddd2f[_0xb7251f(0x397)],'suggestedKey':_0x3ddd2f['suggestedKey']})),_0x4652d5=_0x1bb6f5[_0xb7251f(0x493)]?{'cameras':_0x3ce293,'setupRequired':_0x3ce293[_0xb7251f(0x3b7)]>0x0,'hintText':_0x3ce293['length']===0x0?_0xb7251f(0x812):'For\x20each\x20<CeraphCamera>\x20below,\x20ask\x20the\x20user\x20which\x20scenario\x20this\x20camera\x20serves\x20and\x20call\x20ceraph_init_replace_camera\x20with\x20the\x20chosen\x20imageKey.\x20Three\x20options:\x20(A)\x20imageKey=\x22default\x22\x20—\x20bundled\x20black\x20PNG\x20fallback.\x20Right\x20answer\x20when\x20the\x20test\x20doesn\x27t\x20care\x20about\x20image\x20content\x20(most\x20form-submit\x20/\x20file-upload\x20flows).\x20(B)\x20imageKey=\x22<key>\x22\x20—\x20a\x20specific\x20test\x20image.\x20Ask\x20the\x20user\x20for\x20a\x20descriptive\x20lowercase-dashes\x20name\x20AND\x20drop\x20the\x20file\x20at\x20.ceraph/camera-images/<key>.{jpg,png,webp},\x20then\x20call\x20rn_sync_camera_registry.\x20(C)\x20imageKey=\x22@runtime\x22\x20—\x20the\x20camera\x20serves\x20multiple\x20scenarios\x20per\x20flow;\x20the\x20planner\x20picks\x20the\x20image\x20per-step\x20at\x20runtime.\x20Use\x20when\x20one\x20camera\x20screen\x20feeds\x20different\x20outcomes.'}:null;return _0x1bb6f5[_0xb7251f(0x493)]&&_0x4652d5&&_0x5d33e0(''+_0x148fa0+JSON['stringify'](_0x4652d5)+'\x0a'),{'packageInstalled':_0x8124be,'packageManager':_0x15e59a,'tier':_0x38369b,'proStatus':_0x36e94b,'authLogin':_0x4883f0?.[_0xb7251f(0x41e)]??null,'cameraEdits':_0x42cb47,'layoutInjection':_0x1d8742,'graphSeed':_0x472bc,'cameraRegistrySync':_0x31edc0,'doctor':_0xa9387f,'workingDir':_0x6821f7,'urlScheme':_0x46543c,'babelConfig':_0x4d4bf4,'agentHint':_0x4652d5};}async function _0x839e1c(_0x5bd784,_0x5a4489){const _0x59c772=_0xf8ecb6,_0x2fe2a4=_0x5a4489[_0x59c772(0x736)]??_0x534210,_0x422881=await _0x2fe2a4(_0x5bd784);if(_0x422881[_0x59c772(0xb14)]===_0x59c772(0x41a)){if(_0x422881['isMonorepo']&&!_0x422881[_0x59c772(0xb04)]){if(_0x59c772(0x73f)!==_0x59c772(0x3d6))throw new Error('Detected\x20a\x20monorepo\x20at\x20the\x20current\x20directory\x20but\x20could\x20not\x20find\x20a\x20React\x20Native\x20or\x20Expo\x20subpackage.\x20Re-run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20from\x20inside\x20the\x20RN/Expo\x20app\x20folder,\x20or\x20add\x20the\x20app\x20to\x20your\x20workspaces.');else return{'ok':![],'reason':'wda-package-missing','error':_0x59c772(0x84d)};}return _0x5bd784;}if(_0x422881[_0x59c772(0xb14)]==='single'){const _0x167a2a=_0x422881['matches'][0x0];if(!_0x167a2a)return _0x5bd784;return _0x1405d2('\x0a',_0x5a4489),_0x1405d2(_0x566d0c('Detected\x20React\x20Native\x20app\x20at\x20'+_0x167a2a[_0x59c772(0x87a)]+_0x59c772(0x1f9)),_0x5a4489),_0x167a2a['absPath'];}_0x1405d2('\x0a',_0x5a4489),_0x1405d2(_0x566d0c(_0x59c772(0x5d7)),_0x5a4489);const _0x5add40=_0x422881[_0x59c772(0x764)]['map'](_0x3326cb=>_0x3326cb['relPath']+'/\x20\x20['+_0x3326cb[_0x59c772(0xa3a)][_0x59c772(0x4ec)](',\x20')+']'),_0x16f7b4=await _0x3bf280(_0x59c772(0x6e8),_0x5add40,_0x5a4489);if(_0x16f7b4==null)throw new Error('No\x20valid\x20selection.\x20Re-run\x20init\x20and\x20pick\x20a\x20numbered\x20option.');const _0x4e6d0c=_0x422881['matches'][_0x16f7b4];if(!_0x4e6d0c)throw new Error(_0x59c772(0x7ea));return _0x1405d2(_0x566d0c('Working\x20from\x20'+_0x4e6d0c['relPath']+'/'),_0x5a4489),_0x4e6d0c[_0x59c772(0x8a9)];}function _0xb70c8e(_0x4bbf61,_0xc2959e){if(_0xc2959e['startsWith'](_0x4bbf61)){const _0x5762c6=_0xc2959e['slice'](_0x4bbf61['length']+0x1);return _0x5762c6['length']>0x0?_0x5762c6:_0xc2959e;}return _0xc2959e;}async function _0x549594(){const _0xbfd1cf=_0xf8ecb6,_0x48f066=await _0x57ae5f();return{'accessToken':_0x48f066['token'],'expiresAt':0x0,'githubUser':{'login':'','id':0x0},'storedAt':new Date()[_0xbfd1cf(0x471)](),..._0x48f066['email']?{'email':_0x48f066['email']}:{}};}async function _0x4e871f(_0x433783,_0x3ede8e,_0x5d28c8,_0xd84cf3,_0x2b17ee={}){const _0x283022=_0xf8ecb6;for(const _0x352177 of _0x3ede8e){!_0x5d28c8[_0x283022(0x979)](_0x352177[_0x283022(0x538)])&&_0x5d28c8[_0x283022(0x93e)](_0x352177[_0x283022(0x538)],await _0x1558ea(_0x352177['filePath']));}try{const _0x2a1d4d=await _0x5934f3(_0x433783,_0x3ede8e,_0x2b17ee);return _0x1405d2(_0x566d0c(_0x283022(0xa1f)+_0x2a1d4d[_0x283022(0x4ce)]+'\x20<CameraView>\x20→\x20<CeraphCamera>\x20across\x20'+_0x2a1d4d[_0x283022(0x838)][_0x283022(0x3b7)]+_0x283022(0x7cb)),_0xd84cf3),_0x2a1d4d;}catch(_0x26fdae){for(const [_0x546336,_0x2de4a9]of _0x5d28c8){if(_0x2de4a9!=null)try{await _0x4c580e(_0x546336,_0x2de4a9);}catch(_0x18e778){console[_0x283022(0x3dd)]('[ceraph]\x20rollback\x20failed\x20for\x20'+_0x546336+':',_0x18e778 instanceof Error?_0x18e778[_0x283022(0x531)]:_0x18e778);}}throw _0x26fdae;}}var _0x3a31aa='#!/bin/bash\x0a#\x20rn-error-notify.sh\x20—\x20Injected\x20by\x20@ceraph/react-native-mcp\x20init\x0a#\x20Reads\x20.rn-errors.json\x20and\x20injects\x20runtime\x20errors\x20into\x20Claude\x27s\x20context.\x0a\x0aERROR_FILE=\x22$CLAUDE_PROJECT_DIR/mobile/.rn-errors.json\x22\x0a\x0a#\x20Also\x20check\x20project\x20root\x20if\x20mobile/\x20doesn\x27t\x20exist\x0aif\x20[\x20!\x20-f\x20\x22$ERROR_FILE\x22\x20];\x20then\x0a\x20\x20ERROR_FILE=\x22$CLAUDE_PROJECT_DIR/.rn-errors.json\x22\x0afi\x0a\x0aif\x20[\x20!\x20-f\x20\x22$ERROR_FILE\x22\x20];\x20then\x0a\x20\x20exit\x200\x0afi\x0a\x0aERROR_COUNT=$(jq\x20-r\x20\x27.errors\x20|\x20length\x27\x20\x22$ERROR_FILE\x22\x202>/dev/null)\x0a\x0aif\x20[\x20\x22$ERROR_COUNT\x22\x20=\x20\x220\x22\x20]\x20||\x20[\x20-z\x20\x22$ERROR_COUNT\x22\x20];\x20then\x0a\x20\x20exit\x200\x0afi\x0a\x0aecho\x20\x22REACT\x20NATIVE\x20RUNTIME\x20ERROR\x20DETECTED:\x22\x0aecho\x20\x22\x22\x0ajq\x20-r\x20\x27.errors[]\x20|\x20\x22Error:\x20\x5c(.message)\x5cnStack:\x20\x5c(.stack)\x5cnTime:\x20\x5c(.timestamp)\x5cn---\x22\x27\x20\x22$ERROR_FILE\x22\x202>/dev/null\x0aecho\x20\x22\x22\x0aecho\x20\x22Use\x20rn_get_errors\x20for\x20full\x20details.\x20Fix\x20the\x20error\x20and\x20rebuild.\x22\x0a',_0x210ef1='#!/bin/bash\x0a#\x20rn-flow-progress-notify.sh\x20—\x20Injected\x20by\x20@ceraph/react-native-mcp\x20init\x0a#\x20Reads\x20.rn-flow-progress.json\x20and\x20injects\x20a\x20one-line\x20heartbeat\x20into\x0a#\x20Claude\x27s\x20context.\x20HEARTBEAT\x20ONLY\x20—\x20no\x20step-level\x20failure\x20details.\x0a\x0aENTRY_FILE=\x22$CLAUDE_PROJECT_DIR/mobile/.rn-flow-progress.json\x22\x0aif\x20[\x20!\x20-f\x20\x22$ENTRY_FILE\x22\x20];\x20then\x0a\x20\x20ENTRY_FILE=\x22$CLAUDE_PROJECT_DIR/.rn-flow-progress.json\x22\x0afi\x0aif\x20[\x20!\x20-f\x20\x22$ENTRY_FILE\x22\x20];\x20then\x0a\x20\x20exit\x200\x0afi\x0a\x0a#\x20If\x20jq\x20isn\x27t\x20installed,\x20exit\x20quietly\x20—\x20the\x20heartbeat\x20is\x20best-effort.\x0aif\x20!\x20command\x20-v\x20jq\x20>/dev/null\x202>&1;\x20then\x0a\x20\x20exit\x200\x0afi\x0a\x0aENTRY=$(jq\x20-r\x20\x27.entry\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0aif\x20[\x20\x22$ENTRY\x22\x20=\x20\x22null\x22\x20]\x20||\x20[\x20-z\x20\x22$ENTRY\x22\x20];\x20then\x0a\x20\x20exit\x200\x0afi\x0a\x0a#\x20jq\x20\x27//\x20\x22\x22\x27\x20(works\x20in\x20jq\x201.4+;\x20\x22//\x20empty\x22\x20needed\x201.5+\x20and\x20would\x20have\x0a#\x20silently\x20aborted\x20older\x20shells)\x20makes\x20jq\x20emit\x20an\x20empty\x20string\x20for\x0a#\x20missing\x20fields\x20rather\x20than\x20the\x20literal\x20\x22null\x22.\x20Defaults\x20below\x20keep\x0a#\x20set\x20-e\x20shells\x20happy\x20in\x20the\x20arithmetic\x20+\x20awk\x20expansions\x20even\x20when\x0a#\x20the\x20entry\x20is\x20partial\x20(transient\x20state\x20if\x20the\x20file\x20is\x20read\x0a#\x20mid-write).\x0aFLOW=$(jq\x20-r\x20\x27.entry.flow\x20//\x20\x22\x22\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0aINDEX=$(jq\x20-r\x20\x27.entry.index\x20//\x20\x22\x22\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0aTOTAL=$(jq\x20-r\x20\x27.entry.total\x20//\x20\x22\x22\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0aSUCCESS=$(jq\x20-r\x20\x27.entry.success\x20//\x20\x22\x22\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0aDURATION=$(jq\x20-r\x20\x27.entry.durationMs\x20//\x20\x22\x22\x27\x20\x22$ENTRY_FILE\x22\x202>/dev/null)\x0a\x0aINDEX=${INDEX:-0}\x0aTOTAL=${TOTAL:-0}\x0aDURATION=${DURATION:-0}\x0aFLOW=${FLOW:-unknown}\x0a\x0aDISPLAY_INDEX=$((INDEX\x20+\x201))\x0aif\x20[\x20\x22$SUCCESS\x22\x20=\x20\x22true\x22\x20];\x20then\x0a\x20\x20STATUS=\x22passed\x22\x0aelse\x0a\x20\x20STATUS=\x22failed\x22\x0afi\x0a\x0aecho\x20\x22Flow\x20$DISPLAY_INDEX/$TOTAL\x20—\x20$FLOW:\x20$STATUS\x20in\x20$(awk\x20\x22BEGIN\x20{printf\x20\x5c\x22%.1f\x5c\x22,\x20$DURATION/1000}\x22)s\x22\x0aecho\x20\x22(Wait\x20for\x20the\x20end-of-run\x20summary\x20before\x20making\x20any\x20code\x20changes\x20—\x20the\x20flows\x20in\x20this\x20run\x20reference\x20your\x20pre-edit\x20code.)\x22\x0a',_0x1d2d25=['.claude',_0xf8ecb6(0x845),'rn-error-notify.sh'],_0x19d4a3=[_0xf8ecb6(0x3fe),_0xf8ecb6(0x845),_0xf8ecb6(0x97b)],_0x5d6baa='.rn-errors.json',_0x484387=_0xf8ecb6(0x813),_0x9ef03b='\x22$CLAUDE_PROJECT_DIR\x22/.claude/hooks/rn-error-notify.sh',_0x57c4e1='\x22$CLAUDE_PROJECT_DIR\x22/.claude/hooks/rn-flow-progress-notify.sh',_0x4d498c=[[_0xf8ecb6(0x3fe),'settings.json'],['.claude','settings.local.json']],_0x569c24=process['cwd'](),_0x47f4d2={'react-native-mcp':{'command':'npx','args':['-y',_0xf8ecb6(0x7c4)]}};async function _0x20cdd5(_0x2bf2a2){try{return await _0x518b77(_0x2bf2a2),!![];}catch{return![];}}async function _0x403a1e(_0x4e3783,_0x3c4534){const _0x363e3c=_0xf8ecb6;await _0x2946ce(_0x4b16de(_0x4e3783,'..'),{'recursive':!![]}),await _0x18b8bb(_0x4e3783,JSON[_0x363e3c(0x312)](_0x3c4534,null,0x2)+'\x0a');}function _0x50f058(_0x5ed506){const _0x29916f=_0xf8ecb6;console[_0x29916f(0x2b0)]('\x20\x20'+_0x5ed506);}async function _0x42beb3(_0x3c5caa,_0x382301){const _0xf87b28=_0xf8ecb6,_0x320d93=await _0x354490(_0x3c5caa);if(_0x320d93['kind']==='malformed')return _0x50f058(_0x382301+_0xf87b28(0x98d)+_0x3c5caa+'\x20is\x20malformed\x20JSON\x20—\x20preserving\x20it.\x20Fix\x20the\x20file\x20manually\x20then\x20re-run\x20init.'),![];const _0x5f255e=_0x320d93[_0xf87b28(0xb14)]==='ok'?_0x320d93[_0xf87b28(0x39d)]:{};if(_0x320d93['kind']==='ok'&&!_0x29787e(_0x5f255e))return _0x50f058(_0x382301+':\x20existing\x20config\x20at\x20'+_0x3c5caa+_0xf87b28(0x2ca)+(Array['isArray'](_0x5f255e)?'array':typeof _0x5f255e)+')\x20—\x20preserving\x20it.'),![];const _0x5473c2=_0x29787e(_0x5f255e)?_0x5f255e:{},_0x28a714=_0x5473c2['mcpServers'];if(_0x28a714!==void 0x0&&!_0x29787e(_0x28a714))return _0x50f058(_0x382301+':\x20existing\x20mcpServers\x20in\x20'+_0x3c5caa+_0xf87b28(0x2ca)+(Array['isArray'](_0x28a714)?'array':typeof _0x28a714)+_0xf87b28(0x8ee)),![];const _0x2d9253=_0x29787e(_0x28a714)?_0x28a714:{};let _0xfc9920=![];for(const _0x1a5be3 of _0x5b996d){_0x1a5be3 in _0x2d9253&&(delete _0x2d9253[_0x1a5be3],_0xfc9920=!![]);}const _0x128686=Boolean(_0x2d9253['react-native-mcp']);if(_0x128686&&!_0xfc9920)return _0x50f058(_0x382301+_0xf87b28(0xa0f)),![];return _0x2d9253[_0xf87b28(0x223)]=_0x47f4d2[_0xf87b28(0x223)],_0x5473c2['mcpServers']=_0x2d9253,await _0x403a1e(_0x3c5caa,_0x5473c2),_0x50f058(_0x382301+_0xf87b28(0x29c)),!![];}async function _0x3045ce(_0x149698){const _0x48ad89=_0xf8ecb6;let _0x5b816a='';try{_0x5b816a=await _0x330453(_0x149698,_0x48ad89(0x827));}catch{}const _0x3aa2f7=new Set(_0x5b996d[_0x48ad89(0x86b)](_0x334162=>_0x48ad89(0x8a2)+_0x334162)),_0x3319a9=_0x896b90(_0x5b816a,_0x3aa2f7);_0x5b816a=_0x3319a9[_0x48ad89(0x350)];const _0x27217b=_0x3319a9['removedKeys'][_0x48ad89(0x3b7)]>0x0,_0x3435f2=_0x5b816a['includes'](_0x48ad89(0x64e));if(_0x3435f2&&!_0x27217b)return _0x50f058('Codex:\x20already\x20configured'),![];if(!_0x3435f2){const _0x4cbda0=_0x48ad89(0x65c);_0x5b816a=_0x5b816a+_0x4cbda0;}return await _0x2946ce(_0x4b16de(_0x149698,'..'),{'recursive':!![]}),await _0x18b8bb(_0x149698,_0x5b816a),_0x50f058(_0x48ad89(0x41d)),!![];}async function _0x3d5a63(_0x2c2112=_0x569c24){const _0x13fa25=_0xf8ecb6,_0x3169cd=_0x4b16de(_0x2c2112,_0x13fa25(0x3fe),'hooks'),_0x182c65=_0x4b16de(_0x3169cd,_0x13fa25(0x9fd)),_0x49afe4=_0x4b16de(_0x3169cd,_0x13fa25(0x97b));await _0x2946ce(_0x3169cd,{'recursive':!![]}),await _0x18b8bb(_0x182c65,_0x3a31aa),await _0x44b754(_0x182c65,0x1ed),_0x50f058(_0x13fa25(0x71f)),await _0x18b8bb(_0x49afe4,_0x210ef1),await _0x44b754(_0x49afe4,0x1ed),_0x50f058('Hook\x20script:\x20.claude/hooks/rn-flow-progress-notify.sh\x20✓');const _0x5126ad=_0x4b16de(_0x2c2112,_0x13fa25(0x3fe),'settings.json'),_0xd8d41=_0x4b16de(_0x2c2112,'.claude','settings.local.json'),_0x28b286=(_0x411524,_0xda9dbc,_0x447f00)=>{const _0x11947b=_0x13fa25,_0x1deefc=_0x29787e(_0x411524)?_0x411524:{},_0x1264b0=_0x1deefc[_0x11947b(0x845)],_0x54cfd6=_0x29787e(_0x1264b0)?_0x1264b0:{},_0x30dbac=_0x54cfd6['FileChanged'];if(!Array['isArray'](_0x30dbac))return _0x30dbac!==void 0x0;return _0x30dbac[_0x11947b(0x275)](_0x5a2b49=>{const _0x7ac2dd=_0x11947b;if(!_0x29787e(_0x5a2b49))return![];if(_0x5a2b49[_0x7ac2dd(0x831)]!==_0xda9dbc)return![];const _0x6bb492=_0x5a2b49[_0x7ac2dd(0x845)];if(!Array['isArray'](_0x6bb492))return![];return _0x6bb492['some'](_0x5ba193=>{if(!_0x29787e(_0x5ba193))return![];const _0x2b2e3e=_0x5ba193['command'];return typeof _0x2b2e3e==='string'&&_0x2b2e3e===_0x447f00;});});},_0x163c9c=await _0x354490(_0x5126ad),_0x251e46=await _0x354490(_0xd8d41);if(_0x163c9c['kind']===_0x13fa25(0xa16)){_0x50f058(_0x13fa25(0x8b9)+_0x5126ad+_0x13fa25(0x47f));return;}if(_0x251e46['kind']==='malformed'){_0x50f058(_0x13fa25(0x8b9)+_0xd8d41+_0x13fa25(0x47f));return;}const _0x3e8f0e=_0x163c9c[_0x13fa25(0xb14)]==='ok'?_0x163c9c[_0x13fa25(0x39d)]:null,_0x4b207d=_0x251e46['kind']==='ok'?_0x251e46['value']:null;if(_0x3e8f0e!==null&&!_0x29787e(_0x3e8f0e)){_0x50f058(_0x13fa25(0x8b9)+_0x5126ad+_0x13fa25(0x6e4));return;}if(_0x4b207d!==null&&!_0x29787e(_0x4b207d)){_0x50f058(_0x13fa25(0x8b9)+_0xd8d41+_0x13fa25(0x6e4));return;}const _0x2b05fc=_0x3e8f0e??{},_0x574592=_0x2b05fc['hooks'];if(_0x574592!==void 0x0&&!_0x29787e(_0x574592)){_0x50f058(_0x13fa25(0x8b9)+_0x5126ad+'\x20`hooks`\x20is\x20not\x20a\x20JSON\x20object\x20—\x20preserving\x20it.');return;}const _0x53098f=_0x29787e(_0x574592)?_0x574592:{},_0x44071c=_0x53098f[_0x13fa25(0x80a)],_0x5e9ca7=Array['isArray'](_0x44071c)?_0x44071c:[];let _0x15c68f=![];!_0x28b286(_0x3e8f0e,_0x5d6baa,_0x9ef03b)&&!_0x28b286(_0x4b207d,_0x5d6baa,_0x9ef03b)?(_0x5e9ca7['push']({'matcher':_0x5d6baa,'hooks':[{'type':_0x13fa25(0xaee),'command':_0x9ef03b}]}),_0x15c68f=!![],_0x50f058('Claude\x20Code\x20hook:\x20FileChanged\x20→\x20.rn-errors.json\x20✓')):_0x50f058('Claude\x20Code\x20hook\x20(.rn-errors.json):\x20already\x20configured'),!_0x28b286(_0x3e8f0e,_0x484387,_0x57c4e1)&&!_0x28b286(_0x4b207d,_0x484387,_0x57c4e1)?'xYuSg'!=='xYuSg'?_0x1a0acf[_0x13fa25(0xa60)]=!![]:(_0x5e9ca7[_0x13fa25(0x4d1)]({'matcher':_0x484387,'hooks':[{'type':'command','command':_0x57c4e1}]}),_0x15c68f=!![],_0x50f058(_0x13fa25(0x284))):_0x50f058(_0x13fa25(0xa7b)),_0x15c68f&&(_0x53098f[_0x13fa25(0x80a)]=_0x5e9ca7,_0x2b05fc['hooks']=_0x53098f,await _0x403a1e(_0x5126ad,_0x2b05fc));}var _0x2ab35f=_0xf8ecb6(0x578);async function _0x3fccc2(){const _0xdf6874=_0xf8ecb6,_0x577db7=_0x4b16de(_0x569c24,_0xdf6874(0x4b1),'camera-images');await _0x2946ce(_0x577db7,{'recursive':!![]});const _0x4c2c4b=_0x4b16de(_0x577db7,'README.md');!await _0x20cdd5(_0x4c2c4b)?(await _0x4f66a1(_0x4c2c4b,_0x2ab35f,'utf-8'),_0x50f058('Camera\x20images:\x20.ceraph/camera-images/\x20+\x20README.md\x20✓')):_0x50f058('Camera\x20images:\x20.ceraph/camera-images/\x20already\x20exists');}async function _0x431dd7(){const _0x47b99e=_0xf8ecb6,_0x31c05e=_0x4b16de(_0x569c24,_0x47b99e(0x39c));let _0x34e6c5='';try{_0x34e6c5=await _0x330453(_0x31c05e,_0x47b99e(0x827));}catch{}const _0x5a1a48=[_0x47b99e(0x383),_0x47b99e(0x813),'.ceraph/runs/','.ceraph/wda-derived/','.ceraph/last-build-snapshot.json'],_0x4038d4=_0x5a1a48[_0x47b99e(0x529)](_0x559bb1=>!_0x34e6c5[_0x47b99e(0x27e)](_0x559bb1));if(_0x4038d4[_0x47b99e(0x3b7)]===0x0){_0x50f058('.gitignore:\x20entries\x20already\x20present');return;}const _0x866f5d=_0x34e6c5===''||_0x34e6c5['endsWith']('\x0a')?'':'\x0a',_0x4d1388=_0x866f5d+_0x4038d4['join']('\x0a')+'\x0a';await _0x18b8bb(_0x31c05e,_0x34e6c5+_0x4d1388),_0x50f058('.gitignore:\x20added\x20'+_0x4038d4[_0x47b99e(0x4ec)](',\x20')+'\x20✓');}async function _0x316e64(){const _0x54d910=_0xf8ecb6;console[_0x54d910(0x2b0)](_0x54d910(0x805)),await _0x42beb3(_0x4b16de(_0x569c24,'.mcp.json'),_0x54d910(0xac2));const _0x10a5d5=await _0x3031b6(_0x569c24);_0x10a5d5[_0x54d910(0x428)]==='preserved'?_0x50f058(_0x54d910(0x295)+_0x10a5d5[_0x54d910(0x22f)]+'\x20has\x20an\x20unexpected\x20shape\x20—\x20preserving\x20it.\x20'+_0x10a5d5[_0x54d910(0x256)]):_0x50f058(_0x54d910(0xa11));await _0x42beb3(_0x4b16de(_0x569c24,_0x54d910(0x85a),'mcp.json'),'Cursor'),await _0x3045ce(_0x4b16de(_0x569c24,_0x54d910(0x323),_0x54d910(0x9e2))),await _0x42beb3(_0x4b16de(_0x569c24,'.vscode','mcp.json'),'VS\x20Code');const _0x188aa3=process.env.HOME??process.env.USERPROFILE??'';if(_0x188aa3){const _0x3a9e71=_0x4b16de(_0x188aa3,_0x54d910(0x8c3),'windsurf',_0x54d910(0xac0));await _0x20cdd5(_0x4b16de(_0x188aa3,_0x54d910(0x8c3),'windsurf'))&&await _0x42beb3(_0x3a9e71,'Windsurf');const _0x524f71=_0x4b16de(_0x188aa3,_0x54d910(0xaec),_0x54d910(0x601),_0x54d910(0xac0));await _0x20cdd5(_0x4b16de(_0x188aa3,'.gemini','antigravity'))&&await _0x42beb3(_0x524f71,'Antigravity');}return _0x10a5d5;}function _0x1b86b3(_0x18fae5){const _0x510eeb=_0xf8ecb6,_0x26c2bf=_0x18fae5['filter'](_0x117882=>_0x117882['severity']===_0x510eeb(0x3dd)&&!_0x117882['ok']),_0x4f6d53=_0x18fae5[_0x510eeb(0x529)](_0x213978=>_0x213978['severity']===_0x510eeb(0x696)&&!_0x213978['ok']);if(_0x26c2bf['length']===0x0&&_0x4f6d53[_0x510eeb(0x3b7)]===0x0)return'';const _0x1f9a7b=[];for(const _0x5cd970 of _0x26c2bf){_0x1f9a7b[_0x510eeb(0x4d1)](_0x510eeb(0x2f4)+_0x5cd970['name']+':\x20'+_0x5cd970['message']);if(_0x5cd970['remediation'])_0x1f9a7b['push'](_0x510eeb(0xa79)+_0x5cd970[_0x510eeb(0x638)]);}for(const _0x3c5dfa of _0x4f6d53){_0x1f9a7b['push'](_0x510eeb(0x83c)+_0x3c5dfa['name']+':\x20'+_0x3c5dfa['message']);if(_0x3c5dfa['remediation'])_0x1f9a7b[_0x510eeb(0x4d1)](_0x510eeb(0xa79)+_0x3c5dfa[_0x510eeb(0x638)]);}return _0x1f9a7b['join']('\x0a')+'\x0a';}function _0x27d340(_0x49a56b){const _0x7ce52d=_0xf8ecb6;if(_0x49a56b)return!![];if(process.env.CERAPH_NON_INTERACTIVE==='1')return!![];return!process[_0x7ce52d(0x908)][_0x7ce52d(0x4b9)];}async function _0x3379d2(_0xed1582={}){const _0x3e0e81=_0xf8ecb6,_0x57c144=console[_0x3e0e81(0x2b0)];_0xed1582[_0x3e0e81(0x3cc)]&&(console[_0x3e0e81(0x2b0)]=(..._0x475d27)=>{const _0x5067db=_0x3e0e81;process['stderr'][_0x5067db(0xaac)](_0x475d27[_0x5067db(0x86b)](_0x33ebb9=>typeof _0x33ebb9==='string'?_0x33ebb9:String(_0x33ebb9))['join']('\x20')+'\x0a');});try{return await _0x5aa4dd(_0xed1582);}finally{_0xed1582[_0x3e0e81(0x3cc)]&&(console['log']=_0x57c144);}}async function _0x5aa4dd(_0x34e76b){const _0x3261bf=_0xf8ecb6,_0x24b7f4=_0x34e76b[_0x3261bf(0x493)]===!![],_0x19c543=_0x34e76b[_0x3261bf(0x3cc)]?_0x32000c=>{const _0x201980=_0x3261bf;process[_0x201980(0x910)]['write'](_0x32000c);}:void 0x0;if(_0x34e76b['tier']===_0x3261bf(0x2a1)&&_0x27d340(_0x24b7f4))return await _0x29339f(_0x3261bf(0x2a1))[_0x3261bf(0x48b)](()=>void 0x0),console[_0x3261bf(0x2b0)](_0x3261bf(0x920)),console['log']('Pro\x20selected.\x0a'),console[_0x3261bf(0x2b0)]('\x20\x201.\x20Sign\x20in:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a3230({'intent':'pro'})),console[_0x3261bf(0x2b0)](_0x3261bf(0x4b5)),console[_0x3261bf(0x2b0)](_0x3261bf(0x662)),{'proSignInDeferred':!![],'walkthrough':null};console[_0x3261bf(0x2b0)](_0x3261bf(0x920));const _0xa0b5a=await _0x316e64();console['log'](_0x3261bf(0x526)),await _0x3d5a63(),console[_0x3261bf(0x2b0)](_0x3261bf(0xa48)),await _0x3fccc2(),console['log']('\x0aGitignore:'),await _0x431dd7();const _0x245f5a=await _0x5a9822(_0x569c24,{'agentMode':_0x24b7f4,'nonInteractive':_0x24b7f4?!![]:void 0x0,'write':_0x19c543,'installStdioToStderr':_0x34e76b['outputToStderr']===!![],'tier':_0x34e76b['tier'],'claudePreApprovalPreserved':_0xa0b5a['status']===_0x3261bf(0x93c),'runDoctor':async()=>{const _0x33715f=_0x3261bf,_0xf465af=new _0x70c5ce(),_0x404e38=new _0x43c6e0(_0xf465af),_0x5d814=new _0x2cc05b(_0xf465af),_0x2a789b=await _0x3fb793({'screen':_0xf465af,'apps':_0x404e38,'autonomy':_0x5d814,'projectDir':_0x569c24,'excludeRuntimeChecks':!![]}),_0x252c51=_0x2a789b['checks'][_0x33715f(0x529)](_0x2a11fe=>_0x2a11fe['ok'])['length'];return{'ok':_0x2a789b['ok'],'summary':_0x1b86b3(_0x2a789b[_0x33715f(0x9d3)]),'passedCount':_0x252c51,'totalCount':_0x2a789b[_0x33715f(0x9d3)]['length']};}});return{'proSignInDeferred':![],'walkthrough':_0x245f5a};}var _0x360c9d=process[_0xf8ecb6(0x624)][0x1]??'';if(_0x360c9d[_0xf8ecb6(0xaa5)](_0xf8ecb6(0x52c))||_0x360c9d[_0xf8ecb6(0xaa5)]('init.ts')){const _0x21df60=process.env.CERAPH_AGENT_MODE==='1'||process['argv']['includes'](_0xf8ecb6(0x492));_0x3379d2({'agentMode':_0x21df60})[_0xf8ecb6(0x48b)](_0x9ecb68=>{const _0x2aaa41=_0xf8ecb6;console[_0x2aaa41(0x3dd)](_0x2aaa41(0x8e1),_0x9ecb68),process[_0x2aaa41(0x68c)](0x1);});}async function _0xd85afe(_0x55fa88={}){const _0x4f407e=_0xf8ecb6,_0x45b821=_0x55fa88['loadAuth']??_0x1be651,_0x2ac1be=_0x55fa88[_0x4f407e(0x9ee)]??_0x170983,_0x37a524=_0x55fa88[_0x4f407e(0x4c3)]??_0x3379d2,_0xda16ba=_0x55fa88['cliAuthUrl']??_0x5a3230,_0x12a3e5=_0x55fa88[_0x4f407e(0x1f0)]?.['trim']()||void 0x0;if(_0x12a3e5){const _0xac171=await _0x2ac1be({'signal':_0x55fa88['signal'],'token':_0x12a3e5});if(_0xac171['status']!=='ok'){const _0xdac70=_0xac171[_0x4f407e(0x428)]===_0x4f407e(0x652)?_0x4f407e(0x25c):'Sign-in\x20failed:\x20'+_0xac171['error'],_0x36af11=_0xda16ba();return{'status':'auth-error','message':_0xdac70+'\x20Open\x20the\x20sign-in\x20URL,\x20copy\x20the\x20token\x20it\x20issues,\x20and\x20re-call\x20ceraph_init\x20with\x20that\x20value\x20as\x20`token`.','verificationUri':_0x36af11,'url':_0x36af11};}}const _0x1db524=await _0x45b821()['catch'](()=>null);if(!_0x1db524?.['accessToken']){const _0x481a08=_0xda16ba();return{'status':_0x4f407e(0x396),'verificationUri':_0x481a08,'url':_0x481a08,'message':_0x4f407e(0xa29)};}const _0x558d2f=await _0x37a524({'agentMode':!![],'outputToStderr':!![]});return{'status':_0x4f407e(0x335),'message':'Init\x20complete.\x20Every\x20phase\x20ran\x20(MCP\x20clients,\x20Claude\x20hooks,\x20.gitignore,\x20camera-images,\x20camera\x20replacement,\x20boot\x20injection,\x20URL\x20scheme,\x20doctor).\x20See\x20`result`\x20for\x20per-phase\x20outcomes.','result':_0x558d2f[_0x4f407e(0x657)]};}import{networkInterfaces}from'os';var _0x354294=new Set(['en0']),_0x32e906=new Set(['en1',_0xf8ecb6(0x3df),_0xf8ecb6(0x4e0),'en4','en5',_0xf8ecb6(0x29f)]);function _0x1aa25a(_0x1c3985,_0x1d48e0){const _0x380227=_0xf8ecb6;if(_0x1d48e0['family']!=='IPv4')return null;if(_0x1d48e0['internal'])return null;if(_0x1d48e0[_0x380227(0x506)][_0x380227(0x746)](_0x380227(0x2d2)))return null;if(_0x1d48e0[_0x380227(0x506)][_0x380227(0x746)]('169.254.'))return null;let _0x1a99be;if(_0x354294[_0x380227(0x979)](_0x1c3985))_0x1a99be=_0x380227(0x337);else{if(_0x32e906['has'](_0x1c3985))_0x1a99be='usb-ethernet';else return null;}return{'interfaceName':_0x1c3985,'address':_0x1d48e0[_0x380227(0x506)],'kind':_0x1a99be};}function _0x372068(_0x2b3dd3={}){const _0x2a0234=_0xf8ecb6,_0x3fb0b0=_0x2b3dd3['networkInterfaces']??networkInterfaces,_0x1eef35=_0x3fb0b0(),_0x34acf8=new Set(),_0x250394=[],_0x2753a9=[],_0x2e78ed=Object[_0x2a0234(0x8c1)](_0x1eef35)[_0x2a0234(0x426)]();for(const _0x573976 of _0x2e78ed){const _0x144b76=_0x1eef35[_0x573976];if(!_0x144b76)continue;for(const _0x340329 of _0x144b76){const _0x1b0c00=_0x1aa25a(_0x573976,_0x340329);if(!_0x1b0c00)continue;if(_0x34acf8['has'](_0x1b0c00[_0x2a0234(0x506)]))continue;_0x34acf8['add'](_0x1b0c00[_0x2a0234(0x506)]);if(_0x1b0c00[_0x2a0234(0xb14)]===_0x2a0234(0x337))_0x250394[_0x2a0234(0x4d1)](_0x1b0c00);else _0x2753a9['push'](_0x1b0c00);}}return[..._0x250394,..._0x2753a9];}function _0x3146f0(_0x40aa58={}){const _0x201869=_0x372068(_0x40aa58);return _0x201869[0x0]??null;}import{spawn as _0xda8b56}from'child_process';import{z as _0x135448}from'zod';import{existsSync,readFileSync as _0x4aa9d1,readdirSync}from'fs';import{isAbsolute as _0x25100c,join as _0x4636a1,relative as _0x77263c,resolve,sep as _0x3f9a58}from'path';function _0x59877f(_0x4d668c){return existsSync(_0x4d668c);}function _0x229364(_0x25e9c3){const _0x348527=_0xf8ecb6;try{const _0x1d3ef2=_0x4aa9d1(_0x25e9c3,'utf-8'),_0x51436d=JSON['parse'](_0x1d3ef2);if(!_0x51436d||typeof _0x51436d!==_0x348527(0x9e3))return null;return _0x51436d;}catch{return null;}}function _0x3c97c4(_0x3feb26){const _0x2371ec=_0xf8ecb6,_0x19873c=new Set();let _0xb14bc1=![];const _0xd3489e=_0x229364(_0x4636a1(_0x3feb26,_0x2371ec(0x2a8)));if(_0xd3489e?.['workspaces']){_0xb14bc1=!![];if(Array[_0x2371ec(0x200)](_0xd3489e['workspaces'])){for(const _0x1011a9 of _0xd3489e['workspaces'])_0x19873c[_0x2371ec(0x856)](_0x1011a9);}else{if(_0xd3489e['workspaces']&&typeof _0xd3489e[_0x2371ec(0x593)]===_0x2371ec(0x9e3)&&Array[_0x2371ec(0x200)](_0xd3489e['workspaces'][_0x2371ec(0x824)]))for(const _0x125fe1 of _0xd3489e['workspaces'][_0x2371ec(0x824)]){_0x19873c['add'](_0x125fe1);}}}const _0x567dd3=_0x4636a1(_0x3feb26,_0x2371ec(0xa0a));if(_0x59877f(_0x567dd3)){let _0x41bdd8=null;try{_0x41bdd8=_0x4aa9d1(_0x567dd3,'utf-8');}catch{_0x41bdd8=null;}if(_0x41bdd8!=null){_0xb14bc1=!![];for(const _0x465dd6 of _0x2b43b2(_0x41bdd8))_0x19873c['add'](_0x465dd6);}}const _0x2975bd=_0x229364(_0x4636a1(_0x3feb26,_0x2371ec(0x94c)));if(_0x2975bd){const _0x27b801=_0x2975bd[_0x2371ec(0x824)];if(Array['isArray'](_0x27b801)){_0xb14bc1=!![];for(const _0x5e1db6 of _0x27b801){if(typeof _0x5e1db6==='string')_0x19873c[_0x2371ec(0x856)](_0x5e1db6);}}else _0x59877f(_0x4636a1(_0x3feb26,'lerna.json'))&&(_0xb14bc1=!![]);}if(!_0xb14bc1)return null;return Array[_0x2371ec(0x56c)](_0x19873c);}function _0x2cbce1(_0x479faa,_0x2d70e5){const _0x277654=_0xf8ecb6,_0x2c45e3=_0x2d70e5[_0x277654(0x42e)](/^\.\//,'')['replace'](/\/+$/,'');if(_0x2c45e3['length']===0x0)return[];if(!_0x2c45e3['includes']('*')){const _0x124c40=_0x4636a1(_0x479faa,_0x2c45e3);return _0x59877f(_0x124c40)?[_0x124c40]:[];}const _0x323ccf=_0x2c45e3['match'](/^([^*]+)\/\*$/);if(!_0x323ccf||!_0x323ccf[0x1])return[];const _0x18f07a=_0x323ccf[0x1]['replace'](/\/+$/,''),_0x3cfa64=_0x4636a1(_0x479faa,_0x18f07a);let _0x423fa5;try{_0x423fa5=readdirSync(_0x3cfa64,{'withFileTypes':!![]});}catch{return[];}const _0x4a76a7=[];for(const _0x1be84a of _0x423fa5){if(_0x277654(0x82c)!==_0x277654(0x82c))throw new _0x5e10a1('flow\x20name\x20exceeds\x20256\x20characters.');else{if(!_0x1be84a['isDirectory']())continue;if(_0x1be84a[_0x277654(0x9e5)][_0x277654(0x746)]('.'))continue;_0x4a76a7['push'](_0x4636a1(_0x3cfa64,_0x1be84a[_0x277654(0x9e5)]));}}return _0x4a76a7;}function _0x63a6cf(_0x3fefa3){const _0x539a8c=_0xf8ecb6,_0x537813=process.env.CERAPH_PROJECT_DIR;if(_0x537813&&_0x537813['length']>0x0){const _0x170968=_0x25100c(_0x537813)?_0x537813:resolve(_0x3fefa3,_0x537813);return{'dir':_0x170968,'reason':_0x539a8c(0x453)};}const _0x5f93b5=_0x229364(_0x4636a1(_0x3fefa3,'package.json')),_0x4753a2=_0x5cb79f(_0x5f93b5);if(_0x4753a2[_0x539a8c(0x982)]||_0x4753a2['rn'])return{'dir':_0x3fefa3,'reason':'cwd\x20is\x20a\x20React\x20Native\x20/\x20Expo\x20app'};const _0x1417da=_0x3c97c4(_0x3fefa3);if(_0x1417da==null)return{'dir':_0x3fefa3,'reason':'not\x20a\x20monorepo'};const _0x47822a=new Set();for(const _0x21f516 of _0x1417da){for(const _0x45953d of _0x2cbce1(_0x3fefa3,_0x21f516))_0x47822a[_0x539a8c(0x856)](_0x45953d);}const _0x2642e8=[];for(const _0x4a30ba of _0x47822a){if(_0x539a8c(0x340)!=='SDhwx'){const _0x3c31d7=_0x229364(_0x4636a1(_0x4a30ba,'package.json')),_0x49046c=_0x5cb79f(_0x3c31d7),_0x2c86a4=_0x59877f(_0x4636a1(_0x4a30ba,'app.json'));if(!_0x49046c['expo']&&!_0x49046c['rn']&&!_0x2c86a4)continue;const _0x5c1de8=_0x77263c(_0x3fefa3,_0x4a30ba)[_0x539a8c(0x51a)](_0x3f9a58)[_0x539a8c(0x4ec)]('/');_0x2642e8['push']({'absPath':_0x4a30ba,'relPath':_0x5c1de8[_0x539a8c(0x3b7)]>0x0?_0x5c1de8:'.'});}else return _0x3b0aac(this['root'],_0x3623db);}_0x2642e8['sort']((_0x4129cb,_0x5ba16d)=>_0x4129cb['relPath']<_0x5ba16d['relPath']?-0x1:_0x4129cb[_0x539a8c(0x87a)]>_0x5ba16d['relPath']?0x1:0x0);if(_0x2642e8['length']===0x1){const _0x1cdd17=_0x2642e8[0x0];return{'dir':_0x1cdd17['absPath'],'reason':'monorepo:\x20rooting\x20at\x20RN\x20app\x20'+_0x1cdd17[_0x539a8c(0x87a)]+'/'};}if(_0x2642e8[_0x539a8c(0x3b7)]===0x0)return'plyBr'!=='tZaxn'?{'dir':_0x3fefa3,'reason':'monorepo,\x20no\x20RN\x20app\x20among\x20workspaces'}:_0x5d2914('app_launch',_0x32b9eb);const _0x2cc43b=_0x2642e8['map'](_0x1f3a20=>_0x1f3a20['relPath'])[_0x539a8c(0x4ec)](',\x20');return{'dir':_0x3fefa3,'reason':_0x539a8c(0x367)+_0x2642e8[_0x539a8c(0x3b7)]+'\x20RN\x20apps\x20('+_0x2cc43b+');\x20set\x20CERAPH_PROJECT_DIR\x20to\x20pick\x20one'};}function _0x53d71b(_0x2cecdb,_0x275d57){const _0x1f9353=_0xf8ecb6;if(!_0x2cecdb||_0x2cecdb[_0x1f9353(0x3b7)]===0x0)return _0x275d57;const _0x5a4eef=_0x25100c(_0x2cecdb)?_0x2cecdb:resolve(_0x275d57,_0x2cecdb),_0x5ab649=_0x77263c(_0x275d57,_0x5a4eef),_0x109f29=_0x5ab649===''||_0x5ab649!=='..'&&!_0x5ab649[_0x1f9353(0x746)]('..'+_0x3f9a58)&&!_0x25100c(_0x5ab649);return _0x109f29?_0x275d57:_0x5a4eef;}import{access as _0x2bbbb6,readFile as _0x105e7f}from'fs/promises';import{join as _0x516e44}from'path';import{spawn as _0x4272cd}from'child_process';import{readFile as _0x35140c,access as _0x27e4a5}from'fs/promises';import{join as _0x1de52c}from'path';var _0x118fef=[{'file':'pnpm-lock.yaml','pm':_0xf8ecb6(0x8f6)},{'file':'yarn.lock','pm':'yarn'},{'file':_0xf8ecb6(0x6a0),'pm':_0xf8ecb6(0x524)},{'file':_0xf8ecb6(0xabf),'pm':'bun'},{'file':_0xf8ecb6(0x3c3),'pm':_0xf8ecb6(0x26d)}],_0x58332d=_0xf8ecb6(0x28d);async function _0x2f2440(_0x5b8aad){const _0xd9beec=_0xf8ecb6;try{if('AomAS'!=='AomAS')this[_0xd9beec(0x2ec)]=_0x4f18db;else return await _0x27e4a5(_0x5b8aad),!![];}catch{return![];}}async function _0x56d124(_0x4149c1){const _0x470f8b=_0xf8ecb6;for(const {file:_0x177add,pm:_0x382943}of _0x118fef){if(await _0x2f2440(_0x1de52c(_0x4149c1,_0x177add)))return _0x382943;}return _0x470f8b(0x26d);}function _0xbe787d(_0x4c7cdd,_0x3ac185){const _0x32776e=_0xf8ecb6;switch(_0x4c7cdd){case'pnpm':return{'bin':_0x32776e(0x8f6),'args':[_0x32776e(0x38a),..._0x3ac185]};case'yarn':return{'bin':_0x32776e(0x2d0),'args':['remove',..._0x3ac185]};case'bun':return{'bin':'bun','args':[_0x32776e(0x38a),..._0x3ac185]};case _0x32776e(0x26d):return{'bin':'npm','args':[_0x32776e(0x96b),..._0x3ac185]};}}async function _0x1e0a46(_0xd4fd8a,_0x544436){const _0x1df3b4=_0xf8ecb6;let _0x18b074;try{_0x18b074=await _0x35140c(_0x1de52c(_0xd4fd8a,_0x1df3b4(0x2a8)),_0x1df3b4(0x827));}catch{return[];}let _0x36abb4;try{if('foNiT'===_0x1df3b4(0x494))_0x36abb4=JSON[_0x1df3b4(0x981)](_0x18b074);else return{'ok':![],'error':_0x1df3b4(0x597)};}catch{return _0x1df3b4(0x2bd)==='DTKPd'?_0x1ed72b:[];}if(!_0x36abb4||typeof _0x36abb4!=='object')return[];const _0x239b44=_0x36abb4['dependencies']??{},_0x30037a=_0x36abb4['devDependencies']??{};return _0x544436['filter'](_0xf8611a=>Boolean(_0x239b44[_0xf8611a]||_0x30037a[_0xf8611a]));}async function _0x41e75a(_0x1cd1c4,_0x1d567c={}){const _0x27c9fa=_0xf8ecb6,_0x309fbe=await _0x56d124(_0x1cd1c4),_0x2ea9e8=[_0x58332d],_0x2a41f0=await _0x1e0a46(_0x1cd1c4,_0x2ea9e8);if(_0x2a41f0[_0x27c9fa(0x3b7)]===0x0)return{'status':'nothing-to-remove','pm':_0x309fbe,'removedPackages':[]};const _0x485924=_0xbe787d(_0x309fbe,_0x2a41f0),_0x4d7b87=_0x1d567c[_0x27c9fa(0x4cb)]??_0x4937b6,_0x1d65a6=await _0x4d7b87({'bin':_0x485924['bin'],'args':_0x485924[_0x27c9fa(0x886)],'cwd':_0x1cd1c4});if(_0x1d65a6[_0x27c9fa(0x2c3)]!==0x0)return{'status':_0x27c9fa(0x9b7),'pm':_0x309fbe,'removedPackages':[],'command':_0x485924,'exitCode':_0x1d65a6[_0x27c9fa(0x2c3)]};return{'status':_0x27c9fa(0x62c),'pm':_0x309fbe,'removedPackages':_0x2a41f0,'command':_0x485924};}function _0x4937b6(_0x218379){return new Promise(_0x5e1bb3=>{const _0x2035ee=_0xc050;if(_0x2035ee(0x325)!==_0x2035ee(0x325)){const _0x31c4e2=this['defaultExpectedRegion'](_0x2a6990);try{const _0x4506a8=_0x64b0d4(_0x4129d7,_0x25014d,_0x31c4e2);_0x4506a8[_0x2035ee(0x696)]&&_0x1b3116['push']({'kind':_0x2035ee(0x75e),'message':_0x4506a8[_0x2035ee(0x696)],'detail':_0x4a1b84(_0x4506a8[_0x2035ee(0x4a8)]),'flowId':_0x29f70f['flowId']});}catch{}}else{const _0x136686=_0x4272cd(_0x218379[_0x2035ee(0x9c1)],_0x218379['args'],{'cwd':_0x218379['cwd'],'stdio':_0x2035ee(0x545)});_0x136686['on']('error',()=>_0x5e1bb3({'exitCode':0x7f})),_0x136686['on'](_0x2035ee(0x68c),_0xa31ff1=>_0x5e1bb3({'exitCode':_0xa31ff1??0x1}));}});}import{readFile as _0x4b5afe,writeFile as _0x11381e}from'fs/promises';import{join as _0x10ad2c}from'path';var _0x237104,_0x3fdfdb,_0x26aa79,_0x4098cd,_0x1ba9c6=![];async function _0x2910f1(){const _0x2471f8=_0xf8ecb6;if(_0x1ba9c6)return;const _0x1f2d13=await import(_0x2471f8(0x74a));({IndentationText:_0x237104,Node:_0x3fdfdb,Project:_0x26aa79,SyntaxKind:_0x4098cd}=_0x1f2d13,_0x1ba9c6=!![]);}var _0x3b1577=_0xf8ecb6(0x431),_0x3d2175=_0xf8ecb6(0xa93);async function _0x3bd9f2(_0x4af48b){try{return await _0x4b5afe(_0x4af48b,'utf-8'),!![];}catch{return![];}}async function _0x32adb6(_0x46ef25){const _0x5f3d27=_0xf8ecb6,_0x1a7962=_0x10ad2c(_0x46ef25,'app','_layout.tsx');if(await _0x3bd9f2(_0x1a7962))return{'kind':'expo-router','filePath':_0x1a7962};const _0x167308=_0x10ad2c(_0x46ef25,_0x5f3d27(0x7b4),'_layout.jsx');if(await _0x3bd9f2(_0x167308))return _0x5f3d27(0x346)!==_0x5f3d27(0x346)?{'ready':![],'reason':_0x5f3d27(0x8cf)}:{'kind':_0x5f3d27(0x6a7),'filePath':_0x167308};for(const _0x1b65e5 of['App.tsx','App.jsx']){const _0x129e0b=_0x10ad2c(_0x46ef25,_0x1b65e5);if(await _0x3bd9f2(_0x129e0b))return{'kind':_0x5f3d27(0xacf),'filePath':_0x129e0b};}return null;}function _0x252ffe(_0x40e2e8){const _0x17fe4a=_0xf8ecb6;for(const _0x5778e7 of _0x40e2e8[_0x17fe4a(0x51f)]()){if(_0x5778e7['isDefaultExport']())return _0x5778e7;}const _0x519cf4=_0x40e2e8[_0x17fe4a(0x6a9)]()['find'](_0x7243de=>_0x3fdfdb['isExportAssignment'](_0x7243de));if(_0x519cf4&&_0x3fdfdb['isExportAssignment'](_0x519cf4)){const _0x4b3f7f=_0x519cf4['getExpression']();if(_0x3fdfdb[_0x17fe4a(0x9ce)](_0x4b3f7f)){const _0x43774e=_0x4b3f7f['getSymbol']();if(_0x43774e){if('OnckJ'===_0x17fe4a(0x71e)){const _0x2c85d0=_0x43774e['getDeclarations']()[0x0];if(_0x2c85d0&&_0x3fdfdb[_0x17fe4a(0xa77)](_0x2c85d0)){if('Zosvc'===_0x17fe4a(0x853)){const _0x40cb9f=_0x2c85d0[_0x17fe4a(0x7b9)]();if(_0x40cb9f&&_0x3fdfdb[_0x17fe4a(0x282)](_0x40cb9f))return _0x40cb9f;if(_0x40cb9f&&_0x3fdfdb['isFunctionExpression'](_0x40cb9f))return _0x40cb9f;}else{const _0x2398da=_0x42e80f[_0x17fe4a(0x531)]['toLowerCase']();if(!_0x2398da[_0x17fe4a(0x27e)]('timeout')&&!_0x2398da['includes']('timed\x20out'))return![];return _0x3bc59c['kind']==='js-exception'||_0x339bce[_0x17fe4a(0xb14)]==='network-failure';}}}else return{'success':![],'apps':[],'error':'Failed\x20to\x20parse\x20devicectl\x20output:\x20'+(_0x49a4ee instanceof _0xf5d944?_0x5bc497[_0x17fe4a(0x531)]:_0x74f875(_0x4281e7))};}}if(_0x3fdfdb['isArrowFunction'](_0x4b3f7f))return _0x4b3f7f;if(_0x3fdfdb[_0x17fe4a(0x2df)](_0x4b3f7f))return _0x4b3f7f;}return null;}function _0x598c06(_0x52cb50){const _0xce1442=_0xf8ecb6;if(_0x3fdfdb['isExpressionStatement'](_0x52cb50)){const _0xdf36f3=_0x52cb50['getExpression']();if(_0x3fdfdb[_0xce1442(0x503)](_0xdf36f3)){const _0x4de015=_0xdf36f3['getExpression']();if(_0x3fdfdb[_0xce1442(0x9ce)](_0x4de015)&&_0x4de015[_0xce1442(0x3a0)]()===_0x3d2175)return!![];}}return![];}function _0x100880(_0xea3477){const _0x5aee2c=_0xf8ecb6,_0x34c6a0=_0xea3477['getArguments']();if(_0x34c6a0[_0x5aee2c(0x3b7)]===0x0)return _0x5aee2c(0x319);const _0x952ca8=_0x34c6a0[0x0];let _0x2f826a=null;if(_0x3fdfdb['isArrowFunction'](_0x952ca8)||_0x3fdfdb['isFunctionExpression'](_0x952ca8)){const _0x5de187=_0x952ca8['getBody']();if(_0x3fdfdb[_0x5aee2c(0x44e)](_0x5de187))_0x2f826a=_0x5de187;else{if(_0x3fdfdb[_0x5aee2c(0x503)](_0x5de187)){const _0x412f17=_0x5de187[_0x5aee2c(0x708)]();if(_0x3fdfdb[_0x5aee2c(0x9ce)](_0x412f17)&&_0x412f17['getText']()===_0x3d2175)return _0x5aee2c(0xa6f);}return'unrelated';}}else return'unrelated';if(!_0x2f826a)return'unrelated';const _0x29a526=_0x2f826a[_0x5aee2c(0x6a9)]();if(_0x29a526['length']===0x0)return'unrelated';let _0x3f54e3=![],_0x2ce441=![];for(const _0x1fc767 of _0x29a526){_0x598c06(_0x1fc767)?_0x3f54e3=!![]:_0x2ce441=!![];}if(!_0x3f54e3)return _0x5aee2c(0x319);return _0x2ce441?'installCeraph-with-others':_0x5aee2c(0xa6f);}function _0x3fb509(_0x350b93){const _0x17d96e=_0xf8ecb6,_0x15397f=_0x350b93[_0x17d96e(0x468)]();if(!_0x15397f||!_0x3fdfdb[_0x17d96e(0x44e)](_0x15397f))return[];const _0x446ff3=[];return _0x15397f['forEachDescendant'](_0x370971=>{const _0x116b1f=_0x17d96e;if(_0x3fdfdb['isCallExpression'](_0x370971)){const _0x1e1049=_0x370971[_0x116b1f(0x708)]();_0x3fdfdb['isIdentifier'](_0x1e1049)&&_0x1e1049[_0x116b1f(0x3a0)]()===_0x116b1f(0x5da)&&(_0x116b1f(0xb24)!=='jUlHT'?_0x446ff3['push'](_0x370971):(_0xf6a7b3[_0x116b1f(0x38a)](),_0x165741=!![]));}}),_0x446ff3;}function _0x1f87d1(_0x473efb){const _0x27287b=_0xf8ecb6,_0x3ed2e3=_0x473efb['getImportDeclaration']('react');if(!_0x3ed2e3)return![];const _0x2550b1=_0x3ed2e3['getNamedImports'](),_0x21ab19=_0x2550b1['find'](_0x4ab792=>_0x4ab792[_0x27287b(0x385)]()==='useEffect');if(!_0x21ab19)return![];const _0x115c4e=_0x21ab19[_0x27287b(0x4c7)]();if(_0x115c4e)return![];let _0x3192f2=![];_0x473efb[_0x27287b(0x6f8)](_0x15012a=>{const _0x7942e6=_0x27287b;if(_0x3192f2)return;if(_0x3fdfdb['isIdentifier'](_0x15012a)&&_0x15012a['getText']()==='useEffect'){const _0x5e7058=_0x15012a[_0x7942e6(0x913)]();if(_0x5e7058&&(_0x3fdfdb[_0x7942e6(0x64a)](_0x5e7058)||_0x3fdfdb[_0x7942e6(0xa88)](_0x5e7058)))return;_0x3192f2=!![];}});if(_0x3192f2)return![];_0x21ab19[_0x27287b(0x38a)]();const _0x478201=_0x3ed2e3['getNamedImports'](),_0x42c170=_0x3ed2e3['getDefaultImport']()!=null,_0x2821d1=_0x3ed2e3[_0x27287b(0x998)]()!=null;return _0x478201['length']===0x0&&!_0x42c170&&!_0x2821d1&&_0x3ed2e3[_0x27287b(0x38a)](),!![];}function _0x5a83ae(_0x4eb234){const _0x5a492e=_0xf8ecb6,_0x4a578a=_0x4eb234['getImportDeclaration'](_0x3b1577);if(!_0x4a578a)return![];const _0x58a3ca=_0x4a578a[_0x5a492e(0x3d5)](),_0x225c98=_0x58a3ca['find'](_0x48f3bc=>_0x48f3bc['getName']()===_0x3d2175);if(!_0x225c98)return![];_0x225c98[_0x5a492e(0x38a)]();const _0xc4d7a0=_0x4a578a['getNamedImports'](),_0x291cee=_0x4a578a['getDefaultImport']()!=null;return _0xc4d7a0[_0x5a492e(0x3b7)]===0x0&&!_0x291cee&&_0x4a578a[_0x5a492e(0x38a)](),!![];}async function _0x4bab7c(_0xfce8e7){const _0xdce94d=_0xf8ecb6;await _0x2910f1();const _0x5db6f7=await _0x32adb6(_0xfce8e7);if(!_0x5db6f7)return{'status':_0xdce94d(0x2a2)};const _0x459ef6=new _0x26aa79({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1},'manipulationSettings':{'indentationText':_0x237104[_0xdce94d(0x76e)]}}),_0x398549=_0x459ef6[_0xdce94d(0x8d8)](_0x5db6f7['filePath']),_0x227475=_0x252ffe(_0x398549);if(!_0x227475){const _0x1132d9=_0x5a83ae(_0x398549);if(_0x1132d9)return await _0x11381e(_0x5db6f7['filePath'],_0x398549[_0xdce94d(0x8e7)](),'utf-8'),{'status':'reverted','target':_0x5db6f7,'removedUseEffect':![],'removedImport':!![]};return{'status':'already-reverted','target':_0x5db6f7};}const _0x47b954=_0x3fb509(_0x227475),_0x2ba06a=_0x47b954['map'](_0x282b51=>({'call':_0x282b51,'kind':_0x100880(_0x282b51)})),_0x502380=_0x2ba06a[_0xdce94d(0x529)](_0x24f4a8=>_0x24f4a8['kind']==='installCeraph-only'),_0x2af9d5=_0x2ba06a['filter'](_0x4d4cdd=>_0x4d4cdd[_0xdce94d(0xb14)]===_0xdce94d(0x970));if(_0x2af9d5[_0xdce94d(0x3b7)]>0x0)return{'status':_0xdce94d(0x965),'target':_0x5db6f7,'reason':'useEffect\x20contains\x20other\x20statements'};let _0x24990e=![];for(const _0x301443 of _0x502380){if(_0xdce94d(0x8c2)!==_0xdce94d(0x555)){const _0x499496=_0x301443[_0xdce94d(0x927)][_0xdce94d(0x9be)](_0x4098cd[_0xdce94d(0xa78)]);_0x499496&&(_0x499496['remove'](),_0x24990e=!![]);}else _0x5b5ff4[_0xdce94d(0x745)]['push'](_0x580d3c);}const _0x3d7ecc=_0x5a83ae(_0x398549);_0x24990e&&_0x1f87d1(_0x398549);if(!_0x24990e&&!_0x3d7ecc)return{'status':_0xdce94d(0x2be),'target':_0x5db6f7};return await _0x11381e(_0x5db6f7['filePath'],_0x398549[_0xdce94d(0x8e7)](),'utf-8'),{'status':_0xdce94d(0x654),'target':_0x5db6f7,'removedUseEffect':_0x24990e,'removedImport':_0x3d7ecc};}import{readFile as _0x5144e3,unlink as _0x2f5d3c,writeFile as _0x4eea2c}from'fs/promises';import{join as _0x270c19}from'path';var _0x4e1bb4=['.rn-errors.json',_0xf8ecb6(0x813),_0xf8ecb6(0x756),'.ceraph/wda-derived/',_0xf8ecb6(0x71d)],_0x4bc949=['.rn-errors.json',_0xf8ecb6(0x813)];async function _0x4a786e(_0x53c8b8,_0x14ddca={}){const _0x161c8a=_0xf8ecb6,_0x253990=_0x270c19(_0x53c8b8,_0x161c8a(0x39c)),_0x3690b9=_0x14ddca['readFile']??(_0x4d0200=>_0x5144e3(_0x4d0200,'utf-8')),_0x35b871=_0x14ddca[_0x161c8a(0x865)]??((_0x598a10,_0x2f6d19)=>_0x4eea2c(_0x598a10,_0x2f6d19,'utf-8')),_0x1a0d1c=_0x14ddca['unlink']??(_0x368735=>_0x2f5d3c(_0x368735)),_0x439b1d=[];for(const _0x4df08a of _0x4bc949){const _0x347acd=_0x270c19(_0x53c8b8,_0x4df08a);try{await _0x1a0d1c(_0x347acd),_0x439b1d[_0x161c8a(0x4d1)](_0x4df08a);}catch{}}let _0x4417f8;try{_0x4417f8=await _0x3690b9(_0x253990);}catch{return{'status':_0x161c8a(0x85f),'path':_0x253990,'removedRuntimeFiles':_0x439b1d};}const _0x28cfc3=_0x4417f8['endsWith']('\x0a'),_0x5b0341=_0x4417f8[_0x161c8a(0x51a)](/\r?\n/);_0x28cfc3&&_0x5b0341[_0x161c8a(0x3b7)]>0x0&&_0x5b0341[_0x5b0341['length']-0x1]===''&&_0x5b0341['pop']();const _0xfe956e=new Set(_0x4e1bb4),_0x3c23a1=[],_0x288f5a=[];for(const _0x3da4c3 of _0x5b0341){if(_0xfe956e[_0x161c8a(0x979)](_0x3da4c3[_0x161c8a(0x668)]())){if('eRcJh'!==_0x161c8a(0xa32)){_0x3c23a1[_0x161c8a(0x4d1)](_0x3da4c3);continue;}else return{'array':_0x501aee,'sourceText':_0x35295a[_0x161c8a(0x8e7)]()};}_0x288f5a[_0x161c8a(0x4d1)](_0x3da4c3);}if(_0x3c23a1[_0x161c8a(0x3b7)]===0x0)return{'status':_0x161c8a(0x2be),'path':_0x253990,'removedRuntimeFiles':_0x439b1d};const _0x3e3b03=_0x28cfc3?_0x288f5a[_0x161c8a(0x4ec)]('\x0a')+'\x0a':_0x288f5a[_0x161c8a(0x4ec)]('\x0a');return await _0x35b871(_0x253990,_0x3e3b03),{'status':'reverted','path':_0x253990,'removedLines':_0x3c23a1,'removedRuntimeFiles':_0x439b1d};}async function _0x501ca2(_0x572c05){const _0x4c1739=_0xf8ecb6;try{return await _0x2bbbb6(_0x572c05),!![];}catch{if('rWiKI'==='Stsnu')this[_0x4c1739(0xa01)]===_0x10a1c4&&(this['startInFlight']=null);else return![];}}async function _0x59c425(_0x1d41c8){const _0x8d9ad=_0xf8ecb6;try{const _0xee60ef=await _0x105e7f(_0x516e44(_0x1d41c8,_0x8d9ad(0x2a8)),'utf-8');return JSON[_0x8d9ad(0x981)](_0xee60ef);}catch{return null;}}async function _0x5c35be(_0x3c9ede){const _0x42b7ea=_0xf8ecb6,_0x40878b=_0x516e44(_0x3c9ede,_0x42b7ea(0x39c));let _0x20fdd8;try{_0x20fdd8=await _0x105e7f(_0x40878b,_0x42b7ea(0x827));}catch{if('OBwcc'==='OBwcc')return[];else _0x59a6dc[_0x42b7ea(0x4d1)]('');}return _0x4e1bb4['filter'](_0x470dd8=>_0x20fdd8['split'](/\r?\n/)[_0x42b7ea(0x275)](_0x10d37f=>_0x10d37f[_0x42b7ea(0x668)]()===_0x470dd8));}async function _0x5daebd(_0xc74ead){const _0x179225=_0xf8ecb6,_0x20e1ec=_0x516e44(_0xc74ead,_0x179225(0x8fb));let _0x39b7d2;try{_0x39b7d2=await _0x105e7f(_0x20e1ec,_0x179225(0x827));}catch{return null;}let _0x4470e1;try{_0x4470e1=JSON[_0x179225(0x981)](_0x39b7d2);}catch{return null;}const _0x475dcf=_0x4470e1['expo']?.['scheme'];if(typeof _0x475dcf===_0x179225(0x30d))return _0x475dcf===_0x179225(0x4ad);if(Array['isArray'](_0x475dcf))return _0x475dcf[_0x179225(0x27e)](_0x179225(0x4ad));return![];}async function _0xcef833(_0x503107){const _0x5090d1=_0xf8ecb6,_0x2a6420=[_0x5090d1(0x7b4),'src',_0x5090d1(0x9b8)],_0x2f7b38=new Set([_0x5090d1(0x540),'.jsx']),_0x22a143=new Set([_0x5090d1(0x714),_0x5090d1(0xa00),_0x5090d1(0xb1a),_0x5090d1(0x683),_0x5090d1(0x4b1),_0x5090d1(0x759),_0x5090d1(0x2fb),'ios',_0x5090d1(0x88d)]);let _0x1a19e5=0x0;const _0x39c624=async _0x508ec7=>{const _0x5ecde2=_0x5090d1;let _0x4853ad;try{const {readdir:_0x42fc97}=await import(_0x5ecde2(0x330));_0x4853ad=await _0x42fc97(_0x508ec7,{'withFileTypes':!![]});}catch{return;}for(const _0x5dbabc of _0x4853ad){if(_0x5dbabc['isDirectory']()){if('AFBUL'==='AFBUL'){if(_0x22a143[_0x5ecde2(0x979)](_0x5dbabc[_0x5ecde2(0x9e5)]))continue;await _0x39c624(_0x516e44(_0x508ec7,_0x5dbabc[_0x5ecde2(0x9e5)]));continue;}else return null;}if(!_0x5dbabc['isFile']())continue;const _0x17f82b=_0x5dbabc[_0x5ecde2(0x9e5)][_0x5ecde2(0x95b)]('.');if(_0x17f82b<0x0)continue;const _0xd78694=_0x5dbabc[_0x5ecde2(0x9e5)][_0x5ecde2(0x795)](_0x17f82b)[_0x5ecde2(0x5b5)]();if(!_0x2f7b38[_0x5ecde2(0x979)](_0xd78694))continue;try{const _0x4552c7=await _0x105e7f(_0x516e44(_0x508ec7,_0x5dbabc[_0x5ecde2(0x9e5)]),_0x5ecde2(0x827)),_0x47c4a4=_0x4552c7[_0x5ecde2(0x2f3)](/<CeraphCamera/g);if(_0x47c4a4)_0x1a19e5+=_0x47c4a4['length'];}catch{}}};for(const _0x474781 of _0x2a6420){await _0x39c624(_0x516e44(_0x503107,_0x474781));}for(const _0x3fc8fd of['App.tsx','App.jsx']){try{const _0x143466=await _0x105e7f(_0x516e44(_0x503107,_0x3fc8fd),_0x5090d1(0x827)),_0x1759ff=_0x143466['match'](/<CeraphCamera/g);if(_0x1759ff)_0x1a19e5+=_0x1759ff[_0x5090d1(0x3b7)];}catch{}}return _0x1a19e5;}async function _0x5bb085(_0x17811a,_0xa6aa2a){const _0x97ebf1=_0xf8ecb6,_0x5d014e=async(_0x9b4ee8,_0x4ca015)=>{const _0x5d1ef0=_0xc050;try{const _0x4daefa=await _0x105e7f(_0x9b4ee8,_0x5d1ef0(0x827));if(_0x4ca015===_0x5d1ef0(0x2ea)){const _0x1025b8=JSON['parse'](_0x4daefa),_0x13b21b=_0x1025b8['mcpServers']??{};return Boolean(_0x13b21b['react-native-mcp']||_0x13b21b['mobile-mcp']);}return _0x4daefa[_0x5d1ef0(0x27e)](_0x5d1ef0(0x64e))||_0x4daefa['includes']('[mcp_servers.mobile-mcp]');}catch{return![];}},_0x1a4c0e=async _0x4a988b=>{const _0x2d2b4a=_0xc050;try{const _0x14f81b=await _0x105e7f(_0x4a988b,'utf-8'),_0x20774b=JSON[_0x2d2b4a(0x981)](_0x14f81b),_0x326b07=_0x20774b[_0x2d2b4a(0xac4)];return Array['isArray'](_0x326b07)&&_0x326b07['includes'](_0x3c3e94);}catch{return![];}},_0x5718b0=_0x3c12ca(_0xa6aa2a||void 0x0),_0x4c79ed={};for(const _0x5bef78 of _0x5718b0)_0x4c79ed[_0x5bef78[_0x97ebf1(0x960)]]=_0x5bef78['path'];return{'claudeCode':await _0x5d014e(_0x516e44(_0x17811a,_0x97ebf1(0x5ec)),'json'),'cursor':await _0x5d014e(_0x516e44(_0x17811a,_0x97ebf1(0x85a),'mcp.json'),_0x97ebf1(0x2ea)),'codex':await _0x5d014e(_0x516e44(_0x17811a,'.codex','config.toml'),_0x97ebf1(0x87d)),'vscode':await _0x5d014e(_0x516e44(_0x17811a,_0x97ebf1(0x752),'mcp.json'),'json'),'windsurf':_0xa6aa2a?await _0x5d014e(_0x4c79ed['Windsurf']??'','json'):![],'antigravity':_0xa6aa2a?await _0x5d014e(_0x4c79ed['Antigravity']??'','json'):![],'claudePreApproval':await _0x1a4c0e(_0x516e44(_0x17811a,_0x89e7d2))};}async function _0x2b8db0(_0x68143c){const _0x2ad6ce=_0xf8ecb6,_0x210a06=await _0x501ca2(_0x516e44(_0x68143c,..._0x1d2d25)),_0xef0678=await _0x501ca2(_0x516e44(_0x68143c,..._0x19d4a3));let _0x13a3dc=![];for(const _0x44f8f4 of _0x4d498c){if(_0x2ad6ce(0x649)===_0x2ad6ce(0x649)){const _0x2d749e=_0x516e44(_0x68143c,..._0x44f8f4);let _0x553d99;try{_0x553d99=await _0x105e7f(_0x2d749e,'utf-8');}catch{continue;}let _0x616670;try{_0x616670=JSON[_0x2ad6ce(0x981)](_0x553d99);}catch{continue;}if(!_0x616670||typeof _0x616670!==_0x2ad6ce(0x9e3)||Array['isArray'](_0x616670))continue;const _0x2feeac=_0x616670['hooks'];if(!_0x2feeac||typeof _0x2feeac!=='object'||Array['isArray'](_0x2feeac))continue;const _0x6a7cea=_0x2feeac['FileChanged'];if(!Array[_0x2ad6ce(0x200)](_0x6a7cea))continue;for(const _0x7ec965 of _0x6a7cea){if(!_0x7ec965||typeof _0x7ec965!==_0x2ad6ce(0x9e3)||Array['isArray'](_0x7ec965))continue;const _0x511d94=_0x7ec965,_0x3ba99b=_0x511d94['matcher'];if(_0x3ba99b!==_0x5d6baa&&_0x3ba99b!==_0x484387)continue;const _0x45ee8e=_0x3ba99b===_0x5d6baa?_0x9ef03b:_0x57c4e1,_0x5ba56a=_0x511d94['hooks'];if(!Array['isArray'](_0x5ba56a))continue;for(const _0x5cde85 of _0x5ba56a){if(!_0x5cde85||typeof _0x5cde85!==_0x2ad6ce(0x9e3)||Array[_0x2ad6ce(0x200)](_0x5cde85))continue;const _0x5aff5f=_0x5cde85['command'];if(typeof _0x5aff5f===_0x2ad6ce(0x30d)&&_0x5aff5f===_0x45ee8e){_0x13a3dc=!![];break;}}if(_0x13a3dc)break;}if(_0x13a3dc)break;}else _0xc6b2ef['kill']('SIGKILL');}return{'errorScript':_0x210a06,'flowProgressScript':_0xef0678,'settingsEntries':_0x13a3dc};}async function _0x18a59c(_0x33bb2a,_0x19e1cf={}){const _0x39c25f=_0xf8ecb6,_0x156fc5=_0x19e1cf[_0x39c25f(0x736)]??_0x534210,_0x15c765=await _0x156fc5(_0x33bb2a);let _0x31c74b=_0x33bb2a,_0x1a0368=null;if(_0x15c765['kind']==='single'&&_0x15c765[_0x39c25f(0x764)][0x0])_0x31c74b=_0x15c765['matches'][0x0][_0x39c25f(0x8a9)];else _0x15c765[_0x39c25f(0xb14)]===_0x39c25f(0x517)&&(_0x1a0368={'matches':_0x15c765[_0x39c25f(0x764)]['map'](_0x4aacb0=>({'relPath':_0x4aacb0[_0x39c25f(0x87a)],'absPath':_0x4aacb0[_0x39c25f(0x8a9)]}))});const _0x2a853f=_0x19e1cf[_0x39c25f(0x93d)]?.()??process.env.HOME??process.env.USERPROFILE??'',_0x21e9a7=await _0x59c425(_0x31c74b),_0x1ca9a4={..._0x21e9a7?.['dependencies']??{},..._0x21e9a7?.['devDependencies']??{}},_0x3611fc=Boolean(_0x1ca9a4['@ceraph/react-native-mcp']),_0x2d3a3e=Boolean(_0x1ca9a4['appium-webdriveragent']),_0x2fada8=await _0x56d124(_0x31c74b),_0x403cf3=await _0x5c35be(_0x31c74b),_0x1765b6=await _0x5daebd(_0x31c74b),_0x3a9fdb=await _0x32adb6(_0x31c74b);let _0x370717=null;if(_0x3a9fdb)try{if('SAHCU'===_0x39c25f(0x55c)){const _0x2d6448=await _0x105e7f(_0x3a9fdb[_0x39c25f(0x538)],'utf-8');_0x370717=_0x2d6448['includes']('installCeraph(');}else return new _0x50214e(_0x32b226['from'](_0x8e7b38,'base64'));}catch{_0x370717=null;}const _0x184680=await _0xcef833(_0x31c74b),_0x4b3941=_0x19e1cf['rootDir']??_0x33bb2a,_0x535306=await _0x5bb085(_0x4b3941,_0x2a853f),_0x211170=await _0x2b8db0(_0x4b3941),_0x631e4c=await _0x501ca2(_0x516e44(_0x31c74b,'.ceraph')),_0x487f31=_0x2a853f?await _0x501ca2(_0x516e44(_0x2a853f,'.ceraph','auth.json')):![];return{'workingDir':_0x31c74b,'monorepoConflict':_0x1a0368,'packageInstalled':_0x3611fc,'packageManager':_0x2fada8,'appiumPresent':_0x2d3a3e,'gitignoreEntriesPresent':_0x403cf3[_0x39c25f(0x3b7)]>0x0,'gitignoreEntries':_0x403cf3,'schemeRegistered':_0x1765b6,'bootTargetPath':_0x3a9fdb?.[_0x39c25f(0x538)]??null,'bootInjected':_0x370717,'ceraphCameraUsageCount':_0x184680,'mcpClientsConfigured':_0x535306,'claudeHooksPresent':_0x211170,'ceraphDirPresent':_0x631e4c,'authPresent':_0x487f31};}import{copyFile,mkdir as _0x2fa3f7,readFile as _0x27fc76,rm as _0x17cebd,stat as _0x44bc35}from'fs/promises';import{tmpdir,homedir as _0x351567}from'os';import{dirname as _0x142654,isAbsolute as _0x58536c,join as _0x2d1828,relative as _0x5740e3}from'path';import{readFile as _0x3695d4,writeFile as _0x683d4c}from'fs/promises';import{homedir as _0x154473}from'os';import{join as _0x4d6cde}from'path';var _0x41c892=_0xf8ecb6(0x842),_0x2a8afe=_0xf8ecb6(0x43e);function _0x3e88(){const _0x4f7626=['uid','storageAckRequestId','convention','submitToken','sweepExpired','storage-ack','Failed\x20to\x20start\x20Metro:\x20','bridges','Ztoeo','http://localhost:','react-native','→\x20reader\x20UI\x20shows\x20mutated\x20value','revertMcpClients','clearFirst',')\x20->\x20(','ignore','\x27\x20instead.','rn_reset_state','rn-error-notify.sh','rn_get_errors','rYjyL','dist','startInFlight','steps','getPixelRatio','screen_tap_and_verify','device:','appium-webdriveragent\x20not\x20required\x20for\x20this\x20target.','imageKey\x20unchanged','buildErrors','idbAvailable','pnpm-workspace.yaml','assertVisible','storageAckKeys','stdioToStderr','chainId',':\x20already\x20configured','tUiNo','Claude\x20Code:\x20pre-approved\x20the\x20Ceraph\x20MCP\x20server\x20(no\x20trust\x20prompt)\x20✓','HEAD','sessionBaseUrl','\x20Keep-awake\x20may\x20stay\x20off\x20until\x20the\x20app\x20is\x20foregrounded;\x20the\x20postflight\x20device-awake\x20check\x20still\x20gates\x20readiness.','tap\x20succeeded\x20but\x20post-tap\x20verify\x20failed:\x20','malformed','appium-webdriveragent','queries[','auth.json','lastContactAt','[react-native-mcp]\x20WARNING:\x20dropped\x20','chain','keyboard','waitForStorageAck\x20timed\x20out\x20after\x20','Replaced\x20','zytMI','VnHdw','\x20file(s):','verifyProfileTransition','runBridge','js-error','xcodebuild-exited-early','getRunIndex','distancePx','Sign\x20in\x20to\x20run\x20the\x20complete\x20init.\x20Open\x20the\x20verificationUri,\x20sign\x20in,\x20copy\x20the\x20token\x20it\x20issues,\x20and\x20re-call\x20ceraph_init\x20with\x20that\x20value\x20as\x20`token`.\x20The\x20project\x20is\x20left\x20untouched\x20until\x20you\x20do.','getActiveApp','question','sendLoggingMessage','clean','Number\x20of\x20recent\x20lines\x20to\x20return\x20(default:\x2050)','no-flows','MendI','getTime','eEiJR','layout','advanceUntilPauseOrEnd','kwMHw','--verify','removeAllListeners','rn_stop','.png','signals','),\x20so\x20flows\x20were\x20resolved\x20against\x20the\x20committed\x20graph,\x20NOT\x20your\x20local\x20edits.\x20flowIds\x20minted\x20from\x20a\x20dirty-tree\x20preview\x20may\x20come\x20back\x20as\x20unknown-flow-ids\x20—\x20if\x20that\x20happens,\x20re-pick\x20ids\x20from\x20the\x20error\x27s\x20`available`\x20list.\x20Flow\x20ids\x20are\x20content-addressed,\x20so\x20a\x20flow\x20whose\x20steps\x20your\x20local\x20edits\x20changed\x20carries\x20a\x20different\x20id:\x20genuinely\x20divergent\x20flows\x20fail\x20explicitly\x20with\x20unknown-flow-ids\x20rather\x20than\x20silently\x20executing\x20the\x20stale\x20committed\x20steps.\x20Committing\x20your\x20changes\x20restores\x20full\x20working-tree\x20resolution.','http://localhost:8100','Long-press\x20an\x20element\x20matched\x20by\x20text/accessibilityLabel.\x20Default\x20duration\x20is\x201000ms.','clear','diffDependencies','perFlowMutexWith','activateApp','vLQKK','disableScopeRegression','failed','on-demand','\x20image(s))\x20at\x20','pendingStorageAckResolvers','\x0aCamera\x20test\x20images:','apps/mobile','home','GxbkR','boot','outside\x20','Resolved\x20subDir\x20escapes\x20.ceraph/camera-images/:\x20',';\x20},\x20[]);','GagJQ','baseUrl','check','cacheDir','subtle','Created\x20','.tmp.','claudePreApprovalPreserved','totalCount','scrollTo','componentControl:\x20boolean-prop\x20entries\x20require\x20non-empty\x20visibilityProp','If\x20true,\x20return\x20the\x20step\x20list\x20as\x20a\x20preview\x20without\x20mutating\x20anything.\x20Use\x20this\x20first\x20to\x20show\x20the\x20user\x20what\x20would\x20happen.','CoZyI','/status','TFSrw','@ceraph/react-native-mcp/babel-plugin','testIdReady','Cognito\x20deleteUser\x20failed:\x20','realDeviceHookInflight','user_id','/session','Claude\x20Code\x20will\x20ask\x20you\x20to\x20approve\x20the\x20Ceraph\x20MCP\x20server\x20once\x20on\x20restart\x20—\x20your\x20.claude/settings.local.json\x20had\x20an\x20unexpected\x20shape,\x20so\x20it\x20was\x20left\x20untouched.\x20Approve\x20the\x20prompt,\x20or\x20add\x20\x22react-native-mcp\x22\x20to\x20enabledMcpjsonServers\x20in\x20that\x20file\x20by\x20hand.','verifyNavigation','affectedFlowNames','findElement','qwTKj','target-selected','bridge-opaque','shell','boolean','response-ui-divergence:\x20','installCeraph-only','.cjs','30d','bluetooth','filePaths','admin','ArrayLiteralExpression','Failed\x20to\x20spawn\x20prebuild:\x20','isVariableDeclaration','ExpressionStatement','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20','SWyxP','Claude\x20Code\x20hook\x20(.rn-flow-progress.json):\x20already\x20configured','Test\x20image\x20registry\x20','mutations','secret-missing','layoutCount','listapps','CPwbZ','wMRLK','getAuth','stopGeneration','wda-derived','simulatorUdid','detectBootTarget','isImportClause','isFinite','resolverUdid','Unknown\x20error\x20during\x20typeIntoField','expo-dynamic','app_activate','StaticText','Per-flow\x20conditions\x20the\x20AI\x20agent\x20uses\x20to\x20reason\x20about\x20user\x20identity.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.','destinationRoute','unlink','spawn-failed','installCeraph','run-ios','zKXtl','drainCommandsForTesting','written','XCUIElementTypeTextField','command-channel','elementKey','?ts=','Create\x20`.ceraph/camera-images/`\x20and\x20add\x20at\x20least\x20one\x20image.\x20Run\x20this\x20tool\x20again\x20to\x20generate\x20the\x20registry.','preparing\x20device','xPcQv','requiresEnv','/wda/dragfromtoforduration','preset','Post-reload\x20snapshot\x20failed\x20(WDA\x20unreachable\x20or\x20source\x20error)','BaySJ','Set\x20the\x20device\x20orientation\x20to\x20portrait\x20or\x20landscape\x20via\x20WDA.','endsWith','isLocked','Common\x20right\x20after\x20an\x20iOS\x20or\x20macOS\x20update.\x20Update\x20Xcode\x20(or\x20install\x20the\x20matching\x20Device\x20Support),\x20open\x20Xcode\x20→\x20Window\x20→\x20Devices\x20&\x20Simulators\x20and\x20wait\x20for\x20\x27Preparing\x20device\x20for\x20development\x27\x20to\x20finish,\x20then\x20retry.','width','Allow\x20Full\x20Access','WDA\x20openUrl\x20failed:\x20','waitForAppTerminated','write','every','responseField','writeUInt32LE','knHAx','assertVisible:\x20element\x20not\x20visible:\x20','active','mcp.json','location','Snapshot\x20what\x20Ceraph\x20has\x20installed\x20in\x20this\x20project\x20—\x20package\x20presence,\x20gitignore\x20entries,\x20MCP-client\x20configs,\x20root-layout\x20boot\x20wiring,\x20<CeraphCamera>\x20usage\x20count,\x20and\x20whether\x20the\x20user-global\x20auth\x20token\x20is\x20present.\x20Use\x20this\x20BEFORE\x20ceraph_uninstall_run\x20to\x20show\x20the\x20user\x20what\x20would\x20change.\x20Returns\x20the\x20footprint\x20without\x20mutating\x20anything.','addNamedImport','MzODB','collectVisibleElements','startupTimeoutMs','verify-observation','digest','inStackTrace','recordBootRequest','Supported\x20formats:\x20JPEG,\x20PNG,\x20WebP,\x20HEIC.\x20Re-export\x20the\x20image\x20in\x20one\x20of\x20these\x20and\x20try\x20again.','bun.lock','mcp_config.json','listRuns','Claude\x20Code','Clerk\x20deleteUser\x20failed:\x20','enabledMcpjsonServers','Preflight\x20passed\x20(target\x20ready,\x20required\x20env\x20present).','getActiveAppInfo','remote.origin.url',',\x20then\x20re-run\x20any\x20flow\x20tool\x20—','aYAlf','hlbKB','Start\x20a\x20chained\x20mobile\x20run.\x20Pass\x20the\x20chain\x20block\x20returned\x20by\x20a\x20planning\x20tool\x20VERBATIM\x20—\x20the\x20runner\x20verifies\x20a\x20server-issued\x20signature\x20on\x20`chainId`\x20/\x20`flows`\x20/\x20`bridges`\x20and\x20rejects\x20any\x20modified\x20plan.\x20For\x20ad-hoc\x20scenarios\x20where\x20you\x20want\x20to\x20drive\x20a\x20custom\x20sequence,\x20use\x20the\x20screen_*\x20primitives\x20directly\x20instead\x20of\x20hand-crafting\x20a\x20chain.\x20Returns\x20one\x20of\x20`snap_point_pending`\x20|\x20`chain_complete`\x20|\x20`error`.\x20Pair\x20with\x20`rn_test_chain_continue`\x20to\x20resume.','not-installed','ceraph-react-native-mcp','AbortError','bare-rn','drainCommands','low','device','reduce','testDataManager','failedFlowIndex','read','/screenshot','componentHook:\x20tier\x20must\x20be\x20\x22componentHook\x22','open','denyButtons','MAX_METRO_LINES','Repeatedly\x20swipe\x20until\x20an\x20element\x20matching\x20text/accessibilityLabel\x20appears\x20in\x20the\x20accessibility\x20tree.\x20Returns\x20without\x20tapping.\x20Default\x20direction\x20is\x20\x27up\x27\x20(swipe\x20up\x20—\x20reveals\x20content\x20below\x20the\x20fold),\x20max\x2010\x20swipes.\x20Pass\x20direction:\x20\x27down\x27\x20to\x20scroll\x20backward\x20toward\x20the\x20top.','launchApp','stack','KhfIy','XILED','No\x20<CeraphCamera>\x20at\x20','rootDir','Auth0\x20deleteUser\x20failed:\x20','componentHook:\x20hookName\x20must\x20be\x20a\x20non-empty\x20string','prebuild\x20--clean\x20is\x20only\x20available\x20for\x20Expo\x20projects.','Xcode\x20is\x20missing\x20Device\x20Support\x20for\x20this\x20iPhone\x27s\x20iOS\x20version','CDsLh','iproxy\x20auto-bridge\x20failed\x20to\x20start:\x20','pRpXm','appium-webdriveragent\x20ready\x20—\x20simulator\x20WebDriverAgent\x20can\x20build.','Return\x20info\x20about\x20the\x20foreground\x20app\x20via\x20WDA\x27s\x20/wda/activeAppInfo\x20(bundleId,\x20pid,\x20name).','.gemini','onRedbox','command','bootWriteCounter','reused','expiresAt','childExit','ms]','Server-issued\x20HMAC\x20over\x20chainId\x20+\x20flows\x20+\x20bridges.\x20Pass\x20verbatim\x20from\x20the\x20planning\x20tool\x27s\x20chain\x20block.\x20The\x20runner\x20rejects\x20calls\x20without\x20it\x20or\x20with\x20a\x20mismatched\x20value.','clearSimulatorWdaPort','laptop-network','padEnd','listener','content-type-mismatch','toString','elapsedMs','KhdSH','\x20>\x20','random','catalog','target','Permission\x20interceptor\x20middleware\x20is\x20wired.\x20iOS\x20system\x20permission\x20dialogs\x20will\x20be\x20auto-accepted\x20during\x20flows\x20(configurable\x20via\x20the\x20`CERAPH_AUTO_ACCEPT_PERMISSIONS`\x20env\x20var:\x20`auto-accept`\x20|\x20`ask`\x20|\x20`off`).','create','protocol','rootIsRnApp','ygAmR','apiBase','runtime_error','/signal','Podfile','vSZfK','componentHook','win32','queries','42Tklywc','\x27\x20—\x20trusting\x20the\x20bytes.','KKiMT','--dev-client','local-network','completed','kind','myfFy','Ensure\x20the\x20iOS\x20device\x20is\x20awake\x20and\x20unlocked.\x20Returns\x20a\x20structured\x20result\x20with\x20remediation\x20guidance\x20when\x20the\x20device\x20is\x20locked.','missing\x20token','hardware-udid-not-found','unlocked','build','baYDF','Re-run\x20`rn_sync_camera_registry`\x20manually\x20to\x20regenerate\x20`_registry.ts`.\x20The\x20image\x20file\x20itself\x20is\x20on\x20disk\x20and\x20safe.','ceraph_uninstall_status','bootWriteCount','back','warn','tier-gated','Could\x20not\x20list\x20installed\x20apps:\x20','run:ios','adaIF','No\x20working\x20launch\x20transport\x20found.\x20Install\x20Xcode\x20(for\x20devicectl)\x20or\x20idb\x20(https://fbidb.io/)\x20to\x20launch\x20apps\x20on\x20a\x20real\x20device.','expectedRoutes','scheme','existing','openMethods','devDependencies','CWbOE','screenFromResult','applied','JmIjb','token','unverified','contents','\x20visible=','isJsxSelfClosingElement','photos','mutexWith','XCUIElementTypeAlert','selectedAt','/\x20—\x20working\x20from\x20there','writeTier','system_profiler','babel.config.js','startMetro','File\x20not\x20found:\x20','force','isArray','--abbrev-ref','alloc','derived-data','direction','Signed\x20in\x20[cached]','Simulator\x20UDID\x20','ceraph-uninstall-mcp-preview-','ext','Allow','wda-not-ready','triggerLabel',')\x20—\x20entry\x20rejected','0.2.2','storage-ack\x20requires\x20boolean\x20`storageAckSuccess`','array','syncCameraRegistry','Built\x20and\x20installed\x20the\x20app\x20(','videoRecorder','device_set_orientation','bootSource','unhandled-rejection','PlannedChainInput.flows\x20must\x20contain\x20at\x20least\x20one\x20flow.','nav-bar','bootMaxWaitMs','ffmpeg','port','process','plgTc','spawn','app_launch','handled','SruYk','beforeAll.ensureLaunched','getTarget','react-native-mcp','snapshotTarget','URL\x20/\x20deep\x20link\x20to\x20open,\x20e.g.\x20myapp://product/42','\x0a[runCommand:\x20timed\x20out\x20after\x20','X\x20coordinate\x20to\x20tap','authenticate','subDir\x20\x27','application/json','min.','usbmuxd','getWindowSize','UcSvM','settingsPath','pointer','CERAPH_INIT_AGENT_HINT=','booted','AdminDeleteUserCommand','heis','EACCES','&id=','isFile','createSourceFile','Device\x20is\x20locked.\x20Unlock\x20it\x20manually\x20once,\x20then\x20set\x20Settings\x20→\x20Display\x20&\x20Brightness\x20→\x20Auto-Lock\x20→\x20Never\x20so\x20it\x20stays\x20awake\x20while\x20flows\x20run.\x20WDA\x20can\x27t\x20bypass\x20Face\x20ID\x20or\x20a\x20passcode.','addAttribute','pro-ready','WDA\x20tap\x20failed\x20(serial\x20fallback)','ceraph-rn-shim','Image\x20is\x20','supabase','locked','`rn_wda_stop`\x20(or\x20MCP\x20shutdown)\x20ran\x20while\x20the\x20simulator\x20WDA\x20build\x20was\x20in\x20flight.\x20The\x20build\x20was\x20terminated.\x20Re-run\x20`rn_wda_start`\x20if\x20you\x20still\x20want\x20a\x20simulator\x20session.','ceraph_init_inject_boot','mkdir','xcrun','already-running','Text','shutdown','iproxyManager','Signal\x20listener\x20bound\x20on\x20port\x20','storageAckSuccess','timed\x20out','rect','[chain-runner]\x20Dropping\x20','Installing\x20appium-webdriveragent\x20for\x20simulator\x20support\x20(one-time,\x20~200MB)…','(?=[\x5cs/>])','udidInflight','\x20image','\x20failed:\x20','pop','keyUp','Install\x20the\x20optional\x20appium-webdriveragent\x20dep\x20in\x20your\x20project\x20(npm\x20i\x20-D\x20appium-webdriveragent)\x20and\x20retry\x20—\x20see\x20the\x20README\x20Simulator\x20setup.','reason','screen_wait_for','keepAliveHeartbeat','[react-native-mcp]\x20Not\x20signed\x20in.\x20Run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20to\x20finish\x20setup\x20—\x20sign-in\x20(required\x20for\x20the\x20flow\x20tools),\x20the\x20runtime-error\x20hook\x20that\x20surfaces\x20app\x20errors\x20in\x20your\x20chat,\x20and\x20your\x20Mac\x27s\x20LAN\x20IP.\x20Build\x20/\x20run\x20/\x20device\x20tools\x20work\x20without\x20it.','simulator','PlannedChainInput.affectedFlowNames\x20must\x20be\x20an\x20array.','Sign-in\x20was\x20cancelled.','deep-link-fallback','startedAt','Red\x20screen\x20error\x20detected','resetDelayMs','Apply\x20ONE\x20<CameraView>\x20→\x20<CeraphCamera\x20imageKey=\x22...\x22>\x20AST\x20replacement.\x20The\x20AI\x20provides\x20the\x20imageKey\x20based\x20on\x20the\x20context\x20it\x20saw\x20in\x20scan_camera\x27s\x20surroundingCode.\x20Also\x20valid\x20for\x20an\x20EXISTING\x20<CeraphCamera\x20/>\x20that\x27s\x20still\x20uninitialized\x20(no\x20imageKey)\x20—\x20call\x20with\x20the\x20same\x20filePath/line\x20to\x20set\x20the\x20imageKey\x20on\x20the\x20tag.\x0a\x0aAccepted\x20imageKey\x20values:\x0a\x20\x20-\x20\x22default\x22\x20—\x20bundled\x201024x1024\x20black\x20PNG.\x20Right\x20for\x20tests\x20that\x20don\x27t\x20care\x20about\x20image\x20content\x20(form\x20submits,\x20file\x20uploads,\x20permission\x20flows).\x0a\x20\x20-\x20\x22<scenario>\x22\x20(lowercase-dashes)\x20—\x20a\x20specific\x20user-supplied\x20image.\x20Drop\x20the\x20file\x20at\x20.ceraph/camera-images/<scenario>.{jpg,png,webp}\x20(or\x20write\x20it\x20via\x20`ceraph_add_camera_image`)\x20before\x20flows\x20execute.\x0a\x20\x20-\x20\x22@runtime\x22\x20(or\x20any\x20value\x20starting\x20with\x20@)\x20—\x20declares\x20runtime\x20control\x20of\x20the\x20image.\x20The\x20planner\x20or\x20a\x20deep-link\x20push\x20picks\x20the\x20image\x20per-step\x20at\x20flow\x20time.\x20Use\x20when\x20one\x20camera\x20screen\x20feeds\x20different\x20scenarios\x20across\x20flows.\x0a\x0aAlso\x20adds\x20the\x20shim\x20import\x20and\x20trims\x20`CameraView`\x20from\x20the\x20expo-camera\x20import\x20when\x20no\x20JSX\x20uses\x20it\x20anymore.\x20Idempotent\x20—\x20returns\x20`{\x20already:\x20true\x20}`\x20when\x20the\x20line\x20is\x20already\x20CeraphCamera\x20with\x20the\x20same\x20imageKey.','mutationMarker','/var/run/usbmuxd','bind-failed','delete','monorepo','setTimeoutFn','bounds','url','sleep','ceraph_init_monorepo_status','destroy','npm','ceraph-dir','revertGitignore','durationMs','Pro\x20requires\x20sign-in.\x20Surface\x20the\x20authUrl\x20to\x20the\x20user,\x20have\x20them\x20paste\x20the\x20token\x20it\x20issues,\x20then\x20call\x20ceraph_init_auth_browser\x20with\x20that\x20token.\x20After\x20sign-in,\x20re-call\x20ceraph_init_select_tier\x20to\x20continue.','zDehI','flavor','disableAXCache','some','videoPath','Starter\x20·\x20Free\x20—\x20local\x20build,\x20run,\x20and\x20device\x20tools.\x20No\x20sign-in.','--quiet','auto','getArguments','\x20unexpected\x20change','react-native-','durationMs=','includes','webBaseUrl','provision','round','isArrowFunction','auth\x20provider\x20\x27cognito\x27\x20requires\x20@aws-sdk/client-cognito-identity-provider\x20in\x20package.json.\x20Run:\x20npm\x20install\x20@aws-sdk/client-cognito-identity-provider','Claude\x20Code\x20hook:\x20FileChanged\x20→\x20.rn-flow-progress.json\x20✓','Re-run\x20`ceraph_doctor`\x20to\x20see\x20what\x27s\x20blocking\x20on-device\x20automation.','auth-profile','terminateAppViaWDA','workingDir','connected','[ceraph-test-data]\x20adapter\x20cleanup\x20failed\x20for\x20','not-found','windsurf','@ceraph/react-native-mcp','ScreenManager\x20not\x20provided\x20—\x20cannot\x20query\x20active\x20app\x20via\x20WDA.','real-device-connected','ceraph://\x20URL\x20scheme\x20already\x20registered\x20in\x20','verifySelector','preferSimulator','true','screen_open_url','Claude\x20Code:\x20','ffmpeg-installed','assertion','oIkTI','boolean-prop','Inspect\x20the\x20project\x20root\x20for\x20monorepo\x20signals\x20(package.json\x20workspaces,\x20pnpm-workspace.yaml,\x20lerna.json)\x20and\x20return\x20any\x20RN/Expo\x20subpackages\x20found.\x20If\x20the\x20cwd\x20is\x20itself\x20an\x20RN\x20app,\x20`rootIsRnApp:\x20true`\x20and\x20`matches:\x20[]`.\x20Use\x20this\x20before\x20calling\x20other\x20init\x20tools\x20—\x20when\x20matches.length\x20===\x201,\x20pass\x20that\x20absPath\x20as\x20projectDir\x20to\x20every\x20subsequent\x20ceraph_init_*\x20call.','ceraph-uninstall-claude-hooks-preview-',':\x20configured\x20✓','@supabase/supabase-js','no\x20details','en6','Run\x20`iproxy\x208100\x208100\x20-u\x20<udid>`\x20manually\x20to\x20see\x20the\x20full\x20error.','pro','no-layout-found','no\x20devices\x20are\x20booted','videoRecorderFactory','signInWithEmailAndPassword','WDA\x20session\x20creation\x20succeeded\x20but\x20no\x20sessionId\x20returned','echoExpectations','package.json','auth\x20provider\x20\x27','/session/','readJson','Built\x20and\x20installed\x20the\x20app.','NUUYx','getTagNameNode','number','log','voLDB','canonicalScript','mchain-run-','CqYjB','vbpNe','bqvTq','Shim\x20received\x20the\x20reset\x20but\x20reported\x20the\x20clear\x20didn\x27t\x20complete\x20—\x20see\x20detail.','\x20scheme\x20to\x20ceraph://','No\x20failure\x20detail\x20recorded.','PropertyAssignment','BIbPs','.\x20Shim-side\x20signals\x20(JS\x20errors,\x20unhandled\x20rejections,\x20network\x20failures)\x20will\x20be\x20dropped.','wZDEg','already-reverted','Clerk\x20createUser\x20failed:\x20','Optional\x20project\x20to\x20write\x20client\x20configs\x20for.\x20Defaults\x20to\x20where\x20the\x20server\x20launched.\x20A\x20subpackage\x20of\x20the\x20launch\x20dir\x20resolves\x20to\x20the\x20launch\x20root\x20(monorepo);\x20a\x20path\x20outside\x20it\x20writes\x20to\x20that\x20project.','loadAuth','[react-native-mcp]\x20Catalog\x20endpoint\x20rejected\x20(','exitCode','install-failed','uNZmF','purgeImages','path','Install\x20with\x20`brew\x20install\x20ffmpeg`\x20to\x20enable\x20per-chain\x20mp4\x20capture\x20on\x20real-device\x20runs.\x20Tests\x20will\x20continue\x20without\x20video\x20until\x20installed.','Opening\x20','\x20is\x20not\x20a\x20JSON\x20object\x20(got\x20','Missing\x20env\x20var(s):\x20','BDbDt','tap','fetch','ceraph_test_data_cleanup\x20requires\x20either\x20`id`\x20(single\x20user)\x20or\x20`all:\x20true`\x20(wipe).','yarn','simulator-not-found','127.','auto-lock-disabled','all','into','unref','key=','bind','Failed\x20to\x20spawn\x20','method\x20not\x20allowed','metroParser','Content-Type','componentControl:\x20tier\x20must\x20be\x20\x22componentControl\x22','@ceraph-test.local','isFunctionExpression','pushLine','killProcess','mobilePro','runVerifyMarkers','-scheme','pTOEN','.\x20Expected\x20\x27','PlannedChainInput\x20must\x20be\x20an\x20object.','affectedDisplayRoute','mutates','json','device_ensure_awake','realDeviceHook','ioreg','Opaque\x20chain\x20identifier\x20returned\x20by\x20`rn_test_chain_start`.\x20Expires\x20after\x2030\x20minutes\x20of\x20inactivity.','-w0','isMetroRunning','127.0.0.1','snapshotErrorBanners','match','\x20\x20[BLOCKER]\x20','cleanup','Rewrite\x20','config','now','timeoutMs','legacy','.next','readPreference','--relative','Join\x20the\x20same\x20WiFi\x20network\x20as\x20your\x20phone,\x20or\x20update\x20the\x20expectedNetwork\x20doctor\x20option.','no\x20shell\x20profile','PlannedChainInput.flows\x20must\x20be\x20an\x20array.',')\x20exceeds\x20flows.length-1\x20(','recordAsyncStorageRead','isNaN','1483011lHnkcV','hookName','lastRedboxSignature','content-type','ADhyc','auth','tmpRoot','udidResolved','/commands/ack','string','storage',':\x0a\x20\x20import\x20{\x20installCeraph\x20}\x20from\x20\x22','Metro\x20dev\x20server\x20started\x20successfully.','ioQbm','stringify','trimStart','libraryCatalog','mode','onChildSpawned','sourceEndpoint','\x22.\x20Re-issue\x20rn_test_chain_continue\x20with\x20','unrelated','-getairportnetwork','macOS\x20Screen\x20Recording\x20permission\x20not\x20granted.\x20Open\x20System\x20Settings\x20→\x20Privacy\x20&\x20Security\x20→\x20Screen\x20Recording\x20and\x20enable\x20your\x20terminal\x20app\x20(Terminal\x20/\x20iTerm\x20/\x20Warp\x20/\x20Cursor\x20/\x20VS\x20Code\x20—\x20whichever\x20launched\x20the\x20MCP).\x20After\x20granting,\x20fully\x20quit\x20and\x20relaunch\x20the\x20terminal,\x20then\x20unplug\x20and\x20replug\x20your\x20iPhone\x20before\x20retrying.','Not\x20in\x20a\x20git\x20repo\x20(or\x20no\x20HEAD\x20commit\x20yet)\x20—\x20graph\x20cache\x20seed\x20skipped.\x20First\x20rn_test_*\x20call\x20will\x20build\x20the\x20graph\x20from\x20scratch.','height','intent','findAndTap','Mint\x20a\x20managed\x20test\x20user\x20via\x20the\x20configured\x20auth\x20provider\x20(Clerk\x20/\x20Auth0\x20/\x20Supabase\x20/\x20Firebase\x20/\x20Cognito).\x20Returns\x20email\x20+\x20password\x20(+\x20sessionToken\x20when\x20the\x20provider\x20exposes\x20one)\x20for\x20use\x20in\x20test\x20scripts.\x2024-hour\x20TTL\x20—\x20expired\x20users\x20are\x20swept\x20on\x20the\x20next\x20MCP\x20startup.\x20Pro\x20tier\x20only.','ceraph_test_data_provision','auth/user-not-found','.codex','\x0a}\x0a','LCNiP','reloadRecoveryWitness','endpoint','Ceraph\x20rate\x20limit\x20hit.\x20Try\x20again\x20in\x20a\x20few\x20seconds.','\x20before\x20WDA\x20reported\x20a\x20port.\x20Most\x20common\x20cause:\x20WebDriverAgentRunner\x20has\x20no\x20code-signing\x20identity\x20selected.\x20Open\x20the\x20project\x20in\x20Xcode\x20once\x20(`open\x20\x22','\x20<CameraView>\x20usage(s)\x20across\x20','Bring\x20an\x20app\x20to\x20the\x20foreground\x20without\x20a\x20cold\x20restart.\x20Uses\x20WDA\x27s\x20/wda/apps/launch,\x20falls\x20back\x20to\x20a\x20fresh\x20launch\x20if\x20WDA\x20is\x20unreachable.','Opening\x20browser\x20to\x20sign\x20in…','unknown\x20kind:\x20','disableBulkActions','values','fs/promises','checkAndHandle','version','\x22\x20step=','mif1','ready','Multiple\x20React\x20Native\x20subpackages\x20detected.\x20Pass\x20--project-dir\x20to\x20target\x20a\x20specific\x20subpackage,\x20e.g.\x20`--project-dir\x20','wifi','Re-run\x20with\x20--purge-images\x20to\x20delete\x20.ceraph/\x20(camera\x20images,\x20design\x20snapshots,\x20run\x20artifacts).\x20Default\x20leaves\x20them\x20in\x20place\x20so\x20a\x20re-install\x20picks\x20up\x20where\x20you\x20left\x20off.','unknown\x20reason','method','initialObservation','The\x20native\x20build\x20failed.\x20See\x20the\x20captured\x20Xcode\x20output.','content','ceraph_init_auth_browser','Unknown\x20error\x20during\x20findAndTap','Shzgh','screen_screenshot','Unknown\x20error\x20during\x20swipe','base64','getGitSha','Ed25519','JxONX','https://ceraph.dev/api/mcp','\x20run(s)\x20could\x20not\x20be\x20purged\x20(permission\x20or\x20disk\x20error).\x20See\x20server\x20logs\x20for\x20per-run\x20detail.','runtimeErrors','expandedBeforeAll','aISbH','.zshrc','\x20+\x20testID\x20injector)\x20—\x20your\x20app\x20had\x20no\x20babel\x20config,\x20so\x20we\x20added\x20one.\x20Rebuild\x20your\x20dev\x20client\x20once\x20to\x20activate.','tool','stopping','next','When\x20true,\x20deletes\x20every\x20on-demand\x20user\x20for\x20this\x20project.','RkIWQ','rn_test_chain_continue','Lcqlq','stepPath','jit','statFn','[react-native-mcp]\x20','-di','devicectlAvailable','lockState','payload','next=','Matched\x20element\x20has\x20no\x20bounds/rect\x20information.','en0','responseValue','-c:v','dgVdj','detail','objectiveSignals','No\x20device\x20hardware\x20UDID\x20resolved\x20—\x20could\x20not\x20start\x20the\x20iproxy\x20bridge.','errorSummary','monorepo\x20with\x20','granted','bundleId','writtenOrUnchanged','acked','Delete\x20on-disk\x20chain-run\x20artifacts\x20(per-step\x20screenshots\x20+\x20run\x20index)\x20older\x20than\x20a\x20threshold.\x20Use\x20to\x20free\x20disk\x20before\x20disk\x20pressure\x20becomes\x20a\x20problem,\x20or\x20to\x20drop\x20runs\x20containing\x20sensitive\x20screenshots.\x20Defaults\x20to\x20`14d`\x20(matches\x20the\x20server\x27s\x20startup-retention\x20sweep).\x20Pass\x20`30d`\x20for\x20a\x20more\x20conservative\x20purge\x20or\x20`all`\x20to\x20wipe\x20every\x20cached\x20run\x20on\x20the\x20machine.\x20Returns\x20the\x20list\x20of\x20evicted\x20runIds,\x20bytes\x20freed,\x20and\x20how\x20many\x20runs\x20remain\x20cached.','clerk','hasOwnProperty','touch','/wda/lock','pluginVersion','\x20minutes','listInstalledAppsSimulator','__keychain__','Could\x20not\x20detect\x20a\x20supported\x20image\x20format\x20from\x20the\x20decoded\x20bytes.','startInner','sim','lock\x20screen','\x20[y/N]\x20','actions','awaiting_error_decision','race','diff-affected','[react-native-mcp]\x20Runtime\x20catalog\x20loaded\x20(','runReloadRecoveryWitness','No\x20runtime\x20signals\x20reached\x20this\x20session\x20directly:\x20another\x20process\x20holds\x20the\x20device-signal\x20port\x20(8101)\x20—\x20usually\x20a\x20second\x20Ceraph\x20MCP,\x20but\x20possibly\x20an\x20unrelated\x20server.\x20If\x20it\x27s\x20a\x20Ceraph\x20instance\x20on\x20the\x20SAME\x20project,\x20in-app\x20runtime\x20errors\x20still\x20reach\x20you\x20via\x20the\x20shared\x20.rn-errors.json;\x20otherwise\x20(a\x20different\x20Ceraph\x20project,\x20or\x20a\x20non-Ceraph\x20process)\x20they\x20won\x27t\x20appear\x20here.\x20To\x20capture\x20them\x20here,\x20free\x20port\x208101\x20(lsof\x20-nP\x20-iTCP:8101)\x20—\x20this\x20session\x20reclaims\x20it\x20automatically\x20once\x20it\x27s\x20released.','buildTapPointerActions','localPort','.rn-errors.json','PBGJG','getName','center','deleted','app-installed','getWorkingTreeDiff','remove','Foregrounded\x20','typeIntoField','KVoah','hwFUw','CERAPH_AUTH_DOMAIN','rn_reload','wwNsR','getUdid','screen-recording-permission','witnesses','Dependencies\x20removed:\x20','needs-auth','line','mtimeMs','zsh','Resize\x20or\x20recompress\x20the\x20image\x20before\x20uploading.\x20Test\x20fixtures\x20rarely\x20need\x20to\x20be\x20larger\x20than\x201\x20MB.\x20Cap:\x205\x20MB.','tmpHome','.gitignore','value','flow-end','listChangedFiles','getText','nonInteractive','CFBundleDisplayName','relativePath','isAvailable','Re-call\x20ceraph_init_select_tier\x20with\x20the\x20user\x27s\x20chosen\x20{\x20tier\x20}.\x20Share\x20detailsUrl\x20if\x20the\x20user\x20wants\x20more\x20about\x20the\x20plans.','snapshotPath','No\x20element\x20found\x20matching\x20field\x20query:\x20','stripped','clearErrorFile','code','VpLRQ','no\x20signing\x20certificate','\x22\x20entry.','isFinalStep','realDeviceHookFiredFor','msf1','claude-hooks','found','[ceraph][ceraph-infra]\x20surgical\x20AsyncStorage\x20delete\x20returned\x20no\x20ACK\x20or\x20failure\x20for\x20keys:\x20','/cli-auth','Ceraph\x27s\x20device-signal\x20listener\x20couldn\x27t\x20start\x20(e.g.\x20a\x20permission\x20error\x20or\x20an\x20invalid\x20CERAPH_SIGNAL_HOST),\x20so\x20the\x20command\x20channel\x20is\x20unavailable\x20in\x20this\x20session,\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20','createUser','length','BgkDj','present','\x20library\x20pkgs,\x20','ticking','\x20(auto-detected\x20from\x20the\x20project\x20config;\x20pass\x20bundleId\x20if\x20your\x20build\x20uses\x20a\x20different\x20id.)','/\x20and\x20call\x20`rn_sync_camera_registry`\x20to\x20regenerate.','isExportAssignment','Chain\x20bridge\x20tap\x20failed\x20before\x20flow\x20','halt','\x20runs\x20(','Signal\x20listener\x20failed\x20to\x20bind\x20on\x20port\x20','package-lock.json','xcodebuild-spawn-failed','wait-for-device\x20sleep\x20failed:\x20','\x20<CeraphCamera>\x20component','iproxy\x20bridge\x20already\x20running.','response-ui-divergence','entry','ProvisionError','Failed\x20to\x20create\x20WDA\x20session:\x20','outputToStderr','→\x20mutated\x20value\x20NOT\x20observed\x20in\x20reader\x20UI','rn_start','build\x20interrupted','runsStore','IFnck','CERAPH_AUTH_USER_POOL_ID','WebDriverAgent.xcodeproj','app.config.js','getNamedImports','epPhW','timer','openUrl\x20failed','accumulatedHasFullyDynamicWrite','parsed','Rngfm','buf','error','Laptop\x20is\x20on\x20WiFi\x20\x27','en2','text','copy','resized','revertCeraphUrlScheme','Absolute\x20path\x20of\x20the\x20source\x20file.','[ceraph]\x20video\x20recorder\x20stop\x20failed:\x20','removeEventListener','invalidate','plugin-not-configured','updateRunIndex','isArrayLiteralExpression','getParentIfKind','metroWarnings','signal-host','idb','inflightChild','describe','Already\x20wired\x20—\x20no\x20changes\x20needed.','invalid-image-key','tapAtPoint','assertNotVisible:\x20element\x20is\x20visible:\x20','no\x20layout\x20file\x20detected','returns','terminate','<unknown>','WebDriverAgent\x20is\x20reachable\x20at\x20','Uninstall\x20Ceraph\x20from\x20this\x20project.\x20Reverts\x20source-tree\x20edits\x20(<CeraphCamera>\x20→\x20<CameraView>,\x20installCeraph()\x20boot\x20wiring,\x20ceraph\x20URL\x20scheme),\x20strips\x20MCP\x20client\x20configs,\x20removes\x20gitignore\x20entries\x20+\x20the\x20shell\x20signal-host\x20export,\x20and\x20uninstalls\x20the\x20package\x20via\x20the\x20project\x27s\x20package\x20manager.\x20Default\x20leaves\x20`.ceraph/`\x20(test\x20images\x20+\x20snapshots)\x20and\x20`~/.ceraph/auth.json`\x20(user-global\x20OAuth\x20token)\x20untouched.\x20Pass\x20`purgeImages`\x20and\x20`global`\x20to\x20nuke\x20those\x20too.\x20Always\x20call\x20with\x20`dryRun:\x20true`\x20first\x20to\x20preview\x20the\x20step\x20list\x20before\x20a\x20real\x20run.','uiKind','ceraph_test_data_provision\x20failed:\x20','get','.claude','Simulator\x20UDID;\x20defaults\x20to\x20first\x20booted\x20simulator','getSourceFile','destination=','buildProcess','hOozS','iPhone','NwGdK','is\x20not\x20connected','enum','UlPbD','app.json\x20/\x20app.config.js\x20has\x20changed\x20since\x20last\x20build.\x20Expo\x20plugins\x20or\x20native\x20config\x20may\x20have\x20changed.','Optional\x20WiFi\x20SSID\x20the\x20user\x20expects\x20the\x20laptop\x20(and\x20phone)\x20to\x20be\x20on.\x20Mismatch\x20is\x20a\x20warning,\x20not\x20an\x20error.','flow\x20ended\x20without\x20success','jzkMa','UDID_TTL_MS','source','not\x20associated','readErrors','off','Bring\x20Ceraph\x20to\x20a\x20ready-to-test\x20state\x20in\x20one\x20call:\x20starts\x20Metro,\x20builds/installs\x20the\x20app\x20if\x20needed,\x20and\x20verifies\x20on-device\x20automation.\x20Runs\x20only\x20the\x20steps\x20that\x20aren\x27t\x20already\x20done\x20and\x20stops\x20at\x20the\x20first\x20failure\x20with\x20its\x20remediation.\x20Prefer\x20this\x20over\x20calling\x20rn_start\x20/\x20rn_build_ios\x20/\x20ceraph_doctor\x20separately.\x20Works\x20against\x20either\x20a\x20plugged-in\x20iPhone\x20or\x20a\x20booted\x20simulator\x20(honoring\x20CERAPH_TARGET).','role-alert','rVefc','find','WDA\x20actions\x20tap\x20failed','verifyNavigation:\x20','[stdout]\x20','export\x20','none','verifyMutation','Index\x20','Codex:\x20configured\x20✓','email','N/A','package','droppedEntries','Max\x20time\x20in\x20ms\x20to\x20wait\x20for\x20the\x20app\x20to\x20come\x20back\x20after\x20the\x20reload\x20(default\x2010000).','openUrl','52tlmSxi','region','sort',')\x20—\x20preserved','status','\x20extended\x20pkgs)','entries','auth0','readChangedFileContents','EUsRm','replace','applyRecreate','Verify\x20the\x20base64\x20string\x20is\x20intact\x20and\x20not\x20a\x20placeholder.','@ceraph/react-native-mcp/shim','Real\x20iOS\x20device\x20connected\x20(udid\x20','cacheDoctor','default','ref','clearText','Sayoh','runId\x20\x22','screenshot','PDagQ','form_identifier_exists','Specific\x20user\x20id\x20to\x20delete.\x20Mutually\x20exclusive\x20with\x20`all`.','argv0','#\x20End\x20Ceraph\x20signal\x20host','optimistic-rollback','disappear','wdaReady','[react-native-mcp]\x20Public-key\x20endpoint\x20rejected\x20(','IOUSB','accessibilityLabel','authWallRetries','hideKeyboardAfter','.\x20If\x20you\x20see\x20network\x20timeout\x20errors\x20during\x20the\x20run,\x20verify\x20your\x20phone\x20is\x20on\x20the\x20same\x20network.','file','Serial\x20tap\x20failed','Invalid\x20Ceraph\x20endpoint\x20URL:\x20\x22','\x20(expected\x20an\x20object).','No\x20booted\x20iOS\x20simulator\x20found.\x20Boot\x20one\x20first:\x20`xcrun\x20simctl\x20boot\x20<udid>`\x20or\x20open\x20it\x20via\x20`open\x20-a\x20Simulator`\x20and\x20pick\x20a\x20device.\x20Then\x20retry\x20`rn_wda_start`.','Access-Control-Allow-Origin','isBlock','down','charCodeAt','juqKq','simulatorWdaPort','CERAPH_PROJECT_DIR\x20override','EgFoo','WDA\x20setOrientation\x20failed:\x20','optionalDependencies','camera-registry-synced','createClient','getDefaultImport','prebuild','oMvAN','longPress','flush','type','WDA\x20unavailable\x20—\x20call\x20rn_wda_start\x20first\x20if\x20testing\x20on\x20a\x20simulator.','Unknown\x20error\x20during\x20getActiveAppInfo','checkTargetReady','user','eQEyG','PlannedChainInput.snapPointFlowIndices\x20entry\x20','ptySv','intervalMs',').\x20WDA\x20base\x20URL:\x20','getBody','wXXXu','__awaitRealDeviceHookForTests','hKiEL','[react-native-mcp]\x20Auth-bypass\x20provider\x20wired:\x20','prototype','App.jsx','avfoundation','storageAckCount','toISOString','Cognito\x20adapter\x20requires\x20`userPoolId`\x20for\x20cleanup.','Set\x20your\x20','installCeraph()\x20already\x20wired\x20in\x20','Native\x20dev\x20dependencies\x20changed:\x20','bundleIdentifier','rate-limited','\x20layout(s)\x20(','reasons','controlMode','hardwareProperties','babel-preset-expo','XCUIElementTypeSecureTextField','enqueueCommand','\x20is\x20malformed\x20JSON\x20—\x20preserving\x20it.\x20Fix\x20the\x20file\x20manually\x20then\x20re-run\x20init.','[ceraph][ceraph-infra]\x20deleteAsyncStorageKeys\x20dispatch\x20error:\x20',');\x20using\x20embedded\x20key','\x22);\x20}\x20catch\x20{\x20return\x20null;\x20}\x20}\x20})','utf8','npx','already-approved','WebDriverAgent\x20is\x20not\x20reachable.\x20On\x20a\x20real\x20device\x20it\x27s\x20served\x20at\x20localhost:8100\x20(run\x20it\x20via\x20Xcode\x27s\x20WebDriverAgentRunner);\x20for\x20a\x20simulator,\x20call\x20`rn_wda_start`\x20first\x20to\x20launch\x20WDA\x20and\x20route\x20to\x20it.','xcodebuild\x20couldn\x27t\x20find\x20the\x20device','min','root','Properties','catch','query','Refusing\x20to\x20send\x20your\x20Ceraph\x20token\x20to\x20a\x20\x22','serial_num','Unknown\x20error\x20during\x20findElement','git','fetchSourceTree','--agent','agentMode','foNiT','xcodebuild-missing','getOrientation','Username-Password-Authentication','pointerUp','plugin-version-mismatch','waitForStorageAck','function','ZGZuD','rmdir','reset','No\x20device\x20connected\x20after\x20','wizard','providerUserId','Return\x20all\x20captured\x20errors\x20from\x20build\x20and\x20runtime.\x20Includes\x20structured\x20build\x20errors\x20(file,\x20line,\x20column,\x20message),\x20runtime\x20JS\x20errors\x20(message,\x20stack\x20trace),\x20and\x20warnings.','TimeoutError','left','deep-link\x20(command\x20channel\x20unavailable\x20—\x20:8101\x20not\x20bound\x20by\x20this\x20session)','findDeviceAppPid','ceraph_init_setup_mcp_clients','regressions','bad-response','[react-native-mcp]\x20Catalog\x20overlay\x20install\x20failed\x20(non-fatal):\x20','expo-json-already-registered','flowRunner','ceraph','Sign-in\x20timed\x20out.\x20Reload\x20the\x20browser\x20tab\x20to\x20retry\x20—\x20or\x20paste\x20your\x20token\x20below:\x0a','No\x20element\x20found\x20matching\x20','inconclusive','.ceraph','getJitUser','WxuNU','Auth\x20provider\x20secret\x20not\x20found.\x20Set\x20','\x20\x202.\x20Complete\x20checkout:\x20https://ceraph.dev/#pricing','onSignal','Image','CLHLm','isTTY','cognito','state','\x20not\x20echoed\x20by\x20UI','FBwzR','buildSnapPoint','cached','perFlowStatedDependencies','MwXvv','\x20is\x20not\x20installed\x20on\x20the\x20target\x20—\x20skipped\x20app\x20foreground.','runInit','requiresCleanKeys','\x22);\x20}\x20catch\x20{\x20return\x20null;\x20}\x20}\x20}','wdaFetchAt','getAliasNode','stem','restartApp','indexOf','spawnRemove','permission-gate','initializeApp','totalReplacements','revert-camera\x20removed\x20imageKey\x20props\x20from\x20','port-conflict','push','search','wildcard','onChildSpawned\x20callback\x20threw:\x20','reload-recovery','buildSettings','chmod','No\x20<CameraView>\x20usages\x20found\x20in\x20app/,\x20src/,\x20screens/,\x20App.tsx','port-not-detected','findElementFromTree','revertClaudeHooks','CERAPH_AUTH_PROVIDER','requiresAncestor','registered','beforeAll','en3','rbhaU','bBnGk','children','readFile','isJsxOpeningElement','not-pro','bootBuffer','hardwareUdid','MpZmT','PlannedChainInput.bridges\x20must\x20be\x20an\x20array.','connect','join','sdk-missing','EdyXA','\x22\x20cannot\x20start\x20with\x20\x22.\x22\x20(rejects\x20\x22.\x22\x20/\x20\x22..\x22\x20/\x20dotfiles).','/wda/touchAndHold','detectedExt','currentStack','image-larger-than-typical',']:\x20','closeMethods','code\x20signing\x20is\x20required','renderedValue=','buildClient','refs/remotes/origin/HEAD','installCeraph()\x20wired\x20in\x20','\x20[cached]','Flow\x20names\x20that\x20touch\x20diff-affected\x20screens.\x20Pass\x20through\x20verbatim\x20from\x20a\x20planning\x20response\x20that\x20carried\x20them.\x20Used\x20to\x20promote\x20selective\x20screenshot\x20capture\x20for\x20diff-affected\x20flows\x20during\x20chain\x20execution.\x20Absent\x20or\x20empty\x20means\x20no\x20promotion\x20(event-triggered\x20capture\x20only).','tNdqJ','resolver','Flow\x20timeout\x20(','\x20out\x20of\x20range.\x20Found\x20','krleh','jitLabel','isCallExpression','runId\x20must\x20be\x20a\x20non-empty\x20string.','URL-path\x20patterns\x20used\x20to\x20scope\x20boot-time\x20request\x20bodies\x20the\x20AI\x20agent\x20sees.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.\x20Empty\x20or\x20absent\x20means\x20no\x20scoping.','address','Failed\x20to\x20get\x20window\x20size:\x20','apps','Code=115','needs-manual','WDA\x20apps/terminate\x20failed:\x20','seeded','resolveCommandAck','\x27\x20is\x20not\x20a\x20recognized\x20image\x20MIME\x20type;\x20using\x20detected\x20\x27','Source\x20of\x20coordinates:\x20\x27screenshot\x27\x20(default)\x20auto-corrects\x20for\x20pixel\x20ratio;\x20\x27device\x27\x20uses\x20coordinates\x20as-is','testid-sentinel','load','etpSj','POST','ceraph_test_data_cleanup','Metro\x20waiting\x20on','Element\x20not\x20found','multi','deleted-file','ios/\x20directory\x20does\x20not\x20exist.\x20Run\x20`npx\x20expo\x20prebuild`\x20to\x20generate\x20native\x20projects.','split','launch','ADbHV','fnDVh','/bash','getFunctions','\x27\x20at\x20','getSymbol','\x22;\x0a\x20\x20useEffect(()\x20=>\x20{\x20','Optional\x20explicit\x20deadline\x20in\x20milliseconds.\x20Default:\x20none\x20—\x20the\x20call\x20waits\x20forever\x20and\x20relies\x20on\x20the\x20MCP\x20abort\x20signal\x20for\x20cancellation.\x20Set\x20this\x20only\x20when\x20you\x20want\x20a\x20hard\x20cap.','bun','provider','\x0aRuntime\x20error\x20hook:','Access-Control-Allow-Headers','Unable\x20to\x20determine\x20device\x20lock\x20state.\x20Make\x20sure\x20the\x20device\x20is\x20unlocked\x20and\x20the\x20screen\x20is\x20on,\x20then\x20re-run\x20the\x20flow.','filter','env','Supabase\x20deleteUser\x20failed:\x20','init.js','\x20screen(s),\x20','mcp-clients','Filter\x20by\x20log\x20level\x20(default:\x20all)','More\x20about\x20the\x20plans\x20→\x20','message','\x20captured\x20but\x20not\x20inlined\x20(inline\x20cap\x20is\x20','whenReady','onDemandTtlMs','appendStderr','cacheTtlMs','runBuild','filePath','_systemBack','No\x20auth\x20provider\x20configured.\x20Add\x20`auth:\x20{\x20provider,\x20secretEnv\x20}`\x20to\x20ceraph.config.js\x20to\x20enable\x20JIT\x20test-user\x20provisioning.','heic','Which\x20plan?','lbLNK','content-type-unrecognized','`\x20exited\x20with\x20code\x20','.tsx','capErrors','.\x20Stop\x20whatever\x20holds\x20:8101\x20(lsof\x20-nP\x20-iTCP:8101)\x20—\x20the\x20session\x20reclaims\x20it\x20automatically\x20—\x20or\x20rebuild\x20so\x20the\x20ceraph://\x20scheme\x20is\x20registered.','XfnLe','data:','inherit','Xcode\x20derived-data\x20path;\x20defaults\x20to\x20.ceraph/wda-derived','pixelRatio','ceraph://reload','CERAPH_AUTH_REGION','lock','isStringLiteral','sShtq','xVnzQ','mxOjl','failure','uHZTD','retriesUsed','getCurrentState','max','DELETE','NLESA','WDA\x20already\x20reachable\x20—\x20iproxy\x20bridge\x20not\x20(re)started.','List\x20apps\x20installed\x20on\x20the\x20connected\x20real\x20device\x20via\x20`xcrun\x20devicectl\x20device\x20info\x20apps`.\x20Cached\x20for\x2030s.','rn_get_console','longPressElement','error-banner:\x20','discoveredIn','SAHCU','\x20→\x20response\x20','camera','Port\x20','getImportDeclaration','installCeraph()\x20is\x20wrapped\x20in\x20a\x20useEffect\x20that\x20also\x20contains\x20other\x20statements\x20(see\x20','statedDependencies','Your\x20Ceraph\x20session\x20is\x20no\x20longer\x20valid\x20(the\x20account\x20may\x20have\x20been\x20deleted,\x20or\x20your\x20token\x20expired).\x20Run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20to\x20sign\x20in\x20again.\x20Your\x20local\x20screenshots\x20and\x20flows\x20are\x20preserved\x20—\x20only\x20the\x20server-side\x20identity\x20needs\x20refreshing.','appendShimSignal','batched','All\x20<CeraphCamera\x20imageKey>\x20values\x20resolve\x20to\x20files\x20in\x20.ceraph/camera-images/.','busy','\x20selector=','link','accumulatedWriteKeys','appendIfValid','from','Optional\x20MIME\x20hint\x20(e.g.\x20`image/jpeg`).\x20The\x20actual\x20extension\x20is\x20chosen\x20from\x20magic-byte\x20detection;\x20if\x20the\x20hint\x20mismatches,\x20the\x20tool\x20returns\x20a\x20warning\x20but\x20still\x20writes\x20using\x20the\x20detected\x20type.','setTargetResolver','No\x20real\x20iOS\x20device\x20detected\x20—\x20target\x20is\x20simulator,\x20so\x20this\x20is\x20fine.','controlProp',')\x20and\x20this\x20session\x20reclaims\x20it\x20automatically.','userPoolId','Swipe\x20failed\x20during\x20scrollToElement','/wda/activeAppInfo','mkdirFn','denied','ceraph_init','#\x20Ceraph\x20camera\x20test\x20images\x0a\x0aPer-screen\x20test\x20images\x20for\x20`<CeraphCamera\x20/>`\x20from\x0a`@ceraph/react-native-mcp/shim`.\x20The\x20filename\x20(without\x20extension)\x20is\x0athe\x20imageKey\x20you\x20pass\x20on\x20the\x20JSX\x20tag.\x0a\x0a##\x20Three\x20ways\x20to\x20wire\x20a\x20camera\x0a\x0a`<CeraphCamera\x20/>`\x20(no\x20`imageKey`)\x20—\x20uninitialized.\x20Falls\x20back\x20to\x20a\x0abundled\x201024x1024\x20black\x20PNG\x20that\x20ships\x20with\x20the\x20package,\x20so\x20the\x20screen\x0arenders.\x20The\x20MCP\x27s\x20`ceraph_doctor`\x20lists\x20these\x20as\x20info\x20findings\x20so\x20an\x0aAI\x20assistant\x20can\x20prompt\x20you\x20to\x20make\x20a\x20deliberate\x20choice.\x20Pick\x20from:\x0a\x0a1.\x20`<CeraphCamera\x20imageKey=\x22default\x22\x20/>`\x20—\x20explicit\x20acknowledgment\x20of\x0a\x20\x20\x20the\x20black\x20PNG.\x20Right\x20answer\x20for\x20most\x20form\x20/\x20upload\x20/\x20permission\x0a\x20\x20\x20flows\x20where\x20the\x20image\x20content\x20doesn\x27t\x20matter.\x0a2.\x20`<CeraphCamera\x20imageKey=\x22profile\x22\x20/>`\x20—\x20a\x20specific\x20test\x20image\x20you\x0a\x20\x20\x20provide\x20(this\x20folder).\x20Drop\x20`profile.jpg`\x20(or\x20`.png`\x20/\x20`.webp`\x20/\x0a\x20\x20\x20`.heic`)\x20here.\x20The\x20agent\x20can\x20write\x20the\x20file\x20for\x20you\x20via\x0a\x20\x20\x20`ceraph_add_camera_image`.\x0a3.\x20`<CeraphCamera\x20imageKey=\x22@runtime\x22\x20/>`\x20—\x20runtime\x20control.\x20The\x20flow\x0a\x20\x20\x20planner\x20picks\x20the\x20image\x20per-step\x20at\x20test\x20time.\x20Use\x20when\x20one\x20camera\x0a\x20\x20\x20screen\x20feeds\x20different\x20scenarios\x20across\x20multiple\x20flows.\x0a\x0a##\x20Naming\x0a\x0aLowercase\x20+\x20hyphen-separated,\x20descriptive\x20of\x20what\x20the\x20image\x20represents:\x0a\x0a-\x20`profile.jpg`\x20—\x20face\x20photo\x20for\x20a\x20profile\x20picture\x20screen\x0a-\x20`id-card.png`\x20—\x20government-issued\x20ID\x20for\x20a\x20KYC\x20scan\x20screen\x0a-\x20`product-photo.jpg`\x20—\x20a\x20product\x20image\x20for\x20an\x20upload\x20screen\x0a\x0aSupported\x20extensions:\x20`.jpg`,\x20`.jpeg`,\x20`.png`,\x20`.webp`,\x20`.heic`.\x0aExtension\x20priority\x20on\x20collision:\x20jpg\x20>\x20jpeg\x20>\x20png\x20>\x20webp\x20>\x20heic.\x0a\x0a##\x20Workflow\x0a\x0a1.\x20Drop\x20the\x20image\x20into\x20this\x20folder\x20with\x20the\x20right\x20filename.\x0a2.\x20Reference\x20it\x20on\x20the\x20tag:\x0a\x20\x20\x20```tsx\x0a\x20\x20\x20import\x20{\x20CeraphCamera\x20}\x20from\x20\x22@ceraph/react-native-mcp/shim\x22;\x0a\x20\x20\x20<CeraphCamera\x20imageKey=\x22profile\x22\x20/>\x0a\x20\x20\x20```\x0a3.\x20Regenerate\x20the\x20registry:\x20call\x20the\x20MCP\x20tool\x0a\x20\x20\x20`rn_sync_camera_registry`,\x20or\x20just\x20call\x20`ceraph_doctor`\x20—\x20it\x0a\x20\x20\x20syncs\x20the\x20registry\x20automatically.\x0a4.\x20In\x20`App.tsx`\x20or\x20your\x20root\x20layout\x20(once):\x0a\x20\x20\x20```tsx\x0a\x20\x20\x20import\x20{\x20installCeraph\x20}\x20from\x20\x22@ceraph/react-native-mcp/shim\x22;\x0a\x20\x20\x20useEffect(()\x20=>\x20{\x20installCeraph();\x20},\x20[]);\x0a\x20\x20\x20```\x0a\x20\x20\x20`installCeraph()`\x20loads\x20the\x20generated\x20registry\x20from\x0a\x20\x20\x20`./.ceraph/camera-images/_registry`\x20and\x20wires\x20the\x20deep-link\x0a\x20\x20\x20handlers\x20the\x20flow\x20planner\x20uses.\x0a\x0aCommit\x20these\x20images\x20so\x20flows\x20are\x20reproducible\x20across\x20machines\x20and\x20CI.\x0a','ttlExpiresAt','createdAt','your\x20Pro\x20access\x20refreshes\x20automatically.','toUpperCase','firebase','server-error','screen_type_into_field','rn_list_flows\x20is\x20missing\x20required\x20git\x20helpers.','fallbackText','disableAutoLock','errorCode','.json','probeStatus','O_RDONLY','\x20catalog\x20entries\x20during\x20validation\x20(client\x20build\x20may\x20predate\x20a\x20newer\x20server\x20schema):\x20','waitFor','maxSwipes','lhSAp','PATCH','ffmpeg\x20not\x20required\x20for\x20simulator\x20targets\x20—\x20`xcrun\x20simctl\x20io\x20recordVideo`\x20(shipped\x20with\x20Xcode)\x20handles\x20video\x20capture.','rn_find_flows','githubUser','SIGKILL','ceraph_uninstall_run','url=','ucPIj','workspaces','PUT','--short','unsupported-image-format','boot-request\x20requires\x20`url`','[react-native-mcp]\x20CERAPH_SIGNAL_HOST\x20is\x20unset\x20and\x20no\x20LAN\x20IP\x20was\x20auto-detectable.\x20Real-device\x20shim\x20signals\x20will\x20default\x20to\x20localhost\x20(which\x20the\x20device\x20cannot\x20reach\x20back\x20to\x20the\x20Mac).\x20Set\x20it\x20manually:\x20export\x20CERAPH_SIGNAL_HOST=<your-mac-ip>','[ceraph]\x20','componentControl:\x20stateInference\x20must\x20be\x20a\x20non-empty\x20string','ZflXP','kezKX','Capture\x20a\x20screenshot\x20of\x20the\x20current\x20iOS\x20screen\x20via\x20WebDriverAgent.\x20Returns\x20the\x20PNG\x20as\x20a\x20viewable\x20image.','getClosingElement','iproxy\x20not\x20installed\x20—\x20`brew\x20install\x20libimobiledevice`\x20to\x20enable\x20the\x20USB\x20bridge.','action',').\x20Narrow\x20the\x20scope.','udid','session','@aws-sdk/client-cognito-identity-provider','bootstatus','CERAPH_AUTH_CONNECTION','rn_wda_stop','ENOENT','Verify\x20Settings\x20→\x20Display\x20&\x20Brightness\x20→\x20Auto-Lock\x20is\x20set\x20to\x20Never.\x20Otherwise\x20the\x20phone\x20will\x20sleep\x20mid-flow.','Directory\x20to\x20inspect.\x20Defaults\x20to\x20the\x20MCP\x20server\x27s\x20cwd\x20(usually\x20the\x20user\x27s\x20project\x20root).','column','errors','darwin','podfileLockHash','abs','Run\x20the\x20COMPLETE\x20Ceraph\x20init\x20—\x20identical\x20to\x20`npx\x20@ceraph/react-native-mcp\x20init`.\x20This\x20is\x20the\x20recommended\x20path\x20for\x20agent-driven\x20setup:\x20it\x20runs\x20EVERY\x20phase\x20in\x20one\x20call\x20(MCP-client\x20configs,\x20Claude\x20Code\x20hooks,\x20.gitignore,\x20camera-images\x20dir,\x20<CameraView>\x20scan/replace,\x20installCeraph()\x20boot\x20injection,\x20ceraph://\x20URL\x20scheme,\x20server-side\x20graph\x20seed,\x20and\x20doctor)\x20so\x20you\x20never\x20hand-assemble\x20a\x20partial\x20install\x20from\x20the\x20granular\x20ceraph_init_*\x20tools.\x20Resumable\x20auth\x20gate:\x20with\x20no\x20sign-in\x20and\x20no\x20token\x20it\x20returns\x20{\x20status:\x20\x27needs-auth\x27,\x20verificationUri\x20}\x20and\x20DOES\x20NOT\x20mutate\x20the\x20project\x20—\x20surface\x20the\x20verificationUri\x20to\x20the\x20user,\x20have\x20them\x20sign\x20in\x20and\x20paste\x20the\x20token\x20it\x20issues,\x20then\x20re-call\x20ceraph_init\x20with\x20that\x20value\x20as\x20`token`\x20(persisted\x20directly,\x20no\x20browser\x20opens).\x20Once\x20signed\x20in\x20it\x20returns\x20{\x20status:\x20\x27ready\x27,\x20result\x20}\x20where\x20`result`\x20is\x20the\x20structured\x20per-phase\x20walkthrough\x20outcome.','checkMobilePro','Could\x20not\x20auto-wire\x20the\x20testID\x20injector:\x20','end','Sign\x20in\x20by\x20opening\x20the\x20browser.\x20Spawns\x20a\x20localhost\x20listener,\x20opens\x20ceraph.dev/cli-auth,\x20waits\x20for\x20the\x20issued\x20token,\x20and\x20writes\x20it\x20to\x20~/.ceraph/auth.json.\x20Returns\x20{\x20status:\x20\x27ok\x27,\x20email?\x20}\x20on\x20success,\x20{\x20status:\x20\x27aborted\x27\x20}\x20when\x20the\x20MCP\x20client\x20cancelled\x20the\x20tool\x20call\x20(don\x27t\x20prompt\x20the\x20user\x20—\x20just\x20stop),\x20or\x20{\x20status:\x20\x27error\x27,\x20error\x20}\x20on\x20unexpected\x20failure\x20(including\x20\x27No\x20token\x20provided.\x27\x20when\x20the\x20browser\x20flow\x20times\x20out\x20and\x20the\x20user\x20doesn\x27t\x20paste\x20a\x20token).\x20TOKEN\x20HAND-OFF:\x20when\x20the\x20flow\x20can\x27t\x20complete\x20on\x20this\x20machine\x20(headless,\x20browser\x20on\x20another\x20device,\x20timeout),\x20surface\x20https://ceraph.dev/cli-auth\x20to\x20the\x20user,\x20ask\x20them\x20to\x20paste\x20the\x20token\x20it\x20issues\x20into\x20the\x20chat,\x20then\x20re-call\x20this\x20tool\x20with\x20that\x20value\x20as\x20`token`\x20—\x20it\x20is\x20persisted\x20directly\x20and\x20no\x20browser\x20opens.\x20For\x20a\x20COMPLETE\x20setup\x20(every\x20phase,\x20not\x20just\x20sign-in),\x20prefer\x20`ceraph_init`\x20—\x20it\x20runs\x20this\x20same\x20token\x20hand-off\x20AND\x20the\x20full\x20walkthrough\x20in\x20one\x20call.','toLowerCase','App\x20','babel-config','WRAPPER_EXTENSION','visibilityProp','Decision\x20\x22','ceraph-uninstall-scheme-preview-','fOzwH','Skipped\x20—\x20no\x20bundleId\x20provided.','screen','filesScanned','toFixed','targetResolver','already','testid-config.json','drainAsyncStorageReads','aHAJg','step-','NPwwd','save','buffer','Ordered\x20flow\x20list.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.','CERAPH_DEVICE_WDA_PROJECT','KkIYO','Added\x20ceraph://\x20to\x20your\x20','(warn)','start','fetchImpl','no\x20code\x20signing\x20identit','[ceraph]\x20video\x20recorder\x20start\x20failed\x20for\x20runId=','js-exception','\x27],\x0a\x20\x20};\x0a};\x0a','veYfW','list','Multiple\x20React\x20Native\x20subpackages\x20detected:','https:','no-changes','useEffect','Call\x20rn_wda_start\x20to\x20launch\x20WebDriverAgent\x20on\x20the\x20simulator,\x20then\x20retry\x20(first\x20launch\x20runs\x20a\x20one-time\x20xcodebuild\x20for\x20code\x20signing;\x20later\x20launches\x20reuse\x20the\x20cache).','.bashrc','ZCEQO','Use\x20only\x20[a-z0-9-],\x20no\x20slashes,\x20no\x20`..`,\x20no\x20leading\x20`/`.\x20Example:\x20`id-documents`.','pwAre','ceraph://','screen_tap','authentication\x20canceled','writeErrorFile','JqZUS','VTZoO','readFileUtf8','Optional\x20WiFi\x20SSID\x20the\x20user\x20expects\x20the\x20laptop\x20(and\x20phone)\x20to\x20be\x20on.\x20Mismatch\x20is\x20a\x20warning,\x20not\x20a\x20stop.','verify','fromEntries','settings.local.json','rawIdentifier','.mcp.json','Drop\x20a\x20camera\x20test\x20image\x20into\x20`.ceraph/camera-images/`\x20without\x20the\x20dev\x20having\x20to\x20copy\x20files\x20by\x20hand.\x20Pass\x20`imageBase64`\x20(the\x20bytes\x20—\x20no\x20`data:`\x20prefix\x20needed)\x20plus\x20a\x20lowercase\x20hyphen-separated\x20`imageKey`\x20(e.g.\x20`handwriting-sample-1`).\x20`contentType`\x20is\x20a\x20hint\x20only\x20—\x20the\x20extension\x20is\x20chosen\x20from\x20magic\x20bytes\x20(JPEG/PNG/WebP/HEIC).\x20A\x20collision\x20with\x20an\x20existing\x20imageKey\x20is\x20rejected\x20unless\x20`overwrite:\x20true`\x20is\x20set.\x20After\x20writing,\x20the\x20static\x20`_registry.ts`\x20is\x20regenerated\x20automatically\x20(same\x20step\x20as\x20`rn_sync_camera_registry`).','MMToX','Boot\x20a\x20simulator\x20(open\x20-a\x20Simulator)\x20and\x20retry.','Terminate\x20an\x20iOS\x20app\x20by\x20bundle\x20ID.','\x20(dynamic\x20Expo\x20config)\x20—\x20we\x20can\x27t\x0asafely\x20auto-edit\x20a\x20JS/TS\x20file.\x20Add\x20Ceraph\x27s\x20URL\x20scheme\x20manually:\x0a\x0a\x20\x20export\x20default\x20({\x20config\x20})\x20=>\x20({\x0a\x20\x20\x20\x20...config,\x0a\x20\x20\x20\x20scheme:\x20Array.isArray(config.scheme)\x0a\x20\x20\x20\x20\x20\x20?\x20[...config.scheme,\x20\x22ceraph\x22]\x0a\x20\x20\x20\x20\x20\x20:\x20config.scheme\x0a\x20\x20\x20\x20\x20\x20\x20\x20?\x20[config.scheme,\x20\x22ceraph\x22]\x0a\x20\x20\x20\x20\x20\x20\x20\x20:\x20\x22ceraph\x22,\x0a\x20\x20\x20\x20//\x20...\x20rest\x20of\x20your\x20expo\x20config\x0a\x20\x20});\x0a\x0aThen\x20re-run\x20`expo\x20prebuild\x20--clean`\x20if\x20you\x27ve\x20ejected,\x20or\x20just\x0arestart\x20the\x20dev\x20client.\x0a','https://ceraph.dev/api/catalog/current','Pro\x20·\x20$10/mo\x20—\x20AI\x20flow\x20testing\x20on\x20your\x20real\x20device.\x20Sign\x20in\x20to\x20start.','asahw','paths','processIdentifier','send','\x20—\x20keep-awake\x20shim\x20active.','ceraph_init_select_tier','Selecting\x20Pro\x20isn\x27t\x20the\x20same\x20as\x20being\x20Pro.\x20Complete\x20checkout\x20at\x20','removeListener','List\x20active\x20on-demand\x20managed\x20test\x20users\x20for\x20this\x20project.\x20Excludes\x20JIT\x20users\x20(those\x20live\x20for\x20one\x20chain\x20run\x20only).\x20Pro\x20tier\x20only.','update','HFxFy','registryPath','setRealDeviceHook','antigravity','module.exports\x20=\x20function\x20(api)\x20{\x0a\x20\x20api.cache(true);\x0a\x20\x20return\x20{\x0a\x20\x20\x20\x20presets:\x20[\x27','/orientation','renderPropName','Base\x20ref\x20to\x20diff\x20the\x20working\x20tree\x20against.\x20Ignored\x20when\x20filePaths\x20is\x20supplied.\x20Defaults\x20to\x20the\x20repo\x27s\x20default\x20branch\x20(origin/HEAD,\x20falling\x20back\x20to\x20main,\x20then\x20master).','listBooted','Write\x20the\x20MCP\x20server\x20config\x20block\x20to\x20every\x20supported\x20editor\x27s\x20local\x20config\x20file:\x20.mcp.json\x20(Claude\x20Code),\x20.cursor/mcp.json\x20(Cursor),\x20.codex/config.toml\x20(Codex),\x20.vscode/mcp.json\x20(VS\x20Code).\x20A\x20single\x20react-native-mcp\x20entry\x20(this\x20package)\x20is\x20written\x20per\x20file\x20—\x20it\x20owns\x20the\x20full\x20device-interaction\x20layer\x20(screen\x20taps/swipes,\x20app\x20lifecycle,\x20device\x20control)\x20and\x20talks\x20to\x20WebDriverAgent\x20directly.\x20Also\x20pre-approves\x20the\x20server\x20in\x20Claude\x20Code\x27s\x20project\x20scope\x20(.claude/settings.local.json\x20`enabledMcpjsonServers`)\x20so\x20the\x20ceraph_*\x20tools\x20load\x20without\x20the\x20one-time\x20trust\x20prompt.\x20Returns\x20{\x20written:\x20string[],\x20skipped:\x20string[],\x20preserved:\x20{name,reason}[],\x20claudePreApproval\x20}.\x20Skip\x20=\x20already\x20had\x20the\x20react-native-mcp\x20entry.\x20Preserved\x20=\x20the\x20existing\x20config\x20was\x20malformed\x20JSON\x20or\x20an\x20unexpected\x20shape,\x20so\x20it\x20was\x20left\x20untouched\x20(no\x20overwrite);\x20surface\x20the\x20reason\x20so\x20the\x20user\x20fixes\x20it\x20by\x20hand\x20and\x20re-runs.\x20NOTE:\x20this\x20writes\x20ONLY\x20the\x20MCP-client\x20configs\x20—\x20it\x20does\x20NOT\x20install\x20the\x20Claude\x20hooks\x20or\x20.gitignore\x20entries.\x20For\x20a\x20complete\x20install\x20call\x20`ceraph_init`;\x20use\x20this\x20tool\x20standalone\x20only\x20to\x20(re)write\x20a\x20single\x20client\x27s\x20config.','IpeKU','bound','\x20→\x20<CeraphCamera\x20/>','hyMmo','redbox','ttlEx','vzWXx','floor','readyResolve','Target:\x20unknown\x20(resolver\x20failed).\x20Falling\x20back\x20to\x20device\x20defaults.','resolveBranch','Ijfab','setOrientation','Report\x20which\x20iOS\x20target\x20is\x20currently\x20selected\x20(device\x20vs\x20simulator),\x20the\x20resolved\x20WDA\x20base\x20URL,\x20whether\x20a\x20simulator\x20WDA\x20session\x20is\x20running,\x20and\x20the\x20CERAPH_TARGET\x20env\x20preference.\x20Call\x20this\x20when\x20the\x20developer\x20asks\x20`am\x20I\x20testing\x20on\x20device\x20or\x20simulator?`\x20or\x20before\x20starting\x20a\x20flow\x20if\x20uncertain\x20which\x20transport\x20is\x20active.','Button','ceraph_init_replace_camera','child','Invariant\x20Violation:\x20','captureInitialObservation','auth_wall','ceraph-uninstall-shell-preview-','\x20userMarker=','probeResponseUiDivergence','stateVersion','WDA\x20pressButton\x20failed:\x20','Chain\x20run\x20is\x20busy\x20advancing\x20a\x20prior\x20call.\x20Wait\x20for\x20the\x20in-flight\x20response\x20before\x20issuing\x20another\x20rn_test_chain_continue.','SDRzj','getLineAndColumnAtPos','argv','No\x20real\x20iOS\x20device\x20connected.\x20Connect\x20a\x20device\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac.','AvtLk','ms:\x20','flows','currentBaseUrl','purgeRun','\x27\x20is\x20longer\x20than\x2064\x20characters.','removed','resolve','ceraph_init_register_scheme','ZtMXx','tag','runs','expo-camera','matchedSignal','Per-edge\x20bridge\x20steps.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.','needsBuild','VFQYc','ios/Podfile.lock\x20has\x20changed\x20since\x20last\x20build.\x20Pod\x20dependencies\x20may\x20be\x20out\x20of\x20sync.','remediation','install','volumeup','removedKeys','openMethod','removed-entries','selectCommand','ySeTL','No\x20previous\x20build\x20snapshot\x20found.\x20Run\x20a\x20build\x20to\x20establish\x20a\x20baseline.\x20A\x20clean\x20prebuild\x20is\x20recommended\x20for\x20the\x20first\x20build.','invalid-base64','ceraph_test_data_cleanup\x20failed:\x20','The\x20first\x20simulator\x20WebDriverAgent\x20build\x20is\x20cold\x20and\x20can\x20take\x20a\x20few\x20minutes;\x20the\x20compiled\x20output\x20is\x20cached,\x20so\x20just\x20call\x20ceraph_start\x20again\x20—\x20the\x20next\x20build\x20is\x20incremental.','/wda/keys','rn_test_flows','readEnv','\x20(before\x20reanimated)','texjY','Apytx','isImportSpecifier','unknown\x20revision','Unknown\x20error\x20during\x20tap','Not\x20an\x20Expo\x20project.\x20Prebuild\x20detection\x20is\x20Expo-only.','[mcp_servers.react-native-mcp]','?intent=pro','8251wroLKH','network-error','aborted','WebDriverAgent\x20could\x20not\x20start\x20—\x20','reverted','screenshotReason','\x22\x20—\x20attempting\x20JIT\x20recovery\x0a','walkthrough','\x27\x20already\x20maps\x20to\x20','metroProcess','-derivedDataPath','api-error','\x0a[mcp_servers.react-native-mcp]\x0acommand\x20=\x20\x22npx\x22\x0aargs\x20=\x20[\x22-y\x22,\x20\x22@ceraph/react-native-mcp@latest\x22]\x0a','details','single','required-env-vars','webp','rename','\x0aSelecting\x20Pro\x20isn\x27t\x20the\x20same\x20as\x20being\x20Pro\x20—\x20AI\x20flow\x20testing\x20unlocks\x20once\x0acheckout\x20completes.\x20Re-run\x20init\x20in\x20a\x20terminal\x20(or\x20use\x20the\x0aceraph_init_select_tier\x20tool)\x20to\x20finish\x20sign-in.\x0a','/wda/tap/0','163595FyHknF','results','React\x20Native\x20/\x20Expo\x20development\x20workflow\x20tools.\x20Auto-detects\x20project\x20type.\x0a\x0aWHICH\x20TOOLS\x20TO\x20USE:\x0a•\x20User\x20wants\x20their\x20code\x20changes\x20verified,\x20specific\x20flows\x20run,\x20or\x20comprehensive\x20coverage\x20→\x20use\x20the\x20autonomous\x20flow\x20tools:\x20rn_list_flows\x20previews\x20which\x20flows\x20a\x20diff\x20or\x20file\x20set\x20affects,\x20rn_find_flows\x20searches\x20every\x20flow\x20app-wide\x20by\x20natural\x20language,\x20rn_test_flows\x20executes\x20selected\x20flowIds.\x20These\x20execute\x20Ceraph\x27s\x20server-planned\x20flows,\x20which\x20exhaustively\x20exercise\x20the\x20distinct\x20UI\x20outcomes\x20reachable\x20from\x20the\x20changed\x20code.\x20Per-step\x20screenshots\x20and\x20runtime\x20errors\x20surface\x20in\x20the\x20result.\x20Do\x20NOT\x20try\x20to\x20modify\x20or\x20reorder\x20the\x20returned\x20plan\x20—\x20it\x20is\x20owned\x20by\x20the\x20server.\x0a•\x20User\x20wants\x20a\x20specific\x20custom\x20scenario\x20(e.g.\x20\x27test\x20signup\x20with\x20email\x20X\x27,\x20\x27tap\x20the\x20Premium\x20plan\x20and\x20verify\x20checkout\x20opens\x27,\x20\x27reproduce\x20the\x20bug\x20where\x20tapping\x20save\x20crashes\x20the\x20app\x27)\x20→\x20compose\x20screen_*\x20and\x20app_*\x20primitives\x20directly.\x20You\x20plan\x20the\x20steps\x20yourself;\x20Ceraph\x20just\x20drives\x20WebDriverAgent.\x20Use\x20screen_screenshot\x20between\x20actions\x20to\x20observe\x20state\x20and\x20decide\x20the\x20next\x20step.\x20This\x20path\x20is\x20intentionally\x20lower-fidelity\x20than\x20the\x20autonomous\x20flow\x20tools\x20and\x20does\x20not\x20produce\x20coverage\x20guarantees\x20—\x20it\x20is\x20for\x20ad-hoc\x20requests\x20the\x20user\x20explicitly\x20directed.\x0a\x0aTOOL\x20SELECTION\x20FOR\x20AUTONOMOUS\x20FLOW\x20TOOLS:\x0a\x20\x20-\x20\x27Test\x20my\x20changes\x27\x20/\x20comprehensive\x20verification\x20→\x20rn_list_flows\x20(diff\x20scope),\x20then\x20rn_test_flows\x20with\x20EVERY\x20returned\x20flowId.\x0a\x20\x20-\x20User\x20scoped\x20to\x20specific\x20files\x20→\x20rn_list_flows\x20with\x20filePaths,\x20then\x20rn_test_flows.\x0a\x20\x20-\x20User\x20wants\x20a\x20focused\x20subset\x20(\x27just\x20test\x20the\x20X\x20flow\x27,\x20\x27show\x20me\x20what\x20would\x20run\x27)\x20→\x20rn_list_flows,\x20pick\x20the\x20relevant\x20rows,\x20then\x20rn_test_flows\x20with\x20those\x20flowIds.\x0a\x20\x20-\x20User\x20describes\x20flows\x20in\x20natural\x20language\x20without\x20a\x20diff\x20scope\x20(\x27test\x20login\x27,\x20\x27run\x20the\x20checkout\x20flows\x27)\x20→\x20rn_find_flows\x20(app-wide\x20search),\x20then\x20rn_test_flows.\x0a\x20\x20-\x20\x27Test\x20PR\x20#N\x27\x20/\x20\x27verify\x20this\x20pull\x20request\x27\x20→\x20there\x20is\x20NO\x20PR\x20tool\x20by\x20design.\x20Check\x20out\x20the\x20PR\x20(a\x20GitHub\x20MCP\x20server\x20if\x20connected,\x20else\x20`gh\x20pr\x20checkout\x20N`),\x20then\x20REBUILD\x20+\x20relaunch\x20so\x20the\x20device\x20runs\x20the\x20PR\x27s\x20code\x20(rn_build_ios\x20+\x20rn_start\x20—\x20a\x20native\x20or\x20dependency\x20change\x20will\x20NOT\x20hot-reload),\x20then\x20rn_list_flows({base:\x20\x27<pr-target-branch>\x27})\x20→\x20rn_test_flows\x20with\x20the\x20returned\x20flowIds.\x20Post\x20the\x20pass/fail\x20summary\x20back\x20as\x20a\x20PR\x20comment\x20via\x20the\x20GitHub\x20MCP\x20if\x20the\x20user\x20wants\x20it.\x0aPreview\x20rows\x20are\x20a\x20menu\x20—\x20their\x20order\x20carries\x20no\x20meaning,\x20and\x20rn_test_flows\x20ignores\x20the\x20order\x20of\x20the\x20flowIds\x20you\x20pass:\x20the\x20server\x20orders\x20execution\x20by\x20planner\x20priority\x20and\x20chain\x20grouping.\x0a\x0aSTARTUP\x20FLOW\x20WHEN\x20NO\x20TARGET\x20IS\x20AVAILABLE:\x0a\x20\x20-\x20Both\x20real\x20iOS\x20devices\x20and\x20the\x20iOS\x20Simulator\x20are\x20supported.\x20For\x20a\x20booted\x20simulator\x20(with\x20the\x20optional\x20appium-webdriveragent\x20dep\x20installed),\x20call\x20rn_wda_start\x20to\x20launch\x20WebDriverAgent\x20against\x20it;\x20with\x20no\x20real\x20device\x20connected,\x20subsequent\x20screen_*/app_*\x20calls\x20route\x20to\x20the\x20simulator\x20automatically.\x20If\x20a\x20real\x20device\x20is\x20ALSO\x20connected,\x20auto-detection\x20(CERAPH_TARGET=auto,\x20the\x20default)\x20prefers\x20the\x20device\x20—\x20tell\x20the\x20user\x20to\x20set\x20CERAPH_TARGET=simulator\x20in\x20the\x20MCP\x20process\x20environment\x20to\x20force\x20simulator\x20routing.\x0a\x20\x20-\x20For\x20a\x20real\x20device,\x20tell\x20the\x20user\x20to\x20plug\x20their\x20iPhone\x20in\x20via\x20USB-C,\x20then\x20call\x20rn_wait_for_device\x20(event-driven\x20via\x20usbmuxd,\x20no\x20timeout).\x20The\x20original\x20tool\x20can\x20be\x20re-run\x20as\x20soon\x20as\x20it\x20returns\x20success.\x0a\x20\x20-\x20WebDriverAgent\x20must\x20already\x20be\x20installed\x20on\x20the\x20device.\x20If\x20doctor\x20reports\x20WDA\x20unreachable,\x20the\x20user\x20opens\x20Xcode\x20→\x20WebDriverAgentRunner\x20and\x20presses\x20Run\x20once;\x20subsequent\x20sessions\x20reuse\x20that\x20build.\x0a\x0aAutonomous\x20flow\x20tools\x20(server-planned):\x20rn_list_flows,\x20rn_find_flows,\x20rn_test_flows.\x0aWDA-direct\x20primitives\x20(you\x20orchestrate):\x20app_launch/terminate/activate,\x20screen_tap,\x20screen_tap_and_verify,\x20screen_swipe,\x20screen_scroll_to,\x20screen_long_press,\x20screen_type_into_field,\x20screen_press_key,\x20screen_open_url,\x20screen_screenshot,\x20screen_wait_for,\x20screen_tap_chain.\x0a\x0aAuth\x20via\x20`npx\x20@ceraph/react-native-mcp\x20init`.\x20Build\x20with\x20rn_build_ios,\x20run\x20Metro\x20with\x20rn_start,\x20inspect\x20errors\x20with\x20rn_get_errors,\x20check\x20rn_check_prebuild\x20when\x20native\x20deps\x20change\x20(Expo\x20only).\x0a\x0aCAMERA\x20SETUP\x20ON\x20FIRST\x20INVOCATION:\x0aAfter\x20init\x20completes,\x20`ceraph_doctor`\x20may\x20report\x20a\x20`camera-imageKey-setup`\x20info\x20finding\x20listing\x20one\x20or\x20more\x20<CeraphCamera\x20/>\x20components\x20that\x20still\x20need\x20a\x20deliberate\x20imageKey\x20choice\x20(init\x20replaces\x20tags\x20WITHOUT\x20inserting\x20an\x20imageKey\x20—\x20the\x20bundled\x20black\x20PNG\x20keeps\x20the\x20app\x20working\x20until\x20the\x20developer\x20decides).\x20When\x20you\x20see\x20this\x20finding,\x20hold\x20a\x20one-shot\x20conversation\x20with\x20the\x20user\x20covering\x20each\x20camera.\x20Three\x20options\x20per\x20camera:\x0a\x20\x20(A)\x20Black\x20default\x20(most\x20test\x20flows\x20don\x27t\x20care\x20about\x20image\x20content):\x20ceraph_init_replace_camera\x20with\x20imageKey=\x22default\x22.\x0a\x20\x20(B)\x20A\x20specific\x20test\x20image:\x20ask\x20the\x20user\x20for\x20a\x20descriptive\x20lowercase-dashes\x20name\x20(e.g.\x20\x22profile\x22,\x20\x22id-card\x22,\x20\x22product-photo\x22),\x20then\x20write\x20the\x20file\x20via\x20ceraph_add_camera_image\x20(the\x20user\x20can\x20paste\x20base64\x20or\x20drop\x20the\x20file\x20in\x20.ceraph/camera-images/<key>.{jpg,png,webp}\x20by\x20hand).\x20Call\x20rn_sync_camera_registry\x20after\x20manual\x20file\x20drops;\x20ceraph_add_camera_image\x20auto-syncs.\x20Then\x20ceraph_init_replace_camera\x20with\x20the\x20chosen\x20key.\x0a\x20\x20(C)\x20Multi-image\x20per\x20flow\x20(the\x20camera\x20serves\x20different\x20scenarios\x20across\x20flows;\x20the\x20planner\x20picks\x20the\x20image\x20per\x20step\x20at\x20runtime):\x20ceraph_init_replace_camera\x20with\x20imageKey=\x22@runtime\x22.\x0aOnce\x20every\x20camera\x20has\x20an\x20explicit\x20imageKey\x20the\x20doctor\x20finding\x20stops\x20appearing.\x20Run\x20`ceraph_doctor`\x20again\x20to\x20confirm.\x0a\x0aDOCTOR\x20BEHAVIOR:\x0a•\x20Test/run\x20tools\x20(rn_test_flows,\x20rn_test_chain_start)\x20auto-run\x20doctor\x20on\x20first\x20invocation\x20and\x20cache\x20the\x20result\x20for\x20the\x20MCP\x20session.\x0a•\x20rn_test_chain_continue\x20ALWAYS\x20re-runs\x20doctor\x20(no\x20cache)\x20because\x20the\x20chain\x20may\x20have\x20been\x20paused\x20for\x20minutes\x20at\x20a\x20snap\x20point\x20—\x20device\x20could\x20have\x20locked\x20or\x20disconnected\x20during\x20the\x20wait.\x0a•\x20If\x20doctor\x20has\x20errors,\x20the\x20test\x20tool\x20refuses\x20to\x20execute\x20and\x20returns\x20`{\x20status:\x20\x22doctor-failed\x22,\x20errors:\x20[...]\x20}`.\x20Fix\x20the\x20errors\x20and\x20retry\x20—\x20doctor\x20re-runs\x20automatically\x20after\x20any\x20failure\x20(passing\x20results\x20are\x20cached,\x20failing\x20ones\x20are\x20not).\x0a•\x20Actionable\x20non-error\x20findings\x20are\x20surfaced\x20as\x20`doctorAdvisories`\x20on\x20gated\x20tool\x20responses:\x20failed\x20warnings\x20(e.g.\x20wrong\x20WiFi)\x20and\x20info\x20findings\x20that\x20carry\x20a\x20remediation\x20(e.g.\x20camera-imageKey-setup).\x20Passing\x20status\x20stamps\x20without\x20a\x20remediation\x20are\x20filtered\x20out\x20to\x20keep\x20responses\x20lean.\x20Act\x20on\x20advisories\x20the\x20first\x20time\x20you\x20see\x20them.\x0a•\x20An\x20explicit\x20`ceraph_doctor`\x20call\x20always\x20re-runs\x20and\x20refreshes\x20the\x20cache,\x20so\x20it\x20doubles\x20as\x20a\x20manual\x20revalidation\x20hook.','pathname','trim','screenshotsAvailable','latestTestIdSentinel','yarn.lock','statusCode','findAndTapReturningTree','XoPpp','\x20[Y/n]\x20','valueHash','awake','provisionJit','isMonorepo','/rn-list-flows','8596464SWgNQW','unable\x20to\x20find\x20a\x20device\x20matching','\x20is\x20','block','ingest','eLWTF','foregroundApp','devicectl\x20info\x20apps\x20failed:\x20','Delete\x20on-demand\x20managed\x20test\x20users.\x20Pass\x20`id`\x20to\x20remove\x20one\x20user\x20or\x20`all:\x20true`\x20to\x20wipe\x20every\x20on-demand\x20user\x20for\x20this\x20project.\x20Local\x20records\x20are\x20removed\x20even\x20if\x20the\x20provider-side\x20delete\x20fails\x20(clean\x20up\x20via\x20the\x20provider\x27s\x20dashboard\x20if\x20needed).\x20Pro\x20tier\x20only.','getSource','mcpServers','Swipe\x20on\x20the\x20iOS\x20device\x20screen.\x20Direction\x20is\x20up/down/left/right;\x20optional\x20from-point\x20and\x20distance\x20default\x20to\x20a\x20center-screen\x20swipe\x20of\x20~60%\x20of\x20the\x20relevant\x20axis.\x20Coordinates\x20are\x20device-space\x20by\x20default;\x20pass\x20coordinateSource:\x20\x27screenshot\x27\x20if\x20`from`\x20came\x20from\x20a\x20screenshot.','Qxrag','Return\x20recent\x20console\x20output\x20from\x20Metro\x20dev\x20server,\x20optionally\x20filtered\x20by\x20log\x20level.','.git','timestamp','GET','responseBody','getSimulatorWdaUdid','.mjs','getVideoStartError','KxaBM','The\x20imageKey\x20to\x20use.\x20Either\x20\x22default\x22\x20(bundled\x20black\x20PNG),\x20a\x20user-defined\x20lowercase-dashes\x20key\x20matching\x20.ceraph/camera-images/<key>.{jpg,png,webp},\x20or\x20\x22@runtime\x22\x20/\x20any\x20\x22@\x22-prefixed\x20sentinel\x20for\x20runtime-controlled\x20selection.','exit','_name','previousScheme','--device','\x20is\x20not\x20installed\x20on\x20the\x20device.','file://','App\x20did\x20not\x20respond\x20on\x20WDA\x20within\x20','ceraph_start','ACQsC','alreadyHasImageKey','warning','disableHeartbeat','Resize\x20or\x20recompress\x20the\x20image\x20before\x20uploading.\x20Test\x20fixtures\x20rarely\x20need\x20to\x20be\x20larger\x20than\x201\x20MB\x20—\x20over-large\x20fixtures\x20inflate\x20the\x20repo\x20and\x20slow\x20Metro\x20bundling.\x20Cap:\x205\x20MB.','async-storage-read','tier','derivedDataPath','\x20not\x20visible','Build\x20Failed','importRestored','Env\x20var\x20names\x20the\x20planned\x20flows\x20reference.\x20Each\x20must\x20be\x20set\x20+\x20non-empty.','bun.lockb','failedAt','kUhBb','Simulator\x20UDID\x20unavailable\x20—\x20call\x20`rn_wda_start`\x20to\x20bind\x20a\x20simulator\x20before\x20starting\x20a\x20chain\x20so\x20the\x20recorder\x20can\x20address\x20it\x20explicitly.\x20Using\x20`booted`\x20is\x20unsafe\x20with\x20multiple\x20booted\x20simulators.','image/heic','metroOutput','XuicZ','expo-router','camera-imageKey-setup','getStatements','appName','The\x20plan\x20the\x20user\x20chose.\x20Omit\x20on\x20the\x20first\x20call\x20to\x20receive\x20the\x20two\x20options\x20to\x20surface.','Wait\x20for\x20an\x20iPhone\x20to\x20be\x20connected\x20via\x20USB-C.\x20Uses\x20macOS\x27s\x20usbmuxd\x20daemon\x20for\x20sub-second\x20event-driven\x20detection\x20(no\x20polling).\x20Waits\x20indefinitely\x20until\x20either\x20a\x20device\x20connects\x20or\x20the\x20agent\x20aborts\x20the\x20call.\x20Use\x20this\x20after\x20telling\x20the\x20user\x20\x27please\x20plug\x20in\x20your\x20iPhone\x27\x20—\x20the\x20call\x20resolves\x20immediately\x20when\x20they\x20do,\x20with\x20zero\x20detection\x20lag.','Supabase\x20createUser\x20failed:\x20','persisted','Connect\x20the\x20iPhone\x20via\x20USB-C,\x20trust\x20this\x20Mac,\x20enable\x20Developer\x20Mode,\x20then\x20call\x20ceraph_start\x20again.','ternary-with--1','concat','unknown','hasStarted','No\x20element\x20found\x20for\x20query\x20at\x20index\x20','Device\x20','ls-files','deleteAsyncStorageKeys','once','peerDependencies','152MSqMfB','unlock','simctl\x20launch\x20failed:\x20','gatingExpression','reload-not-needed','.\x20Open\x20Xcode,\x20run\x20the\x20WebDriverAgentRunner\x20target\x20on\x20your\x20connected\x20iPhone\x20once,\x20then\x20try\x20again\x20on\x20real\x20devices.\x20Simulator\x20support\x20is\x20available\x20via\x20rn_wda_start.','WDA\x20activeAppInfo\x20failed:\x20','/wda/unlock','handle','Open\x20~/.mobile-mcp/WebDriverAgent/WebDriverAgent.xcodeproj\x20in\x20Xcode,\x20select\x20the\x20WebDriverAgentRunner\x20target\x20→\x20Signing\x20&\x20Capabilities,\x20set\x20a\x20Development\x20Team,\x20and\x20run\x20it\x20once\x20on\x20the\x20iPhone\x20to\x20sign\x20+\x20cache\x20the\x20build.\x20Then\x20retry.','runPrebuildClean','.webp','terminateApp','manual','dev-settings-reload','ios','bootBufferBytes','Enable\x20it\x20on\x20the\x20iPhone:\x20Settings\x20→\x20Privacy\x20&\x20Security\x20→\x20Developer\x20Mode\x20→\x20On,\x20restart\x20the\x20device,\x20then\x20retry.','@react-native','getSimulatorWdaPort','Detected\x20bare\x20React\x20Native\x20project\x20(ios/\x20and/or\x20android/).','adapter','success','onDialog','TIEIn','Ensure\x20WebDriverAgent\x20is\x20running\x20on\x20the\x20device\x20(Xcode\x20→\x20run\x20WDA\x20target\x20on\x20your\x20iPhone,\x20or\x20check\x20`iproxy\x208100\x208100`).','swipes','positive','jHVsn','portrait','Pass\x20a\x20non-empty\x20`imageKey`\x20like\x20`\x22profile\x22`\x20or\x20`\x22handwriting-sample-1\x22`.','--udid','Skipped\x20—\x20iproxy\x20auto-bridge\x20not\x20applicable\x20to\x20simulator\x20targets.','started','dcEPm','FaMfn','rVnYa','existing\x20settings\x20at\x20','UOWrx','skipped-needs-confirmation','devices','unEWq','\x20top-level\x20is\x20not\x20a\x20JSON\x20object\x20—\x20preserving\x20it.','store','suggestedKey','Text\x20to\x20type\x20into\x20the\x20focused\x20field.','Which\x20one\x20should\x20init\x20configure?','Antigravity','@react-native/babel-preset','FzFwN','responseValue=','buildFlowReport','kill','FzOJn','screen_swipe','\x20-D\x20appium-webdriveragent`,\x20then\x20retry.','symbolic-ref','pendingCommandAcks','metro','unspecified\x20failure','Reconnect\x20the\x20iPhone\x20via\x20USB-C,\x20unlock\x20and\x20trust\x20this\x20Mac,\x20then\x20retry.','realpath','forEachDescendant','WDA\x20keys\x20(backspace)\x20failed:\x20','PZbaU','env-override-simulator','Run\x20prebuild\x20--clean\x20before\x20building\x20(Expo\x20only)','Bearer\x20token\x20the\x20user\x20pasted\x20after\x20signing\x20in\x20at\x20the\x20verificationUri\x20(issued\x20by\x20ceraph.dev/cli-auth).\x20When\x20set,\x20it\x20is\x20persisted\x20to\x20~/.ceraph/auth.json\x20and\x20the\x20full\x20init\x20runs\x20in\x20the\x20same\x20call.','tapCoords','projectUrl','error-banner','fileHash','processes','getCurrentBranch','sack-','Project\x20cached\x20server-side:\x20','ESEqR','missingRequiredEnv','getExpression','currentErrorMessage','MessageType','buildErrorResponse','Starter\x20selected\x20—\x20local\x20build,\x20run,\x20and\x20device\x20tools.\x20No\x20sign-in\x20needed.','getStart','XVxNh','componentControl','detectPackageManager','getifaddr','WebDriverAgent-','findIndex','node_modules','withLock','close','componentName','freeze','timestampMs','handleForTesting','idb\x20launch\x20failed:\x20','accumulatedBootDrains','.ceraph/last-build-snapshot.json','OnckJ','Hook\x20script:\x20.claude/hooks/rn-error-notify.sh\x20✓','ceraph_purge_runs','setTestDataManager','getLiteralText','\x20is\x20held\x20by\x20another\x20process\x20—\x20usually\x20a\x20second\x20Ceraph\x20MCP\x20(a\x20different\x20project,\x20or\x20a\x20stale/orphaned\x20session),\x20but\x20possibly\x20an\x20unrelated\x20server.\x20This\x20Ceraph\x20server\x20runs\x20with\x20all\x20tools,\x20but\x20it\x20doesn\x27t\x20own\x20the\x20device-signal\x20listener:\x20runtime-error\x20capture\x20reaches\x20this\x20session\x20only\x20if\x20the\x20holder\x20is\x20a\x20Ceraph\x20instance\x20on\x20the\x20SAME\x20project\x20(shared\x20.rn-errors.json)\x20—\x20otherwise\x20errors\x20won\x27t\x20appear\x20here.\x20Free\x20the\x20port\x20(lsof\x20-nP\x20-iTCP:','Signed\x20in\x20as\x20','firebase-admin','babelConfigHash','network-failure','3BPyinu','platform','qUhfH','Simulator\x20booted\x20(','SIGTERM','hwVnl','outcome','detectProjectType','addArgument','wda-reachable','int','-hide_banner','No\x20managed\x20processes\x20were\x20running.','Unknown\x20error\x20during\x20screenshot','detectMonorepo','missing-dir','autonomy','ELOOP','hasCoverSheet','.jsx','accessToken','Failed\x20to\x20get\x20element\x20tree:\x20','bytes','XqASp','permissionKind','evictExpired','Unknown\x20error\x20during\x20unlock','projectPath','removedUseEffect','samples','startsWith','setAppLifecycle','invalid\x20state','closeMethod','ts-morph','readyPromise','isListening','::1','chain.mp4','prev=','Firebase\x20deleteUser\x20failed:\x20','toRoute','.vscode','fileExists','bootCaptureTail','View','.ceraph/runs/','componentHook:\x20stateInference\x20must\x20be\x20a\x20non-empty\x20string','Device\x20is\x20awake\x20(lockState:\x20','.expo','No\x20correction\x20(device\x20coordinates)','continue','absolutePath','To\x20add\x20AI\x20flow\x20testing\x20on\x20your\x20real\x20device,\x20re-run\x20init\x20and\x20pick\x20Pro.','scope-regression','currentKind','vmAVs','route','severity','network-4xx','matches','permissionInterceptor','.\x20These\x20names\x20do\x20not\x20match\x20any\x20flow\x20in\x20chain.flows[].name.\x20Diff-affected\x20screenshot\x20capture\x20will\x20only\x20fire\x20for\x20matching\x20names.\x0a','wTEZH','optional','runDoctor','Wired\x20the\x20testID\x20injector\x20into\x20','Boot\x20revert\x20returned\x20an\x20unrecognised\x20status\x20shape.','summary','otherStatements','TwoSpaces','currentEpoch','the\x20device\x20canceled\x20the\x20WebDriverAgent\x20UI-test\x20authentication','-destination','fetcher','signal','Could\x20not\x20dispatch\x20reload\x20deep\x20link:\x20','hasReceivedDeviceContact','houvB','stateInference','jitUser','cotgZ','listDir','tick','ceraph://storage?op=delete&keys=','--name-only','setOnSignal','Divided\x20by\x20','setAdapter','expo-config-needs-manual','hashFile','pressKey','unchanged','users','RYaIx','Poll\x20the\x20WDA\x20source\x20tree\x20until\x20an\x20element\x20matching\x20the\x20query\x20is\x20visible\x20(or,\x20if\x20disappear\x20is\x20true,\x20until\x20it\x20vanishes).\x20Default\x20timeout\x20is\x205s.','.\x20If\x20you\x20no\x20longer\x20need\x20the\x20customized\x20version,\x20delete\x20the\x20file\x20manually.\x20Settings\x20entries\x20pointing\x20at\x20the\x20script(s)\x20','Per-flow\x20mutex-partner\x20flow\x20names.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.','snap_point_pending','affectedDisplaySelector','.jpeg','matchCount','loadSnapshot','data','stdout','DHHcK','existing\x20mcpServers\x20in\x20','cachedAt','expandedSteps','slice','status=','iproxy\x20bridge\x20already\x20running\x20(external).','101633BYjGkd','info','recreate','SecureText','jpg','\x20MB.\x20Test\x20fixtures\x20typically\x20fit\x20under\x201\x20MB;\x20consider\x20downsampling\x20if\x20it\x27s\x20larger\x20than\x20the\x20camera\x20screen\x20needs.','flow\x20must\x20be\x20a\x20non-empty\x20string.','@clerk/backend','No\x20token\x20provided.','rn_sync_camera_registry','`\x20failed\x20to\x20run:\x20','unexpected_state','starter','`xcodebuild`\x20not\x20found\x20on\x20PATH.\x20Install\x20Xcode\x20(full\x20app,\x20not\x20just\x20Command\x20Line\x20Tools)\x20and\x20accept\x20the\x20license:\x20`sudo\x20xcodebuild\x20-license\x20accept`.','DGjQN','`xcodebuild\x20test`\x20exited\x20before\x20WebDriverAgent\x27s\x20HTTP\x20server\x20answered\x20on\x20:8100.\x20Most\x20common\x20cause:\x20the\x20WebDriverAgentRunner\x20target\x20has\x20no\x20valid\x20signing\x20for\x20this\x20device,\x20or\x20the\x20device\x20is\x20asleep/locked\x20(unlock\x20it\x20and\x20retry).\x20Open\x20the\x20project\x20in\x20Xcode,\x20set\x20a\x20Development\x20Team\x20on\x20the\x20WebDriverAgentRunner\x20target,\x20run\x20it\x20once\x20on\x20the\x20iPhone\x20to\x20sign\x20+\x20cache\x20the\x20build,\x20then\x20retry.','warnings','SRNAd','Unknown\x20error\x20during\x20pressKey','Allow\x20Once','Another\x20process\x20holds\x20the\x20device-signal\x20port\x20(:8101),\x20so\x20Ceraph\x27s\x20command\x20channel\x20is\x20unavailable\x20in\x20this\x20session,\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20','jAKCF','\x20require(\x22','deps','.js','probePermission','getKind','CYLjE','app','componentHook:\x20returns.openMethod\x20must\x20be\x20a\x20non-empty\x20string','WebDriverAgent\x20has\x20no\x20valid\x20signing\x20for\x20this\x20device','App.tsx','xcodebuild','getInitializer','saveSnapshot','PRODUCT_BUNDLE_IDENTIFIER','AIUpS','verifyMutation:\x20','edits','path:','resolveRepo','placeholder','stderrBuffer','\x20check','@ceraph/react-native-mcp@latest','getConsole','errorFilePath','run.json','dpmNi','appium-webdriveragent/package.json','kKOTD','\x20file(s)','[ceraph]\x20JIT\x20provision\x20failed:\x20','isNoSubstitutionTemplateLiteral','connection','hasAdapter','hevx','ksrsB','src','totalDurationMs','addImportDeclaration','gatingProp','diff','clientId','bkwOm','ManagementClient','no-git-repo','udidResolvedAt','sessionId','gitignore','rDjWo','mobile-mcp','providerId','\x20in\x20package.json.\x20Run:\x20npm\x20install\x20','31097woMBSK','scriptAbsPath','No\x20iOS\x20target\x20detected.\x20For\x20a\x20real\x20device:\x20tell\x20the\x20user\x20to\x20plug\x20in\x20their\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac,\x20then\x20call\x20`rn_wait_for_device`\x20(listens\x20on\x20macOS\x27s\x20usbmuxd\x20daemon\x20for\x20sub-second\x20event-driven\x20detection\x20—\x20no\x20polling,\x20no\x20timeout).\x20For\x20a\x20simulator:\x20boot\x20one\x20(Simulator.app\x20or\x20`xcrun\x20simctl\x20boot\x20<udid>`)\x20and\x20call\x20`rn_wda_start`\x20to\x20target\x20it.','stopVideoRecording','Launch\x20an\x20iOS\x20app\x20by\x20bundle\x20ID\x20on\x20a\x20connected\x20real\x20device\x20(preferred)\x20or\x20the\x20booted\x20simulator\x20(fallback).\x20Terminates\x20any\x20existing\x20instance\x20first\x20via\x20devicectl\x20--terminate-existing.','cfYSm','finally','main','Picked\x20index\x20out\x20of\x20range.','lastTouchedMs','title','added','expectedSelectors','Failed\x20to\x20create\x20output\x20directory:\x20','run','pendingStorageAckResolver','FQuWL','whichFn','checkIdb','cwd','spawnFn','\x20additional\x20screenshot','errorSignature','uBnBG','getLockState','Element\x20not\x20visible\x20after\x20','login','isJsxAttribute','Boot\x20revert\x20raised.\x20Check\x20the\x20layout\x20file\x20for\x20syntax\x20errors\x20before\x20re-running.','\x20failed.','account-invalid','screenshotBase64','[::ffff:7f00:1]','nodeId','matched','MCP\x20configuration:','localhost','GwtMS','expo-config','hxrvH','FileChanged','Another\x20chain\x20(runId=','No\x20bare\x20<CameraView>\x20usages\x20from\x20expo-camera\x20found\x20in\x20app/src/screens.','camera-images','xeCer','\x20to\x20activate\x20AI\x20flow\x20testing.\x20Once\x20payment\x20is\x20done,\x20re-call\x20this\x20tool\x20—\x20Pro\x20access\x20refreshes\x20automatically.','runStep','screen_press_key','No\x20<CeraphCamera>\x20components\x20detected.\x20No\x20camera-setup\x20conversation\x20needed;\x20proceed\x20with\x20the\x20rest\x20of\x20the\x20project\x20work.','.rn-flow-progress.json','bootCaptureMode','Supabase\x20createUser\x20returned\x20no\x20user.','image/','SPUSBDataType','\x20required\x20env\x20var(s)\x20present.','runDir','buildOutput','errorMessage','reveal','ceraph_init_scan_camera','FrAZl','heix','element','[react-native-mcp]\x20Reclaimed\x20the\x20device-signal\x20port\x20—\x20listener\x20now\x20active.','oFwTt','Could\x20not\x20reach\x20the\x20Ceraph\x20server\x20(request\x20timed\x20out\x20after\x20','packages','simctl','killed','utf-8','removedIp','Allow\x20While\x20Using\x20App','visible','readinessPollMs','DIzXj','bootDebounceMs','searchElements','getTestIdReady','Undefined\x20symbol:\x20','matcher','Couldn\x27t\x20ensure\x20appium-webdriveragent:\x20','PdeQz','\x20text=','waitForAppReady','Chain\x20identifier\x20—\x20surfaced\x20verbatim\x20in\x20responses.','Listen','filesEdited','TextField','snapshotReachable','nextFlowIndex','\x20\x20[WARN]\x20\x20\x20\x20','xctrace','opts','simulatorWdaUdid','devicePort','dIIUV','#\x20Ceraph\x20signal\x20host\x20—\x20auto-set\x20by\x20@ceraph/react-native-mcp\x20init','14d','DwTwS','hooks','AdminSetUserPasswordCommand','agentMessage','keyDown','fieldQuery','step','listInstalledApps','removedRuntimeFiles','Simulator\x20WDA\x20requires\x20the\x20`appium-webdriveragent`\x20package,\x20but\x20it\x20isn\x27t\x20installed.\x20Run\x20`npm\x20i\x20-D\x20appium-webdriveragent`\x20(or\x20`pnpm\x20add\x20-D\x20appium-webdriveragent`)\x20in\x20your\x20project,\x20then\x20call\x20`rn_wda_start`\x20again.\x20This\x20is\x20an\x20optional\x20dep\x20—\x20device-only\x20setups\x20don\x27t\x20need\x20it.','scriptsLeftAlone','Pro\x20selected.\x20To\x20start\x20AI\x20flow\x20testing,\x20complete\x20checkout\x20at\x20','image/jpeg','Chain\x20aborted:\x20flow\x20\x22','firebase-admin\x20module\x20has\x20no\x20initializeApp','Zosvc','detectEarlyExit','$1-$2','add','Auth0\x20createUser\x20failed:\x20','console-error','missingEnv','.cursor','devicectl','moved','settingsFilesModified','\x20id=','no-gitignore','wda','pathSlug','xdg-open','flowIds','1\x20minute','writeFile','lvhdd','auth\x20provider\x20\x27clerk\x27\x20requires\x20@clerk/backend\x20in\x20package.json.\x20Run:\x20npm\x20install\x20@clerk/backend','screen_tap_chain','user-exists','CDCjk','map','AtLIx','reloadRecoveryWitnesses','button','addEventListener','-framerate','Skipped\x20installCeraph()\x20injection.\x20Re-run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20to\x20wire\x20it.','fPDSj','hjjID','Use\x20a\x20short,\x20single-segment\x20subdirectory\x20name.','\x20matching\x20element(s).','stale-build','Add\x20the\x20matching\x20image\x20file\x20to\x20.ceraph/camera-images/\x20(e.g.\x20<key>.jpg)\x20and\x20re-run\x20`rn_sync_camera_registry`,\x20or\x20fix\x20the\x20imageKey\x20prop\x20value.','getDefaultBranch','getNameNode','relPath','Diff\x20exceeds\x20','page','toml','image-too-large','metro-error','\x20in\x20the\x20MCP\x20server\x20environment,\x20then\x20call\x20ceraph_start\x20again.','rWnqr','subscription','Skipped\x20—\x20no\x20required\x20env\x20vars\x20declared.','payload\x20too\x20large','pending','args','Signed\x20in','WebDriverAgent\x20','toggleMethod','key','passedCount','assertNotVisible','android','protectedRoute=','SQWth','installedAppsCache','iXjHf','app.config.ts','modal','fNfwN','bare-rn-needs-manual','field=','local-hash','Tear\x20down\x20the\x20simulator\x20WebDriverAgent\x20session\x20started\x20by\x20rn_wda_start\x20and\x20clear\x20the\x20captured\x20port.\x20Idempotent\x20—\x20calling\x20it\x20when\x20no\x20simulator\x20WDA\x20session\x20is\x20running\x20is\x20a\x20no-op.\x20Real-device\x20WDA\x20is\x20unaffected.','result','Pre-reload\x20snapshot\x20failed\x20(WDA\x20unreachable\x20or\x20source\x20error)','\x20is\x20malformed\x20JSON\x20—\x20preserved;\x20fix\x20it\x20manually\x20then\x20re-run','hasStopped','ref-imperative','accept','elementMatches','asyncStorageReadBuffer','awaitingErrorDecision','mcp_servers.','.\x20Fix\x20the\x20error\x20above\x20and\x20re-run\x20`npx\x20@ceraph/react-native-mcp\x20uninstall`.','project-not-found','Link','seamed','FCDjc','ask','absPath','test','failedToPurge','rn_check_prebuild','connectionProperties','componentHook:\x20returns\x20must\x20be\x20an\x20object','Set\x20','availableElements','dryRun','swipe','nonnegative','dependencies','dir','ensureLaunched','unknown\x20error','SIGINT','Claude\x20Code\x20hook:\x20','yverM','mtime','stop','\x22\x20—\x20must\x20be\x20an\x20absolute\x20URL\x20with\x20a\x20scheme\x20(e.g.\x20https://ceraph.dev/api/mcp\x20or\x20http://localhost:3000/api/mcp).','.mobile-mcp','Nzxsx','hLeYj','keys','AUsas','.codeium','createCustomToken','nodes','.env.ceraph','getAttributes','[react-native-mcp]\x20Runtime\x20catalog\x20unavailable;\x20running\x20with\x20bootstrap\x20catalog\x20only','verifyAuth','parseError','react','_findNavBarBackButton','right','dXFjK','no-sentinel-received','\x20MB\x20which\x20exceeds\x20the\x205\x20MB\x20cap.','listOnDemand','iphone','Pass\x20global:\x20true\x20to\x20remove\x20~/.ceraph/auth.json\x20—\x20the\x20token\x20is\x20user-global\x20and\x20removing\x20it\x20logs\x20you\x20out\x20of\x20every\x20Ceraph\x20install.','O_EXCL','imageKey','WebDriverAgent\x20is\x20not\x20reachable\x20at\x20','method=','addSourceFileAtPath','rn_target_status','\x20All\x20edited\x20files\x20were\x20restored\x20from\x20snapshots.','the\x20WebDriverAgent\x20build\x20was\x20interrupted','doctor-failed','substring','not-configured','Y\x20coordinate\x20to\x20tap','ceraph_init_status','Init\x20failed:','mime','pid','Stop\x20all\x20managed\x20React\x20Native\x20processes\x20(Metro\x20dev\x20server\x20and/or\x20build\x20process).','MAX_BUILD_LINES','unresolved','getFullText','rn_test_chain_start','iproxy-bridge','ms).\x20Check\x20your\x20network\x20connection\x20and\x20try\x20again.','retryAfterSwipes','isProTier','union',')\x20—\x20preserving\x20the\x20file.','signedAt','ensureSession','coordinateSource','camera-image-key-orphan','<CeraphCamera','created','high','pnpm','advisories','flow','=...','subarray','app.json','EFJPQ','tapChain','Scan\x20.ceraph/camera-images/\x20for\x20test\x20images\x20and\x20(re)generate\x20the\x20static\x20`_registry.ts`\x20the\x20app\x20imports\x20at\x20boot.\x20The\x20filename\x20without\x20extension\x20becomes\x20the\x20imageKey\x20passed\x20to\x20<CeraphCamera\x20imageKey>.\x20Call\x20this\x20after\x20adding\x20or\x20removing\x20image\x20files\x20manually\x20(Finder,\x20git\x20pull).\x20`ceraph_add_camera_image`\x20already\x20auto-syncs\x20after\x20each\x20write\x20—\x20only\x20call\x20this\x20tool\x20for\x20manual\x20drops.\x20Idempotent\x20—\x20does\x20not\x20rewrite\x20the\x20registry\x20when\x20it\x20already\x20matches\x20the\x20discovered\x20set.','awIsq','Could\x20not\x20reach\x20the\x20Ceraph\x20server.\x20Check\x20your\x20network\x20connection\x20and\x20try\x20again.','byteLength','CeraphCamera','MAX_ERRORS','could\x20not\x20confirm\x20the\x20app\x20is\x20installed','Could\x20not\x20find\x20app/_layout.tsx\x20or\x20App.tsx.\x20Add\x20this\x20to\x20your\x20root\x20component\x20manually\x20(the\x20require\x20path\x20is\x20relative\x20to\x20that\x20file\x20—\x20`./.ceraph/testid-config.json`\x20from\x20a\x20root\x20App.tsx,\x20`../.ceraph/testid-config.json`\x20from\x20app/_layout.tsx):\x0a\x20\x20useEffect(()\x20=>\x20{\x20installCeraph({\x20readTestidConfig:\x20()\x20=>\x20{\x20try\x20{\x20return\x20require(\x22./.ceraph/testid-config.json\x22);\x20}\x20catch\x20{\x20return\x20null;\x20}\x20}\x20});\x20},\x20[]);','Dry-run\x20boot\x20preview\x20failed;\x20re-run\x20without\x20--dry-run\x20to\x20see\x20the\x20real\x20error\x20path.','yes','stdin','No\x20<CameraView>\x20at\x20','progressWriter','Unrecognised\x20signal\x20kind\x20\x27','imageKey\x20\x27','tSnPu','response','SRYlj','stderr','finger1','getElements','getParent','no-mobile-graph','EPERM','async-storage-read\x20requires\x20`key`','testID','cleanupOne','-project','getDeclarations','BfwyE','.\x20Fix\x20the\x20listener\x20(check\x20CERAPH_SIGNAL_HOST\x20and\x20that\x20port\x208101\x20is\x20free\x20and\x20permitted)\x20and\x20restart,\x20or\x20rebuild\x20so\x20the\x20ceraph://\x20scheme\x20is\x20registered.','which','SXhet','inflight','\x0a@ceraph/react-native-mcp\x20init\x0a','hevc','outputPath','10pfhfPT','role','confirm','isDirectory','call','protectedRoute','SUPPRESS','nextText','When\x20true,\x20clear\x20the\x20field\x27s\x20current\x20value\x20before\x20typing.\x20Defaults\x20to\x20false.','Unknown\x20error\x20during\x20openUrl','isDefaultExport','metroKilled','alreadyPresent','flowId','Failed\x20to\x20clear\x20field\x20before\x20typing','no-config','ceraph://reset','missing','889748CvctYW','CameraView','invalid-subdir','avJUQ','files','DPbSW','Required\x20env\x20var','preserved','homeDir','set','bNZPk','hTYrf','\x20files).','runId','saveStepScreenshot','domain','PRODUCT_TYPE','jvEzR','byteOffset','test-data','prebuild\x20--clean\x20failed:\x0a','require','writeSet','lerna.json','Env\x20var\x20names\x20the\x20planned\x20flows\x20reference.\x20Each\x20must\x20be\x20set\x20+\x20non-empty\x20for\x20doctor\x20to\x20pass.','[ceraph]\x20video\x20recorder\x20eviction\x20stop\x20failed:\x20','.bin','CERAPH_AUTH_PROJECT_URL','extendedCatalog','size','https://ceraph.dev/#pricing','Failed\x20to\x20focus\x20element\x20before\x20clearing','\x20more','buildKilled','Library','devicesupport','/source?format=json','\x20Warning:\x20','lastIndexOf','abort','BElKW','cleanupJit','stopAll','label','WDA\x20keys\x20failed:\x20','deleteUser','pickTransport','AEpxb','skipped','onStep','minimize','installed','Failed\x20to\x20launch\x20app','setHeader','uninstall','Could\x20not\x20locate\x20the\x20WebDriverAgent\x20Xcode\x20project\x20to\x20launch\x20device\x20WDA.\x20Ceraph\x20looked\x20at\x20(1)\x20$CERAPH_DEVICE_WDA_PROJECT,\x20(2)\x20the\x20most-recent\x20~/Library/Developer/Xcode/DerivedData/WebDriverAgent-*/info.plist\x20WorkspacePath,\x20and\x20(3)\x20~/.mobile-mcp/WebDriverAgent/WebDriverAgent.xcodeproj.\x20Open\x20the\x20WebDriverAgent\x20project\x20in\x20Xcode\x20once,\x20set\x20a\x20Development\x20Team\x20on\x20the\x20WebDriverAgentRunner\x20target,\x20run\x20it\x20on\x20your\x20iPhone\x20(this\x20signs\x20+\x20caches\x20the\x20build),\x20then\x20retry.\x20To\x20pin\x20the\x20project\x20explicitly,\x20set\x20CERAPH_DEVICE_WDA_PROJECT\x20to\x20the\x20absolute\x20path\x20of\x20WebDriverAgent.xcodeproj.','videoStartError','Authentication\x20required.\x20Run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20first\x20to\x20sign\x20in.','OYMOO','installCeraph-with-others','working-tree\x20diff\x20vs\x20','setBootCaptureMode','no-graph-files','feed','\x20is\x20not\x20installed','Run\x20`ceraph_doctor`\x20for\x20the\x20full\x20state\x20including\x20warnings\x20+\x20info\x20findings\x20(e.g.\x20camera\x20setup\x20hints).','index','commandQueue','has','\x27:\x20','rn-flow-progress-notify.sh','-list_devices','ensureBabelPlugin','selector-','global','simctl\x20terminate\x20failed:\x20','parse','expo','commandSeq','screenCount','O_WRONLY','userMarkerSelector','ZignH','ttlMs','objective','password','defaultYes','\x22`),\x20set\x20a\x20Development\x20Team\x20on\x20the\x20WebDriverAgentRunner\x20target,\x20build\x20it\x20manually\x20for\x20the\x20simulator,\x20then\x20retry\x20`rn_wda_start`.\x20Last\x2020\x20lines\x20of\x20xcodebuild\x20output\x20below.',':\x20existing\x20config\x20at\x20','signature','mutationKind','text\x20or\x20accessibilityLabel\x20is\x20required.','rmFn','hex','No\x20element\x20found\x20matching\x20query:\x20','polling-fallback','sendW3CActions','ensureAwake','axCache','getNamespaceImport','Failed\x20to\x20terminate\x20via\x20WDA,\x20devicectl,\x20or\x20idb.\x20The\x20app\x20may\x20not\x20be\x20running,\x20or\x20(devicectl\x20path)\x20it\x20is\x20not\x20a\x20user-installed\x20app\x20so\x20its\x20PID\x20could\x20not\x20be\x20resolved.','revertPackage','screenName','ffmpeg\x20not\x20found\x20—\x20continuous\x20chain-run\x20video\x20capture\x20will\x20be\x20skipped.\x20Tests\x20still\x20execute\x20normally.','server','xkxrH','message\x20is\x20required','EWbIR','PlannedChainInput.snapPointFlowIndices\x20contains\x20non-integer\x20or\x20negative\x20entry:\x20','ceraph-rn','Skipped\x20—\x20iproxy\x20auto-bridge\x20not\x20enabled\x20for\x20this\x20doctor\x20call.','changed','prevText','shift','truncated','getFilePath','expo-json-added','projectDir','no-rn-project','\x22\x20is\x20not\x20valid\x20for\x20pause\x20state\x20\x22','llm-decides','caffeinate','classifyRuntimeEntry','wdaFetch','waitForAppForeground','-json','jckXS','sagaL','/rn-test-flows','\x27\x20must\x20be\x20lowercase\x20letters/digits\x20separated\x20by\x20single\x20hyphens.','command-failed','screens','Failed\x20to\x20get\x20element\x20tree','volumedown','NZiZG','failureCause','uUYmc','getFirstAncestorByKind','\x20\x20configureTestImage(','app\x20','bin','ceraph.config','transport','appConfig','then','AST-scan\x20the\x20project\x20for\x20<CameraView>\x20usages\x20(from\x20expo-camera).\x20Returns\x20each\x20usage\x20with\x20its\x20file\x20path,\x20line,\x20suggested\x20imageKey\x20(heuristic),\x20and\x20~30\x20lines\x20of\x20surrounding\x20code\x20so\x20the\x20AI\x20can\x20reason\x20about\x20what\x20to\x20put\x20in\x20imageKey.\x20The\x20AI\x20should\x20override\x20the\x20suggestion\x20based\x20on\x20context\x20(e.g.\x20a\x20`project.type\x20===\x20\x27uppercase\x27`\x20branch\x20nearby\x20implies\x20imageKey=\x27letter-uppercase\x27).','listFiles','storage-ack\x20requires\x20finite\x20`storageAckCount`','identifier','app_active','sessionToken','Auth0\x20adapter\x20requires\x20`domain`\x20for\x20cleanup.',').\x20Preview\x20a\x20narrower\x20scope\x20with\x20filePaths.','isIdentifier','Optional\x20single\x20path\x20or\x20array\x20of\x20repo-relative\x20file\x20paths.\x20When\x20present,\x20scopes\x20the\x20preview\x20to\x20flows\x20that\x20touch\x20these\x20files\x20and\x20ignores\x20the\x20diff\x20path.','Bridge\x20to\x20next\x20flow\x20failed','Doctor:\x20','{\x20return\x20','checks','credential','dismiss','console.warn','All\x20<CeraphCamera>\x20components\x20have\x20an\x20explicit\x20imageKey\x20(or\x20use\x20a\x20runtime\x20sentinel).','existing\x20config\x20at\x20','dialog','tappedAt','<no\x20IP>','origin','drainBootRequests','sourceMethod','\x20is\x20not\x20booted.\x20Booted\x20simulators:\x20','Unknown\x20chain\x20runId.\x20The\x20run\x20either\x20expired\x20(30m\x20TTL)\x20or\x20never\x20started.\x20Re-run\x20rn_test_chain_start\x20to\x20begin\x20a\x20fresh\x20chain.','pipe','config.toml','object','CERAPH_AUTH_CLIENT_ID','name','recordStorageAck','epoch','user-marker\x20NOT\x20visible\x20on\x20protected\x20route','output','replaceWithText'];_0x3e88=function(){return _0x4f7626;};return _0x3e88();}function _0x1a6129(_0x47a023={}){const _0x32f94b=_0xf8ecb6,_0x4bd771=_0x47a023['env']??process.env,_0x2cb87e=_0x47a023['home']??_0x154473(),_0x1b467f=_0x4bd771['SHELL']??'';if(_0x1b467f[_0x32f94b(0xaa5)](_0x32f94b(0x51e)))return'gWFDm'===_0x32f94b(0x62f)?{..._0x377052['witnesses']&&_0x2985ea[_0x32f94b(0x394)]['length']>0x0?{'witnesses':_0x1c7109[_0x32f94b(0x394)]}:{},..._0x41b6a9[_0x32f94b(0x364)]&&_0x3ef02c[_0x32f94b(0x364)]['length']>0x0?{'objectiveSignals':_0x3c4241['objectiveSignals']}:{},..._0x3f3349['reloadRecoveryWitnesses']&&_0x9eaa76['reloadRecoveryWitnesses'][_0x32f94b(0x3b7)]>0x0?{'reloadRecoveryWitnesses':_0xd073aa['reloadRecoveryWitnesses']}:{}}:{'path':_0x4d6cde(_0x2cb87e,_0x32f94b(0x5dc)),'shell':'bash'};return{'path':_0x4d6cde(_0x2cb87e,_0x32f94b(0x34c)),'shell':_0x32f94b(0x399)};}async function _0xa7340d(_0x63e290={}){const _0x520f3d=_0xf8ecb6,_0x3227d0=_0x63e290[_0x520f3d(0xb00)]??_0x1a6129({'env':_0x63e290[_0x520f3d(0x52a)],'home':_0x63e290[_0x520f3d(0xa4a)]}),_0x52cf73=_0x63e290['readFile']??(_0x59bd23=>_0x3695d4(_0x59bd23,'utf-8')),_0x2a8938=_0x63e290[_0x520f3d(0x865)]??((_0x3c909d,_0x70cc5f)=>_0x683d4c(_0x3c909d,_0x70cc5f,_0x520f3d(0x827)));let _0x54e673;try{_0x54e673=await _0x52cf73(_0x3227d0['path']);}catch{return{'status':'no-profile','path':_0x3227d0['path'],'shell':_0x3227d0['shell']};}const _0xf738ef=_0x54e673[_0x520f3d(0x4ca)](_0x41c892);if(_0xf738ef===-0x1)return _0x520f3d(0x7ad)==='jAKCF'?{'status':'already-reverted','path':_0x3227d0['path'],'shell':_0x3227d0['shell']}:{'flow':_0x40b5b6['name'],'flowId':_0x4cad16['flowId'],'success':![],'totalDurationMs':_0x390681[_0x520f3d(0x2f8)]()-_0x4a148e,'steps':[{'stepIndex':-0x1,'action':_0x520f3d(0x221),'success':![],'durationMs':_0x1b42db[_0x520f3d(0x2f8)]()-_0x5203da,'error':_0x148c15[_0x520f3d(0x3dd)]??_0x8ac9a1[_0x520f3d(0x3dd)]??_0x520f3d(0x969)}],'runtimeErrors':[],'awake':_0x71e5f9};const _0x96da78=_0x54e673['indexOf'](_0x2a8afe,_0xf738ef);if(_0x96da78===-0x1)return{'status':_0x520f3d(0x2be),'path':_0x3227d0['path'],'shell':_0x3227d0['shell']};const _0x188567=_0x96da78+_0x2a8afe[_0x520f3d(0x3b7)],_0x3f989a=_0x54e673[_0x188567]==='\x0a'?_0x188567+0x1:_0x188567,_0xbd6332=_0x54e673['slice'](_0xf738ef,_0x3f989a),_0x55c349=_0xbd6332[_0x520f3d(0x2f3)](/export\s+CERAPH_SIGNAL_HOST=(\S+)/),_0x1b5943=_0x55c349?_0x55c349[0x1]:null;let _0x3cacff=_0xf738ef;_0x3cacff>=0x1&&_0x54e673[_0x3cacff-0x1]==='\x0a'&&(_0x3cacff>=0x2&&_0x54e673[_0x3cacff-0x2]==='\x0a'&&(_0x3cacff-=0x1));const _0x5223fe=_0x54e673['slice'](0x0,_0x3cacff)+_0x54e673['slice'](_0x3f989a);return await _0x2a8938(_0x3227d0[_0x520f3d(0x2c7)],_0x5223fe),{'status':'reverted','path':_0x3227d0[_0x520f3d(0x2c7)],'shell':_0x3227d0[_0x520f3d(0xa6c)],'removedIp':_0x1b5943};}import{rm as _0x3b14ef,readdir as _0x4b61a8,stat as _0x295fc0}from'fs/promises';import{join as _0x2c046a}from'path';async function _0x4b2f68(_0x54d115,_0x583c13){try{const _0x45203f=await _0x583c13(_0x54d115);return _0x45203f['isDirectory']();}catch{return![];}}async function _0x1cb81e(_0x5023f4,_0x27ceda={}){const _0x53e876=_0xf8ecb6,_0x55e47e=_0x2c046a(_0x5023f4[_0x53e876(0x9aa)],_0x53e876(0x4b1)),_0x2a4a35=_0x27ceda['rm']??((_0x5bed95,_0x13b72e)=>_0x3b14ef(_0x5bed95,_0x13b72e)),_0x545bd5=_0x27ceda['readdir']??(_0x4dba8f=>_0x4b61a8(_0x4dba8f)),_0x3a0cc0=_0x27ceda['stat']??(_0x2555b6=>_0x295fc0(_0x2555b6)),_0x35a3f5=await _0x4b2f68(_0x55e47e,_0x3a0cc0);if(!_0x35a3f5)return{'status':_0x53e876(0x2be),'path':_0x55e47e};let _0x58831b=[];try{_0x58831b=await _0x545bd5(_0x55e47e);}catch{_0x58831b=[];}_0x58831b[_0x53e876(0x426)]();if(!_0x5023f4[_0x53e876(0x925)])return _0x53e876(0x7d8)==='gAWqa'?{'file':'','line':0x0,'column':0x0,'message':_0x30f567[0x3],'severity':_0x2d6c7e[0x2],'type':'link'}:{'status':'skipped-needs-confirmation','path':_0x55e47e,'paths':_0x58831b['map'](_0x6d1bd2=>_0x2c046a(_0x55e47e,_0x6d1bd2))};return await _0x2a4a35(_0x55e47e,{'recursive':!![],'force':!![]}),{'status':'deleted','path':_0x55e47e,'deletedEntries':_0x58831b};}import{rmdir,unlink as _0x338c51}from'fs/promises';import{homedir as _0x3f2144}from'os';import{dirname as _0x560754,join as _0x862eff}from'path';function _0x244d27(_0xcf93c={}){const _0x13ab6c=_0xf8ecb6;return _0x862eff(_0xcf93c[_0x13ab6c(0xa4a)]??_0x3f2144(),_0x13ab6c(0x4b1),'auth.json');}async function _0x5f4322(_0x495081,_0x4bb55d={}){const _0x17f19d=_0xf8ecb6,_0x5c96fd=_0x244d27({'home':_0x4bb55d['home']}),_0x2c0afa=_0x4bb55d['unlink']??(_0xf7368c=>_0x338c51(_0xf7368c));if(!_0x495081['global'])return{'status':'skipped','path':_0x5c96fd,'note':_0x17f19d(0x8d3)};const _0x29f808=_0x4bb55d[_0x17f19d(0x49d)]??(_0x6ed459=>rmdir(_0x6ed459));try{await _0x2c0afa(_0x5c96fd);try{await _0x29f808(_0x560754(_0x5c96fd));}catch{}return{'status':_0x17f19d(0x387),'path':_0x5c96fd};}catch(_0x343721){const _0x5db5a2=typeof _0x343721===_0x17f19d(0x9e3)&&_0x343721!==null&&_0x17f19d(0x3aa)in _0x343721&&_0x343721['code']===_0x17f19d(0x5a8);if(_0x5db5a2){try{'RCzWZ'!==_0x17f19d(0x3db)?await _0x29f808(_0x560754(_0x5c96fd)):(_0x58eaaa[_0x17f19d(0x411)]('exit',_0x47c315),_0x72bb4(_0x28714e),_0x109ee8());}catch{}return{'status':'already-reverted','path':_0x5c96fd};}throw _0x343721;}}import{readFile as _0x29dff4,writeFile as _0x4cf4f2,unlink as _0x80be55}from'fs/promises';import{join as _0x5887fe}from'path';import{Project as _0x5af6d7,SyntaxKind as _0x32350a}from'ts-morph';var _0x478604=[_0x339bd1('babel-preset-expo'),_0x339bd1('@react-native/babel-preset')];async function _0x58c4bb(_0x12e1ba){const _0x3b629c=_0xf8ecb6,_0x128a49=_0x12e1ba[_0x3b629c(0x4e4)]??(_0xc6d297=>_0x29dff4(_0xc6d297,'utf-8')),_0x238930=_0x12e1ba['writeFile']??((_0x5e8617,_0x3f35f9)=>_0x4cf4f2(_0x5e8617,_0x3f35f9,'utf-8')),_0x31679a=_0x12e1ba['unlink']??(_0x2bba38=>_0x80be55(_0x2bba38));let _0x96eafa,_0x5ddea3;for(const _0x3585a3 of _0x33f2a4){const _0x51e984=_0x5887fe(_0x12e1ba[_0x3b629c(0x9aa)],_0x3585a3);try{_0x5ddea3=await _0x128a49(_0x51e984),_0x96eafa=_0x51e984;break;}catch{}}if(!_0x96eafa||_0x5ddea3===void 0x0)return{'status':_0x3b629c(0x932)};if(!_0x5ddea3[_0x3b629c(0x27e)](_0xe66411))return{'status':_0x3b629c(0x2be),'path':_0x96eafa};if(_0x478604['includes'](_0x5ddea3))return await _0x31679a(_0x96eafa),{'status':'reverted','path':_0x96eafa,'action':_0x3b629c(0x387)};const _0x38ac59=new _0x5af6d7({'useInMemoryFileSystem':!![]}),_0x11903b=_0x38ac59[_0x3b629c(0x238)](_0x3b629c(0x1fc),_0x5ddea3);let _0xf8e50=![];_0x11903b['forEachDescendant'](_0x3965e4=>{const _0x40fc17=_0x3b629c;if(_0xf8e50)return;if(_0x3965e4[_0x40fc17(0x7b2)]()!==_0x32350a[_0x40fc17(0xa75)])return;const _0x5965c1=_0x3965e4,_0x502ef=_0x5965c1[_0x40fc17(0x912)]();for(let _0x5ab638=0x0;_0x5ab638<_0x502ef['length'];_0x5ab638++){if('tQVFv'!=='WLOku'){if(_0x502ef[_0x5ab638][_0x40fc17(0x3a0)]()[_0x40fc17(0x27e)](_0xe66411)){_0x5965c1['removeElement'](_0x5ab638),_0xf8e50=!![];break;}}else try{this['onSignal'](_0x35a5d6);}catch{}}});if(!_0xf8e50)return{'status':'already-reverted','path':_0x96eafa};return await _0x238930(_0x96eafa,_0x11903b['getFullText']()),{'status':_0x3b629c(0x654),'path':_0x96eafa,'action':_0x3b629c(0x3a8)};}import{readFile as _0x17194c,writeFile as _0x403629,access as _0x1fcf54}from'fs/promises';import{join as _0x33ccf3}from'path';var _0x59c154='ceraph';async function _0x5c2ca7(_0x3f7aaf){try{return await _0x1fcf54(_0x3f7aaf),!![];}catch{return![];}}function _0x1e3d10(_0x395f97){const _0x5ca2b0=_0xf8ecb6;if(!_0x395f97[_0x5ca2b0(0x982)]||typeof _0x395f97['expo']!=='object'){if('NcZot'!=='MVDmc')return{'changed':![],'previousScheme':void 0x0,'nextScheme':void 0x0};else{const _0xda4e9c=_0x85ebb5[_0x5ca2b0(0x2ae)]();_0xda4e9c[_0x5ca2b0(0x3a0)]()===_0x3894f3&&_0x1bc32d[_0x5ca2b0(0x4d1)](_0x5b25d3);}}const _0x31b790=_0x395f97['expo'],_0x3fc99f=_0x31b790[_0x5ca2b0(0xb27)];if(typeof _0x3fc99f===_0x5ca2b0(0x30d)){if(_0x3fc99f===_0x59c154)return delete _0x31b790['scheme'],{'changed':!![],'previousScheme':_0x3fc99f,'nextScheme':void 0x0};return{'changed':![],'previousScheme':_0x3fc99f,'nextScheme':_0x3fc99f};}if(Array['isArray'](_0x3fc99f)){const _0x4edd86=_0x3fc99f[_0x5ca2b0(0x27e)](_0x59c154);if(!_0x4edd86)return{'changed':![],'previousScheme':[..._0x3fc99f],'nextScheme':[..._0x3fc99f]};const _0x59aa81=_0x3fc99f['filter'](_0x52e87d=>_0x52e87d!==_0x59c154),_0x33d400=[..._0x3fc99f];if(_0x59aa81['length']===0x0){if(_0x5ca2b0(0x90d)==='dIXey'){if(typeof _0x3f20f0==='string')_0x18679e['add'](_0x48d009);}else return delete _0x31b790[_0x5ca2b0(0xb27)],{'changed':!![],'previousScheme':_0x33d400,'nextScheme':void 0x0};}if(_0x59aa81['length']===0x1)return _0x31b790[_0x5ca2b0(0xb27)]=_0x59aa81[0x0],{'changed':!![],'previousScheme':_0x33d400,'nextScheme':_0x59aa81[0x0]};return _0x31b790['scheme']=_0x59aa81,{'changed':!![],'previousScheme':_0x33d400,'nextScheme':_0x59aa81};}return{'changed':![],'previousScheme':void 0x0,'nextScheme':void 0x0};}function _0x4d36d1(_0x2259cc){const _0x487e18=_0xf8ecb6;try{const _0x2f1978=JSON['parse'](_0x2259cc);if(!_0x2f1978||typeof _0x2f1978!==_0x487e18(0x9e3)||Array['isArray'](_0x2f1978))return null;return _0x2f1978;}catch{return null;}}function _0x594eff(_0x27272e,_0x5339b8){const _0x41fd2c=_0xf8ecb6,_0x5039ee=_0x5339b8[_0x41fd2c(0x2f3)](/\n(\s+)"/),_0x3e86b5=_0x5039ee?.[0x1]??'\x20\x20',_0x409613=_0x5339b8[_0x41fd2c(0xaa5)]('\x0a'),_0x4ad134=JSON[_0x41fd2c(0x312)](_0x27272e,null,_0x3e86b5);return _0x409613?_0x4ad134+'\x0a':_0x4ad134;}var _0x1157af='Remove\x20the\x20ceraph\x20scheme\x20from\x20ios/<App>/Info.plist\x20CFBundleURLTypes\x20and\x20android/app/src/main/AndroidManifest.xml.\x20Both\x20files\x20were\x20never\x20written\x20by\x20init\x20—\x20they\x20require\x20manual\x20edits\x20because\x20they\x20are\x20inside\x20the\x20customer\x27s\x20native\x20project\x20tree.';function _0x55c636(_0x166ea0){return'Your\x20project\x20uses\x20'+_0x166ea0+'\x20(dynamic\x20Expo\x20config).\x20The\x20init\x20walkthrough\x20never\x20edited\x20this\x20file\x20automatically;\x20if\x20you\x20(or\x20a\x20teammate)\x20added\x20`ceraph`\x20to\x20its\x20`scheme`\x20value,\x20remove\x20that\x20entry\x20by\x20hand.\x20After\x20editing,\x20run\x20`expo\x20prebuild\x20--clean`\x20or\x20restart\x20the\x20dev\x20client.';}async function _0x13a5cb(_0x982c77,_0x53a3af={}){const _0x159a7c=_0xf8ecb6,_0x82bae8=_0x53a3af[_0x159a7c(0x753)]??_0x5c2ca7,_0x4ed79b=_0x53a3af['readFile']??(_0x14fbe4=>_0x17194c(_0x14fbe4,'utf-8')),_0x57d880=_0x53a3af[_0x159a7c(0x865)]??((_0xb85a55,_0x36e7f1)=>_0x403629(_0xb85a55,_0x36e7f1,'utf-8')),_0x3dfca8=_0x33ccf3(_0x982c77,_0x159a7c(0x8fb)),_0x24e007=_0x33ccf3(_0x982c77,'app.config.js'),_0x4a1e83=_0x33ccf3(_0x982c77,_0x159a7c(0x892)),_0x22287e=_0x33ccf3(_0x982c77,_0x159a7c(0x6c9)),_0x1f32bd=_0x33ccf3(_0x982c77,'android'),_0x581007=await _0x82bae8(_0x24e007),_0x411402=await _0x82bae8(_0x4a1e83);if(_0x581007||_0x411402){const _0x4da94e=_0x411402?_0x4a1e83:_0x24e007;return{'status':'manual','kind':_0x159a7c(0xa8c),'path':_0x4da94e,'remediation':_0x55c636(_0x4da94e)};}if(await _0x82bae8(_0x3dfca8)){const _0x24655d=await _0x4ed79b(_0x3dfca8),_0x5d6a09=_0x4d36d1(_0x24655d);if(!_0x5d6a09)return{'status':'already-reverted','path':_0x3dfca8};const {changed:_0x256666,previousScheme:_0x359eab,nextScheme:_0x44a57b}=_0x1e3d10(_0x5d6a09);if(!_0x256666)return'xLSQY'===_0x159a7c(0x7a9)?{'ok':![],'error':'Failed\x20to\x20create\x20output\x20directory:\x20'+_0x3be4ad(_0xfb815c)}:{'status':'already-reverted','path':_0x3dfca8};return await _0x57d880(_0x3dfca8,_0x594eff(_0x5d6a09,_0x24655d)),{'status':'reverted','path':_0x3dfca8,'previousScheme':_0x359eab,'nextScheme':_0x44a57b};}if(await _0x82bae8(_0x22287e)||await _0x82bae8(_0x1f32bd))return{'status':_0x159a7c(0x6c7),'kind':_0x159a7c(0xacf),'remediation':_0x1157af};return{'status':_0x159a7c(0x9ab)};}import{access as _0x9c284b,readFile as _0x341e44,unlink as _0x201d6a}from'fs/promises';import{join as _0x4c6df9}from'path';async function _0x2443b2(_0x3b60af){try{return await _0x9c284b(_0x3b60af),!![];}catch{return![];}}async function _0x14cdc7(_0x25f3ac,_0x5d9f4f={}){const _0x392470=_0xf8ecb6,_0x25fb9d=_0x5d9f4f[_0x392470(0x4e4)]??(_0x558fe9=>_0x341e44(_0x558fe9,_0x392470(0x827))),_0x2d0834=_0x5d9f4f[_0x392470(0x865)]??_0x18b8bb,_0x40e220=_0x5d9f4f[_0x392470(0xa91)]??(_0xc9c36c=>_0x201d6a(_0xc9c36c)),_0x2e3204=_0x5d9f4f['fileExists']??_0x2443b2,_0x28afb1=[{'scriptAbsPath':_0x4c6df9(_0x25f3ac['projectDir'],..._0x1d2d25),'canonicalScript':_0x3a31aa,'matcher':_0x5d6baa,'command':_0x9ef03b},{'scriptAbsPath':_0x4c6df9(_0x25f3ac['projectDir'],..._0x19d4a3),'canonicalScript':_0x210ef1,'matcher':_0x484387,'command':_0x57c4e1}],_0x4ada8d=[],_0x5e1a1c=[];for(const _0x4ebf1b of _0x28afb1){if(!await _0x2e3204(_0x4ebf1b[_0x392470(0x7e3)]))continue;let _0xe7b431;try{_0xe7b431=await _0x25fb9d(_0x4ebf1b['scriptAbsPath']);}catch{_0x5e1a1c[_0x392470(0x4d1)](_0x4ebf1b[_0x392470(0x7e3)]);continue;}_0xe7b431===_0x4ebf1b[_0x392470(0x2b2)]?(await _0x40e220(_0x4ebf1b['scriptAbsPath']),_0x4ada8d['push'](_0x4ebf1b[_0x392470(0x7e3)])):_0x5e1a1c[_0x392470(0x4d1)](_0x4ebf1b[_0x392470(0x7e3)]);}const _0x55472a=[],_0x6b86b2=[];for(const _0xfa238 of _0x4d498c){const _0x5a727d=_0x4c6df9(_0x25f3ac[_0x392470(0x9aa)],..._0xfa238);if(!await _0x2e3204(_0x5a727d))continue;let _0x18b52c;try{_0x18b52c=await _0x25fb9d(_0x5a727d);}catch{_0x6b86b2['push'](_0x5a727d);continue;}let _0x408294;try{_0x408294=JSON[_0x392470(0x981)](_0x18b52c);}catch{if(_0x392470(0x405)===_0x392470(0x4e9))_0x51b329(_0x3902f8[_0x2b9efc],_0x1514ae,[..._0x5b2aad,_0x376c8d]);else{_0x6b86b2['push'](_0x5a727d);continue;}}if(!_0x408294||typeof _0x408294!==_0x392470(0x9e3)||Array[_0x392470(0x200)](_0x408294)){_0x6b86b2['push'](_0x5a727d);continue;}const _0x41952f=_0x59da82(_0x408294,_0x28afb1);if(!_0x41952f['mutated']){_0x6b86b2[_0x392470(0x4d1)](_0x5a727d);continue;}const _0x42c473=_0x18b52c[_0x392470(0x2f3)](/\n(\s+)"/),_0x346ce8=_0x42c473?.[0x1]??'\x20\x20',_0x3a6cfb=_0x18b52c[_0x392470(0xaa5)]('\x0a'),_0xc5c6e5=JSON['stringify'](_0x41952f['next'],null,_0x346ce8);await _0x2d0834(_0x5a727d,_0x3a6cfb?_0xc5c6e5+'\x0a':_0xc5c6e5),_0x55472a['push'](_0x5a727d);}const _0x26f6f1=_0x4ada8d[_0x392470(0x3b7)]>0x0||_0x55472a['length']>0x0;let _0xdc6924;if(_0x5e1a1c[_0x392470(0x3b7)]>0x0)_0xdc6924='manual';else{if(_0x26f6f1){if(_0x392470(0x2b1)===_0x392470(0x2b1))_0xdc6924='reverted';else{const _0x445321=_0x210b0b['lastIndexOf']('.');if(_0x445321<=0x0)return null;const _0x244762=_0x159c4e['slice'](0x0,_0x445321),_0x49ccda=_0x52d088[_0x392470(0x795)](_0x445321)['toLowerCase']();if(!_0x14bc27(_0x49ccda))return null;if(_0x244762['length']===0x0)return null;return{'stem':_0x244762,'ext':_0x49ccda};}}else _0xdc6924=_0x392470(0x2be);}return{'status':_0xdc6924,'details':{'scriptsDeleted':_0x4ada8d,'scriptsLeftAlone':_0x5e1a1c,'settingsFilesModified':_0x55472a,'settingsFilesUntouched':_0x6b86b2}};}function _0x59da82(_0x4c40dd,_0x5c1f83){const _0x54feb2=_0xf8ecb6,_0x43155c=_0x4c40dd[_0x54feb2(0x845)];if(!_0x43155c||typeof _0x43155c!=='object'||Array['isArray'](_0x43155c))return{'mutated':![],'next':_0x4c40dd};const _0x43a83b=_0x43155c,_0x47a2b0=_0x43a83b[_0x54feb2(0x80a)];if(!Array['isArray'](_0x47a2b0))return{'mutated':![],'next':_0x4c40dd};const _0x500b39=new Map();for(const _0x23a12f of _0x5c1f83)_0x500b39[_0x54feb2(0x93e)](_0x23a12f['matcher'],_0x23a12f);const _0x4f4c12=[];let _0x4c5d86=![];for(const _0x496289 of _0x47a2b0){if(!_0x496289||typeof _0x496289!==_0x54feb2(0x9e3)||Array[_0x54feb2(0x200)](_0x496289)){_0x4f4c12['push'](_0x496289);continue;}const _0x41babc=_0x496289,_0x49476c=_0x41babc['matcher'];if(typeof _0x49476c!==_0x54feb2(0x30d)){if('ygAmR'===_0x54feb2(0xb05)){_0x4f4c12[_0x54feb2(0x4d1)](_0x496289);continue;}else{const _0x565c26=_0x1d4c58[_0x54feb2(0x708)]();if(_0x5d541a['isIdentifier'](_0x565c26)&&_0x565c26[_0x54feb2(0x3a0)]()===_0x240f46)return _0x54feb2(0xa6f);}}const _0x1fefa5=_0x500b39[_0x54feb2(0x3fd)](_0x49476c);if(!_0x1fefa5){_0x4f4c12[_0x54feb2(0x4d1)](_0x496289);continue;}const _0x14b186=_0x41babc[_0x54feb2(0x845)];if(!Array['isArray'](_0x14b186)){_0x4f4c12['push'](_0x496289);continue;}const _0x2a2cc7=[];let _0xeaef71=![];for(const _0x16e795 of _0x14b186){if(!_0x16e795||typeof _0x16e795!==_0x54feb2(0x9e3)||Array['isArray'](_0x16e795)){_0x2a2cc7['push'](_0x16e795);continue;}const _0x877e43=_0x16e795,_0x1448f9=_0x877e43[_0x54feb2(0xaee)];if(typeof _0x1448f9==='string'&&_0x1448f9===_0x1fefa5['command']){if('IYcxW'!==_0x54feb2(0x5e4)){_0xeaef71=!![];continue;}else{if(_0x597f78)return;_0x4c39cf=!![],_0x1e9151(_0x23fcb7),_0x113c76({'code':_0x4245c1??0x1,'stdout':_0x5b2154,'stderr':_0x267e36});}}_0x2a2cc7[_0x54feb2(0x4d1)](_0x16e795);}if(!_0xeaef71){_0x4f4c12[_0x54feb2(0x4d1)](_0x496289);continue;}_0x4c5d86=!![];if(_0x2a2cc7[_0x54feb2(0x3b7)]===0x0)continue;_0x4f4c12[_0x54feb2(0x4d1)]({..._0x41babc,'hooks':_0x2a2cc7});}if(!_0x4c5d86)return{'mutated':![],'next':_0x4c40dd};const _0x130316={..._0x43a83b};_0x4f4c12[_0x54feb2(0x3b7)]===0x0?delete _0x130316[_0x54feb2(0x80a)]:_0x130316[_0x54feb2(0x80a)]=_0x4f4c12;const _0x582bf1={..._0x4c40dd};return Object[_0x54feb2(0x8c1)](_0x130316)[_0x54feb2(0x3b7)]===0x0?delete _0x582bf1[_0x54feb2(0x845)]:_0x582bf1['hooks']=_0x130316,{'mutated':!![],'next':_0x582bf1};}import{writeFile as _0x5e58b2,readdir as _0x4d99f7}from'fs/promises';import{join as _0x1f6f53,relative as _0x334968,sep as _0x6a8c7e}from'path';var _0x52d0d1,_0x1217d9,_0x4bdf5c,_0x5958f1,_0xc1ef11=![];async function _0x22ef24(){const _0xe140a4=_0xf8ecb6;if(_0xc1ef11)return;const _0x27e517=await import(_0xe140a4(0x74a));({IndentationText:_0x52d0d1,Node:_0x1217d9,Project:_0x4bdf5c,SyntaxKind:_0x5958f1}=_0x27e517,_0xc1ef11=!![]);}var _0x4e8d22=_0xf8ecb6(0x431),_0x9b10ab=_0xf8ecb6(0x902),_0x3c7322=_0xf8ecb6(0x632),_0x49f8d0='CameraView',_0x3d5948=[_0xf8ecb6(0x7b4),_0xf8ecb6(0x7d2),_0xf8ecb6(0x9b8)],_0x17731b=new Set(['.tsx',_0xf8ecb6(0x73b)]),_0x57f67c=new Set(['node_modules',_0xf8ecb6(0xa00),'build',_0xf8ecb6(0x683),_0xf8ecb6(0x4b1),'.expo',_0xf8ecb6(0x2fb),'ios','android']);async function _0xc57702(_0x25e2a5){const _0x4c7b33=_0xf8ecb6,_0xcd8a6=[];async function _0x512eb5(_0x177a45){const _0x226b6a=_0xc050;let _0x232e92;try{_0x232e92=await _0x4d99f7(_0x177a45,{'withFileTypes':!![]});}catch{return;}for(const _0x5a8087 of _0x232e92){const _0x3a3dda=_0x1f6f53(_0x177a45,_0x5a8087[_0x226b6a(0x9e5)]);if(_0x5a8087['isDirectory']()){if(_0x57f67c[_0x226b6a(0x979)](_0x5a8087[_0x226b6a(0x9e5)]))continue;await _0x512eb5(_0x3a3dda);continue;}if(!_0x5a8087[_0x226b6a(0x237)]())continue;const _0x62d306=_0x5a8087[_0x226b6a(0x9e5)]['lastIndexOf']('.');if(_0x62d306<0x0)continue;const _0x22b93e=_0x5a8087[_0x226b6a(0x9e5)]['slice'](_0x62d306)[_0x226b6a(0x5b5)]();if(!_0x17731b['has'](_0x22b93e))continue;_0xcd8a6['push'](_0x3a3dda);}}for(const _0x40e150 of _0x3d5948){await _0x512eb5(_0x1f6f53(_0x25e2a5,_0x40e150));}for(const _0x58ceb3 of[_0x4c7b33(0x7b7),_0x4c7b33(0x46e)]){if(_0x4c7b33(0x681)==='nmvkN'){if(!_0x2ba9e4['isExpressionStatement'](_0x224ddf))return![];const _0x4db12f=_0x1e3e75[_0x4c7b33(0x708)]();if(!_0x2eac9d['isCallExpression'](_0x4db12f))return![];const _0x41716e=_0x4db12f[_0x4c7b33(0x708)]();return _0x269a9f[_0x4c7b33(0x9ce)](_0x41716e)&&_0x41716e['getText']()==='installCeraph';}else _0xcd8a6['push'](_0x1f6f53(_0x25e2a5,_0x58ceb3));}return _0xcd8a6;}function _0x5a917d(_0x1bdc08){const _0x438908=_0xf8ecb6,_0x344740=new _0x4bdf5c({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1},'manipulationSettings':{'indentationText':_0x52d0d1[_0x438908(0x76e)]}});for(const _0x4f5429 of _0x1bdc08){try{_0x344740[_0x438908(0x8d8)](_0x4f5429);}catch{}}return _0x344740;}function _0x3f547c(_0x4c61db,_0x167516){const _0x38bbcb=[];return _0x4c61db['forEachDescendant'](_0x43a934=>{const _0x47fc7f=_0xc050;if(_0x1217d9[_0x47fc7f(0x4e5)](_0x43a934)||_0x1217d9['isJsxSelfClosingElement'](_0x43a934)){const _0x564b7c=_0x43a934['getTagNameNode']();if(_0x564b7c['getText']()===_0x167516){if('tNdqJ'===_0x47fc7f(0x4fd))_0x38bbcb[_0x47fc7f(0x4d1)](_0x43a934);else{const _0x400d80=_0x12e7fa['objectiveSignals'][0x0];return _0x400d80['kind']+':\x20'+_0x400d80['message'];}}}}),_0x38bbcb;}function _0x3b02f7(_0x23ba4e){const _0x512101=_0x23ba4e['getAttributes']();for(const _0x2d8617 of _0x512101){if(_0x1217d9['isJsxAttribute'](_0x2d8617)){const _0x114ada=_0x2d8617['getNameNode']();_0x114ada['getText']()==='imageKey'&&_0x2d8617['remove']();}}}function _0xc0b0d6(_0x186597){const _0x7957cc=_0xf8ecb6;let _0x377922=0x0,_0x4f50a9=Number['POSITIVE_INFINITY'];for(let _0x259ba5=0x0;_0x259ba5<0x2710;_0x259ba5++){if('DGjQN'!==_0x7957cc(0x7a6))return this['mode'];else{const _0x42bb7d=_0x3f547c(_0x186597,_0x9b10ab);if(_0x42bb7d[_0x7957cc(0x3b7)]===0x0)break;if(_0x42bb7d[_0x7957cc(0x3b7)]>=_0x4f50a9)break;_0x4f50a9=_0x42bb7d[_0x7957cc(0x3b7)];const _0x4602ba=_0x42bb7d[0x0];_0x4602ba['getTagNameNode']()['replaceWithText'](_0x49f8d0);if(_0x1217d9[_0x7957cc(0x4e5)](_0x4602ba)){const _0x284715=_0x4602ba[_0x7957cc(0x3eb)](_0x5958f1['JsxElement']);if(_0x284715){const _0x108476=_0x284715[_0x7957cc(0x59e)]();_0x108476['getTagNameNode']()['replaceWithText'](_0x49f8d0);}}_0x3b02f7(_0x4602ba),_0x377922++;}}return _0x377922;}function _0x32fb2f(_0x22232b){const _0x31f50e=_0xf8ecb6,_0x5f4998=_0x22232b['getImportDeclaration'](_0x4e8d22);if(!_0x5f4998)return![];const _0x3f7d45=_0x5f4998['getNamedImports'](),_0x333c5b=_0x3f7d45[_0x31f50e(0x415)](_0x329850=>_0x329850['getName']()===_0x9b10ab);if(!_0x333c5b)return![];_0x333c5b[_0x31f50e(0x38a)]();const _0x5066eb=_0x5f4998['getNamedImports'](),_0x5e9d16=_0x5f4998['getDefaultImport']()!=null;return _0x5066eb['length']===0x0&&!_0x5e9d16&&_0x5f4998['remove'](),!![];}function _0x10e5bf(_0x150a1e){const _0xd26ce4=_0xf8ecb6,_0x7f4fa9=_0x150a1e[_0xd26ce4(0x560)](_0x3c7322);if(_0x7f4fa9){if('RchtF'===_0xd26ce4(0x7b3))return![];else{const _0x279e9b=_0x7f4fa9['getNamedImports']();if(_0x279e9b[_0xd26ce4(0x275)](_0x268615=>_0x268615[_0xd26ce4(0x385)]()===_0x49f8d0))return![];return _0x7f4fa9[_0xd26ce4(0xab6)](_0x49f8d0),!![];}}return _0x150a1e[_0xd26ce4(0x7d4)]({'moduleSpecifier':_0x3c7322,'namedImports':[_0x49f8d0]}),!![];}async function _0x295356(_0x3aa0cd){const _0x536870=_0xf8ecb6;await _0x22ef24();const _0x1ac2eb=await _0xc57702(_0x3aa0cd),_0x1e7be2=_0x5a917d(_0x1ac2eb),_0x31de60=[];let _0x49f15a=0x0;for(const _0x230c91 of _0x1e7be2['getSourceFiles']()){_0x49f15a++;const _0x245f33=_0x3f547c(_0x230c91,_0x9b10ab);if(_0x245f33['length']===0x0){const _0x4557c2=_0x230c91[_0x536870(0x560)](_0x4e8d22),_0x3b7527=_0x4557c2!=null&&_0x4557c2['getNamedImports']()['some'](_0x1bec05=>_0x1bec05[_0x536870(0x385)]()===_0x9b10ab);if(!_0x3b7527)continue;const _0x47308d=_0x32fb2f(_0x230c91);if(!_0x47308d)continue;const _0x43c4e6=_0x230c91['getFilePath']();await _0x5e58b2(_0x43c4e6,_0x230c91[_0x536870(0x8e7)](),'utf-8'),_0x31de60[_0x536870(0x4d1)]({'path':_0x43c4e6,'relPath':_0x334968(_0x3aa0cd,_0x43c4e6)['split'](_0x6a8c7e)['join']('/'),'ceraphCamerasRemoved':0x0,'importDropped':!![],'importRestored':![]});continue;}const _0x976130=_0xc0b0d6(_0x230c91),_0x2a3697=_0x3f547c(_0x230c91,_0x9b10ab),_0x55702a=_0x2a3697[_0x536870(0x3b7)]===0x0?_0x32fb2f(_0x230c91):![],_0x121d53=_0x3f547c(_0x230c91,_0x49f8d0)[_0x536870(0x3b7)]>0x0,_0x38da69=_0x121d53?_0x10e5bf(_0x230c91):![],_0x360830=_0x230c91['getFilePath']();await _0x5e58b2(_0x360830,_0x230c91['getFullText'](),_0x536870(0x827)),_0x31de60[_0x536870(0x4d1)]({'path':_0x360830,'relPath':_0x334968(_0x3aa0cd,_0x360830)['split'](_0x6a8c7e)[_0x536870(0x4ec)]('/'),'ceraphCamerasRemoved':_0x976130,'importDropped':_0x55702a,'importRestored':_0x38da69});}return{'files':_0x31de60,'filesScanned':_0x49f15a};}var _0x360291,_0x4fe7a9,_0x408f05=![];async function _0x58d0b2(){if(_0x408f05)return;const _0x2eb69b=await import('ts-morph');({Node:_0x360291,Project:_0x4fe7a9}=_0x2eb69b,_0x408f05=!![]);}var _0x4f103c=async _0x263fc=>({'exitCode':0x0});async function _0x552728(_0x25ce8b){const _0x4512f5=_0xf8ecb6,_0x1b037b=[],_0x51c7be=_0x47e2ea=>{const _0x4f407d=_0xc050;_0x1b037b['push'](_0x47e2ea),_0x25ce8b[_0x4f407d(0x966)]?.(_0x47e2ea);},_0x2abda3=await _0x489575(_0x25ce8b);if(_0x2abda3[_0x4512f5(0xb14)]==='error'){const _0xd15a53={'name':_0x4512f5(0x266),'status':'error','details':{'matches':_0x2abda3['matches']},'remediation':_0x2abda3[_0x4512f5(0x638)]};return _0x51c7be(_0xd15a53),_0x4648f1(_0x25ce8b[_0x4512f5(0x9aa)],_0x1b037b);}const _0x448591=_0x2abda3[_0x4512f5(0x288)],_0x2f24b0=_0x25ce8b[_0x4512f5(0xae2)]??_0x25ce8b['projectDir'],_0x2d737f=_0x25ce8b['dryRun']===!![],_0xbc4de=await _0x214009(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0xbc4de);const _0xaa55d6=await _0x15884e(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0xaa55d6);const _0x1b0a6f=await _0xd5391c(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0x1b0a6f);const _0x295681=await _0x3d147b(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0x295681);const _0x364437=await _0x5c3c04(_0x2f24b0,_0x25ce8b,_0x2d737f);_0x51c7be(_0x364437);const _0x31d19e=await _0x2baf23(_0x2f24b0,_0x25ce8b,_0x2d737f);_0x51c7be(_0x31d19e);const _0x499aea=await _0x1d3168(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0x499aea);const _0x42a58d=await _0x4ea630(_0x25ce8b,_0x2d737f);_0x51c7be(_0x42a58d);const _0x4fa3a7=await _0x7365cf(_0x448591,_0x25ce8b,_0x2d737f);_0x51c7be(_0x4fa3a7);const _0x42a774=await _0x5de854(_0x25ce8b,_0x2d737f);_0x51c7be(_0x42a774);const _0x4dde4a=await _0x352e65(_0x448591,_0x25ce8b,_0x2d737f);return _0x51c7be(_0x4dde4a),_0x4648f1(_0x448591,_0x1b037b);}async function _0x489575(_0x32d6ac){const _0x5ee2c1=_0xf8ecb6,_0x286ca5=_0x32d6ac['detectMonorepo']??_0x534210,_0x91c1f7=await _0x286ca5(_0x32d6ac['projectDir']);if(_0x91c1f7['kind']===_0x5ee2c1(0x41a))return{'kind':'ok','workingDir':_0x32d6ac['projectDir']};if(_0x91c1f7['kind']==='single'){const _0x551bed=_0x91c1f7['matches'][0x0];if(!_0x551bed)return{'kind':'ok','workingDir':_0x32d6ac[_0x5ee2c1(0x9aa)]};return{'kind':'ok','workingDir':_0x551bed[_0x5ee2c1(0x8a9)]};}return{'kind':'error','matches':_0x91c1f7[_0x5ee2c1(0x764)]['map'](_0x53f492=>({'relPath':_0x53f492[_0x5ee2c1(0x87a)],'absPath':_0x53f492['absPath']})),'remediation':_0x5ee2c1(0x336)+(_0x91c1f7[_0x5ee2c1(0x764)][0x0]?.['relPath']??_0x5ee2c1(0xa49))+'`.'};}async function _0x214009(_0x3cef23,_0x5e1cc2,_0x185858){const _0x14f59d=_0xf8ecb6,_0x2b76c5=_0x5e1cc2['revertCamera']??_0x295356;if(_0x185858)try{const _0x33f6fb=await _0x57ba66(_0x3cef23,_0x2b76c5);return _0x3a0887(_0x33f6fb,{'dryRun':!![]});}catch(_0x171c74){return{'name':'camera','status':'error','details':{'error':_0x4a2c99(_0x171c74)},'remediation':'Dry-run\x20camera\x20preview\x20failed.\x20Re-run\x20without\x20--dry-run\x20after\x20fixing\x20the\x20error\x20above,\x20or\x20pass\x20--project-dir\x20if\x20the\x20path\x20is\x20wrong.'};}const _0x4108ee=new Map();try{const _0x16a88c=await _0x519fd2(_0x3cef23);for(const _0x4e8e9d of _0x16a88c){_0x4108ee[_0x14f59d(0x93e)](_0x4e8e9d,await _0x1558ea(_0x4e8e9d));}const _0x424114=await _0x2b76c5(_0x3cef23);return _0x3a0887(_0x424114,{'dryRun':![]});}catch(_0x53ac49){const _0x314c21=[];for(const [_0x3a25e0,_0x289463]of _0x4108ee){if(_0x289463==null)continue;try{await _0x4c580e(_0x3a25e0,_0x289463);}catch(_0x8bcd98){_0x314c21[_0x14f59d(0x4d1)](_0x3a25e0+':\x20'+_0x4a2c99(_0x8bcd98));}}const _0x18d524='Camera\x20revert\x20failed:\x20'+_0x4a2c99(_0x53ac49)+'.',_0x4af880=_0x314c21[_0x14f59d(0x3b7)]===0x0?_0x18d524+_0x14f59d(0x8da):_0x18d524+'\x20Some\x20files\x20could\x20not\x20be\x20restored:\x20'+_0x314c21[_0x14f59d(0x4ec)](';\x20');return{'name':'camera','status':_0x14f59d(0x3dd),'details':{'error':_0x4a2c99(_0x53ac49),'snapshotCount':_0x4108ee['size'],'restoreFailures':_0x314c21},'remediation':_0x4af880};}}function _0x3a0887(_0x503c8d,_0x3716e8){const _0x11b4fe=_0xf8ecb6,_0x82aa8d=_0x503c8d['files'][_0x11b4fe(0xad3)]((_0x3f593a,_0x5df0c8)=>_0x3f593a+_0x5df0c8['ceraphCamerasRemoved'],0x0),_0x32e762=_0x82aa8d;if(_0x503c8d['files']['length']===0x0)return{'name':'camera','status':_0x11b4fe(0x2be),'details':{'filesScanned':_0x503c8d[_0x11b4fe(0x5bf)],..._0x3716e8['dryRun']?{'dryRun':!![]}:{}}};const _0x27d754=_0x32e762>0x0?'warning':_0x11b4fe(0x654),_0x5dc0be={'name':_0x11b4fe(0x55e),'status':_0x27d754,'details':{'filesScanned':_0x503c8d['filesScanned'],'filesEdited':_0x503c8d[_0x11b4fe(0x939)][_0x11b4fe(0x86b)](_0x41f7ac=>_0x41f7ac['relPath']),'ceraphCamerasRemoved':_0x82aa8d,'importDropped':_0x503c8d[_0x11b4fe(0x939)][_0x11b4fe(0x529)](_0x7f368c=>_0x7f368c['importDropped'])[_0x11b4fe(0x3b7)],'importRestored':_0x503c8d['files'][_0x11b4fe(0x529)](_0x2bfc4f=>_0x2bfc4f[_0x11b4fe(0x69e)])['length'],'imageKeysStripped':_0x32e762,..._0x3716e8[_0x11b4fe(0x8b1)]?{'dryRun':!![]}:{}}};return _0x27d754==='warning'&&(_0x5dc0be['remediation']=_0x11b4fe(0x4cf)+_0x32e762+'\x20<CeraphCamera>\x20tag(s).\x20If\x20any\x20of\x20those\x20keys\x20were\x20customer-set\x20(not\x20Ceraph-generated),\x20re-apply\x20them\x20after\x20install\x20rebuilds\x20the\x20camera\x20surface.'),_0x5dc0be;}async function _0x519fd2(_0x605175){const _0x1a41cf=_0xf8ecb6,_0x3acf9c=['app',_0x1a41cf(0x7d2),_0x1a41cf(0x9b8)],_0xe8b76b=new Set(['.tsx','.jsx']),_0x16d43c=new Set(['node_modules','dist','build',_0x1a41cf(0x683),_0x1a41cf(0x4b1),_0x1a41cf(0x759),'.next','ios',_0x1a41cf(0x88d)]),_0x57e7ee=[],_0xdab3cf=async _0x4953f5=>{const _0x290597=_0x1a41cf;let _0x7b12fd;try{const {readdir:_0x543f67}=await import('fs/promises');_0x7b12fd=await _0x543f67(_0x4953f5,{'withFileTypes':!![]});}catch{return;}for(const _0x15b026 of _0x7b12fd){if(_0x15b026['isDirectory']()){if(_0x16d43c[_0x290597(0x979)](_0x15b026[_0x290597(0x9e5)]))continue;await _0xdab3cf(_0x2d1828(_0x4953f5,_0x15b026[_0x290597(0x9e5)]));continue;}if(!_0x15b026[_0x290597(0x237)]())continue;const _0x43877b=_0x15b026['name']['lastIndexOf']('.');if(_0x43877b<0x0)continue;const _0x3ae6ad=_0x15b026['name'][_0x290597(0x795)](_0x43877b)[_0x290597(0x5b5)]();if(!_0xe8b76b[_0x290597(0x979)](_0x3ae6ad))continue;_0x57e7ee['push'](_0x2d1828(_0x4953f5,_0x15b026['name']));}};for(const _0x4d0de9 of _0x3acf9c){await _0xdab3cf(_0x2d1828(_0x605175,_0x4d0de9));}for(const _0x392b85 of[_0x1a41cf(0x7b7),_0x1a41cf(0x46e)]){_0x57e7ee['push'](_0x2d1828(_0x605175,_0x392b85));}const _0x916ba9=[];for(const _0x4c124d of _0x57e7ee){if(_0x1a41cf(0x99e)!=='AAftb'){let _0x41247c;try{_0x41247c=await _0x27fc76(_0x4c124d,'utf-8');}catch{if('dpmNi'!==_0x1a41cf(0x7c8)){if(_0x44b9df instanceof _0xf48b41)return{..._0xd03d7c({'ok':![],'code':_0x5abdc9[_0x1a41cf(0x3aa)],'error':_0x50a39f[_0x1a41cf(0x531)]}),'isError':!![]};return{..._0x331782({'ok':![],'error':_0x1a41cf(0x3fc)+(_0x3176f4 instanceof _0x17f34f?_0x1e5b05['message']:_0x3495f9(_0x56c18a))}),'isError':!![]};}else continue;}if(_0x41247c[_0x1a41cf(0x27e)](_0x1a41cf(0x8f3)))_0x916ba9[_0x1a41cf(0x4d1)](_0x4c124d);}else return null;}return _0x916ba9;}async function _0x57ba66(_0x7d4ff7,_0x49e57a){const _0xb8b260=_0xf8ecb6,_0x13ca77=await _0x519fd2(_0x7d4ff7),_0x203de5=_0x2d1828(tmpdir(),'ceraph-uninstall-preview-'+Date[_0xb8b260(0x2f8)]()+'-'+Math['random']()[_0xb8b260(0xafa)](0x24)[_0xb8b260(0x795)](0x2));try{await _0x2fa3f7(_0x203de5,{'recursive':!![]});for(const _0x3d218b of _0x13ca77){const _0x245c31=_0x5740e3(_0x7d4ff7,_0x3d218b),_0x32589b=_0x2d1828(_0x203de5,_0x245c31);await _0x2fa3f7(_0x142654(_0x32589b),{'recursive':!![]}),await copyFile(_0x3d218b,_0x32589b);}return await _0x49e57a(_0x203de5);}finally{try{await _0x17cebd(_0x203de5,{'recursive':!![],'force':!![]});}catch{}}}async function _0x15884e(_0x12d320,_0x234c85,_0x2df7d6){const _0xd1a50a=_0xf8ecb6,_0x212eea=_0x234c85['revertBoot']??_0x4bab7c,_0x2a780f=_0x234c85[_0xd1a50a(0xa87)]??_0x32adb6;if(_0x2df7d6)try{const _0x4b6858=await _0x2a780f(_0x12d320);if(!_0x4b6858)return{'name':_0xd1a50a(0xa4c),'status':_0xd1a50a(0x2be),'details':{'reason':_0xd1a50a(0x3f5),'dryRun':!![]}};const _0x4a3d72=await _0x58f82b(_0x4b6858['filePath'],_0x12d320);try{const _0x5a7b13=await _0x212eea(_0x4a3d72['projectDir']);return await _0x1d9e87(_0x5a7b13,_0x12d320,_0x4b6858,_0x234c85,!![]);}finally{await _0x17cebd(_0x4a3d72[_0xd1a50a(0x30a)],{'recursive':!![],'force':!![]})['catch'](()=>void 0x0);}}catch(_0x3db864){return{'name':'boot','status':'error','details':{'error':_0x4a2c99(_0x3db864),'dryRun':!![]},'remediation':_0xd1a50a(0x906)};}try{if(_0xd1a50a(0x760)!==_0xd1a50a(0xab0)){const _0x44fa6c=await _0x212eea(_0x12d320),_0x79b6ca=_0x44fa6c['status']==='no-layout-found'?null:_0x44fa6c['target'];return await _0x1d9e87(_0x44fa6c,_0x12d320,_0x79b6ca,_0x234c85,![]);}else{_0x3b493f=!![];for(const _0x506226 of _0x122032(_0x2eed1b))_0x3e2cc9['add'](_0x506226);}}catch(_0x3bfb1b){return{'name':_0xd1a50a(0xa4c),'status':'error','details':{'error':_0x4a2c99(_0x3bfb1b)},'remediation':_0xd1a50a(0x7fe)};}}async function _0x1d9e87(_0x5f398e,_0x59d6a3,_0x39693b,_0x55cfbf,_0x544eeb){const _0x2ab71d=_0xf8ecb6;switch(_0x5f398e[_0x2ab71d(0x428)]){case _0x2ab71d(0x654):return{'name':'boot','status':_0x2ab71d(0x654),'details':{'target':_0x5f398e['target'],'removedUseEffect':_0x5f398e[_0x2ab71d(0x744)],'removedImport':_0x5f398e['removedImport'],..._0x544eeb?{'dryRun':!![]}:{}}};case _0x2ab71d(0x2be):return{'name':_0x2ab71d(0xa4c),'status':_0x2ab71d(0x2be),'details':{'target':_0x5f398e[_0x2ab71d(0xb00)],..._0x544eeb?{'dryRun':!![]}:{}}};case'no-layout-found':return{'name':_0x2ab71d(0xa4c),'status':'already-reverted','details':{'reason':'no\x20layout\x20file\x20detected',..._0x544eeb?{'dryRun':!![]}:{}}};case'skipped':{const _0x34eb05=await _0x4f1c8c(_0x5f398e[_0x2ab71d(0xb00)]['filePath']);return{'name':'boot','status':'manual','details':{'target':_0x5f398e[_0x2ab71d(0xb00)],'reason':_0x5f398e[_0x2ab71d(0x256)],'location':_0x34eb05[_0x2ab71d(0xab4)],'otherStatements':_0x34eb05[_0x2ab71d(0x76d)],..._0x34eb05[_0x2ab71d(0x8ca)]!==void 0x0?{'parseError':_0x34eb05['parseError']}:{},..._0x544eeb?{'dryRun':!![]}:{}},'remediation':_0x2ab71d(0x561)+_0x5f398e['target']['filePath']+(_0x34eb05[_0x2ab71d(0xab4)]?':'+_0x34eb05[_0x2ab71d(0xab4)]['line']:'')+').\x20Remove\x20the\x20`installCeraph()`\x20call\x20by\x20hand\x20without\x20dropping\x20your\x20own\x20code,\x20then\x20re-run\x20`npx\x20@ceraph/react-native-mcp\x20uninstall`.'+(_0x34eb05[_0x2ab71d(0x8ca)]!==void 0x0?'\x20(Note:\x20re-parse\x20failed\x20—\x20line\x20info\x20missing:\x20'+_0x34eb05[_0x2ab71d(0x8ca)]+')':'')};}}return{'name':_0x2ab71d(0xa4c),'status':'error','details':{'result':_0x5f398e},'remediation':_0x2ab71d(0x76b)};}async function _0x4f1c8c(_0x212087){const _0xe777f4=_0xf8ecb6;try{await _0x58d0b2();const _0x58bbc0=new _0x4fe7a9({'useInMemoryFileSystem':![],'skipAddingFilesFromTsConfig':!![],'skipFileDependencyResolution':!![],'skipLoadingLibFiles':!![],'compilerOptions':{'allowJs':!![],'jsx':0x1}}),_0x385747=_0x58bbc0[_0xe777f4(0x8d8)](_0x212087),_0x20b89a=_0x5a86de(_0x385747);if(!_0x20b89a)return{'location':null,'otherStatements':[]};const _0x4b5694=_0x20b89a['getBody']();if(!_0x4b5694||!_0x360291[_0xe777f4(0x44e)](_0x4b5694))return{'location':null,'otherStatements':[]};let _0x4f205f=null,_0x2a3249=[];return _0x4b5694['forEachDescendant'](_0x53deb5=>{const _0x58d4f1=_0xe777f4;if(_0x4f205f)return;if(!_0x360291[_0x58d4f1(0x503)](_0x53deb5))return;const _0x133ce2=_0x53deb5['getExpression']();if(!_0x360291['isIdentifier'](_0x133ce2)||_0x133ce2[_0x58d4f1(0x3a0)]()!=='useEffect')return;const _0x462a4f=_0x53deb5['getArguments'](),_0x3d7325=_0x462a4f[0x0];if(!_0x3d7325)return;if(!_0x360291['isArrowFunction'](_0x3d7325)&&!_0x360291[_0x58d4f1(0x2df)](_0x3d7325))return;const _0x30bdf5=_0x3d7325[_0x58d4f1(0x468)]();if(!_0x360291[_0x58d4f1(0x44e)](_0x30bdf5))return;const _0x59a616=_0x30bdf5['getStatements'](),_0x596b5b=[],_0x1b593c=[];for(const _0x482b43 of _0x59a616){if(_0x5f38ea(_0x482b43))_0x596b5b[_0x58d4f1(0x4d1)](_0x482b43);else _0x1b593c[_0x58d4f1(0x4d1)](_0x482b43);}_0x596b5b[_0x58d4f1(0x3b7)]>0x0&&_0x1b593c['length']>0x0&&(_0x4f205f={'line':_0x53deb5['getStartLineNumber']()},_0x2a3249=_0x1b593c[_0x58d4f1(0x86b)](_0x4d951a=>_0x4d951a['getText']()));}),{'location':_0x4f205f,'otherStatements':_0x2a3249};}catch(_0x1ab74b){return{'location':null,'otherStatements':[],'parseError':_0x4a2c99(_0x1ab74b)};}}function _0x5a86de(_0x563337){const _0x167d09=_0xf8ecb6;for(const _0xa97b34 of _0x563337[_0x167d09(0x51f)]()){if(_0xa97b34[_0x167d09(0x92d)]())return _0xa97b34;}const _0x526b46=_0x563337['getStatements']()['find'](_0x5eb8eb=>_0x360291[_0x167d09(0x3be)](_0x5eb8eb));if(_0x526b46&&_0x360291['isExportAssignment'](_0x526b46)){const _0x3447df=_0x526b46['getExpression']();if(_0x360291['isIdentifier'](_0x3447df)){const _0x1c3f4d=_0x3447df[_0x167d09(0x521)]();if(_0x1c3f4d){const _0x2f760b=_0x1c3f4d['getDeclarations']()[0x0];if(_0x2f760b&&_0x360291[_0x167d09(0xa77)](_0x2f760b)){const _0x58303e=_0x2f760b['getInitializer']();if(_0x58303e&&_0x360291[_0x167d09(0x282)](_0x58303e))return _0x58303e;if(_0x58303e&&_0x360291[_0x167d09(0x2df)](_0x58303e))return _0x58303e;}}}if(_0x360291['isArrowFunction'](_0x3447df))return _0x3447df;if(_0x360291[_0x167d09(0x2df)](_0x3447df))return _0x3447df;}return null;}function _0x5f38ea(_0x23b00d){const _0x10de53=_0xf8ecb6;if(!_0x360291['isExpressionStatement'](_0x23b00d))return![];const _0x4abfe0=_0x23b00d[_0x10de53(0x708)]();if(!_0x360291['isCallExpression'](_0x4abfe0))return![];const _0x222aae=_0x4abfe0[_0x10de53(0x708)]();return _0x360291['isIdentifier'](_0x222aae)&&_0x222aae[_0x10de53(0x3a0)]()==='installCeraph';}async function _0x3d147b(_0x263ab6,_0x52607b,_0x1e7f5a){const _0x4bbb31=_0xf8ecb6,_0x1390ab=_0x52607b[_0x4bbb31(0x3e3)]??_0x13a5cb;if(_0x1e7f5a)try{const _0x23b3d7=await _0x18ba08(_0x263ab6);try{const _0x472271=await _0x1390ab(_0x23b3d7['projectDir']);return _0x3ad99b(_0x472271,!![]);}finally{await _0x17cebd(_0x23b3d7[_0x4bbb31(0x30a)],{'recursive':!![],'force':!![]})[_0x4bbb31(0x48b)](()=>void 0x0);}}catch(_0x3fde84){return{'name':'scheme','status':_0x4bbb31(0x3dd),'details':{'error':_0x4a2c99(_0x3fde84),'dryRun':!![]}};}try{const _0xcbf63b=await _0x1390ab(_0x263ab6);return _0x3ad99b(_0xcbf63b,![]);}catch(_0x4c6f33){return{'name':_0x4bbb31(0xb27),'status':_0x4bbb31(0x3dd),'details':{'error':_0x4a2c99(_0x4c6f33)}};}}function _0x3ad99b(_0x2b3ec0,_0x3b9585){const _0x486134=_0xf8ecb6,_0x5ad71e=_0x3b9585?{'dryRun':!![]}:{};switch(_0x2b3ec0['status']){case _0x486134(0x654):return{'name':_0x486134(0xb27),'status':'reverted','details':{'path':_0x2b3ec0['path'],'previousScheme':_0x2b3ec0[_0x486134(0x68e)],'nextScheme':_0x2b3ec0['nextScheme'],..._0x5ad71e}};case'already-reverted':return{'name':'scheme','status':'already-reverted','details':{'path':_0x2b3ec0['path'],..._0x5ad71e}};case'manual':return{'name':'scheme','status':_0x486134(0x6c7),'details':{'kind':_0x2b3ec0[_0x486134(0xb14)],'path':_0x2b3ec0['path'],..._0x5ad71e},'remediation':_0x2b3ec0[_0x486134(0x638)]};case _0x486134(0x9ab):return{'name':_0x486134(0xb27),'status':_0x486134(0x2be),'details':{'reason':'no\x20RN\x20project\x20detected',..._0x5ad71e}};}}async function _0x18ba08(_0x47a267){const _0x2aabf5=_0xf8ecb6,_0x1e0158=_0x2d1828(tmpdir(),_0x2aabf5(0x5bb)+Date[_0x2aabf5(0x2f8)]()+'-'+Math[_0x2aabf5(0xafe)]()[_0x2aabf5(0xafa)](0x24)['slice'](0x2));return _0x2a7e5f(_0x1e0158,async()=>{const _0x1ad016=_0x2aabf5;await _0x2fa3f7(_0x1e0158,{'recursive':!![]});for(const _0x3a0378 of['app.json','app.config.js','app.config.ts']){const _0x3fd754=_0x2d1828(_0x47a267,_0x3a0378);try{await copyFile(_0x3fd754,_0x2d1828(_0x1e0158,_0x3a0378));}catch{}}for(const _0x5de431 of['ios',_0x1ad016(0x88d)]){try{await _0x44bc35(_0x2d1828(_0x47a267,_0x5de431)),await _0x2fa3f7(_0x2d1828(_0x1e0158,_0x5de431),{'recursive':!![]});}catch{}}return{'projectDir':_0x1e0158,'tmpRoot':_0x1e0158};});}async function _0x5c3c04(_0xf81df6,_0x49e123,_0x11ed16){const _0x361654=_0xf8ecb6,_0x516761=_0x49e123[_0x361654(0x9f7)]??_0x53f87e,_0x2deba4=_0x49e123['revertUserGlobalMcpClients']??_0xebaef1,_0x8f7e56=_0x49e123[_0x361654(0x93d)]?.();if(_0x11ed16){let _0x33b148=null,_0x2b9a70=null;try{_0x33b148=await _0x5048cd(_0xf81df6),_0x2b9a70=await _0x100fb7(_0x8f7e56);const _0x1f244e=await _0x516761(_0x33b148[_0x361654(0x9aa)]),_0x47cb5f=await _0x2deba4({'home':_0x2b9a70[_0x361654(0x39b)]});return _0x5b4fc3(_0x1f244e,_0x47cb5f,!![]);}catch(_0x2a6a21){return{'name':_0x361654(0x52e),'status':_0x361654(0x3dd),'details':{'error':_0x4a2c99(_0x2a6a21),'dryRun':!![]}};}finally{_0x33b148&&await _0x17cebd(_0x33b148['tmpRoot'],{'recursive':!![],'force':!![]})['catch'](()=>void 0x0),_0x2b9a70&&await _0x17cebd(_0x2b9a70['tmpRoot'],{'recursive':!![],'force':!![]})['catch'](()=>void 0x0);}}try{const _0xcd5cb=await _0x516761(_0xf81df6),_0x449dba=await _0x2deba4({'home':_0x8f7e56});return _0x5b4fc3(_0xcd5cb,_0x449dba,![]);}catch(_0x11bfc3){return{'name':_0x361654(0x52e),'status':_0x361654(0x3dd),'details':{'error':_0x4a2c99(_0x11bfc3)}};}}function _0x5b4fc3(_0x1d688a,_0x3a47f4,_0x10cdbc){const _0x5a1364=_0xf8ecb6,_0x1ce9e7=[..._0x1d688a[_0x5a1364(0x939)],..._0x3a47f4[_0x5a1364(0x939)]],_0x3dca64=_0x1ce9e7['filter'](_0x430faa=>_0x430faa[_0x5a1364(0x428)]===_0x5a1364(0x63d)||_0x430faa[_0x5a1364(0x428)]==='deleted-file'),_0xa9bff3=_0x10cdbc?{'dryRun':!![]}:{};if(_0x3dca64['length']===0x0)return{'name':_0x5a1364(0x52e),'status':_0x5a1364(0x2be),'details':{'files':_0x1d688a[_0x5a1364(0x939)],'userGlobalFiles':_0x3a47f4['files'],..._0xa9bff3}};return{'name':_0x5a1364(0x52e),'status':'reverted','details':{'files':_0x1d688a['files'],'userGlobalFiles':_0x3a47f4['files'],'touched':_0x3dca64['length'],..._0xa9bff3}};}async function _0x5048cd(_0x413ef3){const _0x3817b3=_0xf8ecb6,_0x1ccb05=_0x2d1828(tmpdir(),_0x3817b3(0x207)+Date[_0x3817b3(0x2f8)]()+'-'+Math['random']()[_0x3817b3(0xafa)](0x24)['slice'](0x2));return _0x2a7e5f(_0x1ccb05,async()=>{const _0x3dcac9=_0x3817b3;await _0x2fa3f7(_0x1ccb05,{'recursive':!![]});const _0x1852f6=[_0x3dcac9(0x5ec),_0x2d1828('.cursor','mcp.json'),_0x2d1828(_0x3dcac9(0x752),_0x3dcac9(0xab3)),_0x2d1828(_0x3dcac9(0x323),_0x3dcac9(0x9e2)),_0x2d1828('.claude','settings.local.json')];for(const _0x1880e2 of _0x1852f6){const _0xf3b054=_0x2d1828(_0x413ef3,_0x1880e2),_0x4e4a83=_0x2d1828(_0x1ccb05,_0x1880e2);try{await _0x2fa3f7(_0x142654(_0x4e4a83),{'recursive':!![]}),await copyFile(_0xf3b054,_0x4e4a83);}catch{}}return{'projectDir':_0x1ccb05,'tmpRoot':_0x1ccb05};});}async function _0x100fb7(_0x1dfe00){const _0x2f54a0=_0xf8ecb6,_0x20aa51=_0x2d1828(tmpdir(),'ceraph-uninstall-mcp-global-preview-'+Date[_0x2f54a0(0x2f8)]()+'-'+Math['random']()[_0x2f54a0(0xafa)](0x24)[_0x2f54a0(0x795)](0x2));return _0x2a7e5f(_0x20aa51,async()=>{const _0x54ddfb=_0x2f54a0;if('FbgaO'===_0x54ddfb(0x592))return{'success':!![],'transport':'wda'};else{const _0x407433=_0x2d1828(_0x20aa51,'home');await _0x2fa3f7(_0x407433,{'recursive':!![]});const _0x184c9d=_0x3c12ca(_0x1dfe00);for(let _0x2a066f=0x0;_0x2a066f<_0x3246c9['length'];_0x2a066f++){const _0x565041=_0x3246c9[_0x2a066f],_0x595711=_0x184c9d[_0x2a066f];if(!_0x565041||!_0x595711)continue;const _0x2ee065=_0x2d1828(_0x407433,..._0x565041[_0x54ddfb(0x448)]);try{if('ZignH'===_0x54ddfb(0x987))await _0x2fa3f7(_0x142654(_0x2ee065),{'recursive':!![]}),await copyFile(_0x595711['path'],_0x2ee065);else return{'ok':!![],'severity':_0x54ddfb(0x3dd),'message':_0x54ddfb(0x758)+_0x4fa7ad[_0x54ddfb(0x35b)]+').','details':{'lockState':_0x368505['lockState']}};}catch{}}return{'tmpHome':_0x407433,'tmpRoot':_0x20aa51};}});}async function _0x2baf23(_0xf78ba8,_0x50e548,_0x1856f2){const _0x548617=_0xf8ecb6,_0x1805a8=_0x50e548[_0x548617(0x4db)]??_0x14cdc7;if(_0x1856f2)try{const _0x14eb46=await _0xb0f49f(_0xf78ba8);try{const _0x5d3cd8=await _0x1805a8({'projectDir':_0x14eb46[_0x548617(0x9aa)]});return _0x1957c7(_0x5d3cd8,!![]);}finally{await _0x17cebd(_0x14eb46[_0x548617(0x30a)],{'recursive':!![],'force':!![]})[_0x548617(0x48b)](()=>void 0x0);}}catch(_0x785559){return{'name':'claude-hooks','status':_0x548617(0x3dd),'details':{'error':_0x4a2c99(_0x785559),'dryRun':!![]}};}try{const _0x1dd6a6=await _0x1805a8({'projectDir':_0xf78ba8});return _0x1957c7(_0x1dd6a6,![]);}catch(_0x2589c9){return _0x548617(0x9ff)==='rYjyL'?{'name':'claude-hooks','status':_0x548617(0x3dd),'details':{'error':_0x4a2c99(_0x2589c9)}}:{..._0x12bb83({'ok':![],'error':_0x50bc58}),'isError':!![]};}}function _0x1957c7(_0x34e67a,_0x23a8cf){const _0x47bccb=_0xf8ecb6,_0x21152=_0x23a8cf?{'dryRun':!![]}:{};switch(_0x34e67a[_0x47bccb(0x428)]){case _0x47bccb(0x654):return{'name':'claude-hooks','status':'reverted','details':{..._0x34e67a['details'],..._0x21152}};case _0x47bccb(0x2be):return{'name':_0x47bccb(0x3b1),'status':'already-reverted','details':{..._0x34e67a[_0x47bccb(0x65d)],..._0x21152}};case'manual':return{'name':_0x47bccb(0x3b1),'status':'manual','details':{..._0x34e67a['details'],..._0x21152},'remediation':'Hook\x20script(s)\x20were\x20customized\x20after\x20init\x20wrote\x20them,\x20so\x20the\x20reverter\x20left\x20them\x20in\x20place:\x20'+_0x34e67a['details'][_0x47bccb(0x84e)]['join'](',\x20')+_0x47bccb(0x788)+(_0x34e67a['details'][_0x47bccb(0x85d)]['length']>0x0?'were\x20removed\x20from\x20'+_0x34e67a['details'][_0x47bccb(0x85d)]['join'](',\x20')+'.':'were\x20not\x20touched\x20in\x20this\x20run.')};case'skipped':return{'name':'claude-hooks','status':'skipped','details':{..._0x34e67a['details'],..._0x21152}};}}async function _0xb0f49f(_0x3f28ba){const _0xf9ee0c=_0xf8ecb6,_0x388063=_0x2d1828(tmpdir(),_0xf9ee0c(0x29b)+Date[_0xf9ee0c(0x2f8)]()+'-'+Math['random']()[_0xf9ee0c(0xafa)](0x24)[_0xf9ee0c(0x795)](0x2));return _0x2a7e5f(_0x388063,async()=>{const _0x3dbda2=_0xf9ee0c;await _0x2fa3f7(_0x388063,{'recursive':!![]});const _0x3a2537=[_0x2d1828(_0x3dbda2(0x3fe),'hooks','rn-error-notify.sh'),_0x2d1828('.claude',_0x3dbda2(0x845),_0x3dbda2(0x97b)),_0x2d1828(_0x3dbda2(0x3fe),'settings.json'),_0x2d1828(_0x3dbda2(0x3fe),_0x3dbda2(0x5ea))];for(const _0x4acbfb of _0x3a2537){const _0x1d57b8=_0x2d1828(_0x3f28ba,_0x4acbfb),_0x19a0ef=_0x2d1828(_0x388063,_0x4acbfb);try{await _0x2fa3f7(_0x142654(_0x19a0ef),{'recursive':!![]}),await copyFile(_0x1d57b8,_0x19a0ef);}catch{}}return{'projectDir':_0x388063,'tmpRoot':_0x388063};});}async function _0x1d3168(_0x5cb947,_0x327e0f,_0x1738d5){const _0x270e00=_0xf8ecb6,_0x508071=_0x327e0f[_0x270e00(0x26f)]??_0x4a786e;if(_0x1738d5){const _0x5785a7=_0x2d1828(tmpdir(),'ceraph-uninstall-gitignore-preview-'+Date[_0x270e00(0x2f8)]()+'-'+Math['random']()[_0x270e00(0xafa)](0x24)['slice'](0x2));try{try{await _0x2fa3f7(_0x5785a7,{'recursive':!![]});try{await copyFile(_0x2d1828(_0x5cb947,_0x270e00(0x39c)),_0x2d1828(_0x5785a7,_0x270e00(0x39c)));}catch{}for(const _0x17d8e5 of[_0x270e00(0x383),_0x270e00(0x813)]){try{if('MPgMq'!==_0x270e00(0x437))await copyFile(_0x2d1828(_0x5cb947,_0x17d8e5),_0x2d1828(_0x5785a7,_0x17d8e5));else return null;}catch{}}const _0x58d58e=await _0x508071(_0x5785a7);return _0x1266c7(_0x58d58e,!![]);}finally{if('nvuZb'!=='nvuZb'){if(_0x3a4192[_0x270e00(0x746)](_0x215f2c)){const _0x4578f1=_0x74b327[_0x270e00(0x795)](_0xdb1d2a[_0x270e00(0x3b7)]+0x1);return _0x4578f1['length']>0x0?_0x4578f1:_0x3a9ab5;}return _0xa1b61f;}else await _0x17cebd(_0x5785a7,{'recursive':!![],'force':!![]})[_0x270e00(0x48b)](()=>void 0x0);}}catch(_0x5f396d){return{'name':_0x270e00(0x7dd),'status':'error','details':{'error':_0x4a2c99(_0x5f396d),'dryRun':!![]}};}}try{const _0x55b368=await _0x508071(_0x5cb947);return _0x1266c7(_0x55b368,![]);}catch(_0x3dde0d){return{'name':_0x270e00(0x7dd),'status':_0x270e00(0x3dd),'details':{'error':_0x4a2c99(_0x3dde0d)}};}}function _0x1266c7(_0x47af03,_0x2bf48d){const _0x5498b8=_0xf8ecb6,_0x4e2d23=_0x2bf48d?{'dryRun':!![]}:{},_0x9001f6=_0x47af03[_0x5498b8(0x84c)];switch(_0x47af03['status']){case'reverted':return{'name':'gitignore','status':'reverted','details':{'path':_0x47af03['path'],'removedLines':_0x47af03['removedLines'],'removedRuntimeFiles':_0x9001f6,..._0x4e2d23}};case _0x5498b8(0x2be):return{'name':'gitignore','status':_0x9001f6[_0x5498b8(0x3b7)]>0x0?_0x5498b8(0x654):'already-reverted','details':{'path':_0x47af03['path'],'removedRuntimeFiles':_0x9001f6,..._0x4e2d23}};case _0x5498b8(0x85f):return{'name':'gitignore','status':_0x9001f6[_0x5498b8(0x3b7)]>0x0?'reverted':_0x5498b8(0x2be),'details':{'reason':'no\x20.gitignore','removedRuntimeFiles':_0x9001f6,..._0x4e2d23}};}}async function _0x4ea630(_0x46304d,_0x4e34ab){const _0x396743=_0xf8ecb6,_0x50f29d=_0x46304d['revertSignalHostEnv']??_0xa7340d,_0x43aa6d=_0x46304d[_0x396743(0x93d)]?.();if(_0x4e34ab)try{const _0x4c624e=await _0x12a62a(_0x43aa6d);try{const _0x4ca810=await _0x50f29d({'home':_0x4c624e['tmpHome']});return _0x2953b5(_0x4ca810,!![]);}finally{await _0x17cebd(_0x4c624e[_0x396743(0x30a)],{'recursive':!![],'force':!![]})[_0x396743(0x48b)](()=>void 0x0);}}catch(_0x2de315){return{'name':'signal-host','status':'error','details':{'error':_0x4a2c99(_0x2de315),'dryRun':!![]}};}try{const _0x47aa73=await _0x50f29d({'home':_0x43aa6d});return _0x2953b5(_0x47aa73,![]);}catch(_0x3bf291){return{'name':'signal-host','status':_0x396743(0x3dd),'details':{'error':_0x4a2c99(_0x3bf291)}};}}function _0x2953b5(_0x135105,_0x44386e){const _0x2b357f=_0xf8ecb6,_0x85adb9=_0x44386e?{'dryRun':!![]}:{};switch(_0x135105['status']){case'reverted':return{'name':'signal-host','status':_0x2b357f(0x654),'details':{'path':_0x135105[_0x2b357f(0x2c7)],'shell':_0x135105['shell'],'removedIp':_0x135105[_0x2b357f(0x828)],..._0x85adb9}};case _0x2b357f(0x2be):return{'name':_0x2b357f(0x3ed),'status':'already-reverted','details':{'path':_0x135105[_0x2b357f(0x2c7)],'shell':_0x135105[_0x2b357f(0xa6c)],..._0x85adb9}};case'no-profile':return{'name':_0x2b357f(0x3ed),'status':_0x2b357f(0x2be),'details':{'reason':_0x2b357f(0x2ff),'path':_0x135105['path'],..._0x85adb9}};}}async function _0x12a62a(_0xca76ce){const _0x24cd5d=_0xf8ecb6,_0x14d110=_0xca76ce??_0x351567(),_0x2a63b9=_0x2d1828(tmpdir(),_0x24cd5d(0x61c)+Date['now']()+'-'+Math['random']()[_0x24cd5d(0xafa)](0x24)['slice'](0x2));return _0x2a7e5f(_0x2a63b9,async()=>{const _0x3b5578=_0x24cd5d,_0x53c0a6=_0x2d1828(_0x2a63b9,_0x3b5578(0xa4a));await _0x2fa3f7(_0x53c0a6,{'recursive':!![]});for(const _0x4ee6ea of[_0x3b5578(0x34c),'.bashrc']){if(_0x3b5578(0x2ad)!=='NUUYx'){if(_0x10b222===null)return null;try{return _0x360023['parse'](_0x303fdd);}catch{return null;}}else try{await copyFile(_0x2d1828(_0x14d110,_0x4ee6ea),_0x2d1828(_0x53c0a6,_0x4ee6ea));}catch{}}return{'tmpHome':_0x53c0a6,'tmpRoot':_0x2a63b9};});}async function _0x7365cf(_0x1a95a8,_0xf8a505,_0x2a7ebe){const _0x33182e=_0xf8ecb6,_0x42c155=_0xf8a505['revertCeraphDir']??_0x1cb81e;if(!_0xf8a505[_0x33182e(0x2c6)]){if('DpsvX'!=='dwTfh')try{const _0x3255c6=await _0x42c155({'projectDir':_0x1a95a8,'confirm':![]});if(_0x3255c6['status']===_0x33182e(0x2be))return{'name':_0x33182e(0x26e),'status':'already-reverted','details':{'path':_0x3255c6[_0x33182e(0x2c7)],..._0x2a7ebe?{'dryRun':!![]}:{}}};if(_0x3255c6['status']===_0x33182e(0x6e1))return{'name':'ceraph-dir','status':_0x33182e(0x965),'details':{'path':_0x3255c6['path'],'paths':_0x3255c6['paths'],..._0x2a7ebe?{'dryRun':!![]}:{}},'remediation':_0x33182e(0x338)};return{'name':'ceraph-dir','status':_0x33182e(0x3dd),'details':{'unexpectedStatus':_0x3255c6[_0x33182e(0x428)],..._0x2a7ebe?{'dryRun':!![]}:{}},'remediation':'ceraph-dir\x20preview\x20returned\x20an\x20unexpected\x20status;\x20pass\x20--purge-images\x20explicitly\x20to\x20delete\x20.ceraph/.'};}catch(_0x2932d4){return{'name':'ceraph-dir','status':_0x33182e(0x3dd),'details':{'error':_0x4a2c99(_0x2932d4),..._0x2a7ebe?{'dryRun':!![]}:{}}};}else return{'entry':null,'advisedStatus':_0x576cfb};}if(_0x2a7ebe)try{const _0xd738ce=await _0x42c155({'projectDir':_0x1a95a8,'confirm':![]});if(_0xd738ce['status']===_0x33182e(0x2be)){if('gztOT'!=='gztOT')_0x54699a['push']({'type':_0x33182e(0x3e0),'text':_0x2a15a7});else return{'name':_0x33182e(0x26e),'status':_0x33182e(0x2be),'details':{'path':_0xd738ce[_0x33182e(0x2c7)],'dryRun':!![]}};}if(_0xd738ce['status']==='skipped-needs-confirmation')return{'name':'ceraph-dir','status':_0x33182e(0x654),'details':{'path':_0xd738ce['path'],'paths':_0xd738ce[_0x33182e(0x5f5)],'dryRun':!![]}};return{'name':_0x33182e(0x26e),'status':_0x33182e(0x3dd),'details':{'unexpectedStatus':_0xd738ce[_0x33182e(0x428)],'dryRun':!![]}};}catch(_0x4af8a4){return{'name':_0x33182e(0x26e),'status':_0x33182e(0x3dd),'details':{'error':_0x4a2c99(_0x4af8a4),'dryRun':!![]}};}try{const _0x4a66f4=await _0x42c155({'projectDir':_0x1a95a8,'confirm':!![]});switch(_0x4a66f4['status']){case'deleted':return{'name':_0x33182e(0x26e),'status':_0x33182e(0x654),'details':{'path':_0x4a66f4[_0x33182e(0x2c7)],'deletedEntries':_0x4a66f4['deletedEntries']}};case _0x33182e(0x2be):return{'name':'ceraph-dir','status':_0x33182e(0x2be),'details':{'path':_0x4a66f4['path']}};case'skipped-needs-confirmation':return{'name':'ceraph-dir','status':'skipped','details':{'path':_0x4a66f4[_0x33182e(0x2c7)],'unexpected':!![]}};}}catch(_0x5b4f65){return{'name':_0x33182e(0x26e),'status':_0x33182e(0x3dd),'details':{'error':_0x4a2c99(_0x5b4f65)}};}}async function _0x5de854(_0x136203,_0x35e42d){const _0x211edd=_0xf8ecb6,_0x534923=_0x136203['revertAuth']??_0x5f4322,_0x4c788b=_0x136203['homeDir']?.();if(!_0x136203['global'])try{const _0xd373f3=await _0x534923({'global':![]},{'home':_0x4c788b});return{'name':_0x211edd(0x309),'status':_0x211edd(0x965),'details':{'path':_0xd373f3['path'],..._0x35e42d?{'dryRun':!![]}:{}},'remediation':'Re-run\x20with\x20--global\x20to\x20delete\x20~/.ceraph/auth.json.\x20Note:\x20this\x20token\x20is\x20shared\x20across\x20every\x20Ceraph\x20install\x20on\x20this\x20machine\x20—\x20removing\x20it\x20logs\x20you\x20out\x20everywhere.'};}catch(_0x36735b){return{'name':'auth','status':'error','details':{'error':_0x4a2c99(_0x36735b),..._0x35e42d?{'dryRun':!![]}:{}}};}if(_0x35e42d){if('wXXXu'!==_0x211edd(0x469))_0x14ae78=_0x38d88d('xcodebuild',['-showBuildSettings',_0x211edd(0x9b2),'-project',_0x440646],{'cwd':_0x110c66,'stdio':['ignore','pipe','ignore']});else try{const _0x1ceece=_0x4c788b??_0x351567(),_0x34189a=_0x2d1828(_0x1ceece,'.ceraph','auth.json');let _0xbc7b7c=![];try{await _0x44bc35(_0x34189a),_0xbc7b7c=!![];}catch{_0xbc7b7c=![];}return{'name':'auth','status':_0xbc7b7c?_0x211edd(0x654):_0x211edd(0x2be),'details':{'path':_0x34189a,'dryRun':!![],'wouldDelete':_0xbc7b7c}};}catch(_0xfb239c){return{'name':_0x211edd(0x309),'status':'error','details':{'error':_0x4a2c99(_0xfb239c),'dryRun':!![]}};}}try{const _0x3b87ba=await _0x534923({'global':!![]},{'home':_0x4c788b});switch(_0x3b87ba[_0x211edd(0x428)]){case'deleted':return{'name':_0x211edd(0x309),'status':'reverted','details':{'path':_0x3b87ba[_0x211edd(0x2c7)]}};case'already-reverted':return{'name':_0x211edd(0x309),'status':_0x211edd(0x2be),'details':{'path':_0x3b87ba['path']}};case _0x211edd(0x965):return{'name':'auth','status':'skipped','details':{'path':_0x3b87ba['path'],'unexpected':!![]}};}}catch(_0x1d5a8c){if('AbphC'!=='lxjgh')return{'name':'auth','status':_0x211edd(0x3dd),'details':{'error':_0x4a2c99(_0x1d5a8c)}};else{const _0x4a3da3=_0x723b1d[_0x211edd(0x3d5)]();!_0x4a3da3['some'](_0x209d5f=>_0x209d5f['getName']()===_0x945464)&&_0x1ab0db['addNamedImport'](_0xe76a65);}}}async function _0x352e65(_0xbdf33a,_0x308cac,_0x44b33e){const _0x3580d2=_0xf8ecb6,_0x10366f=_0x308cac[_0x3580d2(0x99a)]??_0x41e75a,_0x5657aa=_0x308cac['spawnRemove'];if(_0x44b33e)try{if(_0x3580d2(0x7de)!=='rDjWo'){const [_0x560c28,_0x289146]=_0x623f5['size']<=_0x16c146['size']?[_0x4d54d6,_0x10f1bf]:[_0x511722,_0x33e712];for(const _0x6fdd5b of _0x560c28['keys']()){if(_0x289146['has'](_0x6fdd5b))return!![];}return![];}else{const _0x4cfbc2=await _0x10366f(_0xbdf33a,{'spawnRemove':_0x4f103c});return _0x1548d1(_0x4cfbc2,!![]);}}catch(_0xb60e7a){return{'name':_0x3580d2(0x420),'status':'error','details':{'error':_0x4a2c99(_0xb60e7a),'dryRun':!![]}};}try{const _0x2b0387=await _0x10366f(_0xbdf33a,_0x5657aa?{'spawnRemove':_0x5657aa}:{});return _0x1548d1(_0x2b0387,![]);}catch(_0x111cf4){return{'name':_0x3580d2(0x420),'status':'error','details':{'error':_0x4a2c99(_0x111cf4)}};}}function _0x1548d1(_0x4490e2,_0x4642ec){const _0x3477a7=_0xf8ecb6,_0x25cd17=_0x4642ec?{'dryRun':!![]}:{};switch(_0x4490e2[_0x3477a7(0x428)]){case _0x3477a7(0x62c):return{'name':_0x3477a7(0x420),'status':'reverted','details':{'packageManager':_0x4490e2['pm'],'removedPackages':_0x4490e2['removedPackages'],'command':_0x4490e2['command'],..._0x25cd17}};case'nothing-to-remove':return{'name':'package','status':'already-reverted','details':{'packageManager':_0x4490e2['pm'],..._0x25cd17}};case _0x3477a7(0x9b7):return{'name':'package','status':'error','details':{'packageManager':_0x4490e2['pm'],'command':_0x4490e2['command'],'exitCode':_0x4490e2['exitCode'],..._0x25cd17},'remediation':_0x4490e2['pm']+'\x20'+(_0x4490e2['command']?.['args'][_0x3477a7(0x4ec)]('\x20')??'')+'\x20exited\x20with\x20code\x20'+_0x4490e2[_0x3477a7(0x2c3)]+_0x3477a7(0x8a3)};}}function _0x4a2c99(_0x1d3d89){const _0x6fb91e=_0xf8ecb6;return _0x1d3d89 instanceof Error?_0x1d3d89[_0x6fb91e(0x531)]:String(_0x1d3d89);}async function _0xd5391c(_0x3683cb,_0x2d10a9,_0x3ae3f1){const _0x42fb7e=_0xf8ecb6,_0x2a813a=_0x2d10a9['revertBabelConfig']??(_0x4b2ffa=>_0x58c4bb({'projectDir':_0x4b2ffa,..._0x3ae3f1?{'writeFile':async()=>void 0x0,'unlink':async()=>void 0x0}:{}}));try{const _0x2a40d9=await _0x2a813a(_0x3683cb);return _0x446825(_0x2a40d9,_0x3ae3f1);}catch(_0x4a4090){return{'name':_0x42fb7e(0x5b7),'status':_0x42fb7e(0x3dd),'details':{'error':_0x4a2c99(_0x4a4090),..._0x3ae3f1?{'dryRun':!![]}:{}}};}}function _0x446825(_0x1ece76,_0x33167d){const _0x582264=_0xf8ecb6,_0x12b04d=_0x33167d?{'dryRun':!![]}:{};switch(_0x1ece76[_0x582264(0x428)]){case _0x582264(0x654):return{'name':_0x582264(0x5b7),'status':_0x582264(0x654),'details':{'path':_0x1ece76[_0x582264(0x2c7)],'action':_0x1ece76[_0x582264(0x5a0)],..._0x12b04d}};case'already-reverted':return{'name':'babel-config','status':_0x582264(0x2be),'details':{'path':_0x1ece76[_0x582264(0x2c7)],..._0x12b04d}};case'no-config':return{'name':'babel-config','status':'already-reverted','details':{..._0x12b04d}};}}async function _0x2a7e5f(_0x54beb1,_0x4244af){const _0x1831ed=_0xf8ecb6;try{return _0x1831ed(0x5fe)==='HFxFy'?await _0x4244af():{'success':!![],'transport':'idb'};}catch(_0x177891){try{if(_0x1831ed(0x21c)!==_0x1831ed(0x512))await _0x17cebd(_0x54beb1,{'recursive':!![],'force':!![]});else return{'kind':_0x1831ed(0x4d5),'outcome':'inconclusive','expectedRoutes':_0x2066f5,'reachableBeforeReload':_0x28576e,'reason':_0x1831ed(0xaa2),'reloadMechanism':_0x1831ed(0x6c8)};}catch{}throw _0x177891;}}async function _0x58f82b(_0x53bc3b,_0x4e079e){const _0xd9603=_0xf8ecb6,_0x418098=_0x2d1828(tmpdir(),'ceraph-uninstall-boot-preview-'+Date['now']()+'-'+Math[_0xd9603(0xafe)]()[_0xd9603(0xafa)](0x24)[_0xd9603(0x795)](0x2));return _0x2a7e5f(_0x418098,async()=>{const _0x4978ec=_0xd9603,_0x4fc4e9=_0x5740e3(_0x4e079e,_0x53bc3b),_0x82969f=_0x58536c(_0x4fc4e9)?_0x4978ec(0x7b7):_0x4fc4e9,_0x37ea78=_0x2d1828(_0x418098,_0x82969f);return await _0x2fa3f7(_0x142654(_0x37ea78),{'recursive':!![]}),await copyFile(_0x53bc3b,_0x37ea78),{'projectDir':_0x418098,'tmpRoot':_0x418098};});}function _0x4648f1(_0xb3e261,_0x3d59ef){const _0x55d4e9=_0xf8ecb6,_0x175c01=[],_0x16c463=[];let _0x2c831a=0x0,_0x2f9275=0x0;for(const _0x28be50 of _0x3d59ef){if(_0x28be50['status']==='reverted'||_0x28be50[_0x55d4e9(0x428)]==='warning')_0x2c831a++;else(_0x28be50[_0x55d4e9(0x428)]==='skipped'||_0x28be50['status']===_0x55d4e9(0x2be))&&_0x2f9275++;_0x28be50['status']===_0x55d4e9(0x696)&&_0x28be50[_0x55d4e9(0x638)]&&_0x175c01[_0x55d4e9(0x4d1)](_0x28be50['remediation']),_0x28be50['status']===_0x55d4e9(0x6c7)&&_0x28be50['remediation']&&_0x16c463[_0x55d4e9(0x4d1)](_0x28be50['remediation']);}return{'workingDir':_0xb3e261,'steps':_0x3d59ef,'summary':{'reverted':_0x2c831a,'skipped':_0x2f9275,'warnings':_0x175c01,'manualSteps':_0x16c463}};}var _0x25fa81=0x40*0x400,_0x46c756=process['cwd']();function _0x38fec5(){return _0x46c756;}function _0x1a4175(_0x316476){const _0x13554f=_0xf8ecb6;return{'content':[{'type':_0x13554f(0x3e0),'text':JSON[_0x13554f(0x312)](_0x316476,null,0x2)}]};}var _0x3e0276=0x2*0x400;function _0x33ec5c(_0x4c6d3b,_0x41b0a5){const _0x9d73f3=_0xf8ecb6;if(_0x4c6d3b[_0x9d73f3(0x3b7)]<=_0x41b0a5)return _0x4c6d3b;const _0x586fae=_0x4c6d3b[_0x9d73f3(0x795)](0x0,Math['floor'](_0x41b0a5/0x2)-0x10),_0x3349f8=_0x4c6d3b['slice'](_0x4c6d3b[_0x9d73f3(0x3b7)]-(Math[_0x9d73f3(0x60f)](_0x41b0a5/0x2)-0x10));return _0x586fae+'\x20…\x20<'+(_0x4c6d3b['length']-_0x41b0a5)+'\x20bytes\x20truncated>\x20…\x20'+_0x3349f8;}function _0x344c2c(_0x3ff517,_0x24a383=_0x25fa81){const _0x552b7e=_0xf8ecb6,_0x4cd576=JSON['stringify'](_0x3ff517,null,0x2);if(_0x4cd576['length']<=_0x24a383)return _0x3ff517;const _0x58510f=_0x3ff517[_0x552b7e(0xa02)][_0x552b7e(0x86b)](_0x54373e=>{const _0x27fdbe=_0x552b7e;if(_0x54373e['details']===void 0x0)return _0x54373e;const _0x328184=JSON[_0x27fdbe(0x312)](_0x54373e[_0x27fdbe(0x65d)]);return{..._0x54373e,'details':{'truncated':!![],'originalSize':_0x328184['length']}};}),_0x5378f8={..._0x3ff517,'steps':_0x58510f},_0x3124b9=JSON['stringify'](_0x5378f8,null,0x2);if(_0x3124b9[_0x552b7e(0x3b7)]<=_0x24a383)return _0x5378f8;let _0x1225ce=0x20,_0x53a408=_0x3e0276,_0x2c55d8=_0x5378f8;while(_0x1225ce<=_0x53a408){const _0x2166f9=Math[_0x552b7e(0x60f)]((_0x1225ce+_0x53a408)/0x2),_0x41fc66={..._0x5378f8,'workingDir':_0x33ec5c(_0x5378f8[_0x552b7e(0x288)],_0x2166f9),'steps':_0x5378f8['steps'][_0x552b7e(0x86b)](_0x4dbca5=>({..._0x4dbca5,'remediation':_0x4dbca5['remediation']?_0x33ec5c(_0x4dbca5['remediation'],_0x2166f9):_0x4dbca5['remediation']})),'summary':{..._0x5378f8['summary'],'warnings':_0x5378f8[_0x552b7e(0x76c)][_0x552b7e(0x7a8)][_0x552b7e(0x86b)](_0x2851a1=>_0x33ec5c(_0x2851a1,_0x2166f9)),'manualSteps':_0x5378f8['summary']['manualSteps'][_0x552b7e(0x86b)](_0x3381fd=>_0x33ec5c(_0x3381fd,_0x2166f9))}},_0x3bad4e=JSON[_0x552b7e(0x312)](_0x41fc66,null,0x2)[_0x552b7e(0x3b7)];_0x3bad4e<=_0x24a383?(_0x2c55d8=_0x41fc66,_0x1225ce=_0x2166f9+0x1):_0x53a408=_0x2166f9-0x1;}return _0x2c55d8;}function _0x4c8a93(_0x322d42,_0x5bc52f){const _0x52a02d=_0xf8ecb6;return{'content':[{'type':'text','text':_0x322d42+'\x20failed:\x20'+(_0x5bc52f instanceof Error?_0x5bc52f[_0x52a02d(0x531)]:String(_0x5bc52f))}],'isError':!![]};}function _0x1b7f52(_0x1c2042){return new Promise(_0x57323c=>{const _0x7382f2=_0xc050,_0x3502d9=_0xda8b56(_0x1c2042[_0x7382f2(0x9c1)],_0x1c2042['args'],{'cwd':_0x1c2042['cwd'],'stdio':[_0x7382f2(0x9fa),'pipe','pipe']});_0x3502d9['stdout']?.['on']('data',()=>void 0x0),_0x3502d9['stderr']?.['on']('data',()=>void 0x0),_0x3502d9['on']('error',()=>_0x57323c({'exitCode':0x7f})),_0x3502d9['on']('exit',_0xaca37a=>_0x57323c({'exitCode':_0xaca37a??0x1}));});}function _0x18e489(_0x70c54d){const _0x311e3f=_0xf8ecb6;_0x70c54d[_0x311e3f(0x34e)](_0x311e3f(0xb1d),_0x311e3f(0xab5),{'projectDir':_0x135448[_0x311e3f(0x30d)]()['optional']()['describe']('Project\x20directory\x20to\x20inspect.\x20Defaults\x20to\x20the\x20MCP\x20server\x27s\x20cwd.\x20In\x20a\x20monorepo\x20with\x20multiple\x20RN\x20subpackages,\x20the\x20tool\x20returns\x20`monorepoConflict`\x20listing\x20each\x20candidate\x20—\x20pass\x20the\x20chosen\x20subpackage\x27s\x20path\x20here\x20to\x20disambiguate.')},async _0x53f2ff=>{const _0x268569=_0x311e3f;if(_0x268569(0x8a7)!=='FCDjc')_0x4acf38[_0x268569(0x716)](()=>{}),_0x199b0e({'ok':![],'port':this[_0x268569(0x21a)],'error':_0x5e12f5['message']??_0x14eb28[_0x268569(0x3aa)]??'listen\x20failed','errorCode':_0x386b3b['code']});else try{const _0x3aea27=_0x53f2ff['projectDir']??_0x38fec5(),_0x50e83d=await _0x18a59c(_0x3aea27,{'rootDir':_0x53d71b(_0x53f2ff['projectDir'],_0x38fec5())});return _0x1a4175(_0x50e83d);}catch(_0x46a0f4){return _0x4c8a93(_0x268569(0xb1d),_0x46a0f4);}}),_0x70c54d['tool'](_0x311e3f(0x590),_0x311e3f(0x3fa),{'projectDir':_0x135448['string']()['optional']()[_0x311e3f(0x3f0)]('Project\x20directory\x20to\x20operate\x20on.\x20Defaults\x20to\x20the\x20MCP\x20server\x27s\x20cwd.\x20Required\x20to\x20disambiguate\x20monorepo\x20multi-match.'),'purgeImages':_0x135448['boolean']()[_0x311e3f(0x768)]()[_0x311e3f(0x3f0)]('If\x20true,\x20also\x20delete\x20`.ceraph/`\x20(camera\x20test\x20images\x20+\x20design\x20snapshots\x20+\x20run\x20artifacts).\x20Default\x20false.'),'global':_0x135448['boolean']()[_0x311e3f(0x768)]()['describe']('If\x20true,\x20also\x20delete\x20`~/.ceraph/auth.json`\x20(the\x20user-global\x20OAuth\x20token;\x20this\x20logs\x20the\x20user\x20out\x20of\x20every\x20Ceraph\x20install\x20on\x20this\x20machine).\x20Default\x20false.'),'dryRun':_0x135448[_0x311e3f(0xa6d)]()['optional']()['describe'](_0x311e3f(0xa5b))},async _0x31b137=>{const _0x154be0=_0x311e3f;try{const _0x5b89ec=_0x31b137['projectDir']??_0x38fec5(),_0x985308=await _0x552728({'projectDir':_0x5b89ec,'rootDir':_0x53d71b(_0x31b137[_0x154be0(0x9aa)],_0x38fec5()),'purgeImages':_0x31b137['purgeImages']===!![],'global':_0x31b137[_0x154be0(0x97f)]===!![],'dryRun':_0x31b137[_0x154be0(0x8b1)]===!![],'nonInteractive':!![],'spawnRemove':_0x1b7f52});return _0x1a4175(_0x344c2c(_0x985308));}catch(_0x46abec){return _0x4c8a93(_0x154be0(0x590),_0x46abec);}});}import{promises as _0x335fef}from'fs';import{pathToFileURL}from'url';import{join as _0x1dbfad}from'path';var _0x18ba83=new Set([_0xf8ecb6(0x36d),'auth0','supabase',_0xf8ecb6(0x57d),_0xf8ecb6(0x4ba)]),_0x28e9a0=[_0xf8ecb6(0x7b0),_0xf8ecb6(0xa70),_0xf8ecb6(0x688),_0xf8ecb6(0x584)];async function _0x28256c(_0x2bee2a){const _0x26c0f1=_0xf8ecb6;for(const _0x5b1573 of _0x28e9a0){const _0x268cf0=_0x1dbfad(_0x2bee2a,_0x26c0f1(0x9c2)+_0x5b1573);let _0x50c05b=![];try{'fWCMj'!=='vabhA'?(await _0x335fef['access'](_0x268cf0),_0x50c05b=!![]):_0x1f96ff=_0x1337f9[_0x26c0f1(0x795)](0x1,-0x1);}catch{}if(!_0x50c05b)continue;let _0x18c816=null;if(_0x5b1573===_0x26c0f1(0x584))try{const _0x3d3de7=await _0x335fef['readFile'](_0x268cf0,'utf-8'),_0x4714f7=JSON[_0x26c0f1(0x981)](_0x3d3de7);_0x18c816=_0x4714f7?.['auth'];}catch{return _0x2a7867(_0x2bee2a);}else{const _0x376e7d=pathToFileURL(_0x268cf0)['href']+_0x26c0f1(0xa9b)+Date['now'](),_0xae1a8e=await import(_0x376e7d)['catch'](()=>null);_0xae1a8e&&(_0x18c816=(_0xae1a8e[_0x26c0f1(0x434)]&&_0xae1a8e['default']['auth'])??_0xae1a8e['auth']);}const _0x430e69=_0xe94479(_0x18c816);if(_0x430e69)return _0x430e69;return _0x2a7867(_0x2bee2a);}return _0x2a7867(_0x2bee2a);}async function _0x2a7867(_0x22c76d){const _0x240093=_0xf8ecb6,_0x12e101=_0x1dbfad(_0x22c76d,_0x240093(0x8c6));try{const _0x5afcb5=await _0x335fef[_0x240093(0x4e4)](_0x12e101,_0x240093(0x827)),_0x1459ba=_0x14c7d1(_0x5afcb5),_0xcb19f=_0x40ce78(_0x1459ba);if(_0xcb19f)return _0xcb19f;}catch{}const _0x22e384=_0x40ce78(process.env);if(_0x22e384)return _0x22e384;return null;}function _0xe94479(_0x491681){const _0x1c3db5=_0xf8ecb6;if(!_0x491681||typeof _0x491681!==_0x1c3db5(0x9e3))return null;const _0x30b4f8=_0x491681,_0x4513ab=_0x30b4f8[_0x1c3db5(0x525)];if(typeof _0x4513ab!==_0x1c3db5(0x30d))return null;if(!_0x18ba83[_0x1c3db5(0x979)](_0x4513ab))return null;const _0x119d99=_0x30b4f8['secretEnv'],_0x72a8ce=_0x4513ab==='cognito';if(typeof _0x119d99!=='string'){if(!_0x72a8ce)return null;}return{'provider':_0x4513ab,'secretEnv':typeof _0x119d99===_0x1c3db5(0x30d)?_0x119d99:'',...typeof _0x30b4f8[_0x1c3db5(0x944)]==='string'?{'domain':_0x30b4f8[_0x1c3db5(0x944)]}:{},...typeof _0x30b4f8['connection']==='string'?{'connection':_0x30b4f8[_0x1c3db5(0x7ce)]}:{},...typeof _0x30b4f8[_0x1c3db5(0x6ff)]==='string'?{'projectUrl':_0x30b4f8['projectUrl']}:{},...typeof _0x30b4f8[_0x1c3db5(0x572)]==='string'?{'userPoolId':_0x30b4f8[_0x1c3db5(0x572)]}:{},...typeof _0x30b4f8[_0x1c3db5(0x7d7)]==='string'?{'clientId':_0x30b4f8['clientId']}:{},...typeof _0x30b4f8[_0x1c3db5(0x425)]===_0x1c3db5(0x30d)?{'region':_0x30b4f8[_0x1c3db5(0x425)]}:{}};}function _0x40ce78(_0x3a3620){const _0x38da6a=_0xf8ecb6,_0x454edb=_0x3a3620[_0x38da6a(0x4dc)],_0x10b792=_0x3a3620['CERAPH_AUTH_SECRET_ENV'];if(typeof _0x454edb!=='string'||_0x454edb['length']===0x0)return null;if(!_0x18ba83[_0x38da6a(0x979)](_0x454edb))return null;const _0xa93b5a=_0x454edb==='cognito',_0xbb8a9d=typeof _0x10b792==='string'&&_0x10b792['length']>0x0;if(!_0xbb8a9d&&!_0xa93b5a)return null;return{'provider':_0x454edb,'secretEnv':_0xbb8a9d?_0x10b792:'',..._0x3a3620[_0x38da6a(0x38f)]?{'domain':_0x3a3620[_0x38da6a(0x38f)]}:{},..._0x3a3620['CERAPH_AUTH_CONNECTION']?{'connection':_0x3a3620[_0x38da6a(0x5a6)]}:{},..._0x3a3620[_0x38da6a(0x950)]?{'projectUrl':_0x3a3620['CERAPH_AUTH_PROJECT_URL']}:{},..._0x3a3620[_0x38da6a(0x3d2)]?{'userPoolId':_0x3a3620[_0x38da6a(0x3d2)]}:{},..._0x3a3620['CERAPH_AUTH_CLIENT_ID']?{'clientId':_0x3a3620['CERAPH_AUTH_CLIENT_ID']}:{},..._0x3a3620[_0x38da6a(0x549)]?{'region':_0x3a3620[_0x38da6a(0x549)]}:{}};}function _0x14c7d1(_0x5180ab){const _0x2a18dd=_0xf8ecb6,_0x10206d={};for(const _0x336d20 of _0x5180ab[_0x2a18dd(0x51a)](/\r?\n/)){const _0x5a31ce=_0x336d20[_0x2a18dd(0x668)]();if(_0x5a31ce[_0x2a18dd(0x3b7)]===0x0||_0x5a31ce[_0x2a18dd(0x746)]('#'))continue;const _0xbed32e=_0x5a31ce[_0x2a18dd(0x4ca)]('=');if(_0xbed32e<=0x0)continue;const _0x2b4f44=_0x5a31ce[_0x2a18dd(0x795)](0x0,_0xbed32e)['trim']();let _0x2343ba=_0x5a31ce['slice'](_0xbed32e+0x1)['trim']();(_0x2343ba[_0x2a18dd(0x746)]('\x22')&&_0x2343ba['endsWith']('\x22')||_0x2343ba[_0x2a18dd(0x746)]('\x27')&&_0x2343ba['endsWith']('\x27'))&&(_0x2343ba=_0x2343ba[_0x2a18dd(0x795)](0x1,-0x1)),_0x10206d[_0x2b4f44]=_0x2343ba;}return _0x10206d;}import{promises as _0x28b91c}from'fs';import{join as _0x3e8cb2}from'path';var _0x4fda8d=class extends Error{[_0xf8ecb6(0x3aa)];constructor(_0x1bc69d,_0x1a6ea6,_0x2c5f6a){const _0xf5fd95=_0xf8ecb6;super(_0x1a6ea6),this['name']=_0xf5fd95(0x3ca),this['code']=_0x1bc69d;if(_0x2c5f6a!==void 0x0)this['cause']=_0x2c5f6a;}};import{randomBytes as _0x1d961b}from'crypto';function _0x542720(_0x3a1495){const _0xf05fdf=_0xf8ecb6,_0x2260e3=(_0x3a1495||'user')['toLowerCase']()[_0xf05fdf(0x42e)](/[^a-z0-9-]/g,'-')['replace'](/-+/g,'-')[_0xf05fdf(0x42e)](/^-|-$/g,'')[_0xf05fdf(0x795)](0x0,0x20),_0x90538e=_0x1d961b(0x3)[_0xf05fdf(0xafa)](_0xf05fdf(0x992));return'ceraph-'+_0x2260e3+'-'+_0x90538e+_0xf05fdf(0x2de);}function _0x44998b(){const _0x27d901=_0xf8ecb6,_0x2b4ffb=_0x1d961b(0x10)['toString'](_0x27d901(0x343))[_0x27d901(0x42e)](/[^a-zA-Z0-9]/g,''),_0x34755e=_0x2b4ffb['length']>=0x14?_0x2b4ffb['slice'](0x0,0x14):_0x2b4ffb['padEnd'](0x14,'Aa1');return'A'+_0x34755e[_0x27d901(0x795)](0x1,0xa)+'a'+_0x34755e[_0x27d901(0x795)](0xb,0x13)+'9';}function _0x102efe(_0xa251b5){const _0x266ea5=_0xf8ecb6,_0x1f3d46=process.env[_0xa251b5.secretEnv];if(typeof _0x1f3d46!==_0x266ea5(0x30d)||_0x1f3d46['length']===0x0)throw new _0x4fda8d(_0x266ea5(0xa7e),_0x266ea5(0x4b4)+_0xa251b5['secretEnv']+'\x20in\x20your\x20environment.');return _0x1f3d46;}async function _0x4ecdd2(){const _0x520a02=_0xf8ecb6;try{return await import('@clerk/backend');}catch(_0xc9112c){throw new _0x4fda8d(_0x520a02(0x4ed),_0x520a02(0x867),_0xc9112c);}}var _0x2511a7=class{constructor(_0x52bdf1){const _0x1d82d1=_0xf8ecb6;this[_0x1d82d1(0x2f7)]=_0x52bdf1;}[_0xf8ecb6(0x7e0)]='clerk';async['provision'](_0x599230){const _0x1d1137=_0xf8ecb6,_0x2db25e=_0x102efe(this['config']),_0x5ba72e=await _0x4ecdd2(),_0x31691b=_0x5ba72e['createClerkClient']({'secretKey':_0x2db25e});try{if(_0x1d1137(0x49c)!==_0x1d1137(0x49c)){const _0x279fb4=_0x2deb91['getImportDeclaration'](_0x42995f);if(!_0x279fb4)return![];const _0x203f99=_0x279fb4['getNamedImports'](),_0x3e35d8=_0x203f99[_0x1d1137(0x415)](_0x10a409=>_0x10a409[_0x1d1137(0x385)]()===_0x17f917);if(!_0x3e35d8)return![];_0x3e35d8['remove']();const _0x4e97aa=_0x279fb4['getNamedImports'](),_0x9084e9=_0x279fb4[_0x1d1137(0x459)]()!=null;return _0x4e97aa['length']===0x0&&!_0x9084e9&&_0x279fb4['remove'](),!![];}else{const _0x9a4749=await _0x31691b['users']['createUser']({'emailAddress':[_0x599230['email']],'password':_0x599230[_0x1d1137(0x98a)],'skipPasswordChecks':!![],'publicMetadata':{'ceraphTestLabel':_0x599230[_0x1d1137(0x960)]}});return{'providerUserId':_0x9a4749['id'],'email':_0x599230[_0x1d1137(0x41e)],'password':_0x599230['password']};}}catch(_0xf61926){const _0x29e638=_0xf61926?.[_0x1d1137(0x5ac)],_0x17aece=Array['isArray'](_0x29e638)&&_0x29e638['some'](_0x1c6510=>_0x1c6510?.['code']===_0x1d1137(0x43b));if(_0x17aece)throw new _0x4fda8d(_0x1d1137(0x869),'Clerk\x20createUser\x20conflict:\x20email\x20already\x20exists',_0xf61926);const _0x53c999=_0xf61926?.[_0x1d1137(0x531)]??String(_0xf61926),_0x268add=/already taken|exists|conflict|duplicate/i[_0x1d1137(0x8aa)](_0x53c999)?_0x1d1137(0x869):_0x1d1137(0x65b);throw new _0x4fda8d(_0x268add,'Clerk\x20createUser\x20failed:\x20'+_0x53c999,_0xf61926);}}async['cleanup'](_0x5b8185){const _0x558027=_0xf8ecb6,_0x27fa0f=_0x102efe(this['config']),_0x4b6998=await _0x4ecdd2(),_0x6e726a=_0x4b6998['createClerkClient']({'secretKey':_0x27fa0f});try{await _0x6e726a[_0x558027(0x785)]['deleteUser'](_0x5b8185);}catch(_0x4fe9f7){const _0x2db16e=_0x4fe9f7?.[_0x558027(0x531)]??String(_0x4fe9f7),_0x3739d7=_0x4fe9f7?.['status']??_0x4fe9f7?.[_0x558027(0x66c)];if(_0x3739d7===0x194||/not[\s_-]?found|resource not found/i[_0x558027(0x8aa)](_0x2db16e))return;throw new _0x4fda8d(_0x558027(0x65b),_0x558027(0xac3)+_0x2db16e,_0x4fe9f7);}}};async function _0x405fbf(){const _0x4efc0c=_0xf8ecb6;try{if('MIraD'!=='MIraD'){if(!this['bootCaptureMode'])return{'ok':!![]};if(typeof _0x45d0fb[_0x4efc0c(0x88a)]!=='string'||_0x29e5cf['key']['length']===0x0)return{'ok':![],'error':_0x4efc0c(0x916)};const _0xc484e4=typeof _0x38decb['timestampMs']==='number'&&_0x36f992['isFinite'](_0x1ef2de[_0x4efc0c(0x719)])?new _0x34751f(_0x2c3fc0[_0x4efc0c(0x719)])['toISOString']():new _0x103283()[_0x4efc0c(0x471)](),_0x2ddf09=typeof _0x14e53f[_0x4efc0c(0x531)]===_0x4efc0c(0x30d)&&_0x3b4039[_0x4efc0c(0x531)][_0x4efc0c(0x3b7)]>0x0?_0x38295e[_0x4efc0c(0x531)]:_0x4efc0c(0x6b2),_0x77585a={'key':_0x2f88f9[_0x4efc0c(0x88a)],'valueShape':_0x2ddf09,'timestamp':_0xc484e4,...typeof _0x547316['valueHash']===_0x4efc0c(0x30d)&&_0x9cd09e['valueHash'][_0x4efc0c(0x3b7)]>0x0?{'valueHash':_0x1412eb['valueHash']}:{}};this[_0x4efc0c(0x8a0)][_0x4efc0c(0x4d1)](_0x77585a);while(this[_0x4efc0c(0x8a0)]['length']>_0x5bd4ad){this['asyncStorageReadBuffer'][_0x4efc0c(0x9a6)]();}return{'ok':!![]};}else return await import('auth0');}catch(_0x1f34eb){throw new _0x4fda8d('sdk-missing','auth\x20provider\x20\x27auth0\x27\x20requires\x20auth0\x20in\x20package.json.\x20Run:\x20npm\x20install\x20auth0',_0x1f34eb);}}var _0x34b125=_0xf8ecb6(0x497),_0xa15ea0=class{constructor(_0x39ca07){const _0x2177ee=_0xf8ecb6;this[_0x2177ee(0x2f7)]=_0x39ca07;}[_0xf8ecb6(0x7e0)]='auth0';async[_0xf8ecb6(0x280)](_0x148d57){const _0xff7b00=_0xf8ecb6;if(!this['config']['domain'])throw new _0x4fda8d(_0xff7b00(0x65b),'Auth0\x20adapter\x20requires\x20`domain`\x20in\x20ceraph.config.js\x20(the\x20Auth0\x20tenant\x20domain,\x20e.g.,\x20\x27myorg.auth0.com\x27).');const _0x524bbe=_0x102efe(this['config']),_0x657f6d=await _0x405fbf(),_0x2ede5c=new _0x657f6d['ManagementClient']({'domain':this['config'][_0xff7b00(0x944)],'token':_0x524bbe}),_0x301742=this[_0xff7b00(0x2f7)]['connection']??_0x34b125;try{const _0x14a733=await _0x2ede5c[_0xff7b00(0x785)]['create']({'connection':_0x301742,'email':_0x148d57[_0xff7b00(0x41e)],'password':_0x148d57[_0xff7b00(0x98a)],'email_verified':!![],'app_metadata':{'ceraphTestLabel':_0x148d57[_0xff7b00(0x960)]}}),_0x3552ea=_0x14a733[_0xff7b00(0x78f)]?.['user_id']??_0x14a733[_0xff7b00(0xa63)];if(!_0x3552ea)throw new _0x4fda8d('api-error','Auth0\x20createUser\x20returned\x20no\x20user_id.');return{'providerUserId':_0x3552ea,'email':_0x148d57['email'],'password':_0x148d57[_0xff7b00(0x98a)]};}catch(_0x55eea7){if(_0x55eea7 instanceof _0x4fda8d)throw _0x55eea7;const _0x58cd89=_0x55eea7?.[_0xff7b00(0x531)]??String(_0x55eea7),_0x328173=/exists|conflict|duplicate/i[_0xff7b00(0x8aa)](_0x58cd89)?'user-exists':'api-error';throw new _0x4fda8d(_0x328173,'Auth0\x20createUser\x20failed:\x20'+_0x58cd89,_0x55eea7);}}async[_0xf8ecb6(0x2f5)](_0x51eb6d){const _0x3d4c99=_0xf8ecb6;if(!this['config'][_0x3d4c99(0x944)])throw new _0x4fda8d(_0x3d4c99(0x65b),_0x3d4c99(0x9cc));const _0x44d386=_0x102efe(this[_0x3d4c99(0x2f7)]),_0x4bdfa7=await _0x405fbf(),_0x4b12ff=new _0x4bdfa7[(_0x3d4c99(0x7d9))]({'domain':this['config'][_0x3d4c99(0x944)],'token':_0x44d386});try{await _0x4b12ff['users'][_0x3d4c99(0x265)]({'id':_0x51eb6d});}catch(_0x584c77){const _0x396706=_0x584c77?.[_0x3d4c99(0x531)]??String(_0x584c77),_0x82755e=_0x584c77?.[_0x3d4c99(0x66c)]??_0x584c77?.['status'];if(_0x82755e===0x194||/not[\s_-]?found/i['test'](_0x396706))return;throw new _0x4fda8d('api-error',_0x3d4c99(0xae3)+_0x396706,_0x584c77);}}};async function _0xaf8d77(){const _0x3d01a7=_0xf8ecb6;try{return await import('@supabase/supabase-js');}catch(_0x911dea){throw new _0x4fda8d(_0x3d01a7(0x4ed),'auth\x20provider\x20\x27supabase\x27\x20requires\x20@supabase/supabase-js\x20in\x20package.json.\x20Run:\x20npm\x20install\x20@supabase/supabase-js',_0x911dea);}}var _0x58742d=class{constructor(_0xe74034){const _0x17c476=_0xf8ecb6;this[_0x17c476(0x2f7)]=_0xe74034;}[_0xf8ecb6(0x7e0)]=_0xf8ecb6(0x23f);async['provision'](_0x431514){const _0x5ae4e8=_0xf8ecb6;if(!this[_0x5ae4e8(0x2f7)][_0x5ae4e8(0x6ff)])throw new _0x4fda8d('api-error','Supabase\x20adapter\x20requires\x20`projectUrl`\x20in\x20ceraph.config.js\x20(the\x20Supabase\x20project\x20URL,\x20e.g.,\x20\x27https://abc.supabase.co\x27).');const _0x251412=_0x102efe(this['config']),_0x5eba8e=await _0xaf8d77(),_0x4833e9=_0x5eba8e['createClient'](this['config']['projectUrl'],_0x251412,{'auth':{'autoRefreshToken':![],'persistSession':![]}});try{const _0x54a37a=await _0x4833e9['auth']['admin']['createUser']({'email':_0x431514['email'],'password':_0x431514['password'],'email_confirm':!![],'user_metadata':{'ceraphTestLabel':_0x431514['label']}});if(_0x54a37a['error']){const _0x3ef53b=_0x54a37a[_0x5ae4e8(0x3dd)][_0x5ae4e8(0x531)],_0x46d51e=/exists|already registered|duplicate/i[_0x5ae4e8(0x8aa)](_0x3ef53b)?'user-exists':'api-error';throw new _0x4fda8d(_0x46d51e,_0x5ae4e8(0x6ad)+_0x3ef53b);}const _0x2d7f0f=_0x54a37a[_0x5ae4e8(0x78f)]['user'];if(!_0x2d7f0f)throw new _0x4fda8d(_0x5ae4e8(0x65b),_0x5ae4e8(0x815));return{'providerUserId':_0x2d7f0f['id'],'email':_0x431514[_0x5ae4e8(0x41e)],'password':_0x431514[_0x5ae4e8(0x98a)]};}catch(_0x1fd46c){if(_0x1fd46c instanceof _0x4fda8d)throw _0x1fd46c;throw new _0x4fda8d('api-error',_0x5ae4e8(0x6ad)+(_0x1fd46c?.['message']??String(_0x1fd46c)),_0x1fd46c);}}async[_0xf8ecb6(0x2f5)](_0x544e99){const _0x506a2d=_0xf8ecb6;if(!this[_0x506a2d(0x2f7)]['projectUrl'])throw new _0x4fda8d('api-error','Supabase\x20adapter\x20requires\x20`projectUrl`\x20for\x20cleanup.');const _0x64ce3=_0x102efe(this['config']),_0x1e7630=await _0xaf8d77(),_0x40df19=_0x1e7630[_0x506a2d(0x458)](this[_0x506a2d(0x2f7)]['projectUrl'],_0x64ce3,{'auth':{'autoRefreshToken':![],'persistSession':![]}});try{if('FaMfn'!==_0x506a2d(0x6dd))_0x102716=_0x175d73(_0x459d13,_0x4419d2,{'stdio':['ignore','pipe',_0x506a2d(0x9e1)]});else{const _0x518cb6=await _0x40df19['auth'][_0x506a2d(0xa74)]['deleteUser'](_0x544e99);if(_0x518cb6[_0x506a2d(0x3dd)]){const _0x384ea4=_0x518cb6['error']['message'];if(/not[\s_-]?found|404/i[_0x506a2d(0x8aa)](_0x384ea4))return;throw new _0x4fda8d(_0x506a2d(0x65b),'Supabase\x20deleteUser\x20failed:\x20'+_0x384ea4);}}}catch(_0x30f1d7){if(_0x30f1d7 instanceof _0x4fda8d)throw _0x30f1d7;const _0x142ea0=_0x30f1d7?.[_0x506a2d(0x531)]??String(_0x30f1d7);if(/not[\s_-]?found|404/i['test'](_0x142ea0))return;throw new _0x4fda8d(_0x506a2d(0x65b),_0x506a2d(0x52b)+_0x142ea0,_0x30f1d7);}}};async function _0x50fba0(){const _0x284903=_0xf8ecb6;try{if('IztoR'!=='JcaRP'){const _0x94d22f=await import(_0x284903(0x725)),_0x57fc4c=_0x94d22f[_0x284903(0x434)]??_0x94d22f;if(!_0x57fc4c[_0x284903(0x4cd)])throw new Error(_0x284903(0x852));return _0x57fc4c;}else return _0x2eaa46(_0x24a02a)!==null;}catch(_0xf32fed){throw new _0x4fda8d(_0x284903(0x4ed),'auth\x20provider\x20\x27firebase\x27\x20requires\x20firebase-admin\x20in\x20package.json.\x20Run:\x20npm\x20install\x20firebase-admin',_0xf32fed);}}function _0x58fc02(_0x52394e){const _0x487b8b=_0xf8ecb6;try{const _0x3051f2=JSON[_0x487b8b(0x981)](_0x52394e);if(_0x3051f2&&typeof _0x3051f2==='object')return _0x3051f2;}catch{}return _0x52394e;}var _0x451e51=class{constructor(_0x421f04){const _0x9c679c=_0xf8ecb6;this[_0x9c679c(0x2f7)]=_0x421f04,this[_0x9c679c(0x6aa)]='ceraph-test-data-'+Date[_0x9c679c(0x2f8)]()+'-'+Math[_0x9c679c(0xafe)]()[_0x9c679c(0xafa)](0x24)['slice'](0x2);}[_0xf8ecb6(0x7e0)]='firebase';['appName'];async['getAuth'](){const _0x1a6c3c=_0xf8ecb6,_0x43d948=_0x102efe(this[_0x1a6c3c(0x2f7)]),_0x51301e=await _0x50fba0(),_0x344856=_0x51301e[_0x1a6c3c(0x9d4)]['cert'](_0x58fc02(_0x43d948));let _0x1cf43d;try{_0x1cf43d=_0x51301e['initializeApp']({'credential':_0x344856},this['appName']);}catch(_0x32aae2){const _0x2cc4cc=_0x32aae2?.['message']??String(_0x32aae2);if(/already exists/i['test'](_0x2cc4cc))_0x1cf43d=_0x51301e[_0x1a6c3c(0x7b4)](this[_0x1a6c3c(0x6aa)]);else throw _0x32aae2;}return{'auth':_0x51301e['auth'](_0x1cf43d),'app':_0x1cf43d};}async[_0xf8ecb6(0x280)](_0x575b9d){const _0x458149=_0xf8ecb6,{auth:_0x592cc4,app:_0x39e488}=await this[_0x458149(0xa83)]();try{const _0x31d18f=await _0x592cc4[_0x458149(0x3b6)]({'email':_0x575b9d['email'],'password':_0x575b9d[_0x458149(0x98a)],'emailVerified':!![],'displayName':'Ceraph\x20Test\x20('+_0x575b9d['label']+')'}),_0x250c98=await _0x592cc4[_0x458149(0x8c4)](_0x31d18f[_0x458149(0x9eb)],{'ceraphTestLabel':_0x575b9d[_0x458149(0x960)]})[_0x458149(0x48b)](()=>void 0x0);return{'providerUserId':_0x31d18f[_0x458149(0x9eb)],'email':_0x575b9d[_0x458149(0x41e)],'password':_0x575b9d['password'],..._0x250c98?{'sessionToken':_0x250c98}:{}};}catch(_0x55044f){const _0x32536b=_0x55044f?.['message']??String(_0x55044f),_0x46e1d7=/exists|already-exists|duplicate/i['test'](_0x32536b)?_0x458149(0x869):_0x458149(0x65b);throw new _0x4fda8d(_0x46e1d7,'Firebase\x20createUser\x20failed:\x20'+_0x32536b,_0x55044f);}finally{await _0x39e488['delete']()['catch'](()=>void 0x0);}}async['cleanup'](_0x4c6a2e){const _0x45ea29=_0xf8ecb6,{auth:_0xbf29d1,app:_0x1d1b0f}=await this[_0x45ea29(0xa83)]();try{if('ySeTL'!==_0x45ea29(0x63f)){_0x4b3138({'code':0x7f,'stdout':'','stderr':_0x4be633 instanceof _0x34e2c6?_0x388d73[_0x45ea29(0x531)]:_0x41d362(_0x5158e4)});return;}else await _0xbf29d1[_0x45ea29(0x962)](_0x4c6a2e);}catch(_0x15e3f9){const _0x1a92c6=_0x15e3f9?.['code'],_0x15d51e=_0x15e3f9?.['message']??String(_0x15e3f9);if(_0x1a92c6===_0x45ea29(0x322)||/user-not-found|no user record|not[\s_-]?found/i[_0x45ea29(0x8aa)](_0x15d51e)){if(_0x45ea29(0x42d)!=='EUsRm')return{'error':_0x459de4(_0x2d8535)};else return;}throw new _0x4fda8d('api-error',_0x45ea29(0x750)+_0x15d51e,_0x15e3f9);}finally{_0x45ea29(0x4c1)===_0x45ea29(0x4c1)?await _0x1d1b0f['delete']()[_0x45ea29(0x48b)](()=>void 0x0):_0x2f51[_0x45ea29(0x314)]=_0x553ab1(_0x4bd998);}}};async function _0x8cd945(){const _0x29f40e=_0xf8ecb6;try{return await import('@aws-sdk/client-cognito-identity-provider');}catch(_0x935846){throw new _0x4fda8d(_0x29f40e(0x4ed),_0x29f40e(0x283),_0x935846);}}var _0x1274f7=class{constructor(_0xe45af6){this['config']=_0xe45af6;}[_0xf8ecb6(0x7e0)]='cognito';[_0xf8ecb6(0x4f8)](_0xf7c4cf){const _0x5f28de=_0xf8ecb6,_0x1cc662=((()=>{try{return _0x102efe(this['config']);}catch{return null;}})()),_0x5f5067=process.env.AWS_SECRET_ACCESS_KEY,_0x20986f=_0x1cc662&&_0x5f5067?{'accessKeyId':_0x1cc662,'secretAccessKey':_0x5f5067}:void 0x0;return new _0xf7c4cf['CognitoIdentityProviderClient']({'region':this[_0x5f28de(0x2f7)]['region']??process.env.AWS_REGION,..._0x20986f?{'credentials':_0x20986f}:{}});}async['provision'](_0x3d8e37){const _0x5b8554=_0xf8ecb6;if(!this['config'][_0x5b8554(0x572)])throw new _0x4fda8d(_0x5b8554(0x65b),'Cognito\x20adapter\x20requires\x20`userPoolId`\x20in\x20ceraph.config.js.');const _0x22b3c9=await _0x8cd945(),_0x3dd492=this[_0x5b8554(0x4f8)](_0x22b3c9);try{return await _0x3dd492[_0x5b8554(0x5f7)](new _0x22b3c9['AdminCreateUserCommand']({'UserPoolId':this[_0x5b8554(0x2f7)]['userPoolId'],'Username':_0x3d8e37[_0x5b8554(0x41e)],'TemporaryPassword':_0x3d8e37['password'],'MessageAction':_0x5b8554(0x929),'UserAttributes':[{'Name':'email','Value':_0x3d8e37[_0x5b8554(0x41e)]},{'Name':'email_verified','Value':'true'}]})),await _0x3dd492['send'](new _0x22b3c9[(_0x5b8554(0x846))]({'UserPoolId':this[_0x5b8554(0x2f7)]['userPoolId'],'Username':_0x3d8e37[_0x5b8554(0x41e)],'Password':_0x3d8e37[_0x5b8554(0x98a)],'Permanent':!![]})),{'providerUserId':_0x3d8e37['email'],'email':_0x3d8e37[_0x5b8554(0x41e)],'password':_0x3d8e37['password']};}catch(_0x3dbba2){if('bIkqj'!=='bIkqj')return![];else{const _0x169a77=_0x3dbba2?.[_0x5b8554(0x531)]??String(_0x3dbba2),_0x5395d2=/UsernameExistsException|already exists/i['test'](_0x169a77)?'user-exists':'api-error';throw new _0x4fda8d(_0x5395d2,'Cognito\x20provision\x20failed:\x20'+_0x169a77,_0x3dbba2);}}}async[_0xf8ecb6(0x2f5)](_0x491cac){const _0x4c7239=_0xf8ecb6;if(!this[_0x4c7239(0x2f7)]['userPoolId'])throw new _0x4fda8d('api-error',_0x4c7239(0x472));const _0x3b909b=await _0x8cd945(),_0x5b02f0=this[_0x4c7239(0x4f8)](_0x3b909b);try{await _0x5b02f0[_0x4c7239(0x5f7)](new _0x3b909b[(_0x4c7239(0x233))]({'UserPoolId':this[_0x4c7239(0x2f7)][_0x4c7239(0x572)],'Username':_0x491cac}));}catch(_0x373a89){const _0x4ebbf2=_0x373a89?.[_0x4c7239(0x9e5)],_0x4191e3=_0x373a89?.[_0x4c7239(0x531)]??String(_0x373a89);if(_0x4ebbf2==='UserNotFoundException'||/UserNotFoundException|user does not exist|not[\s_-]?found/i[_0x4c7239(0x8aa)](_0x4191e3))return;throw new _0x4fda8d('api-error',_0x4c7239(0xa61)+_0x4191e3,_0x373a89);}}},_0x243a10={'clerk':_0xf8ecb6(0x79f),'auth0':_0xf8ecb6(0x42b),'supabase':_0xf8ecb6(0x29d),'firebase':_0xf8ecb6(0x725),'cognito':_0xf8ecb6(0x5a4)},_0x299577={'clerk':_0x2511a7,'auth0':_0xa15ea0,'supabase':_0x58742d,'firebase':_0x451e51,'cognito':_0x1274f7};async function _0x22a1b8(_0x6df9f3,_0x5ef60f){const _0x294751=_0xf8ecb6,_0x29b09f=_0x243a10[_0x5ef60f['provider']],_0x499dd2=await _0x4cefc3(_0x6df9f3,_0x29b09f);if(!_0x499dd2)throw new _0x4fda8d('sdk-missing',_0x294751(0x2a9)+_0x5ef60f['provider']+'\x27\x20requires\x20'+_0x29b09f+_0x294751(0x7e1)+_0x29b09f);const _0x176887=_0x299577[_0x5ef60f[_0x294751(0x525)]];return new _0x176887(_0x5ef60f);}async function _0x4cefc3(_0x5f1af5,_0x43a7bc){const _0x4d05f9=_0xf8ecb6;try{const _0x2e7143=await _0x28b91c[_0x4d05f9(0x4e4)](_0x3e8cb2(_0x5f1af5,_0x4d05f9(0x2a8)),'utf-8'),_0x31c2b8=JSON[_0x4d05f9(0x981)](_0x2e7143),_0x18451f=[_0x31c2b8[_0x4d05f9(0x8b4)],_0x31c2b8[_0x4d05f9(0xb2a)],_0x31c2b8[_0x4d05f9(0x6b9)],_0x31c2b8[_0x4d05f9(0x456)]];for(const _0x56ad21 of _0x18451f){if(_0x56ad21&&Object[_0x4d05f9(0x46d)][_0x4d05f9(0x36e)][_0x4d05f9(0x927)](_0x56ad21,_0x43a7bc))return!![];}return![];}catch{if('kvLWL'!=='kvLWL')delete _0x4cd745['FileChanged'];else return![];}}import{randomUUID}from'crypto';var _0x3eb064=0x18*0x3c*0x3c*0x3e8,_0x271e33=class{constructor(_0x2a397d){const _0x3509e4=_0xf8ecb6;this['opts']=_0x2a397d,this[_0x3509e4(0x534)]=_0x2a397d['onDemandTtlMs']??_0x3eb064,this['jitLabel']=_0x2a397d[_0x3509e4(0x502)]??_0x3509e4(0x356),this['readyPromise']=new Promise(_0x203798=>{const _0x1839c6=_0x3509e4;_0x2a397d[_0x1839c6(0x6cf)]!==void 0x0?_0x203798():this['readyResolve']=_0x203798;});}['jitUser']=null;[_0xf8ecb6(0x534)];['jitLabel'];[_0xf8ecb6(0x610)]=null;['readyPromise'];[_0xf8ecb6(0x780)](_0x30fb1a){const _0x2bacc4=_0xf8ecb6;this[_0x2bacc4(0x83e)][_0x2bacc4(0x6cf)]=_0x30fb1a,this[_0x2bacc4(0x610)]&&(this[_0x2bacc4(0x610)](),this[_0x2bacc4(0x610)]=null);}['whenReady'](){const _0x1853b5=_0xf8ecb6;return this[_0x1853b5(0x74b)];}[_0xf8ecb6(0x7cf)](){const _0x5d7f37=_0xf8ecb6;return this[_0x5d7f37(0x83e)][_0x5d7f37(0x6cf)]!=null;}async[_0xf8ecb6(0x8ec)](){const _0x17b5f3=_0xf8ecb6;return this['opts'][_0x17b5f3(0x8ec)]();}async[_0xf8ecb6(0x672)](){const _0x2b8eff=_0xf8ecb6;await this['whenReady']();if(this[_0x2b8eff(0x778)])return{'user':this['jitUser'],'fresh':![]};if(!this['opts'][_0x2b8eff(0x6cf)])throw new _0x4fda8d(_0x2b8eff(0x8de),_0x2b8eff(0x53a));const _0xcc21d5=_0x542720(this['jitLabel']),_0x2c2dd2=_0x44998b(),_0x66da79=await this[_0x2b8eff(0x83e)]['adapter'][_0x2b8eff(0x280)]({'email':_0xcc21d5,'password':_0x2c2dd2,'label':this['jitLabel']}),_0x26c125={'id':randomUUID(),'providerUserId':_0x66da79['providerUserId'],'email':_0x66da79[_0x2b8eff(0x41e)],'password':_0x66da79['password'],..._0x66da79['sessionToken']?{'sessionToken':_0x66da79['sessionToken']}:{},'tier':_0x2b8eff(0x356),'createdAt':new Date()[_0x2b8eff(0x471)]()};return await this['opts'][_0x2b8eff(0x6e5)][_0x2b8eff(0x715)](async()=>{const _0x207168=_0x2b8eff,_0x32d942=await this[_0x207168(0x83e)][_0x207168(0x6e5)][_0x207168(0x511)]();await this['opts'][_0x207168(0x6e5)][_0x207168(0x5c8)]([..._0x32d942,_0x26c125]);}),this[_0x2b8eff(0x778)]=_0x26c125,{'user':_0x26c125,'fresh':!![]};}[_0xf8ecb6(0x4b2)](){const _0x174c2d=_0xf8ecb6;return this[_0x174c2d(0x778)];}async['provisionOnDemand'](_0x879652={}){const _0x1511b0=_0xf8ecb6;await this['whenReady']();if(!this[_0x1511b0(0x83e)]['adapter'])throw new _0x4fda8d('not-configured','No\x20auth\x20provider\x20configured.\x20Add\x20`auth:\x20{\x20provider,\x20secretEnv\x20}`\x20to\x20ceraph.config.js\x20to\x20enable\x20on-demand\x20test-user\x20provisioning.');const _0x169590=_0x879652['tag']??'on-demand',_0x37faeb=_0x542720(_0x169590),_0x550a58=_0x44998b(),_0x29e56d=await this[_0x1511b0(0x83e)][_0x1511b0(0x6cf)]['provision']({'email':_0x37faeb,'password':_0x550a58,'label':_0x169590}),_0x584dbe=Date[_0x1511b0(0x2f8)](),_0x50f096={'id':randomUUID(),'providerUserId':_0x29e56d['providerUserId'],'email':_0x29e56d['email'],'password':_0x29e56d['password'],..._0x29e56d[_0x1511b0(0x9cb)]?{'sessionToken':_0x29e56d[_0x1511b0(0x9cb)]}:{},'tier':'on-demand','createdAt':new Date(_0x584dbe)['toISOString'](),..._0x879652['tag']?{'tag':_0x879652[_0x1511b0(0x630)]}:{},'ttlExpiresAt':new Date(_0x584dbe+this['onDemandTtlMs'])['toISOString']()};return await this['opts'][_0x1511b0(0x6e5)]['withLock'](async()=>{const _0x22b866=_0x1511b0,_0x52f945=await this['opts']['store'][_0x22b866(0x511)]();await this['opts'][_0x22b866(0x6e5)]['save']([..._0x52f945,_0x50f096]);}),{'user':_0x50f096,'fresh':!![]};}async[_0xf8ecb6(0x8d1)](){const _0x50e2a2=_0xf8ecb6;await this['whenReady']();const _0x4cb805=await this[_0x50e2a2(0x83e)]['store'][_0x50e2a2(0x511)]();return _0x4cb805['filter'](_0x6cbf08=>_0x6cbf08[_0x50e2a2(0x69a)]===_0x50e2a2(0xa45));}async[_0xf8ecb6(0x2f5)](_0x465093){const _0x54aa80=_0xf8ecb6;return await this[_0x54aa80(0x533)](),this['opts']['store'][_0x54aa80(0x715)](async()=>{const _0x52e88f=_0x54aa80,_0x30cf81=await this['opts']['store'][_0x52e88f(0x511)]();let _0x46a531;if(_0x465093['all'])_0x46a531=_0x30cf81['filter'](_0x42e2df=>_0x42e2df['tier']==='on-demand');else{if(_0x465093['id'])_0x46a531=_0x30cf81['filter'](_0x53e3a0=>_0x53e3a0['id']===_0x465093['id']&&_0x53e3a0[_0x52e88f(0x69a)]===_0x52e88f(0xa45));else return{'deleted':0x0};}for(const _0x98a1d9 of _0x46a531){await this['cleanupOne'](_0x98a1d9);}const _0x1b390a=_0x30cf81['filter'](_0x555ac9=>!_0x46a531[_0x52e88f(0x275)](_0xcb4662=>_0xcb4662['id']===_0x555ac9['id']));return await this[_0x52e88f(0x83e)][_0x52e88f(0x6e5)][_0x52e88f(0x5c8)](_0x1b390a),{'deleted':_0x46a531[_0x52e88f(0x3b7)]};});}async['sweepExpired'](){const _0x22a705=_0xf8ecb6;return await this[_0x22a705(0x533)](),this[_0x22a705(0x83e)]['store'][_0x22a705(0x715)](async()=>{const _0x13b950=_0x22a705,_0x561090=await this[_0x13b950(0x83e)][_0x13b950(0x6e5)][_0x13b950(0x511)](),_0x3ce5ce=new Date(),_0x37a098=_0x561090[_0x13b950(0x529)](_0x576306=>_0x576306[_0x13b950(0x69a)]===_0x13b950(0xa45)&&_0x576306['ttlExpiresAt']!==void 0x0&&new Date(_0x576306[_0x13b950(0x579)])<=_0x3ce5ce);if(_0x37a098[_0x13b950(0x3b7)]===0x0)return{'expired':0x0};for(const _0x44da57 of _0x37a098){await this['cleanupOne'](_0x44da57);}const _0x17980f=_0x561090[_0x13b950(0x529)](_0x5d7359=>!_0x37a098[_0x13b950(0x275)](_0x53a234=>_0x53a234['id']===_0x5d7359['id']));return await this['opts'][_0x13b950(0x6e5)]['save'](_0x17980f),{'expired':_0x37a098['length']};});}async[_0xf8ecb6(0x95e)](){const _0x16bc70=_0xf8ecb6;await this['whenReady']();const _0x1b2829=this[_0x16bc70(0x778)];if(!_0x1b2829)return;this['jitUser']=null;if(this[_0x16bc70(0x83e)][_0x16bc70(0x6cf)])try{if(_0x16bc70(0x3d1)===_0x16bc70(0x3d1))await this[_0x16bc70(0x83e)][_0x16bc70(0x6cf)][_0x16bc70(0x2f5)](_0x1b2829[_0x16bc70(0x4a1)]);else{const _0x1de8e1=_0x2789e7[_0x16bc70(0x879)]();if(_0x1de8e1[_0x16bc70(0x3a0)]()==='imageKey')return!![];}}catch(_0x35672b){console[_0x16bc70(0x3dd)]('[ceraph-test-data]\x20JIT\x20cleanup\x20failed\x20for\x20'+_0x1b2829['email']+':\x20'+(_0x35672b?.[_0x16bc70(0x531)]??String(_0x35672b)));}await this[_0x16bc70(0x83e)]['store'][_0x16bc70(0x715)](async()=>{const _0x1bcf91=_0x16bc70,_0x38976f=await this['opts'][_0x1bcf91(0x6e5)]['load']();await this[_0x1bcf91(0x83e)]['store']['save'](_0x38976f['filter'](_0x3652e2=>_0x3652e2['id']!==_0x1b2829['id']));});}async[_0xf8ecb6(0x4c9)](_0x2eb9fa,_0x55f00c){const _0x437495=_0xf8ecb6;await _0x55f00c[_0x437495(0x6c6)](_0x2eb9fa)['catch'](()=>void 0x0),await new Promise(_0xd049b1=>setTimeout(_0xd049b1,0x1f4)),await _0x55f00c['launchApp'](_0x2eb9fa)[_0x437495(0x48b)](()=>void 0x0);}async[_0xf8ecb6(0x918)](_0x5b136e){const _0x10fb9a=_0xf8ecb6;if(!this['opts'][_0x10fb9a(0x6cf)])return;try{await this['opts']['adapter']['cleanup'](_0x5b136e['providerUserId']);}catch(_0x5b7947){console['error'](_0x10fb9a(0x28a)+_0x5b136e['email']+':\x20'+(_0x5b7947?.['message']??String(_0x5b7947)));}}};import{promises as _0x2a59b1}from'fs';import{homedir as _0x51eb71}from'os';import{dirname as _0x3d4efa,join as _0x22de02}from'path';function _0x5198ae(_0x1a9d14){const _0x5cc4ab=_0xf8ecb6;return _0x1a9d14[_0x5cc4ab(0x42e)](/[^a-zA-Z0-9_-]/g,'_')['slice'](0x0,0x40);}function _0x340417(){const _0x5bcd1f=_0xf8ecb6;return _0x22de02(_0x51eb71(),_0x5bcd1f(0x4b1),_0x5bcd1f(0x948));}function _0x719e7(_0x227b7a,_0x1fbade={}){const _0x57baa2=_0xf8ecb6,_0x68fddd=_0x1fbade['baseDir']??_0x340417(),_0x5accf2=_0x22de02(_0x68fddd,_0x5198ae(_0x227b7a)+'.json'),_0x5d020b=async _0x83c7c8=>{const _0x534f4f=_0xc050;await _0x2a59b1[_0x534f4f(0x243)](_0x3d4efa(_0x5accf2),{'recursive':!![],'mode':0x1c0});const _0x46597d=_0x5accf2+_0x534f4f(0xa56)+process[_0x534f4f(0x8e3)]+'.'+Math[_0x534f4f(0xafe)]()['toString'](0x24)['slice'](0x2);try{await _0x2a59b1[_0x534f4f(0x865)](_0x46597d,_0x83c7c8,'utf-8'),await _0x2a59b1[_0x534f4f(0x661)](_0x46597d,_0x5accf2);}catch(_0x1edac9){try{if('nPrjP'==='nPrjP')await _0x2a59b1['unlink'](_0x46597d);else return _0x1cd903;}catch{}throw _0x1edac9;}};let _0x5dae2b=Promise[_0x57baa2(0x62d)]();return{async 'load'(){const _0x57e543=_0x57baa2;let _0x442c0f;try{_0x442c0f=await _0x2a59b1[_0x57e543(0x4e4)](_0x5accf2,_0x57e543(0x827));}catch{return[];}let _0x1b57d4;try{_0x1b57d4=JSON['parse'](_0x442c0f);}catch{return[];}if(!Array['isArray'](_0x1b57d4))return[];const _0x4425c4=[];for(const _0x212e66 of _0x1b57d4){if('JrLCU'!=='CdLPc'){if(_0x5d66fa(_0x212e66))_0x4425c4[_0x57e543(0x4d1)](_0x212e66);}else _0x260d58=_0x2db75a[_0x57e543(0x795)](-0x5dc0);}return _0x4425c4;},async 'save'(_0x1593e1){await _0x5d020b(JSON['stringify'](_0x1593e1,null,0x2));},'getPath'(){return _0x5accf2;},async 'withLock'(_0x54a416){const _0x264a4b=_0x57baa2,_0x28d52d=_0x5dae2b;let _0x1bfcd1=()=>{};_0x5dae2b=new Promise(_0x5bd48a=>{const _0x5b8a65=_0xc050;if('YajbS'==='vvaTv'){try{_0x5e790d['kill'](_0x5b8a65(0x58f));}catch{}_0x5d1884();}else _0x1bfcd1=_0x5bd48a;});try{return await _0x28d52d[_0x264a4b(0x48b)](()=>void 0x0),await _0x54a416();}finally{_0x1bfcd1();}}};}function _0x5d66fa(_0x2b3283){const _0x1abffa=_0xf8ecb6;if(!_0x2b3283||typeof _0x2b3283!==_0x1abffa(0x9e3))return![];const _0xd887c3=_0x2b3283;if(typeof _0xd887c3['id']!=='string'||_0xd887c3['id']['length']===0x0)return![];if(typeof _0xd887c3['providerUserId']!==_0x1abffa(0x30d))return![];if(typeof _0xd887c3[_0x1abffa(0x41e)]!=='string'||_0xd887c3[_0x1abffa(0x41e)]['length']===0x0)return![];if(typeof _0xd887c3[_0x1abffa(0x98a)]!=='string')return![];if(_0xd887c3['tier']!=='jit'&&_0xd887c3[_0x1abffa(0x69a)]!==_0x1abffa(0xa45))return![];if(typeof _0xd887c3[_0x1abffa(0x57a)]!==_0x1abffa(0x30d))return![];if(_0xd887c3['sessionToken']!==void 0x0&&typeof _0xd887c3[_0x1abffa(0x9cb)]!=='string')return![];if(_0xd887c3[_0x1abffa(0x630)]!==void 0x0&&typeof _0xd887c3[_0x1abffa(0x630)]!=='string')return![];if(_0xd887c3['ttlExpiresAt']!==void 0x0&&typeof _0xd887c3[_0x1abffa(0x579)]!=='string')return![];return!![];}import{z as _0x252a9b}from'zod';function _0xc0be95(_0x162e22){const _0x374cf7=_0xf8ecb6;return{'content':[{'type':'text','text':JSON[_0x374cf7(0x312)](_0x162e22,null,0x2)}]};}var _0xed9228='Auth-bypass\x20test-user\x20provisioning\x20is\x20a\x20Pro-tier\x20feature.\x20Upgrade\x20at\x20https://ceraph.dev/billing\x20or\x20run\x20without\x20the\x20auth-bypass\x20tool\x20—\x20JIT\x20provisioning\x20still\x20works\x20automatically\x20during\x20chain\x20runs.';function _0x566be6(_0xe0b195,_0x2030f8){const _0x34c9b5=_0xf8ecb6;_0xe0b195['tool'](_0x34c9b5(0x321),_0x34c9b5(0x320),{'tag':_0x252a9b['string']()['optional']()[_0x34c9b5(0x3f0)]('Optional\x20label\x20for\x20tracking\x20this\x20user\x20(e.g.\x20\x27checkout-test\x27).\x20Surfaced\x20on\x20the\x20email\x20prefix\x20and\x20in\x20`ceraph_test_data_list`\x20output.')},async({tag:_0x589f94})=>{const _0x42b8cb=_0x34c9b5;try{const _0x282084=await _0x2030f8[_0x42b8cb(0x8ec)]();if(!_0x282084)return'yCsmp'!=='yCsmp'?_0x3f3196(_0x15b66a(),_0x42b8cb(0x4b1),_0x42b8cb(0x948)):{..._0xc0be95({'ok':![],'error':_0xed9228}),'isError':!![]};const _0x183ce9=await _0x2030f8['provisionOnDemand']({'tag':_0x589f94});return _0xc0be95({'ok':!![],'user':{'id':_0x183ce9[_0x42b8cb(0x462)]['id'],'email':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x41e)],'password':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x98a)],..._0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x9cb)]?{'sessionToken':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x9cb)]}:{},'tier':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x69a)],'createdAt':_0x183ce9['user']['createdAt'],..._0x183ce9['user'][_0x42b8cb(0x630)]?{'tag':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x630)]}:{},..._0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x579)]?{'ttlExpiresAt':_0x183ce9[_0x42b8cb(0x462)][_0x42b8cb(0x579)]}:{}}});}catch(_0x156ab8){if(_0x42b8cb(0x22e)===_0x42b8cb(0x22e)){if(_0x156ab8 instanceof _0x4fda8d)return{..._0xc0be95({'ok':![],'code':_0x156ab8['code'],'error':_0x156ab8['message']}),'isError':!![]};return{..._0xc0be95({'ok':![],'error':_0x42b8cb(0x3fc)+(_0x156ab8 instanceof Error?_0x156ab8['message']:String(_0x156ab8))}),'isError':!![]};}else return null;}}),_0xe0b195['tool']('ceraph_test_data_list',_0x34c9b5(0x5fc),{},async()=>{const _0x4949df=_0x34c9b5;try{const _0x1bcdd5=await _0x2030f8[_0x4949df(0x8ec)]();if(!_0x1bcdd5)return{..._0xc0be95({'ok':![],'error':_0xed9228}),'isError':!![]};const _0x239faa=await _0x2030f8['listOnDemand']();return _0xc0be95({'ok':!![],'users':_0x239faa[_0x4949df(0x86b)](_0x17b3f7=>({'id':_0x17b3f7['id'],'email':_0x17b3f7[_0x4949df(0x41e)],'tier':_0x17b3f7[_0x4949df(0x69a)],'createdAt':_0x17b3f7[_0x4949df(0x57a)],..._0x17b3f7[_0x4949df(0x630)]?{'tag':_0x17b3f7['tag']}:{},..._0x17b3f7['ttlExpiresAt']?{'ttlExpiresAt':_0x17b3f7[_0x4949df(0x579)]}:{}}))});}catch(_0x3f72a3){return{..._0xc0be95({'ok':![],'error':'ceraph_test_data_list\x20failed:\x20'+(_0x3f72a3 instanceof Error?_0x3f72a3[_0x4949df(0x531)]:String(_0x3f72a3))}),'isError':!![]};}}),_0xe0b195['tool'](_0x34c9b5(0x514),_0x34c9b5(0x67d),{'id':_0x252a9b['string']()[_0x34c9b5(0x768)]()['describe'](_0x34c9b5(0x43c)),'all':_0x252a9b['boolean']()['optional']()[_0x34c9b5(0x3f0)](_0x34c9b5(0x351))},async({id:_0x5b259d,all:_0x38fd08})=>{const _0x2e412b=_0x34c9b5;try{const _0x45cc17=await _0x2030f8[_0x2e412b(0x8ec)]();if(!_0x45cc17)return{..._0xc0be95({'ok':![],'error':_0xed9228}),'isError':!![]};if(!_0x5b259d&&!_0x38fd08)return{..._0xc0be95({'ok':![],'error':_0x2e412b(0x2cf)}),'isError':!![]};const _0x52d54d=await _0x2030f8['cleanup']({'id':_0x5b259d,'all':_0x38fd08});return _0xc0be95({'ok':!![],'deleted':_0x52d54d[_0x2e412b(0x387)]});}catch(_0x8670bd){return{..._0xc0be95({'ok':![],'error':_0x2e412b(0x642)+(_0x8670bd instanceof Error?_0x8670bd[_0x2e412b(0x531)]:String(_0x8670bd))}),'isError':!![]};}});}var _0x579376=process['cwd'](),_0x224f6b=_0x63a6cf(_0x579376),_0x504dae=_0x224f6b[_0xf8ecb6(0x8b5)],_0x3f7ec9=_0x579376;_0x224f6b[_0xf8ecb6(0x8b5)]!==_0x579376&&process['stderr']['write']('[ceraph]\x20'+_0x224f6b['reason']+'\x0a');var _0x5b7351=_0x232ea9(_0x504dae,'.ceraph'),_0x53aed0=new _0x989afa(_0x504dae),_0x229990=new _0x3cf6c9(),_0x2eb7fe=new _0x70c5ce({'targetResolver':_0x229990}),_0x39dae6=new _0x5eae4b(_0x504dae,_0x5b7351),_0x5cb8cf=new _0x43c6e0(_0x2eb7fe,_0x229990);_0x229990[_0xf8ecb6(0x747)](_0x5cb8cf);var _0x46143c=new _0x2cc05b(_0x2eb7fe),_0x24325a=new _0x36c71a(_0x229990,_0x5b7351,_0x504dae),_0x5246a9=new _0x5ee35c(),_0x1cffbc=new _0x482f2a(),_0x35c9ca=new _0x3e768a({'screen':_0x2eb7fe,'mode':_0x5daebe(process.env.CERAPH_AUTO_ACCEPT_PERMISSIONS)}),_0x2924fc=process.env.CERAPH_DISABLE_SPEED_OPTS==='1'||process.env.CERAPH_DISABLE_SPEED_OPTS===_0xf8ecb6(0x293),_0x891648=new _0x4af023(_0x2eb7fe,_0x5cb8cf,_0x46143c,{'projectDir':_0x504dae,'permissionInterceptor':_0x35c9ca,'disableAXCache':_0x2924fc,'disableBulkActions':_0x2924fc}),_0x402758=_0x417aee(_0x504dae),_0x26d334=process.env.CERAPH_SIGNAL_PORT?Number(process.env.CERAPH_SIGNAL_PORT):void 0x0,_0x35b0ad=new _0x2fdbde(_0x53aed0,{'port':Number[_0xf8ecb6(0xa89)](_0x26d334)?_0x26d334:void 0x0,'host':'0.0.0.0'}),_0x2c8dd8=null,_0x140ce4='bind-failed',_0x3ad502=0x2710,_0x5b307c,_0x862493=![],_0x860608=process.env.CERAPH_KEEP_AWAKE_HEARTBEAT===_0xf8ecb6(0x411)?null:new _0x3396cb(_0x2eb7fe,{'onRedbox':_0x121893=>_0x35b0ad[_0xf8ecb6(0x679)]({'kind':_0xf8ecb6(0x60c),'message':_0x121893,'stack':'','timestamp':new Date()[_0xf8ecb6(0x471)]()})}),_0x4436b4=new _0x153604({'projectDir':_0x504dae}),_0x564c17=_0x5198ae(_0x504dae),_0x250426=_0x719e7(_0x564c17),_0x6faf18=new _0x271e33({'projectDir':_0x504dae,'projectId':_0x564c17,'store':_0x250426,'adapter':void 0x0,'isProTier':()=>_0x2a0a26()}),_0x22cea7=new _0x28bbaf(_0x891648,_0x2eb7fe,_0x5cb8cf,_0x35b0ad,{'runsStore':_0x4436b4,'testDataManager':_0x6faf18,'videoRecorderFactory':({runId:_0x31a0a0})=>new _0x5cf829({'resolver':_0x229990,'outputPath':_0x232ea9(_0x4436b4[_0xf8ecb6(0xae2)],_0x31a0a0,_0xf8ecb6(0x74e))})});_0x229990[_0xf8ecb6(0x600)](async _0xf59ff9=>{const _0x246ad8=_0xf8ecb6;if(!_0xf59ff9['udid'])return;await _0x3281ae(_0xf59ff9['udid'])[_0x246ad8(0x48b)](()=>null);const _0x53134a=await _0x152bfa(_0xf59ff9[_0x246ad8(0x5a2)])['catch'](()=>null);_0x53134a&&_0x53134a[_0x246ad8(0x428)]===_0x246ad8(0x576)&&process[_0x246ad8(0x910)]['write'](_0x246ad8(0x599)+_0x53134a['message']+'\x0a');});function _0x2c6da6(){return _0x3fb793({'screen':_0x2eb7fe,'apps':_0x5cb8cf,'autonomy':_0x46143c,'iproxyManager':_0x5246a9,'projectDir':_0x504dae,'target':_0x229990});}var _0x18d779=((()=>{try{const _0x4d6d34=_0x57c4ae(import.meta.url),_0x4d6559=_0x4d6d34('../package.json');return _0x4d6559['version']??'0.0.0';}catch{return'0.0.0';}})()),_0x4fd7c4=new McpServer({'name':_0xf8ecb6(0x223),'version':_0x18d779},{'capabilities':{'tools':{},'logging':{}},'instructions':_0xf8ecb6(0x666)});_0x35b0ad[_0xf8ecb6(0x77e)](_0x589e61=>{const _0x225978=_0xf8ecb6,_0x18a590=_0x589e61[_0x225978(0xb14)]==='network-error'?_0x225978(0x696):'error';void _0x4fd7c4['server'][_0x225978(0xa2c)]({'level':_0x18a590,'logger':_0x225978(0x23d),'data':{'kind':_0x589e61[_0x225978(0xb14)],'message':_0x589e61[_0x225978(0x531)],..._0x589e61['stack']?{'stack':_0x589e61[_0x225978(0xade)]}:{},..._0x589e61['url']?{'url':_0x589e61[_0x225978(0x269)]}:{},..._0x589e61['status']!==void 0x0?{'status':_0x589e61[_0x225978(0x428)]}:{},'timestamp':_0x589e61['timestamp']}})['catch'](()=>void 0x0);});function _0x393307(_0x5a4350,_0x36ba86){const _0x4081cb=_0xf8ecb6;_0x36ba86 instanceof _0x3eb20a&&(_0x36ba86[_0x4081cb(0xb14)]==='account-invalid'||_0x36ba86[_0x4081cb(0xb14)]==='tier-gated')&&_0x409a76();const _0x201e47=_0x36ba86 instanceof _0x3eb20a?_0x36ba86[_0x4081cb(0x847)]:_0x5a4350+'\x20failed:\x20'+(_0x36ba86 instanceof Error?_0x36ba86[_0x4081cb(0x531)]:String(_0x36ba86));return{'content':[{'type':'text','text':_0x201e47}],'isError':!![]};}async function _0x1af761(_0x26a7ab){const _0x2953b8=_0xf8ecb6,_0x4e324f=new AbortController(),_0x184ec8=setTimeout(()=>_0x4e324f[_0x2953b8(0x95c)](),0x5dc);try{const _0x2adc0b=await fetch('http://localhost:'+_0x26a7ab+'/status',{'signal':_0x4e324f['signal']});return _0x2adc0b['ok'];}catch{return![];}finally{clearTimeout(_0x184ec8);}}_0x4fd7c4[_0xf8ecb6(0x34e)]('rn_build_ios','Build\x20and\x20run\x20the\x20React\x20Native\x20app\x20on\x20an\x20iOS\x20device\x20or\x20simulator.\x20Auto-detects\x20Expo\x20vs\x20bare\x20React\x20Native\x20and\x20uses\x20the\x20correct\x20command.\x20Captures\x20Xcode\x20build\x20output\x20and\x20returns\x20structured\x20error\x20information.\x20If\x20clean\x20is\x20true,\x20runs\x20`npx\x20expo\x20prebuild\x20--clean`\x20first\x20(Expo\x20only).\x20To\x20bring\x20everything\x20up\x20in\x20one\x20call\x20(Metro\x20+\x20build\x20+\x20verify),\x20use\x20ceraph_start.',{'clean':_0x344f4d[_0xf8ecb6(0xa6d)]()[_0xf8ecb6(0x768)]()['describe']('Run\x20prebuild\x20--clean\x20before\x20building\x20(Expo\x20only)'),'device':_0x344f4d['string']()[_0xf8ecb6(0x768)]()['describe']('Device\x20UDID\x20to\x20target\x20(e.g.,\x2000008140-001958943A78801C)')},async({clean:_0x2dc522,device:_0x44fac1})=>{const _0x389778=_0xf8ecb6;try{const _0x6c7f27=await _0x53aed0[_0x389778(0x537)]({'clean':_0x2dc522,'device':_0x44fac1});return _0x6c7f27['success']&&await _0x39dae6[_0x389778(0x7ba)]()['catch'](()=>{}),{'content':[{'type':'text','text':JSON[_0x389778(0x312)](_0x6c7f27,null,0x2)}],'isError':!_0x6c7f27['success']};}catch(_0x13ca4e){return _0x393307('rn_build_ios',_0x13ca4e);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x3ce),'Start\x20the\x20Metro\x20dev\x20server.\x20Auto-detects\x20Expo\x20vs\x20bare\x20React\x20Native.\x20Monitors\x20console\x20output\x20for\x20runtime\x20errors\x20and\x20warnings.\x20To\x20bring\x20everything\x20up\x20in\x20one\x20call\x20(Metro\x20+\x20build\x20+\x20verify),\x20use\x20ceraph_start.',{'port':_0x344f4d[_0xf8ecb6(0x2af)]()['optional']()['describe']('Port\x20for\x20Metro\x20bundler\x20(default:\x208081)'),'clear':_0x344f4d['boolean']()[_0xf8ecb6(0x768)]()['describe']('Clear\x20Metro\x20bundler\x20cache\x20on\x20start')},async({port:_0x4cad1c,clear:_0x4c3399})=>{const _0x1489e3=_0xf8ecb6;try{const _0x3532eb=await _0x53aed0['startMetro']({'port':_0x4cad1c,'clear':_0x4c3399});return{'content':[{'type':_0x1489e3(0x3e0),'text':JSON['stringify'](_0x3532eb,null,0x2)}],'isError':!_0x3532eb[_0x1489e3(0x6d0)]};}catch(_0x27f45d){return _0x393307(_0x1489e3(0x3ce),_0x27f45d);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('ceraph_start',_0xf8ecb6(0x412),{'device':_0x344f4d['string']()['optional']()['describe']('Device\x20UDID\x20to\x20target\x20(e.g.,\x2000008140-001958943A78801C)'),'port':_0x344f4d[_0xf8ecb6(0x2af)]()['optional']()['describe']('Port\x20for\x20Metro\x20bundler\x20(default:\x208081)'),'bundleId':_0x344f4d['string']()['optional']()['describe']('Bundle\x20ID\x20of\x20the\x20app\x20under\x20test\x20(e.g.,\x20com.acme.myapp).\x20Used\x20for\x20the\x20app-installed\x20staleness\x20check\x20and\x20doctor.\x20Pass\x20it\x20so\x20the\x20build\x20step\x20can\x20skip\x20when\x20the\x20app\x20is\x20already\x20installed;\x20without\x20it,\x20build-skip\x20falls\x20back\x20to\x20the\x20prebuild\x20snapshot\x20only\x20(a\x20cold\x20first\x20run\x20with\x20no\x20snapshot\x20will\x20build).'),'clean':_0x344f4d['boolean']()['optional']()['describe'](_0xf8ecb6(0x6fc)),'requiredEnv':_0x344f4d['array'](_0x344f4d[_0xf8ecb6(0x30d)]())[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x94d)),'expectedNetwork':_0x344f4d['string']()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x5e7))},async({device:_0x89a3b1,port:_0x1e2944,bundleId:_0x86d0fc,clean:_0xc540f7,requiredEnv:_0x3a30bb,expectedNetwork:_0x59a515})=>{const _0x222d90=_0xf8ecb6;try{if(_0x222d90(0x70e)===_0x222d90(0x70e)){const _0x2f041e=_0x86d0fc??await _0x1d9f13(_0x504dae)[_0x222d90(0x48b)](()=>null),_0x479b9e=await _0x382105({'checkTargetReady':async()=>{const _0x267783=_0x222d90,_0x5c3eee=await _0x229990['resolve']();if(_0x5c3eee['target']==='simulator'){const _0x8403bd=await _0x3eac78()['catch'](()=>[]);if(_0x8403bd['length']===0x0)return{'ok':![],'detail':'No\x20booted\x20simulator.','remediation':'Boot\x20a\x20simulator\x20(open\x20-a\x20Simulator),\x20or\x20connect\x20an\x20iPhone\x20via\x20USB-C,\x20then\x20retry.'};const _0x20d501=await _0x3da09e(_0x504dae,{'log':_0x501427=>{const _0x366af9=_0xc050;void _0x4fd7c4[_0x366af9(0x99d)]['sendLoggingMessage']({'level':'info','logger':_0x366af9(0x9a2),'data':_0x501427})['catch'](()=>void 0x0);}});if(_0x20d501['status']===_0x267783(0x2c4)){const _0x57e5b7=await _0x579c8c(_0x504dae)[_0x267783(0x48b)](()=>_0x267783(0x26d));return{'ok':![],'detail':_0x267783(0x832)+_0x20d501[_0x267783(0x3dd)],'remediation':'Couldn\x27t\x20auto-install\x20appium-webdriveragent\x20—\x20install\x20it\x20manually\x20with\x20`'+_0x57e5b7+'\x20'+(_0x57e5b7===_0x267783(0x26d)?'install':_0x267783(0x856))+_0x267783(0x6f1)};}return{'ok':!![],'detail':_0x20d501[_0x267783(0x428)]==='installed'?'Simulator\x20booted\x20('+_0x8403bd[0x0]['name']+');\x20installed\x20appium-webdriveragent.':_0x267783(0x72b)+_0x8403bd[0x0]['name']+');\x20appium-webdriveragent\x20ready.'};}const _0x33fb9a=await _0x5cb8cf['getUdid']()['catch'](()=>null);return _0x33fb9a?{'ok':!![],'detail':_0x267783(0x6b5)+_0x33fb9a+'\x20connected.'}:{'ok':![],'detail':'No\x20iOS\x20device\x20detected.','remediation':'Connect\x20your\x20iPhone\x20via\x20USB-C\x20and\x20trust\x20this\x20Mac,\x20or\x20boot\x20a\x20simulator\x20(open\x20-a\x20Simulator),\x20then\x20retry.'};},'missingRequiredEnv':()=>(_0x3a30bb??[])['filter'](_0xf97358=>{const _0x1e1dda=process.env[_0xf97358];return _0x1e1dda===void 0x0||_0x1e1dda==='';}),'isMetroRunning':_0x1af761,'startMetro':({port:_0x4653d8})=>_0x53aed0[_0x222d90(0x1fd)]({'port':_0x4653d8}),'needsBuild':async()=>{const _0x29af9f=_0x222d90,_0x147a34=[];if(_0x2f041e){const _0x39cda5=await _0x5cb8cf[_0x29af9f(0x84b)]()[_0x29af9f(0x48b)](_0x439ba8=>({'success':![],'apps':[],'error':_0x439ba8 instanceof Error?_0x439ba8[_0x29af9f(0x531)]:String(_0x439ba8)})),_0x135b2a=_0x39cda5['success']&&_0x39cda5[_0x29af9f(0x508)][_0x29af9f(0x275)](_0x44a55c=>_0x44a55c[_0x29af9f(0x369)]===_0x2f041e);if(!_0x135b2a){if('ZeFLk'==='ZeFLk'){if(_0x39cda5['success'])_0x147a34['push'](_0x29af9f(0x9c0)+_0x2f041e+_0x29af9f(0x975));else{const _0x6dd0bc=_0x39cda5['error']?':\x20'+_0x39cda5[_0x29af9f(0x3dd)]:'';_0x147a34[_0x29af9f(0x4d1)]('could\x20not\x20confirm\x20the\x20app\x20is\x20installed'+_0x6dd0bc);}}else{if(!_0x409a2d[_0x29af9f(0xb00)])return _0x286931;const _0x4066f0=_0x171062(_0x4b4aaa['target']),_0x442c01={};if(_0x4066f0['text']!==void 0x0)_0x442c01['text']=_0x4066f0['text'];return _0x4066f0[_0x29af9f(0x444)]!==void 0x0&&(_0x442c01['accessibilityLabel']=_0x4066f0['accessibilityLabel']),{..._0x1121a1,'into':_0x442c01,'value':_0x55f1cb['value']??''};}}}const _0x2372da=await _0x39dae6[_0x29af9f(0xa52)]()[_0x29af9f(0x48b)](()=>({'needsClean':![],'reasons':[]}));return _0x2372da['needsClean']&&_0x147a34['push'](..._0x2372da[_0x29af9f(0x479)]),{'needsBuild':_0x147a34['length']>0x0,'reasons':_0x147a34};},'runBuild':({clean:_0x137706,device:_0x45d63d})=>_0x53aed0[_0x222d90(0x537)]({'clean':_0x137706,'device':_0x45d63d}),'saveBuildSnapshot':()=>_0x39dae6['saveSnapshot'](),'foregroundApp':_0x2f041e?async()=>{const _0x12f04a=_0x222d90,_0x2f846b=await _0x5cb8cf['listInstalledApps']()['catch'](()=>null);if(_0x2f846b?.[_0x12f04a(0x6d0)]&&!_0x2f846b['apps'][_0x12f04a(0x275)](_0x24def1=>_0x24def1[_0x12f04a(0x369)]===_0x2f041e))return{'ok':![],'detail':_0x2f041e+_0x12f04a(0x4c2)+(_0x86d0fc?'':_0x12f04a(0x3bc))};const _0x88b0e1=await _0x5cb8cf[_0x12f04a(0xadd)](_0x2f041e);return _0x88b0e1['success']?{'ok':!![],'detail':_0x12f04a(0x38b)+_0x2f041e+_0x12f04a(0x5f8)}:{'ok':![],'detail':'Could\x20not\x20foreground\x20'+_0x2f041e+':\x20'+(_0x88b0e1['error']??_0x12f04a(0x6b2))+'.'};}:void 0x0,'ensureWda':async()=>{const _0x12a21f=_0x222d90,_0x396e48=await _0x229990['resolve']();if(_0x396e48['target']==='simulator'){const _0x30b73d=await _0x24325a['start']({});if(_0x30b73d['ok'])return{'ok':!![],'reason':_0x30b73d[_0x12a21f(0xaf0)]?_0x12a21f(0xaf0):_0x12a21f(0x6db),'detail':'Simulator\x20WebDriverAgent\x20'+(_0x30b73d['reused']?'reused':_0x12a21f(0x6db))+'\x20on\x20:'+_0x30b73d['port']+'.'};let _0x2f6797;if(_0x30b73d[_0x12a21f(0x256)]==='no-booted-simulator')_0x2f6797=_0x12a21f(0x5ef);else{if(_0x30b73d[_0x12a21f(0x256)]==='simulator-not-found')_0x2f6797='The\x20selected\x20simulator\x20wasn\x27t\x20found\x20—\x20boot\x20one\x20and\x20retry.';else{if(_0x30b73d[_0x12a21f(0x256)]==='wda-package-missing')_0x2f6797=_0x12a21f(0x255);else _0x30b73d[_0x12a21f(0x256)]===_0x12a21f(0x4d9)?_0x2f6797=_0x12a21f(0x643):_0x2f6797='See\x20the\x20WebDriverAgent\x20error\x20above\x20for\x20the\x20specific\x20fix,\x20then\x20call\x20ceraph_start\x20again.';}}return{'ok':![],'error':_0x30b73d[_0x12a21f(0x3dd)],'detail':'Could\x20not\x20start\x20simulator\x20WebDriverAgent:\x20'+_0x30b73d['error'],'remediation':_0x2f6797};}const _0x553c78=await _0x2d2898(),_0x422546=await _0x1cffbc[_0x12a21f(0x5cf)]({'resolverUdid':_0x396e48[_0x12a21f(0x5a2)]});if(_0x422546['ok'])return{'ok':!![],'reason':_0x422546['reason'],'detail':_0x12a21f(0x888)+_0x422546['reason']+'\x20('+_0x553c78+').'};return{'ok':![],'error':_0x422546['error'],'detail':'Could\x20not\x20start\x20WebDriverAgent:\x20'+_0x422546[_0x12a21f(0x3dd)],'remediation':_0x422546[_0x12a21f(0x638)]??_0x12a21f(0x6af)};},'runDoctor':()=>_0x3fb793({'screen':_0x2eb7fe,'apps':_0x5cb8cf,'autonomy':_0x46143c,'iproxyManager':_0x5246a9,'bundleId':_0x2f041e??void 0x0,'requiredEnv':_0x3a30bb,'expectedNetwork':_0x59a515,'projectDir':_0x504dae,'target':_0x229990}),'cacheDoctor':_0x599504=>_0x17c6c2(_0x599504),'resolveTarget':()=>_0x229990[_0x222d90(0x222)]()},{'device':_0x89a3b1,'port':_0x1e2944,'clean':_0xc540f7});return{..._0x4c7e7d(_0x479b9e),'isError':!_0x479b9e['ready']};}else return this[_0x222d90(0x618)]!==null&&this[_0x222d90(0x618)]['exitCode']===null;}catch(_0x425ff5){return _0x222d90(0x807)!=='GwtMS'?_0x30aed4('rn_wait_for_device',_0x1d3f01):_0x393307(_0x222d90(0x693),_0x425ff5);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x9fe),_0xf8ecb6(0x4a2),{},async()=>{const _0x3a9df6=_0xf8ecb6;try{const _0x39b8bb=_0x53aed0['getErrors']();return{'content':[{'type':'text','text':JSON[_0x3a9df6(0x312)](_0x39b8bb,null,0x2)}]};}catch(_0x527cfb){return _0x393307('rn_get_errors',_0x527cfb);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x558),_0xf8ecb6(0x682),{'lines':_0x344f4d['number']()['optional']()['describe'](_0xf8ecb6(0xa2e)),'level':_0x344f4d[_0xf8ecb6(0x407)](['all','error',_0xf8ecb6(0xb20),'log'])['optional']()['describe'](_0xf8ecb6(0x52f))},async({lines:_0x55a113,level:_0x2c6e28})=>{const _0x1fd6c3=_0xf8ecb6;try{const _0x1ec469=_0x53aed0[_0x1fd6c3(0x7c5)]({'lines':_0x55a113,'level':_0x2c6e28});if(_0x1ec469[_0x1fd6c3(0x3b7)]===0x0)return{'content':[{'type':'text','text':'No\x20console\x20output\x20captured.\x20Is\x20Metro\x20running?\x20Use\x20rn_start\x20to\x20launch\x20it.'}]};return{'content':[{'type':_0x1fd6c3(0x3e0),'text':_0x1ec469[_0x1fd6c3(0x4ec)]('\x0a')}]};}catch(_0x1dba3a){return _0x393307(_0x1fd6c3(0x558),_0x1dba3a);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('rn_check_prebuild','Check\x20if\x20a\x20clean\x20Expo\x20prebuild\x20is\x20needed\x20(Expo\x20projects\x20only).\x20Compares\x20current\x20package.json\x20dependencies,\x20app.json\x20config,\x20and\x20ios/Podfile.lock\x20against\x20a\x20cached\x20snapshot\x20from\x20the\x20last\x20successful\x20build.',{},async()=>{const _0xba32e6=_0xf8ecb6;try{const _0x422dc1=await _0x53aed0['detectProjectType']();if(!_0x422dc1)return _0xba32e6(0x5c5)==='aHAJg'?{'content':[{'type':'text','text':JSON[_0xba32e6(0x312)]({'needsClean':![],'reasons':[_0xba32e6(0x64d)]})}]}:'unknown';const _0x1ec446=await _0x39dae6['check']();return{'content':[{'type':_0xba32e6(0x3e0),'text':JSON[_0xba32e6(0x312)](_0x1ec446,null,0x2)}]};}catch(_0x4b9df1){return _0x393307(_0xba32e6(0x8ac),_0x4b9df1);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x5e1),'Tap\x20at\x20specific\x20coordinates\x20on\x20the\x20iOS\x20device\x20screen\x20via\x20WebDriverAgent.\x20Automatically\x20corrects\x20for\x20pixel\x20ratio\x20mismatch\x20when\x20coordinates\x20come\x20from\x20a\x20screenshot\x20(divides\x20by\x20device\x20pixel\x20ratio).\x20Requires\x20WebDriverAgent\x20reachable\x20(localhost:8100\x20on\x20a\x20real\x20device;\x20call\x20rn_wda_start\x20first\x20for\x20a\x20simulator).',{'x':_0x344f4d['number']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x227)),'y':_0x344f4d['number']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x8df)),'coordinateSource':_0x344f4d['enum'](['screenshot','device'])[_0xf8ecb6(0x768)]()['describe'](_0xf8ecb6(0x50f))},async({x:_0x371dcd,y:_0x2d7f34,coordinateSource:_0x30a5d5})=>{const _0x41ce00=_0xf8ecb6;try{const _0x4259d7=await _0x2eb7fe['isAvailable']();if(!_0x4259d7)return{'content':[{'type':_0x41ce00(0x3e0),'text':JSON['stringify']({'success':![],'error':'WebDriverAgent\x20is\x20not\x20reachable.\x20On\x20a\x20real\x20device\x20it\x27s\x20served\x20at\x20localhost:8100\x20(run\x20it\x20via\x20Xcode\x27s\x20WebDriverAgentRunner);\x20for\x20a\x20simulator,\x20call\x20`rn_wda_start`\x20first\x20to\x20launch\x20WDA\x20and\x20route\x20to\x20it.','tappedAt':{'x':_0x371dcd,'y':_0x2d7f34},'pixelRatio':0x0,'correction':_0x41ce00(0x41f)})}],'isError':!![]};const _0x4b920d=(_0x30a5d5??_0x41ce00(0x439))===_0x41ce00(0x439),_0xa05e4a=await _0x2eb7fe['tap'](_0x371dcd,_0x2d7f34,_0x4b920d);return{'content':[{'type':'text','text':JSON[_0x41ce00(0x312)](_0xa05e4a,null,0x2)}],'isError':!_0xa05e4a[_0x41ce00(0x6d0)]};}catch(_0x34508f){return _0x393307('screen_tap',_0x34508f);}});async function _0x682835(){const _0x5a98bc=_0xf8ecb6,_0x59b58b=await _0x2eb7fe['isAvailable']();if(_0x59b58b)return{'ok':!![]};return{'ok':![],'payload':{'success':![],'error':_0x5a98bc(0x486)}};}function _0x4c7e7d(_0x2a6af8){const _0xb838c=_0xf8ecb6;return{'content':[{'type':_0xb838c(0x3e0),'text':JSON['stringify'](_0x2a6af8,null,0x2)}]};}var _0x39ac00=0xa;function _0x5908bf(_0xc59a42){const _0x561ef6=_0xf8ecb6;if(Array[_0x561ef6(0x200)](_0xc59a42)){if('RYaIx'!==_0x561ef6(0x786))throw new _0x528cba('api-error','Supabase\x20adapter\x20requires\x20`projectUrl`\x20for\x20cleanup.');else return _0xc59a42[_0x561ef6(0x86b)](_0x13629c=>_0x5908bf(_0x13629c));}if(_0xc59a42&&typeof _0xc59a42===_0x561ef6(0x9e3)){const _0x5b6e2b={};for(const [_0x58de4c,_0x6c636f]of Object['entries'](_0xc59a42)){if(_0x58de4c==='screenshotBase64')continue;_0x5b6e2b[_0x58de4c]=_0x5908bf(_0x6c636f);}return _0x5b6e2b;}return _0xc59a42;}function _0x102b65(_0x1d37b5,_0x45e4e3,_0x234ac7){const _0x144455=_0xf8ecb6,_0x16e338=[{'type':_0x144455(0x3e0),'text':JSON['stringify'](_0x5908bf(_0x1d37b5),null,0x2)}];_0x234ac7&&_0x16e338['push']({'type':_0x144455(0x3e0),'text':_0x234ac7});const _0x4b852c=[];for(const _0x492b27 of _0x45e4e3){if(!('steps'in _0x492b27)||!Array['isArray'](_0x492b27['steps']))continue;for(const _0xbb1601 of _0x492b27[_0x144455(0xa02)]){_0xbb1601[_0x144455(0x801)]&&_0x4b852c[_0x144455(0x4d1)]({'flow':_0x492b27[_0x144455(0x8f8)],'stepIndex':_0xbb1601['stepIndex'],'base64':_0xbb1601[_0x144455(0x801)]});}}const _0x56eeec=Math[_0x144455(0x488)](_0x4b852c[_0x144455(0x3b7)],_0x39ac00);for(let _0x5c36dc=0x0;_0x5c36dc<_0x56eeec;_0x5c36dc++){const _0x5ae3a7=_0x4b852c[_0x5c36dc];_0x16e338[_0x144455(0x4d1)]({'type':'text','text':'Screenshot\x20—\x20flow=\x22'+_0x5ae3a7[_0x144455(0x8f8)]+_0x144455(0x333)+_0x5ae3a7['stepIndex']}),_0x16e338[_0x144455(0x4d1)]({'type':'image','data':_0x5ae3a7[_0x144455(0x343)],'mimeType':'image/png'});}if(_0x4b852c[_0x144455(0x3b7)]>_0x39ac00){const _0x9a38fa=_0x4b852c[_0x144455(0x3b7)]-_0x39ac00;_0x16e338['push']({'type':_0x144455(0x3e0),'text':'+'+_0x9a38fa+_0x144455(0x7f7)+(_0x9a38fa===0x1?'':'s')+_0x144455(0x532)+_0x39ac00+').\x20Find\x20them\x20on\x20disk\x20under\x20.ceraph/runs/<runId>/\x20and\x20correlate\x20with\x20the\x20run\x27s\x20recorded\x20video.'});}return{'content':_0x16e338};}function _0x100267(_0x535a49){const {entry:_0x23ab92,advisedStatus:_0x2081c3}=_0x12b624(_0x35b0ad['hasReceivedDeviceContact'](),_0x2c8dd8,_0x140ce4);_0x2c8dd8=_0x2081c3;if(_0x23ab92)_0x535a49['push'](_0x23ab92);}async function _0x5b4fb6(){const _0x511851=_0xf8ecb6;if(_0x35b0ad[_0x511851(0x74c)]()||_0x862493)return;_0x862493=!![];try{const _0x6025d1=await _0x35b0ad['ensureListening']();_0x140ce4=_0x3f573f(_0x6025d1)['status'],_0x35b0ad[_0x511851(0x74c)]()&&(console[_0x511851(0x3dd)](_0x511851(0x821)),_0x5b307c&&(clearInterval(_0x5b307c),_0x5b307c=void 0x0));}finally{_0x862493=![];}}function _0xd36556(){if(_0x5b307c||_0x35b0ad['isListening']())return;_0x5b307c=setInterval(()=>{void _0x5b4fb6();},_0x3ad502),_0x5b307c['unref']?.();}_0x4fd7c4['tool']('screen_swipe',_0xf8ecb6(0x680),{'direction':_0x344f4d[_0xf8ecb6(0x407)](['up','down',_0xf8ecb6(0x4a4),_0xf8ecb6(0x8cd)]),'from':_0x344f4d['object']({'x':_0x344f4d[_0xf8ecb6(0x2af)](),'y':_0x344f4d[_0xf8ecb6(0x2af)]()})[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)]('Optional\x20swipe\x20start\x20point.\x20Defaults\x20to\x20screen\x20center.'),'distancePx':_0x344f4d['number']()['optional']()[_0xf8ecb6(0x3f0)]('Swipe\x20distance\x20in\x20points.'),'durationMs':_0x344f4d['number']()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)]('Swipe\x20duration\x20in\x20ms.'),'coordinateSource':_0x344f4d[_0xf8ecb6(0x407)](['screenshot',_0xf8ecb6(0xad2)])['optional']()},async _0x4b81dc=>{const _0x45b0b3=_0xf8ecb6;try{if(_0x45b0b3(0x68a)===_0x45b0b3(0x68a)){const _0x39f227=await _0x682835();if(!_0x39f227['ok'])return{..._0x4c7e7d(_0x39f227['payload']),'isError':!![]};const _0xe362fb=await _0x2eb7fe[_0x45b0b3(0x8b2)]({'direction':_0x4b81dc['direction'],'from':_0x4b81dc['from'],'distancePx':_0x4b81dc[_0x45b0b3(0xa28)],'durationMs':_0x4b81dc[_0x45b0b3(0x270)],'coordinateSource':_0x4b81dc[_0x45b0b3(0x8f1)]});return{..._0x4c7e7d(_0xe362fb),'isError':!_0xe362fb[_0x45b0b3(0x6d0)]};}else return{'success':!![],'details':{'element':_0x1e6c1d[_0x45b0b3(0x820)],'retryAfterSwipes':_0x20c504+0x1}};}catch(_0x18d3bb){return _0x393307('screen_swipe',_0x18d3bb);}}),_0x4fd7c4['tool']('screen_scroll_to',_0xf8ecb6(0xadc),{'text':_0x344f4d[_0xf8ecb6(0x30d)]()['optional'](),'accessibilityLabel':_0x344f4d['string']()['optional'](),'maxSwipes':_0x344f4d['number']()[_0xf8ecb6(0x768)](),'direction':_0x344f4d['enum'](['up','down'])[_0xf8ecb6(0x768)]()},async _0x790bd8=>{const _0x27dc9f=_0xf8ecb6;try{const _0x13b026=await _0x682835();if(!_0x13b026['ok'])return{..._0x4c7e7d(_0x13b026['payload']),'isError':!![]};if(!_0x790bd8[_0x27dc9f(0x3e0)]&&!_0x790bd8[_0x27dc9f(0x444)])return{..._0x4c7e7d({'success':![],'error':_0x27dc9f(0x990)}),'isError':!![]};const _0x56d8ba=await _0x2eb7fe['scrollToElement']({'text':_0x790bd8['text'],'accessibilityLabel':_0x790bd8[_0x27dc9f(0x444)]},{'maxSwipes':_0x790bd8[_0x27dc9f(0x589)],'direction':_0x790bd8['direction']});return{..._0x4c7e7d(_0x56d8ba),'isError':!_0x56d8ba['success']};}catch(_0x40a72a){return'RuGah'!=='RuGah'?_0x422504['filter'](_0x2ded79=>_0x2ded79[_0x27dc9f(0x762)]==='error'&&!_0x2ded79['ok']):_0x393307('screen_scroll_to',_0x40a72a);}}),_0x4fd7c4['tool']('screen_long_press',_0xf8ecb6(0xa3d),{'text':_0x344f4d['string']()[_0xf8ecb6(0x768)](),'accessibilityLabel':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)](),'durationMs':_0x344f4d['number']()[_0xf8ecb6(0x768)]()},async _0x4ffd59=>{const _0xbe1bd1=_0xf8ecb6;try{const _0x2d7273=await _0x682835();if(!_0x2d7273['ok'])return{..._0x4c7e7d(_0x2d7273[_0xbe1bd1(0x35c)]),'isError':!![]};if(!_0x4ffd59['text']&&!_0x4ffd59['accessibilityLabel'])return{..._0x4c7e7d({'success':![],'error':_0xbe1bd1(0x990)}),'isError':!![]};const _0x300357=await _0x2eb7fe['longPressElement']({'text':_0x4ffd59[_0xbe1bd1(0x3e0)],'accessibilityLabel':_0x4ffd59['accessibilityLabel']},_0x4ffd59['durationMs']??0x3e8);return{..._0x4c7e7d(_0x300357),'isError':!_0x300357['success']};}catch(_0x10ebdf){return _0x393307('screen_long_press',_0x10ebdf);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x811),'Press\x20a\x20hardware/system\x20button:\x20home,\x20volumeUp,\x20volumeDown,\x20or\x20lock.',{'key':_0x344f4d['enum']([_0xf8ecb6(0xa4a),'volumeUp','volumeDown','lock'])},async({key:_0x312796})=>{const _0x1742df=_0xf8ecb6;try{const _0x55159b=await _0x682835();if(!_0x55159b['ok'])return{..._0x4c7e7d(_0x55159b['payload']),'isError':!![]};const _0x29a9ce=await _0x2eb7fe[_0x1742df(0x783)](_0x312796);return{..._0x4c7e7d(_0x29a9ce),'isError':!_0x29a9ce['success']};}catch(_0x1fd4d6){return _0x393307('screen_press_key',_0x1fd4d6);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x294),'Open\x20a\x20URL\x20/\x20deep\x20link\x20on\x20the\x20device\x20to\x20jump\x20straight\x20to\x20a\x20screen\x20—\x20useful\x20for\x20testing\x20your\x20app\x27s\x20deep-link\x20routes\x20(e.g.\x20myapp://product/42).\x20If\x20the\x20scheme\x20isn\x27t\x20registered\x20in\x20the\x20app\x20under\x20test,\x20the\x20result\x20carries\x20an\x20actionable\x20message\x20explaining\x20the\x20app\x20needs\x20a\x20rebuild\x20to\x20pick\x20up\x20the\x20scheme.',{'url':_0x344f4d['string']()['describe'](_0xf8ecb6(0x225))},async({url:_0x32051e})=>{const _0x25d042=_0xf8ecb6;try{const _0x36bff4=await _0x682835();if(!_0x36bff4['ok'])return{..._0x4c7e7d(_0x36bff4['payload']),'isError':!![]};const _0x10b169=await _0x2eb7fe[_0x25d042(0x423)](_0x32051e);return{..._0x4c7e7d(_0x10b169),'isError':!_0x10b169['success']};}catch(_0x213813){return _0x393307(_0x25d042(0x294),_0x213813);}}),_0x4fd7c4['tool']('screen_screenshot',_0xf8ecb6(0x59d),{},async()=>{const _0x517eb7=_0xf8ecb6;try{const _0x206c20=await _0x682835();if(!_0x206c20['ok'])return{..._0x4c7e7d(_0x206c20['payload']),'isError':!![]};const _0x58130f=await _0x2eb7fe[_0x517eb7(0x439)]();return{..._0x1f14f2(_0x58130f)};}catch(_0x34d51b){return _0x393307(_0x517eb7(0x341),_0x34d51b);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('screen_wait_for',_0xf8ecb6(0x787),{'text':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)](),'accessibilityLabel':_0x344f4d[_0xf8ecb6(0x30d)]()['optional'](),'type':_0x344f4d['string']()[_0xf8ecb6(0x768)](),'timeoutMs':_0x344f4d['number']()['optional'](),'pollIntervalMs':_0x344f4d[_0xf8ecb6(0x2af)]()['optional'](),'disappear':_0x344f4d[_0xf8ecb6(0xa6d)]()[_0xf8ecb6(0x768)]()},async _0x1276a9=>{const _0x24f7cb=_0xf8ecb6;try{const _0x53d94e=await _0x682835();if(!_0x53d94e['ok'])return{..._0x4c7e7d(_0x53d94e[_0x24f7cb(0x35c)]),'isError':!![]};if(!_0x1276a9[_0x24f7cb(0x3e0)]&&!_0x1276a9['accessibilityLabel']&&!_0x1276a9[_0x24f7cb(0x45e)])return{..._0x4c7e7d({'success':![],'error':'text,\x20accessibilityLabel,\x20or\x20type\x20is\x20required.'}),'isError':!![]};const _0x31bd2a=await _0x2eb7fe[_0x24f7cb(0x588)]({'text':_0x1276a9[_0x24f7cb(0x3e0)],'accessibilityLabel':_0x1276a9['accessibilityLabel'],'type':_0x1276a9['type']},{'timeoutMs':_0x1276a9['timeoutMs'],'pollIntervalMs':_0x1276a9['pollIntervalMs'],'disappear':_0x1276a9['disappear']});return{..._0x4c7e7d(_0x31bd2a),'isError':!_0x31bd2a['success']};}catch(_0x53b458){return _0x393307(_0x24f7cb(0x257),_0x53b458);}});!_0x2924fc&&_0x948d06(_0x4fd7c4,{'screenManager':_0x2eb7fe,'toolErrorContent':_0x393307,'jsonText':_0x4c7e7d,'requireWDA':_0x682835});_0x4fd7c4['tool'](_0xf8ecb6(0x21e),_0xf8ecb6(0x7e6),{'bundleId':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x3f0)]('e.g.,\x20com.acme.myapp')},async({bundleId:_0xbce553})=>{const _0x20dd2e=_0xf8ecb6;try{const _0xe57848=await _0x5cb8cf[_0x20dd2e(0xadd)](_0xbce553);return{..._0x4c7e7d(_0xe57848),'isError':!_0xe57848[_0x20dd2e(0x6d0)]};}catch(_0xeb371b){return _0x393307('app_launch',_0xeb371b);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('app_terminate',_0xf8ecb6(0x5f0),{'bundleId':_0x344f4d[_0xf8ecb6(0x30d)]()},async({bundleId:_0x21ab98})=>{const _0x1de797=_0xf8ecb6;try{const _0x50ab04=await _0x5cb8cf[_0x1de797(0x6c6)](_0x21ab98);return{..._0x4c7e7d(_0x50ab04),'isError':!_0x50ab04[_0x1de797(0x6d0)]};}catch(_0x30bc2d){if('HzlZV'===_0x1de797(0x9a0))_0x4d79d9[_0x1de797(0x96d)]=_0x215c00[_0x1de797(0x3dd)],_0x44fa51[_0x1de797(0x910)][_0x1de797(0xaac)](_0x1de797(0x5d2)+_0x588827+':\x20'+_0x2cd917[_0x1de797(0x3dd)]+'\x0a');else return _0x393307('app_terminate',_0x30bc2d);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0xa8d),_0xf8ecb6(0x32b),{'bundleId':_0x344f4d['string']()},async({bundleId:_0x297c62})=>{const _0x5c002f=_0xf8ecb6;try{const _0x5818a4=await _0x5cb8cf['activateApp'](_0x297c62);return{..._0x4c7e7d(_0x5818a4),'isError':!_0x5818a4['success']};}catch(_0x34ed59){if('bNZPk'===_0x5c002f(0x93f))return _0x393307('app_activate',_0x34ed59);else _0x5f1e7d=_0x58638f[_0x5c002f(0x981)](_0x189eb8);}}),_0x4fd7c4['tool']('app_list_installed',_0xf8ecb6(0x557),{},async()=>{const _0x1ed92a=_0xf8ecb6;try{const _0x340141=await _0x5cb8cf[_0x1ed92a(0x84b)]();return{..._0x4c7e7d(_0x340141),'isError':!_0x340141[_0x1ed92a(0x6d0)]};}catch(_0x312d40){return _0x393307('app_list_installed',_0x312d40);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('app_active',_0xf8ecb6(0xaeb),{},async()=>{const _0x57d5be=_0xf8ecb6;try{const _0xbb4f55=await _0x5cb8cf['getActiveApp']();return{..._0x4c7e7d(_0xbb4f55),'isError':!_0xbb4f55[_0x57d5be(0x6d0)]};}catch(_0x143cf8){return _0x393307(_0x57d5be(0x9ca),_0x143cf8);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('device_ensure_awake',_0xf8ecb6(0xb16),{},async()=>{const _0x2218e1=_0xf8ecb6;try{const _0x1bf9ca=await _0x46143c['ensureAwake']();return{..._0x4c7e7d(_0x1bf9ca),'isError':!_0x1bf9ca[_0x2218e1(0x671)]};}catch(_0x14a677){return _0x393307(_0x2218e1(0x2eb),_0x14a677);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x213),_0xf8ecb6(0xaa4),{'orientation':_0x344f4d[_0xf8ecb6(0x407)]([_0xf8ecb6(0x6d7),'landscape'])},async({orientation:_0x38e8bc})=>{const _0x1ed4f3=_0xf8ecb6;try{const _0x9f890e=await _0x46143c[_0x1ed4f3(0x614)](_0x38e8bc);return{..._0x4c7e7d(_0x9f890e),'isError':!_0x9f890e[_0x1ed4f3(0x6d0)]};}catch(_0x18ef61){return _0x393307('device_set_orientation',_0x18ef61);}});function _0x1b5c79(){const _0x16a827=_0xf8ecb6;return{'loadAuth':_0x1be651,'resolveRepo':_0x2e0c69,'getCurrentBranch':_0x4aa79c,'getGitSha':_0x1f644c,'getWorkingTreeDiff':_0x4f2a26,'listChangedFiles':_0x4748b8,'readChangedFileContents':_0x26a76c,'getDefaultBranch':_0x9c174,'fetcher':(_0x492fc0,_0x5abbf0,_0x3e295a)=>_0x4e6fa7(_0x492fc0,_0x5abbf0,_0x3e295a),'ensureGraph':()=>_0x25cdf3({'workingDir':_0x504dae}),'flowRunner':_0x891648,'progressWriter':_0x402758,'testDataManager':_0x6faf18,'runsStore':_0x4436b4,'getTestIdReady':()=>_0x316cc9({'projectDir':_0x504dae,'sentinel':_0x35b0ad['getLatestTestIdSentinel']()})['then'](_0x2078d2=>_0x2078d2[_0x16a827(0x335)]),'cwd':_0x504dae};}_0x4fd7c4['tool']('rn_test_flows','Execute\x20one\x20or\x20more\x20flows\x20by\x20flowId\x20against\x20the\x20connected\x20iOS\x20app.\x20flowIds\x20come\x20from\x20rn_find_flows\x20or\x20rn_list_flows\x20responses\x20—\x20NEVER\x20invent\x20or\x20guess\x20them.\x20For\x20comprehensive\x20verification,\x20pass\x20every\x20flowId\x20from\x20the\x20preview.\x20At\x20most\x2010\x20flowIds\x20per\x20call\x20—\x20for\x20previews\x20larger\x20than\x20that,\x20batch\x20the\x20ids\x20across\x20multiple\x20rn_test_flows\x20calls.\x20The\x20server\x20orders\x20execution\x20(planner\x20priority\x20plus\x20chain\x20grouping\x20—\x20chainable\x20selections\x20run\x20back-to-back\x20in\x20one\x20device\x20session,\x20the\x20rest\x20individually),\x20so\x20the\x20order\x20of\x20the\x20ids\x20you\x20pass\x20carries\x20no\x20meaning.\x20Returns\x20per-step\x20screenshots\x20plus\x20any\x20runtime\x20errors.\x20If\x20any\x20id\x20is\x20unknown,\x20the\x20error\x20payload\x20includes\x20an\x20`available`\x20list\x20of\x20{flowId,\x20name}\x20to\x20re-pick\x20from.\x20Requires\x20auth\x20—\x20run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20first.',{'flowIds':_0x344f4d['array'](_0x344f4d['string']())['min'](0x1)[_0xf8ecb6(0x3f0)]('Flow\x20ids\x20to\x20execute,\x20as\x20returned\x20by\x20rn_find_flows\x20/\x20rn_list_flows.\x20Treated\x20as\x20a\x20set\x20—\x20execution\x20order\x20is\x20decided\x20server-side.')},async({flowIds:_0x1a5771})=>{const _0x353ab8=_0xf8ecb6;try{await _0x5b4fb6();const _0x1aabbb=await _0x21e28d(_0x2c6da6);if(_0x1aabbb[_0x353ab8(0xb14)]===_0x353ab8(0x678))return _0x1aabbb['response'];const _0x51e321=await _0x17592c({'flowIds':_0x1a5771},_0x1b5c79()),_0x342771=typeof _0x51e321[_0x353ab8(0x6a1)]===_0x353ab8(0x2af)||(_0x51e321['requiresEnv']?.[_0x353ab8(0x3b7)]??0x0)>0x0,_0x2cfd8b=_0xd52672(_0x1aabbb[_0x353ab8(0x8f7)]),_0x456d28=_0x2cfd8b?{..._0x51e321,'doctorAdvisories':_0x2cfd8b}:_0x51e321,_0x332082=_0x102b65(_0x456d28,_0x51e321[_0x353ab8(0x665)],_0x51e321['warning']);return _0x100267(_0x332082['content']),{..._0x332082,'isError':_0x342771};}catch(_0x34d229){if(_0x34d229 instanceof _0x3eb20a&&_0x34d229['details']!==void 0x0)return{..._0x4c7e7d(_0x34d229[_0x353ab8(0x65d)]),'isError':!![]};return _0x393307(_0x353ab8(0x645),_0x34d229);}}),_0x4fd7c4['tool']('rn_list_flows','Preview\x20which\x20flows\x20your\x20changes\x20(or\x20specific\x20files)\x20affect\x20—\x20THE\x20first\x20step\x20for\x20any\x20\x27test\x20my\x20changes\x27\x20or\x20\x27what\x20does\x20this\x20touch\x27\x20ask.\x20Each\x20row\x20carries\x20a\x20`flowId`\x20plus\x20the\x20flow\x27s\x20name,\x20outcome,\x20mutation\x20status,\x20and\x20preconditions.\x20The\x20rows\x20are\x20a\x20menu:\x20their\x20order\x20is\x20presentational\x20only\x20(the\x20server\x20determines\x20execution\x20order),\x20so\x20just\x20decide\x20what\x20to\x20run\x20—\x20the\x20chosen\x20flowIds\x20for\x20a\x20focused\x20subset,\x20or\x20ALL\x20of\x20them\x20for\x20comprehensive\x20verification\x20—\x20and\x20pass\x20them\x20to\x20`rn_test_flows`\x20to\x20execute\x20(batching\x20above\x20its\x2010-id\x20cap).\x20The\x20preview\x20is\x20comprehensive:\x20`totalCount`\x20is\x20the\x20true\x20matched\x20count,\x20and\x20rows\x20are\x20only\x20ever\x20clipped\x20past\x20a\x20high\x20bound,\x20flagged\x20with\x20`truncated:\x20true`\x20plus\x20a\x20hint.\x20For\x20app-wide\x20queries\x20not\x20scoped\x20to\x20a\x20diff\x20(\x27test\x20the\x20login\x20flows\x27),\x20use\x20`rn_find_flows`\x20instead.\x0a\x0aScope\x20inputs:\x20pass\x20`filePaths`\x20when\x20the\x20user\x20scoped\x20to\x20specific\x20files;\x20otherwise\x20omit\x20both\x20arguments\x20and\x20the\x20preview\x20defaults\x20to\x20the\x20working-tree\x20diff\x20vs\x20the\x20repo\x27s\x20default\x20branch.\x20Requires\x20auth.',{'base':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()['describe'](_0xf8ecb6(0x605)),'filePaths':_0x344f4d[_0xf8ecb6(0x8ed)]([_0x344f4d[_0xf8ecb6(0x30d)](),_0x344f4d['array'](_0x344f4d['string']())])[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x9cf))},async({base:_0x3d3412,filePaths:_0xa6f8d6})=>{const _0x1ebaea=_0xf8ecb6;try{if(_0x1ebaea(0x54e)!==_0x1ebaea(0x54e))return _0x3c02b4(_0x5841bb);else{const _0x3a03b8=await _0x2cdf6d({'base':_0x3d3412,'filePaths':_0xa6f8d6},_0x1b5c79());return _0x4c7e7d(_0x3a03b8);}}catch(_0x41734e){return _0x393307('rn_list_flows',_0x41734e);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('rn_find_flows','Find\x20flows\x20app-wide\x20by\x20describing\x20them\x20in\x20natural\x20language\x20(e.g.\x20\x27user\x20logs\x20in\x27,\x20\x27checkout\x20flows\x27).\x20NOT\x20diff-scoped\x20—\x20searches\x20every\x20flow\x20in\x20the\x20app;\x20for\x20\x27what\x20would\x20my\x20changes\x20affect\x27\x20use\x20`rn_list_flows`\x20instead.\x20The\x20returned\x20candidate\x20set\x20is\x20COMPLETE\x20for\x20the\x20query\x20(the\x20matcher\x20over-includes\x20rather\x20than\x20filters),\x20so\x20make\x20the\x20final\x20selection\x20yourself:\x20pick\x20ONE\x20flow\x20for\x20a\x20happy-path\x20ask,\x20several\x20or\x20all\x20of\x20them\x20for\x20broad\x20behavior\x20coverage.\x20Match\x20order\x20is\x20presentational,\x20not\x20a\x20relevance\x20ranking\x20(each\x20match\x27s\x20`reason`\x20carries\x20the\x20why;\x20the\x20server\x20determines\x20execution\x20order).\x20Then\x20pass\x20the\x20chosen\x20flowIds\x20to\x20`rn_test_flows`\x20to\x20execute.\x20Requires\x20auth.',{'query':_0x344f4d['string']()[_0xf8ecb6(0x488)](0x1)[_0xf8ecb6(0x3f0)]('Natural-language\x20description\x20of\x20the\x20flow(s)\x20to\x20find\x20(e.g.\x20\x27user\x20logs\x20in\x27,\x20\x27add\x20item\x20to\x20cart\x27).')},async({query:_0x386b9a})=>{const _0x53fffc=_0xf8ecb6;try{const _0x284210=await _0x553c87({'query':_0x386b9a},_0x1b5c79()),_0x4f81e9=_0x4c7e7d(_0x284210);return _0x284210['warning']?{'content':[..._0x4f81e9['content'],{'type':_0x53fffc(0x3e0),'text':_0x284210['warning']}]}:_0x4f81e9;}catch(_0x272ec5){return _0x393307(_0x53fffc(0x58d),_0x272ec5);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('rn_test_chain_start',_0xf8ecb6(0xacb),{'chainId':_0x344f4d['string']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x836)),'flows':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d[_0xf8ecb6(0x6b2)]())[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x5ca)),'bridges':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d['array'](_0x344f4d[_0xf8ecb6(0x6b2)]()))['describe'](_0xf8ecb6(0x634)),'snapPointFlowIndices':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d[_0xf8ecb6(0x2af)]()[_0xf8ecb6(0x732)]()[_0xf8ecb6(0x8b3)]())[_0xf8ecb6(0x3f0)]('Indices\x20after\x20which\x20the\x20runner\x20pauses\x20for\x20an\x20AI-agent\x20decision.\x20Pass\x20through\x20verbatim\x20from\x20the\x20planning\x20tool.'),'perFlowStatedDependencies':_0x344f4d['array'](_0x344f4d[_0xf8ecb6(0x8ed)]([_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d['string']()),_0x344f4d['undefined']()]))['optional']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0xa8f)),'perFlowMutexWith':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d[_0xf8ecb6(0x8ed)]([_0x344f4d['array'](_0x344f4d[_0xf8ecb6(0x30d)]()),_0x344f4d['undefined']()]))[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x789)),'bootRequestPatterns':_0x344f4d['array'](_0x344f4d[_0xf8ecb6(0x30d)]())[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x505)),'affectedFlowNames':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d[_0xf8ecb6(0x30d)]())['optional']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x4fc)),'signature':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0xaf4))},async _0x31c063=>{const _0x31fcd6=_0xf8ecb6;try{await _0x5b4fb6();const _0x56e1ef=await _0x21e28d(_0x2c6da6);if(_0x56e1ef['kind']==='block')return _0x56e1ef[_0x31fcd6(0x90e)];const _0x14f3dd=_0x31c063,_0x248f38=await _0x22cea7['start'](_0x14f3dd),_0x22e6f1=_0xd52672(_0x56e1ef[_0x31fcd6(0x8f7)]),_0x280ea8=[..._0x4c7e7d(_0x22e6f1?{..._0x248f38,'doctorAdvisories':_0x22e6f1}:_0x248f38)['content']];return _0x100267(_0x280ea8),{'content':_0x280ea8,'isError':_0x248f38[_0x31fcd6(0x428)]==='error'};}catch(_0x316192){return _0x393307(_0x31fcd6(0x8e8),_0x316192);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x353),'Resume\x20a\x20chain\x20run\x20that\x20previously\x20returned\x20`snap_point_pending`\x20OR\x20`awaiting_error_decision`.\x20Pass\x20the\x20`runId`\x20and\x20the\x20AI\x20agent\x27s\x20decision:\x0a\x20\x20•\x20`snap_point_pending`\x20→\x20`continue`\x20(keep\x20current\x20user)\x20|\x20`recreate`\x20(wipe\x20app\x20state,\x20then\x20run\x20next\x20flow).\x0a\x20\x20•\x20`awaiting_error_decision`\x20→\x20`retry`\x20(re-run\x20the\x20failed\x20flow\x20once;\x20second\x20failure\x20terminalizes)\x20|\x20`halt`\x20(terminalize\x20the\x20run\x20immediately\x20with\x20the\x20recorded\x20failure).\x0aA\x20decision\x20that\x20doesn\x27t\x20match\x20the\x20active\x20pause\x20state\x20is\x20rejected\x20with\x20an\x20error\x20response\x20naming\x20the\x20actual\x20pause\x20—\x20re-issue\x20with\x20the\x20correct\x20verb.\x20Returns\x20the\x20next\x20response\x20—\x20another\x20pause,\x20chain\x20completion,\x20or\x20an\x20error.',{'runId':_0x344f4d[_0xf8ecb6(0x30d)]()['describe'](_0xf8ecb6(0x2ee)),'decision':_0x344f4d['enum'](['continue','recreate','retry',_0xf8ecb6(0x3c0)])[_0xf8ecb6(0x3f0)]('`continue`\x20/\x20`recreate`\x20are\x20valid\x20only\x20at\x20`snap_point_pending`.\x20`retry`\x20/\x20`halt`\x20are\x20valid\x20only\x20at\x20`awaiting_error_decision`.\x20Mismatched\x20pairings\x20are\x20rejected\x20before\x20the\x20runner\x20advances.')},async({runId:_0x58ad02,decision:_0x3737b0})=>{const _0x4f5635=_0xf8ecb6;try{await _0x5b4fb6();const _0xb3caba=await _0x21e28d(_0x2c6da6,{'force':!![]});if(_0xb3caba[_0x4f5635(0xb14)]==='block')return _0xb3caba['response'];const _0x5c2671=await _0x22cea7['continueRun'](_0x58ad02,_0x3737b0),_0x289126=_0xd52672(_0xb3caba[_0x4f5635(0x8f7)]),_0x189ceb=[..._0x4c7e7d(_0x289126?{..._0x5c2671,'doctorAdvisories':_0x289126}:_0x5c2671)[_0x4f5635(0x33d)]];return _0x100267(_0x189ceb),{'content':_0x189ceb,'isError':_0x5c2671['status']==='error'};}catch(_0x496e5a){if('PlVwm'!=='EEfVo')return _0x393307(_0x4f5635(0x353),_0x496e5a);else _0x50f20e(_0x4315b8)?_0x275a0a=!![]:_0x1742b9=!![];}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x720),_0xf8ecb6(0x36c),{'olderThan':_0x344f4d['enum']([_0xf8ecb6(0x843),'30d',_0xf8ecb6(0x2d4)])['optional']()[_0xf8ecb6(0x3f0)]('Age\x20threshold:\x20`14d`\x20matches\x20the\x20server\x27s\x20default\x20startup\x20sweep,\x20`30d`\x20is\x20more\x20conservative,\x20`all`\x20purges\x20every\x20run.')},async({olderThan:_0x261af2})=>{const _0x50a4a0=_0xf8ecb6;try{const _0x1378bd=await _0x504d31(_0x4436b4,{'olderThan':_0x261af2});if(_0x1378bd['failedToPurge']>0x0)return{..._0x4c7e7d({..._0x1378bd,'error':_0x1378bd[_0x50a4a0(0x8ab)]+_0x50a4a0(0x348)}),'isError':!![]};return _0x4c7e7d(_0x1378bd);}catch(_0x21c3be){return _0x393307(_0x50a4a0(0x720),_0x21c3be);}}),_0x4fd7c4['tool']('ceraph_doctor','Run\x20every\x20setup\x20check\x20we\x20can\x20before\x20flows\x20execute:\x20WDA\x20reachable,\x20device\x20connected,\x20device\x20awake,\x20app\x20installed,\x20required\x20env\x20vars\x20present,\x20laptop\x20WiFi.\x20Returns\x20a\x20structured\x20DoctorResult\x20—\x20when\x20ok:\x20false,\x20surface\x20the\x20failing\x20checks\x27\x20remediation\x20verbatim\x20and\x20DO\x20NOT\x20attempt\x20to\x20fix\x20environment\x20issues\x20by\x20editing\x20source\x20code.\x20Call\x20this\x20once\x20before\x20a\x20batch\x20of\x20rn_test_*\x20runs.\x20To\x20bring\x20everything\x20up\x20in\x20one\x20call\x20(Metro\x20+\x20build\x20+\x20verify),\x20use\x20ceraph_start.',{'bundleId':_0x344f4d['string']()['optional']()[_0xf8ecb6(0x3f0)]('Bundle\x20ID\x20of\x20the\x20app\x20under\x20test\x20(e.g.,\x20com.acme.myapp).\x20Required\x20for\x20the\x20app-installed\x20check.'),'requiredEnv':_0x344f4d[_0xf8ecb6(0x20f)](_0x344f4d[_0xf8ecb6(0x30d)]())['optional']()['describe'](_0xf8ecb6(0x69f)),'expectedNetwork':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()['describe'](_0xf8ecb6(0x40a))},async({bundleId:_0x58e6d7,requiredEnv:_0x255a21,expectedNetwork:_0x15cd89})=>{const _0x3c2607=_0xf8ecb6;try{if(_0x3c2607(0x1ec)==='Oauop'){const _0x314bc8=_0x52c65e['timeoutMs']-(_0x4a3f9d()-_0x3c3951),_0x2f0e9f=_0x54f2e4[_0x3c2607(0x553)](_0x314bc8,0x0);_0x2fee67=_0x8dcb87(()=>{_0x3aa86e(new _0x3e748f(_0xdfd5fa(_0xd97da4['timeoutMs'])));},_0x2f0e9f);}else{const _0x255a61=await _0x3fb793({'screen':_0x2eb7fe,'apps':_0x5cb8cf,'autonomy':_0x46143c,'iproxyManager':_0x5246a9,'bundleId':_0x58e6d7,'requiredEnv':_0x255a21,'expectedNetwork':_0x15cd89,'projectDir':_0x504dae,'target':_0x229990});return _0x17c6c2(_0x255a61),{..._0x4c7e7d(_0x255a61),'isError':!_0x255a61['ok']};}}catch(_0x5b8fab){return _0x393307('ceraph_doctor',_0x5b8fab);}}),_0x4fd7c4['tool']('rn_sync_camera_registry',_0xf8ecb6(0x8fe),{},async()=>{const _0x4aa8d7=_0xf8ecb6;try{const _0x54a4a6=await _0x112a0a(_0x504dae);if(_0x54a4a6[_0x4aa8d7(0x36a)]==='missing-dir')return{..._0x4c7e7d({'registered':[],'registryPath':_0x1718c0(_0x504dae,_0x54a4a6[_0x4aa8d7(0x5ff)]),'state':_0x54a4a6['writtenOrUnchanged'],'message':_0x4aa8d7(0xa9c)}),'isError':!![]};return _0x4c7e7d({'registered':_0x54a4a6[_0x4aa8d7(0x4de)]['map'](_0x1a4aa5=>_0x1a4aa5['key']),'registryPath':_0x1718c0(_0x504dae,_0x54a4a6[_0x4aa8d7(0x5ff)]),'state':_0x54a4a6['writtenOrUnchanged']});}catch(_0x9db6ad){return _0x393307('rn_sync_camera_registry',_0x9db6ad);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('ceraph_add_camera_image',_0xf8ecb6(0x5ed),{'imageKey':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x3f0)]('Lowercase\x20+\x20hyphen-separated\x20stem\x20(e.g.\x20`profile`,\x20`id-card`,\x20`handwriting-sample-1`).\x20Becomes\x20both\x20the\x20filename\x20stem\x20AND\x20the\x20value\x20devs\x20pass\x20to\x20`<CeraphCamera\x20imageKey>`.'),'imageBase64':_0x344f4d['string']()['describe']('Base64-encoded\x20image\x20payload.\x20A\x20`data:image/...;base64,...`\x20URI\x20prefix\x20is\x20accepted\x20and\x20stripped\x20automatically.'),'contentType':_0x344f4d[_0xf8ecb6(0x30d)]()['optional']()['describe'](_0xf8ecb6(0x56d)),'overwrite':_0x344f4d[_0xf8ecb6(0xa6d)]()['optional']()[_0xf8ecb6(0x3f0)]('Allow\x20replacing\x20an\x20existing\x20imageKey\x20(across\x20different\x20extensions).\x20Defaults\x20to\x20false.'),'subDir':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)]('Optional\x20single-segment\x20subdirectory\x20under\x20`.ceraph/camera-images/`.\x20Most\x20callers\x20omit\x20this.\x20Must\x20be\x20lowercase\x20+\x20hyphen-separated;\x20no\x20slashes,\x20no\x20`..`.')},async({imageKey:_0x526dce,imageBase64:_0x3d9534,contentType:_0x2d3ad6,overwrite:_0x4fb0c2,subDir:_0x41ef60})=>{const _0x2baecb=_0xf8ecb6;try{const _0x1bf2ae=await _0x164c0b(_0x504dae,{'imageKey':_0x526dce,'imageBase64':_0x3d9534,'contentType':_0x2d3ad6,'overwrite':_0x4fb0c2,'subDir':_0x41ef60});return _0x4c7e7d({'written':_0x1bf2ae['written'],'registry':_0x1bf2ae['registry'],'registered':_0x1bf2ae['registered'],'detectedContentType':_0x1bf2ae['detectedContentType'],'detectedExt':_0x1bf2ae[_0x2baecb(0x4f1)],'replaced':_0x1bf2ae['replaced'],'removedSiblingPath':_0x1bf2ae['removedSiblingPath'],'bytes':_0x1bf2ae['bytes'],'registryState':_0x1bf2ae['registryState'],'warnings':_0x1bf2ae[_0x2baecb(0x7a8)]});}catch(_0xef2c1d){if(_0xef2c1d instanceof _0x12b47f)return{..._0x4c7e7d({'error':_0xef2c1d['code'],'message':_0xef2c1d['message'],'remediation':_0xef2c1d['remediation']}),'isError':!![]};return _0x393307('ceraph_add_camera_image',_0xef2c1d);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('rn_reload','Request\x20a\x20JS\x20bundle\x20reload\x20on\x20the\x20running\x20RN\x20app\x20by\x20dispatching\x20the\x20`ceraph://reload`\x20deep\x20link\x20through\x20WDA.\x20Requires\x20the\x20app\x20to\x20have\x20called\x20`installSignalCapture()`\x20(or\x20otherwise\x20registered\x20the\x20reload\x20deep-link\x20listener)\x20at\x20boot.\x20Waits\x20up\x20to\x20`timeoutMs`\x20for\x20WDA\x20to\x20become\x20responsive\x20again,\x20then\x20captures\x20a\x20screenshot.\x20Dev-only;\x20does\x20nothing\x20in\x20a\x20production\x20build.',{'timeoutMs':_0x344f4d['number']()['optional']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x422))},async({timeoutMs:_0x3b2b92})=>{const _0x5c2082=_0xf8ecb6;try{const _0x25ccbd=await _0x682835();if(!_0x25ccbd['ok'])return{..._0x4c7e7d(_0x25ccbd[_0x5c2082(0x35c)]),'isError':!![]};let _0x1e5516=_0x5c2082(0xa99);await _0x5b4fb6();const _0x48a2c8=_0x35b0ad['isListening'](),_0xb97f5e=_0x48a2c8?await _0x35b0ad[_0x5c2082(0x47e)]('reload'):{'acked':![]};if(!_0xb97f5e['acked']){const _0x13ded7=await _0x2eb7fe['openUrl']('ceraph://reload');if(!_0x13ded7['success'])return{..._0x4c7e7d({'success':![],'error':_0x48a2c8?'No\x20shim\x20acknowledged\x20the\x20reload\x20over\x20the\x20command\x20channel,\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20'+(_0x13ded7[_0x5c2082(0x3dd)]??_0x5c2082(0x3d8)):_0x140ce4===_0x5c2082(0x264)?_0x5c2082(0x3b5)+(_0x13ded7['error']??'openUrl\x20failed')+_0x5c2082(0x91c):'Another\x20process\x20holds\x20the\x20device-signal\x20port\x20(:8101),\x20so\x20Ceraph\x27s\x20command\x20channel\x20is\x20unavailable\x20in\x20this\x20session,\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20'+(_0x13ded7[_0x5c2082(0x3dd)]??'openUrl\x20failed')+_0x5c2082(0x542)}),'isError':!![]};_0x1e5516=_0x48a2c8?'deep-link-fallback':'deep-link\x20(command\x20channel\x20unavailable\x20—\x20:8101\x20not\x20bound\x20by\x20this\x20session)';}const _0x2aa891=_0x3b2b92??0x2710,_0x21500c=Date[_0x5c2082(0x2f8)]();let _0x4cdef3=![];while(Date[_0x5c2082(0x2f8)]()-_0x21500c<_0x2aa891){const _0x9797ea=await _0x2eb7fe['pingStatus']()['catch'](()=>![]);if(_0x9797ea){_0x4cdef3=!![];break;}await new Promise(_0x9806dd=>setTimeout(_0x9806dd,0xc8));}const _0x5931e6=await _0x2eb7fe[_0x5c2082(0x439)]()[_0x5c2082(0x48b)](()=>void 0x0);return{..._0x4c7e7d({'success':_0x4cdef3,'via':_0x1e5516,'elapsedMs':Date[_0x5c2082(0x2f8)]()-_0x21500c,'screenshotBase64':_0x5931e6?.['base64'],'error':_0x4cdef3?void 0x0:'WDA\x20did\x20not\x20return\x20within\x20'+_0x2aa891+'ms'}),'isError':!_0x4cdef3};}catch(_0x5aaf90){return _0x393307(_0x5c2082(0x390),_0x5aaf90);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x9fc),'Reset\x20the\x20running\x20RN\x20app\x27s\x20persisted\x20state\x20(AsyncStorage.clear\x20+\x20any\x20cleanup\x20hooks\x20registered\x20via\x20`registerResetHook`)\x20by\x20dispatching\x20the\x20`ceraph://reset`\x20deep\x20link\x20through\x20WDA.\x20Requires\x20the\x20app\x20to\x20have\x20called\x20`installSignalCapture()`\x20(default-on\x20behavior)\x20or\x20`installResetListener()`\x20explicitly.\x20Dev-only\x20—\x20production\x20builds\x20no-op\x20the\x20in-app\x20clear.',{},async()=>{const _0x429882=_0xf8ecb6;try{await _0x5b4fb6();const _0x1db86f=_0x35b0ad['isListening'](),_0x10a972=_0x1db86f?await _0x35b0ad['enqueueCommand'](_0x429882(0x49e)):{'acked':![]};if(_0x10a972[_0x429882(0x36b)])return _0x4c7e7d({'success':_0x10a972['ok']!==![],'cleared':_0x10a972['ok']!==![],'via':'command-channel',..._0x10a972['detail']?{'detail':_0x10a972[_0x429882(0x363)]}:{},'hint':_0x10a972['ok']!==![]?'AsyncStorage\x20cleared\x20in-app\x20(shim\x20acknowledged).':_0x429882(0x2b7)});const _0x3e5ee1=await _0x682835();if(!_0x3e5ee1['ok'])return{..._0x4c7e7d(_0x3e5ee1['payload']),'isError':!![]};const _0x1038d9=await _0x2eb7fe['openUrl'](_0x429882(0x933));if(!_0x1038d9[_0x429882(0x6d0)])return{..._0x4c7e7d({'success':![],'error':_0x1db86f?'No\x20shim\x20acknowledged\x20the\x20reset\x20over\x20the\x20command\x20channel\x20(is\x20the\x20app\x20running\x20with\x20installCeraph()\x20and\x20reachable\x20on\x20CERAPH_SIGNAL_HOST:8101?),\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20'+(_0x1038d9[_0x429882(0x3dd)]??_0x429882(0x3d8)):_0x140ce4==='bind-failed'?'Ceraph\x27s\x20device-signal\x20listener\x20couldn\x27t\x20start\x20(e.g.\x20a\x20permission\x20error\x20or\x20an\x20invalid\x20CERAPH_SIGNAL_HOST),\x20so\x20the\x20command\x20channel\x20is\x20unavailable\x20in\x20this\x20session,\x20and\x20the\x20deep-link\x20fallback\x20failed:\x20'+(_0x1038d9[_0x429882(0x3dd)]??_0x429882(0x3d8))+_0x429882(0x91c):_0x429882(0x7ac)+(_0x1038d9[_0x429882(0x3dd)]??_0x429882(0x3d8))+_0x429882(0x542)}),'isError':!![]};return _0x4c7e7d({'success':!![],'dispatched':!![],'via':_0x1db86f?_0x429882(0x25d):_0x429882(0x4a5),'hint':'ceraph://reset\x20dispatched\x20via\x20the\x20legacy\x20deep\x20link;\x20the\x20clear\x20runs\x20in-app.\x20Update\x20the\x20shim\x20to\x20get\x20command-channel\x20acks.'});}catch(_0x50c613){return _0x393307(_0x429882(0x9fc),_0x50c613);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0xa38),_0xf8ecb6(0x8e4),{},async()=>{const _0x547fef=_0xf8ecb6;try{if(_0x547fef(0x5ee)!==_0x547fef(0x5ee)){const _0x49bf84=_0x240da7['fromCharCode'](_0x36478e[0x8]??0x0,_0x1afbc2[0x9]??0x0,_0x4bcc50[0xa]??0x0,_0x4eef14[0xb]??0x0),_0x52f310=new _0x6f7c2d([_0x547fef(0x53b),_0x547fef(0x81f),'hevc','hevx','heim','heis',_0x547fef(0x334),_0x547fef(0x3b0)]);if(_0x52f310[_0x547fef(0x979)](_0x49bf84))return{'ext':_0x547fef(0x53b),'mime':_0x547fef(0x6a4)};}else{const _0x2031ae=await _0x53aed0['stopAll']();if(_0x2031ae[_0x547fef(0x3b7)]===0x0)return{'content':[{'type':_0x547fef(0x3e0),'text':JSON['stringify']({'stopped':[],'message':_0x547fef(0x734)})}]};return{'content':[{'type':_0x547fef(0x3e0),'text':JSON[_0x547fef(0x312)]({'stopped':_0x2031ae},null,0x2)}]};}}catch(_0x369d27){return _0x393307('rn_stop',_0x369d27);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x8d9),_0xf8ecb6(0x615),{},async()=>{const _0x302c1e=_0xf8ecb6;try{_0x229990[_0x302c1e(0x3e7)]();const _0x371e0a=await _0x229990[_0x302c1e(0x62d)](),_0x27cb6c=_0x24325a['getSession']();return _0x4c7e7d({'target':_0x371e0a['target'],'udid':_0x371e0a['udid'],'baseUrl':_0x371e0a[_0x302c1e(0xa51)],'reason':_0x371e0a['reason'],'preferenceEnv':process.env.CERAPH_TARGET??null,'simulatorWdaSession':_0x27cb6c?{'port':_0x27cb6c[_0x302c1e(0x21a)],'udid':_0x27cb6c['udid'],'projectPath':_0x27cb6c[_0x302c1e(0x743)]}:null});}catch(_0x485995){return _0x393307(_0x302c1e(0x8d9),_0x485995);}}),_0x4fd7c4['tool']('rn_wda_start','Boot\x20and\x20launch\x20WebDriverAgent\x20against\x20a\x20booted\x20iOS\x20Simulator,\x20then\x20capture\x20its\x20WDA\x20port\x20so\x20subsequent\x20screen_*/app_*\x20calls\x20can\x20route\x20to\x20the\x20simulator.\x20NOTE:\x20if\x20a\x20real\x20iOS\x20device\x20is\x20ALSO\x20connected,\x20auto-detection\x20(CERAPH_TARGET=auto,\x20the\x20default)\x20still\x20prefers\x20the\x20device,\x20so\x20calls\x20keep\x20driving\x20the\x20phone\x20—\x20set\x20CERAPH_TARGET=simulator\x20in\x20the\x20MCP\x20process\x20environment\x20to\x20force\x20simulator\x20routing.\x20With\x20no\x20device\x20connected,\x20routing\x20falls\x20to\x20the\x20simulator\x20automatically.\x20Idempotent\x20—\x20calling\x20it\x20again\x20while\x20a\x20session\x20is\x20running\x20returns\x20the\x20existing\x20one.\x20Requires\x20the\x20optional\x20`appium-webdriveragent`\x20dependency\x20in\x20the\x20project,\x20at\x20least\x20one\x20booted\x20simulator,\x20and\x20a\x20one-time\x20Xcode\x20signing\x20setup\x20for\x20the\x20WDA\x20target\x20(the\x20first\x20launch\x20runs\x20an\x20`xcodebuild\x20test`\x20to\x20code-sign;\x20later\x20launches\x20reuse\x20the\x20cached\x20build).',{'udid':_0x344f4d[_0xf8ecb6(0x30d)]()['optional']()['describe'](_0xf8ecb6(0x3ff)),'derivedDataPath':_0x344f4d['string']()['optional']()['describe'](_0xf8ecb6(0x546))},async({udid:_0x234d3d,derivedDataPath:_0x3905bd})=>{const _0x48c0f5=_0xf8ecb6;try{const _0x44aae3=await _0x24325a[_0x48c0f5(0x5cf)]({'udid':_0x234d3d,'derivedDataPath':_0x3905bd});return{..._0x4c7e7d(_0x44aae3),'isError':!_0x44aae3['ok']};}catch(_0x29eba2){return _0x393307('rn_wda_start',_0x29eba2);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x5a7),_0xf8ecb6(0x898),{},async()=>{const _0x221a9a=_0xf8ecb6;try{const _0x3b1a4c=await _0x24325a[_0x221a9a(0x8bc)]();return _0x4c7e7d(_0x3b1a4c);}catch(_0x587e4a){return _0x393307('rn_wda_stop',_0x587e4a);}});async function _0x2d2898(){const _0x410a49=_0xf8ecb6;if(await _0x2eb7fe[_0x410a49(0x3a4)]())return _0x410a49(0x556);const _0x36a853=await _0x1b6966(await _0x5cb8cf['getUdid']()['catch'](()=>null));if(!_0x36a853)return'No\x20device\x20hardware\x20UDID\x20resolved\x20—\x20could\x20not\x20start\x20the\x20iproxy\x20bridge.';const _0x438e94=await _0x5246a9[_0x410a49(0x5cf)](_0x36a853)[_0x410a49(0x48b)](()=>null);if(!_0x438e94)return'iproxy\x20bridge\x20start\x20threw\x20(ignored).';if(_0x438e94['ok'])return'iproxy\x20bridge\x20started\x20(pid\x20'+_0x438e94['pid']+').';if(_0x438e94['reason']==='already-running')return _0x410a49(0x3c7);if(_0x438e94['reason']===_0x410a49(0xacc))return _0x410a49(0x59f);return'iproxy\x20bridge\x20failed\x20to\x20start:\x20'+(_0x438e94[_0x410a49(0x910)]?.[0x0]??_0x410a49(0x8b7))+'.';}_0x4fd7c4['tool']('rn_wait_for_device',_0xf8ecb6(0x6ac),{'timeoutMs':_0x344f4d[_0xf8ecb6(0x2af)]()['int']()[_0xf8ecb6(0x6d5)]()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x523))},async({timeoutMs:_0x5971b4},_0x303f7c)=>{const _0xb1be45=_0xf8ecb6;try{if('svaCN'==='svaCN'){const _0x59a85e=await _0x510e3c({'timeoutMs':_0x5971b4,'signal':_0x303f7c['signal']});return _0x229990['invalidate'](),_0x4c7e7d(_0x59a85e);}else return![];}catch(_0x2d43aa){if(_0xb1be45(0x352)!=='RkIWQ'){const _0x5cee83=_0x4d5b28['find'](_0xb3c0b5=>_0xb3c0b5['udid']===_0x581d62['udid']);if(!_0x5cee83)return{'ok':![],'reason':'simulator-not-found','error':_0xb1be45(0x206)+_0x1e0a8b['udid']+_0xb1be45(0x9df)+_0x9c114a['map'](_0x4d4571=>_0x4d4571[_0xb1be45(0x9e5)]+'\x20('+_0x4d4571[_0xb1be45(0x5a2)]+')')['join'](',\x20')+'.'};_0x493db8=_0x5cee83;}else return _0x393307('rn_wait_for_device',_0x2d43aa);}});function _0x172685(_0xdfc6ea){const _0x1a267d=_0xf8ecb6;return{'content':[{'type':'text','text':JSON[_0x1a267d(0x312)](_0xdfc6ea,null,0x2)}]};}function _0x329611(_0x201567,_0x47b6c3){return _0x393307(_0x201567,_0x47b6c3);}_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x577),_0xf8ecb6(0x5b0),{'token':_0x344f4d['string']()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x6fd))},async({token:_0x4c81ad},_0x36c296)=>{try{const _0x4bf265=await _0xd85afe({'token':_0x4c81ad,'signal':_0x36c296['signal']});return _0x172685(_0x4bf265);}catch(_0x12e154){return _0x329611('ceraph_init',_0x12e154);}}),_0x4fd7c4['tool'](_0xf8ecb6(0x8e0),'Snapshot\x20the\x20current\x20init\x20state\x20of\x20the\x20project:\x20which\x20steps\x20are\x20complete\x20(package\x20installed,\x20GitHub\x20auth\x20cached,\x20ceraph://\x20scheme\x20registered,\x20installCeraph()\x20injected,\x20CameraView\x20usages\x20found)\x20and\x20which\x20MCP-client\x20config\x20files\x20exist.\x20Read-only.\x20To\x20actually\x20run\x20a\x20COMPLETE\x20setup,\x20call\x20`ceraph_init`\x20(CLI\x20parity\x20—\x20runs\x20every\x20phase\x20including\x20Claude\x20hooks\x20+\x20.gitignore);\x20use\x20the\x20granular\x20ceraph_init_*\x20tools\x20only\x20for\x20surgical\x20re-runs\x20of\x20a\x20single\x20step.',{'projectDir':_0x344f4d['string']()[_0xf8ecb6(0x768)]()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x5aa))},async({projectDir:_0x243eae})=>{try{const _0x18a55c=_0x243eae??_0x504dae,_0x44e272=await _0x464e89(_0x18a55c,_0x53d71b(_0x18a55c,_0x3f7ec9));return _0x172685(_0x44e272);}catch(_0x4329d5){return _0x329611('ceraph_init_status',_0x4329d5);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('ceraph_init_auth_browser',_0xf8ecb6(0x5b4),{'token':_0x344f4d['string']()[_0xf8ecb6(0x768)]()['describe']('Bearer\x20token\x20the\x20user\x20pasted\x20(issued\x20by\x20ceraph.dev/cli-auth).\x20When\x20set,\x20skips\x20the\x20browser\x20flow\x20and\x20persists\x20it\x20directly.')},async({token:_0x595d5d},_0x4b75c2)=>{const _0x46a7e8=_0xf8ecb6;try{if(_0x46a7e8(0xae9)==='QuPaQ')return _0x17f8b5['map'](_0x128a73=>_0x73d053(_0x128a73));else{const _0x29ec83=await _0x170983({'signal':_0x4b75c2[_0x46a7e8(0x773)],'token':_0x595d5d});return _0x172685(_0x29ec83);}}catch(_0x20fede){return _0x329611('ceraph_init_auth_browser',_0x20fede);}});async function _0x4a36a4(_0xd3c224){const _0x42d7fc=_0xf8ecb6,_0x387297='Starter\x20·\x20Free\x20—\x20local\x20build,\x20run,\x20and\x20device\x20tools.\x20No\x20sign-in.',_0x42356f=_0x42d7fc(0x5f3),_0x4383f0=_0x42d7fc(0x953);let _0x3b820a=_0xd3c224['tier'];if(_0x3b820a)await _0x29339f(_0x3b820a)[_0x42d7fc(0x48b)](()=>void 0x0);else{const _0x2d6485=await _0x31acfa()['catch'](()=>null);_0x3b820a=_0x2d6485?.['tier'];}if(!_0x3b820a)return{'status':'needs-tier','question':_0x42d7fc(0x53c),'options':[{'tier':_0x42d7fc(0x7a4),'label':_0x387297},{'tier':'pro','label':_0x42356f}],'detailsUrl':_0x4383f0,'hint':_0x42d7fc(0x3a5)};if(_0x3b820a==='starter')return{'status':'starter-ready','tier':_0x42d7fc(0x7a4),'message':'Starter\x20selected\x20—\x20local\x20build,\x20run,\x20and\x20device\x20tools\x20are\x20ready.\x20No\x20sign-in\x20needed.\x20To\x20add\x20AI\x20flow\x20testing\x20on\x20a\x20real\x20device\x20later,\x20re-call\x20this\x20tool\x20with\x20{\x20tier:\x20\x27pro\x27\x20}.'};const _0x479cf2=await _0x1be651()['catch'](()=>null);if(!_0x479cf2?.['accessToken'])return{'status':'needs-auth','tier':_0x42d7fc(0x2a1),'authUrl':_0x5a3230({'intent':'pro'}),'message':_0x42d7fc(0x271)};const _0x12cf41=await _0x4faaf3()['catch'](()=>![]);if(!_0x12cf41)return{'status':'needs-checkout','tier':_0x42d7fc(0x2a1),'checkoutUrl':_0x4383f0,'message':_0x42d7fc(0x5fa)+_0x4383f0+_0x42d7fc(0x80f)};return{'status':_0x42d7fc(0x23b),'tier':'pro','message':'Pro\x20is\x20active\x20on\x20this\x20account.\x20AI\x20flow\x20testing\x20on\x20your\x20real\x20device\x20is\x20unlocked.'};}_0x4fd7c4[_0xf8ecb6(0x34e)]('ceraph_init_select_tier','Select\x20the\x20Ceraph\x20plan\x20and\x20drive\x20Pro\x20onboarding.\x20Call\x20with\x20no\x20args\x20to\x20get\x20the\x20two\x20plan\x20options\x20({\x20status:\x20\x27needs-tier\x27\x20});\x20call\x20with\x20{\x20tier:\x20\x27starter\x27\x20}\x20for\x20the\x20free\x20local\x20toolset\x20({\x20status:\x20\x27starter-ready\x27\x20});\x20call\x20with\x20{\x20tier:\x20\x27pro\x27\x20}\x20to\x20start\x20Pro\x20setup.\x20The\x20Pro\x20path\x20is\x20a\x20state\x20machine\x20resolved\x20fresh\x20each\x20call:\x20not\x20signed\x20in\x20→\x20{\x20status:\x20\x27needs-auth\x27,\x20authUrl\x20}\x20(sign\x20in\x20via\x20ceraph_init_auth_browser,\x20then\x20re-call);\x20signed\x20in\x20but\x20not\x20yet\x20paid\x20→\x20{\x20status:\x20\x27needs-checkout\x27,\x20checkoutUrl\x20}\x20(selecting\x20Pro\x20is\x20NOT\x20being\x20Pro\x20—\x20complete\x20checkout,\x20then\x20re-call);\x20paid\x20→\x20{\x20status:\x20\x27pro-ready\x27\x20}.\x20Re-calling\x20re-checks\x20server-side,\x20so\x20an\x20abandoned\x20then-completed\x20checkout\x20self-heals.\x20For\x20a\x20complete\x20install\x20(this\x20tier\x20step\x20plus\x20every\x20other\x20phase),\x20call\x20`ceraph_init`\x20instead.',{'tier':_0x344f4d[_0xf8ecb6(0x407)]([_0xf8ecb6(0x7a4),'pro'])['optional']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x6ab))},async({tier:_0x2abafd})=>{const _0x643092=_0xf8ecb6;try{const _0x3f13d4=await _0x4a36a4({'tier':_0x2abafd});return _0x172685(_0x3f13d4);}catch(_0x4ace90){return _0x329611(_0x643092(0x5f9),_0x4ace90);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x81d),_0xf8ecb6(0x9c6),{'projectDir':_0x344f4d['string']()[_0xf8ecb6(0x768)]()},async({projectDir:_0x51f597})=>{const _0x3b4cc0=_0xf8ecb6;try{const _0x55b808=await _0x9cda3f(_0x51f597??_0x504dae);return _0x172685(_0x55b808);}catch(_0x16d249){return _0x329611(_0x3b4cc0(0x81d),_0x16d249);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x617),_0xf8ecb6(0x261),{'filePath':_0x344f4d['string']()[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x3e4)),'line':_0x344f4d['number']()[_0xf8ecb6(0x732)]()[_0xf8ecb6(0x6d5)]()['describe']('1-based\x20line\x20of\x20the\x20opening\x20<CameraView>\x20tag.'),'imageKey':_0x344f4d[_0xf8ecb6(0x30d)]()['min'](0x1)[_0xf8ecb6(0x3f0)](_0xf8ecb6(0x68b)),'projectDir':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()},async({filePath:_0x1a5c9f,line:_0x421329,imageKey:_0x32e115,projectDir:_0x184bf1})=>{try{const _0x138a20=await _0x3252d9(_0x184bf1??_0x504dae,{'filePath':_0x1a5c9f,'line':_0x421329,'imageKey':_0x32e115});return _0x172685(_0x138a20);}catch(_0x137fd4){return _0x329611('ceraph_init_replace_camera',_0x137fd4);}}),_0x4fd7c4[_0xf8ecb6(0x34e)](_0xf8ecb6(0x242),'AST-inject\x20the\x20`installCeraph({\x20readTestidConfig\x20})`\x20seam\x20(plus\x20the\x20shim\x20+\x20react\x20imports)\x20into\x20the\x20root\x20layout\x20(app/_layout.tsx\x20for\x20Expo\x20Router,\x20App.tsx\x20for\x20bare\x20RN)\x20AND\x20wire\x20`@ceraph/react-native-mcp/babel-plugin`\x20into\x20babel.config\x20+\x20write\x20the\x20`.ceraph/testid-config.json`\x20sentinel\x20—\x20so\x20testID\x20injection\x20actually\x20activates.\x20Idempotent\x20—\x20returns\x20`{\x20already:\x20true\x20}`\x20when\x20the\x20seam\x20is\x20already\x20present;\x20the\x20`babelConfig`\x20field\x20reports\x20the\x20babel\x20wiring\x20outcome\x20(added\x20/\x20already-present\x20/\x20created\x20/\x20needs-manual).',{'projectDir':_0x344f4d['string']()['optional']()},async({projectDir:_0xb51904})=>{const _0x54e48a=_0xf8ecb6;try{if(_0x54e48a(0x4e2)!=='TwbNE'){const _0x3e1ff6=await _0x1ebf34(_0xb51904??_0x504dae);return _0x172685(_0x3e1ff6);}else{const _0x419106=_0x1c0eca['toString']();for(const _0x3df04c of _0x419106['split']('\x0a')){_0x3df04c[_0x54e48a(0x668)]()&&this['pushLine'](this['buildOutput'],_0x3df04c,this[_0x54e48a(0x8e5)]);}}}catch(_0x267180){return _0x329611('ceraph_init_inject_boot',_0x267180);}}),_0x4fd7c4['tool']('ceraph_init_register_scheme','Register\x20`ceraph`\x20as\x20a\x20custom\x20URL\x20scheme\x20so\x20deep\x20links\x20(ceraph://reload,\x20ceraph://reset,\x20ceraph://storage)\x20reach\x20the\x20running\x20app.\x20Auto-edits\x20static\x20expo.scheme\x20in\x20app.json;\x20for\x20dynamic\x20app.config.{js,ts}\x20or\x20bare\x20RN,\x20returns\x20the\x20exact\x20instructions\x20to\x20surface\x20to\x20the\x20user.',{'projectDir':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()},async({projectDir:_0x210c49})=>{const _0x3db153=_0xf8ecb6;try{if('ADhyc'===_0x3db153(0x308)){const _0x141be0=await _0x59c56b(_0x210c49??_0x504dae);return _0x172685(_0x141be0);}else{if(this['child']===_0x28dae8)this[_0x3db153(0x618)]=null;_0x1bb839=!![];}}catch(_0x1e6f1a){return _0x329611(_0x3db153(0x62e),_0x1e6f1a);}}),_0x4fd7c4[_0xf8ecb6(0x34e)]('ceraph_init_setup_mcp_clients',_0xf8ecb6(0x607),{'projectDir':_0x344f4d[_0xf8ecb6(0x30d)]()[_0xf8ecb6(0x768)]()['describe'](_0xf8ecb6(0x2c0))},async({projectDir:_0x4d30a4})=>{const _0x125ae9=_0xf8ecb6;try{if('iSzsc'!=='zCFEQ'){const _0x39ca78=await _0x5d6407(_0x53d71b(_0x4d30a4??_0x504dae,_0x3f7ec9));return _0x172685(_0x39ca78);}else{const _0x48f42b=[..._0x10e4bf,_0x57a76c];return _0x48d657[_0x125ae9(0xb27)]=_0x48f42b,{'action':_0x125ae9(0x7ed),'scheme':_0x48f42b,'previousScheme':_0x41081a,'nextScheme':_0x48f42b};}}catch(_0x824623){return _0x329611(_0x125ae9(0x4a7),_0x824623);}}),_0x4fd7c4['tool']('ceraph_init_monorepo_status',_0xf8ecb6(0x29a),{'projectDir':_0x344f4d['string']()[_0xf8ecb6(0x768)]()},async({projectDir:_0x1de3b1})=>{const _0x4b3bc9=_0xf8ecb6;try{const _0xb99134=await _0x4367cd(_0x1de3b1??_0x504dae);return _0x172685(_0xb99134);}catch(_0x443d80){return _0x329611(_0x4b3bc9(0x26b),_0x443d80);}}),_0x18e489(_0x4fd7c4),_0x566be6(_0x4fd7c4,_0x6faf18);async function _0x23ce3c(){const _0x3402d2=_0xf8ecb6;try{const _0x1b2929=0xe*0x18*0x3c*0x3c*0x3e8,_0x382c28=0x400*0x400*0x400,{swept:_0x3edf6a,freedBytes:_0x4c068c}=await _0x4436b4['sweepOlderThan'](_0x1b2929),{evicted:_0x425622,freedBytes:_0x2fe659}=await _0x4436b4['enforceCapacityCap'](_0x382c28),_0x5de04f=(_0x4c068c/(0x400*0x400))[_0x3402d2(0x5c0)](0x1),_0x47dc3c=(_0x2fe659/(0x400*0x400))['toFixed'](0x1);console['error']('[runs-store]\x20swept\x20'+_0x3edf6a[_0x3402d2(0x3b7)]+'\x20runs\x20('+_0x5de04f+'\x20MB)\x20older\x20than\x2014d;\x20evicted\x20'+_0x425622['length']+_0x3402d2(0x3c1)+_0x47dc3c+'\x20MB)\x20over\x201GB\x20cap');}catch(_0x4ef3e9){console[_0x3402d2(0x3dd)]('[runs-store]\x20retention\x20sweep\x20failed\x20(non-fatal):\x20'+(_0x4ef3e9 instanceof Error?_0x4ef3e9['message']:String(_0x4ef3e9)));}}function _0x5e9525(){const _0x4338fa=_0xf8ecb6;if(!process.env.CERAPH_SIGNAL_HOST)try{const _0x2c94b8=_0x3146f0();if(_0x2c94b8)process.env.CERAPH_SIGNAL_HOST=_0x2c94b8['address'],console['error']('[react-native-mcp]\x20CERAPH_SIGNAL_HOST\x20auto-detected:\x20'+_0x2c94b8['address']+'\x20('+_0x2c94b8['interfaceName']+',\x20'+_0x2c94b8['kind']+').\x20To\x20persist\x20across\x20shells,\x20run\x20`npx\x20@ceraph/react-native-mcp\x20init`\x20—\x20it\x20adds\x20the\x20export\x20to\x20~/.zshrc.');else{if('qUhfH'===_0x4338fa(0x72a))console['error'](_0x4338fa(0x598));else return null;}}catch(_0x123f8e){console[_0x4338fa(0x3dd)]('[react-native-mcp]\x20CERAPH_SIGNAL_HOST\x20auto-detection\x20failed:\x20'+(_0x123f8e instanceof Error?_0x123f8e['message']:String(_0x123f8e)));}else console[_0x4338fa(0x3dd)]('[react-native-mcp]\x20CERAPH_SIGNAL_HOST='+process.env.CERAPH_SIGNAL_HOST);}async function _0x23930a(){const _0x5660f6=_0xf8ecb6;_0x5e9525();const _0x1a0901=await _0x35b0ad[_0x5660f6(0x5cf)](),_0x4a207b=_0x3f573f(_0x1a0901);_0x140ce4=_0x4a207b['status'],console['error'](_0x5660f6(0x358)+_0x4a207b['message']);!_0x35b0ad['isListening']()&&_0xd36556();_0x4a207b['fatal']&&process[_0x5660f6(0x68c)](0x1);const _0x115180=new StdioServerTransport();await _0x4fd7c4['connect'](_0x115180),console['error']('[react-native-mcp]\x20Server\x20started\x20on\x20stdio\x20transport'),void _0x1be651()[_0x5660f6(0x48b)](()=>null)['then'](_0x3138b0=>{const _0x574e3c=_0x5660f6;!_0x3138b0?.['accessToken']&&console[_0x574e3c(0x3dd)](_0x574e3c(0x259));}),void _0x23ce3c(),void((async()=>{const _0x3d5ea3=await _0x3d8a92()['catch'](()=>null);_0x258be2(_0x3d5ea3);})()),void _0x25cdf3({'workingDir':_0x504dae}),void((async()=>{const _0x4d3b27=_0x5660f6;try{const _0x5bd682=await _0x28256c(_0x504dae);if(!_0x5bd682){_0x6faf18['setAdapter'](null);return;}const _0x141c9f=await _0x22a1b8(_0x504dae,_0x5bd682);_0x6faf18['setAdapter'](_0x141c9f),console[_0x4d3b27(0x3dd)](_0x4d3b27(0x46c)+_0x5bd682[_0x4d3b27(0x525)]+'\x20(secret\x20env:\x20'+_0x5bd682['secretEnv']+')');}catch(_0x523893){_0x6faf18[_0x4d3b27(0x780)](null);const _0x2159c1=_0x523893 instanceof Error?_0x523893['message']:String(_0x523893);console['error']('[react-native-mcp]\x20Auth-bypass\x20provider\x20detection\x20failed\x20(non-fatal):\x20'+_0x2159c1);}})()),void _0x6faf18[_0x5660f6(0x9ef)]()['catch'](_0x358890=>{const _0xd649c6=_0x5660f6;console[_0xd649c6(0x3dd)]('[react-native-mcp]\x20Managed\x20test-user\x20sweep\x20failed\x20(non-fatal):\x20'+(_0x358890 instanceof Error?_0x358890[_0xd649c6(0x531)]:String(_0x358890)));}),_0x860608?.['start']();const _0x36071d=async()=>{const _0x34c2b3=_0x5660f6;_0x860608?.[_0x34c2b3(0x8bc)](),_0x5b307c&&(clearInterval(_0x5b307c),_0x5b307c=void 0x0),await Promise[_0x34c2b3(0x2d4)]([_0x22cea7['shutdown']()['catch'](()=>void 0x0),_0x35b0ad[_0x34c2b3(0x8bc)]()[_0x34c2b3(0x48b)](()=>void 0x0),_0x24325a[_0x34c2b3(0x8bc)]()[_0x34c2b3(0x48b)](()=>void 0x0),_0x1cffbc['stop']()[_0x34c2b3(0x48b)](()=>void 0x0),_0x5246a9[_0x34c2b3(0x8bc)]()['catch'](()=>void 0x0)]);};process['on'](_0x5660f6(0x8b8),()=>{const _0x4dd18d=_0x5660f6;void _0x36071d()[_0x4dd18d(0x9c5)](()=>process['exit'](0x0));}),process['on']('SIGTERM',()=>{const _0x15e2a0=_0x5660f6;void _0x36071d()['then'](()=>process[_0x15e2a0(0x68c)](0x0));});}process.env.CERAPH_NO_AUTOSTART!=='1'&&_0x23930a()['catch'](_0x5f07b0=>{const _0x36944d=_0xf8ecb6;console[_0x36944d(0x3dd)]('[react-native-mcp]\x20Fatal\x20error:',_0x5f07b0),process[_0x36944d(0x68c)](0x1);});export{_0x102b65 as buildRunResultContent,_0x5908bf as stripScreenshotBlobs};
|