peachsim 0.1.2481 → 0.1.2483

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.
Files changed (139) hide show
  1. package/cli/commands/inspect.ts +2 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +2 -2
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +5 -5
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +3 -3
  14. package/dist-lib/bundle-channel.cjs +2620 -2599
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +3 -3
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +3 -3
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +2 -2
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +7 -7
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +5 -5
  25. package/dist-lib/detox/index.cjs +2 -2
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-FYDDLFH7.mjs → acorn-5IUVEQ5U.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-XVGPPYRC.mjs → chunk-3XA33ML6.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-I2KV5OCI.mjs → chunk-3Y4O3MOM.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-CIRF7MUH.mjs → chunk-4LW6LZ6Z.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-56VSEMVW.mjs → chunk-4PY2AMHM.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-6ALMBFOB.mjs → chunk-74BYI5ME.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-YY4T7YSR.mjs → chunk-DMZ7YRB2.mjs} +3 -3
  34. package/dist-lib/esm-chunks/{chunk-MYAC4QOH.mjs → chunk-DV6RVJXG.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-IKMY4F25.mjs → chunk-HHIU36JR.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-VGOJCWU3.mjs → chunk-HK2PVWZR.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-ZNG6GMUS.mjs → chunk-HPATKEHW.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-HK2YIUS3.mjs → chunk-IGRHCKP6.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-3AHKFCTP.mjs → chunk-JNWWQ6IK.mjs} +1 -1
  40. package/dist-lib/esm-chunks/chunk-KK3WVSF7.mjs +12 -0
  41. package/dist-lib/esm-chunks/{chunk-RRHGYD5I.mjs → chunk-M4YWLFJD.mjs} +2 -2
  42. package/dist-lib/esm-chunks/{chunk-55FEZERB.mjs → chunk-NWAG7YWU.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-DILJLCVN.mjs → chunk-NZ4SCX34.mjs} +12 -12
  44. package/dist-lib/esm-chunks/{chunk-DR66BWZR.mjs → chunk-QQJEXO33.mjs} +4 -4
  45. package/dist-lib/esm-chunks/{chunk-OMWELJZM.mjs → chunk-REMZIJ6Q.mjs} +5 -5
  46. package/dist-lib/esm-chunks/{chunk-MTWECGVY.mjs → chunk-UCAXXDBC.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-YBJYSS46.mjs → chunk-UETKYQXI.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-DOTVMR2R.mjs → chunk-UTFTGMVS.mjs} +5 -5
  49. package/dist-lib/esm-chunks/{metro-layout-parser-EEI7OVUC.mjs → metro-layout-parser-ONZA2XYW.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{swift-package-prebuilt-V5QMDVKG.mjs → swift-package-prebuilt-W7ES3LDK.mjs} +10 -10
  51. package/dist-lib/esm-chunks/{swift-sdk-app-module-QEWCSQWL.mjs → swift-sdk-app-module-XYSH4J23.mjs} +13 -13
  52. package/dist-lib/esm-chunks/{swift-sdk-image-XH4JSUEA.mjs → swift-sdk-image-KNCQQOMT.mjs} +13 -13
  53. package/dist-lib/esm-chunks/{swift-sdk-image-producer-HQJ5Z6TE.mjs → swift-sdk-image-producer-DC6U6VUF.mjs} +4 -4
  54. package/dist-lib/expo-swift-bundle.cjs +260 -233
  55. package/dist-lib/expo-swift-metadata.cjs +2 -2
  56. package/dist-lib/expo-swift-metadata.mjs +7 -7
  57. package/dist-lib/home-paths.cjs +1 -1
  58. package/dist-lib/host/bridge-host.cjs +440 -453
  59. package/dist-lib/host/fetch-proxy-handler.cjs +181 -343
  60. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  61. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  62. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  63. package/dist-lib/host/websocket-proxy.cjs +1 -1
  64. package/dist-lib/index.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +3 -3
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +4 -4
  72. package/dist-lib/native-app-identity-project.cjs +1 -1
  73. package/dist-lib/native-app-identity-project.mjs +15 -15
  74. package/dist-lib/native-app-identity.cjs +2 -2
  75. package/dist-lib/native-app-identity.mjs +6 -6
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +3 -3
  78. package/dist-lib/pdfium-raster.cjs +1 -1
  79. package/dist-lib/pdfium-raster.mjs +2 -2
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +3 -3
  82. package/dist-lib/profiles.cjs +1 -1
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +79 -79
  85. package/dist-lib/public-origins-lib.json +82 -77
  86. package/dist-lib/react-native-host-modules.cjs +1 -1
  87. package/dist-lib/react-native-host-modules.mjs +2 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +1 -1
  91. package/dist-lib/sdk.mjs +7 -7
  92. package/dist-lib/skills.cjs +494 -503
  93. package/dist-lib/swift-compile.cjs +1 -1
  94. package/dist-lib/swift-compile.mjs +10 -10
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +3 -3
  97. package/dist-lib/swift-submit.cjs +1 -1
  98. package/dist-lib/swift-submit.mjs +5 -5
  99. package/dist-lib/swift-svg-raster.cjs +1 -1
  100. package/dist-lib/swift-svg-raster.mjs +2 -2
  101. package/dist-lib/swift-toolchain.cjs +1 -1
  102. package/dist-lib/swift.cjs +1 -1
  103. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  105. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  106. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  107. package/dist-lib/vendor/acorn.cjs +1 -1
  108. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  109. package/dist-lib/vendor/ignore.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/plist.cjs +1 -1
  112. package/dist-lib/vendor/smol-toml.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/dist-types/packages/peach-engine/core-abi/style/style-schema.d.ts +4 -0
  126. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -2
  127. package/package.json +1 -1
  128. package/runtime-companion.json +1 -1
  129. package/src/assetCatalogContract.ts +8 -0
  130. package/src/expo-swift-host.ts +17 -35
  131. package/src/expo-widgets-bundle.ts +6 -4
  132. package/src/guest-bundle.ts +8 -3
  133. package/src/host/bridge-host.ts +4 -25
  134. package/src/native-preparation.ts +112 -120
  135. package/src/nitro-bundle.ts +26 -35
  136. package/src/one-sdk-bundle.ts +1 -0
  137. package/src/swift-host.ts +3 -0
  138. package/src/turbo-bundle.ts +5 -1
  139. package/dist-lib/esm-chunks/chunk-V27M6XEI.mjs +0 -12
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2483 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -29969,7 +29969,7 @@ var init_runtime_assets = __esm({
29969
29969
  var runtime_companion_default;
29970
29970
  var init_runtime_companion = __esm({
29971
29971
  "runtime-companion.json"() {
29972
- runtime_companion_default = { abi: 1, sha256: "56c15583cc140c662769c92ceebfb293e7d63023fb8f35b1202d7a59b1b5739e", file: "node/cli-56c15583cc140c662769c92ceebfb293e7d63023fb8f35b1202d7a59b1b5739e.cjs" };
29972
+ runtime_companion_default = { abi: 1, sha256: "9dda127e78522f05b54bc95961690c19bc971c4c3cbc27d560808da72d9642f1", file: "node/cli-9dda127e78522f05b54bc95961690c19bc971c4c3cbc27d560808da72d9642f1.cjs" };
29973
29973
  }
29974
29974
  });
29975
29975
 
@@ -30443,7 +30443,7 @@ var init_is_record = __esm({
30443
30443
  // src/assetCatalogContract.ts
30444
30444
  function isSwiftImageVariants(value) {
30445
30445
  return Array.isArray(value) && value.length > 0 && value.every(
30446
- (image) => typeof image === "object" && image !== null && typeof image.uri === "string" && typeof image.scale === "number" && Number.isFinite(image.scale) && image.scale > 0 && (image.appearance === void 0 || image.appearance === "light" || image.appearance === "dark") && (image.renderingMode === void 0 || image.renderingMode === "template" || image.renderingMode === "original")
30446
+ (image) => typeof image === "object" && image !== null && typeof image.uri === "string" && typeof image.scale === "number" && Number.isFinite(image.scale) && image.scale > 0 && (image.pixelSize === void 0 || typeof image.pixelSize === "object" && image.pixelSize !== null && Number.isInteger(image.pixelSize.width) && image.pixelSize.width > 0 && Number.isInteger(image.pixelSize.height) && image.pixelSize.height > 0) && (image.appearance === void 0 || image.appearance === "light" || image.appearance === "dark") && (image.renderingMode === void 0 || image.renderingMode === "template" || image.renderingMode === "original")
30447
30447
  );
30448
30448
  }
30449
30449
  function sfSymbolVariantKey(variant2) {
@@ -35490,13 +35490,13 @@ var init_swift_standin_digest = __esm({
35490
35490
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
35491
35491
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
35492
35492
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
35493
- STANDIN_SOURCE_DIGEST = true ? "af8e76787019ba32db8d5a7859201f703e7c8878a602c9a8cc812031ba74859c" : standinSourceDigest();
35493
+ STANDIN_SOURCE_DIGEST = true ? "85f1e7cbeb527885fc58cf92a8723307e9e5239bfa66c1d45020f2cae6b61e3f" : standinSourceDigest();
35494
35494
  }
35495
35495
  });
35496
35496
 
35497
35497
  // src/expo-native-compiler-digest.ts
35498
35498
  function expoNativeCompilerDigestValue() {
35499
- return true ? "223ced9b6685e60e7829b5429b2554c3eab40425ce2218bec328db8814c5df1b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35499
+ return true ? "f9671a1c1eddca137b78f44455f0e3f062609c1fae0e7694d60d1eafc2bf55d1" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35500
35500
  }
35501
35501
  var import_node_crypto12;
35502
35502
  var init_expo_native_compiler_digest = __esm({
@@ -53920,13 +53920,6 @@ var init_storekit_test_store = __esm({
53920
53920
  });
53921
53921
 
53922
53922
  // src/app-config.ts
53923
- var app_config_exports = {};
53924
- __export(app_config_exports, {
53925
- loadRNXAppConfig: () => loadRNXAppConfig,
53926
- loadRNXAppStubs: () => loadRNXAppStubs,
53927
- resolveRNXAppConfig: () => resolveRNXAppConfig,
53928
- withConfiguredNativeSources: () => withConfiguredNativeSources
53929
- });
53930
53923
  function resolveFileEntries(entries2, configDir) {
53931
53924
  if (!entries2) return entries2;
53932
53925
  return Object.fromEntries(
@@ -103010,137 +103003,134 @@ var init_expo_native_prebuilt = __esm({
103010
103003
  }
103011
103004
  });
103012
103005
 
103013
- // src/native-preparation.ts
103014
- function openRevision(app, token) {
103015
- const key2 = `${app}\0${token}`;
103016
- let revision = openRevisions.get(key2);
103017
- if (!revision) {
103018
- revision = nativeInputRevision(app).catch(() => null);
103019
- openRevisions.set(key2, revision);
103020
- setTimeoutNode(() => openRevisions.delete(key2), OPEN_RECEIPT_MS).unref();
103006
+ // src/nativePreparationContract.ts
103007
+ var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
103008
+ var init_nativePreparationContract = __esm({
103009
+ "src/nativePreparationContract.ts"() {
103010
+ "use strict";
103011
+ NATIVE_PREPARE_QUERY_PARAM = "prepare";
103012
+ NATIVE_PREPARED_QUERY_PARAM = "prepared";
103021
103013
  }
103022
- return revision;
103014
+ });
103015
+
103016
+ // src/native-preparation.ts
103017
+ function ignoredChange(relative6) {
103018
+ const parts = relative6.split(import_node_path108.default.sep);
103019
+ return relative6 === import_node_path108.default.join(".git", "index") || parts.includes(".cache") || parts.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
103020
+ relative6
103021
+ );
103023
103022
  }
103024
- async function nativeInputRevision(app) {
103025
- const root = findWorkspaceRoot(app);
103026
- const [excluded, config] = await Promise.all([
103027
- workspaceExclusion(root),
103028
- readExpoConfigAsync(app)
103029
- ]);
103030
- const require4 = (0, import_node_module14.createRequire)(import_node_path108.default.join(app, "package.json"));
103031
- let widgetsOutput;
103032
- try {
103033
- widgetsOutput = import_node_path108.default.join(
103034
- import_node_path108.default.dirname(require4.resolve("expo-widgets/package.json")),
103035
- "bundle",
103036
- "build"
103037
- );
103038
- } catch (error) {
103039
- if (!(error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND"))
103040
- throw error;
103023
+ function watchNativeInputs(root) {
103024
+ const workspace = findWorkspaceRoot(root);
103025
+ const existing = watchedInputs.get(workspace);
103026
+ if (existing) {
103027
+ existing.expiry.refresh();
103028
+ return existing;
103041
103029
  }
103042
- const hash = (0, import_node_crypto64.createHash)("sha256");
103043
- hash.update(
103044
- JSON.stringify([
103045
- config,
103046
- resolveActiveRuntimeRoot(),
103047
- resolveDevCheckoutRuntimeAssetRoot()
103048
- ])
103049
- );
103030
+ const watchers = [];
103050
103031
  const visited = /* @__PURE__ */ new Set();
103051
- const directories = [
103052
- { file: root, installed: false }
103053
- ];
103054
- for (const { file: directory2, installed: installed2 } of directories) {
103055
- if (visited.has(directory2)) continue;
103032
+ const expiry = setTimeoutNode(close, RETENTION_MS);
103033
+ expiry.unref();
103034
+ function close() {
103035
+ if (watchedInputs.get(workspace) === inputs2) watchedInputs.delete(workspace);
103036
+ (0, import_node_timers2.clearTimeout)(expiry);
103037
+ for (const watcher of watchers) watcher.close();
103038
+ }
103039
+ const inputs2 = { expiry };
103040
+ const watch4 = (directory2, recursive, name3) => {
103041
+ const watcher = import_node_fs107.default.watch(
103042
+ directory2,
103043
+ { recursive, persistent: false },
103044
+ (_event, file) => {
103045
+ if (!file || (name3 ? file === name3 : !ignoredChange(file))) close();
103046
+ }
103047
+ );
103048
+ watchers.push(watcher);
103049
+ watcher.on("error", close);
103050
+ };
103051
+ const scan3 = (directory2, watchRoot2) => {
103052
+ if (visited.has(directory2)) return;
103056
103053
  visited.add(directory2);
103057
- const entries2 = import_node_fs107.default.readdirSync(directory2, { withFileTypes: true });
103058
- entries2.sort((a, b) => a.name < b.name ? -1 : Number(a.name !== b.name));
103059
- for (const entry of entries2) {
103054
+ for (const entry of import_node_fs107.default.readdirSync(directory2, { withFileTypes: true })) {
103060
103055
  const file = import_node_path108.default.join(directory2, entry.name);
103061
- const dependency = installed2 || entry.name === "node_modules";
103062
- if (file === widgetsOutput || entry.name === ".git") continue;
103063
- if (!dependency && excluded(import_node_path108.default.relative(root, file), entry.isDirectory()))
103064
- continue;
103065
- hash.update(file).update("\0");
103066
- if (entry.isDirectory()) {
103067
- directories.push({ file, installed: dependency });
103068
- continue;
103069
- }
103070
- const stat2 = import_node_fs107.default.lstatSync(file);
103071
- hash.update(
103072
- `${stat2.dev}:${stat2.ino}:${stat2.size}:${stat2.ctimeMs}:${stat2.mtimeMs}\0`
103073
- );
103056
+ if (ignoredChange(import_node_path108.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
103057
+ if (entry.isDirectory()) scan3(file, watchRoot2);
103074
103058
  if (!entry.isSymbolicLink()) continue;
103075
- const target = import_node_fs107.default.statSync(file, { throwIfNoEntry: false });
103076
- if (target?.isDirectory()) {
103077
- directories.push({ file: import_node_fs107.default.realpathSync(file), installed: dependency });
103078
- } else if (target) {
103079
- hash.update(
103080
- `${target.dev}:${target.ino}:${target.size}:${target.ctimeMs}:${target.mtimeMs}\0`
103081
- );
103082
- }
103059
+ const target = import_node_path108.default.resolve(directory2, import_node_fs107.default.readlinkSync(file));
103060
+ if (target === workspace || target.startsWith(workspace + import_node_path108.default.sep)) continue;
103061
+ const real = import_node_fs107.default.realpathSync(file);
103062
+ if (visited.has(real)) continue;
103063
+ watch4(import_node_path108.default.dirname(real), false, import_node_path108.default.basename(real));
103064
+ if (import_node_fs107.default.statSync(real).isDirectory()) {
103065
+ watch4(real, true);
103066
+ scan3(real, real);
103067
+ } else visited.add(real);
103083
103068
  }
103084
- if (visited.size % 256 === 0) await (0, import_promises13.setImmediate)();
103069
+ };
103070
+ try {
103071
+ watch4(workspace, true);
103072
+ scan3(workspace, workspace);
103073
+ } catch {
103074
+ close();
103075
+ return void 0;
103085
103076
  }
103086
- return hash.digest("hex");
103077
+ watchedInputs.set(workspace, inputs2);
103078
+ return inputs2;
103087
103079
  }
103088
- var import_node_crypto64, import_node_fs107, import_node_module14, import_node_path108, import_node_timers2, import_promises13, setTimeoutNode, OPEN_RECEIPT_MS, openRevisions, NativePreparationReceipts;
103080
+ var import_node_fs107, import_node_path108, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
103089
103081
  var init_native_preparation = __esm({
103090
103082
  "src/native-preparation.ts"() {
103091
103083
  "use strict";
103092
- import_node_crypto64 = require("node:crypto");
103093
103084
  import_node_fs107 = __toESM(require("node:fs"), 1);
103094
- import_node_module14 = require("node:module");
103095
103085
  import_node_path108 = __toESM(require("node:path"), 1);
103096
103086
  import_node_timers2 = require("node:timers");
103097
- import_promises13 = require("node:timers/promises");
103098
- init_expo_workspace_exclusion();
103099
- init_native_firebase_config();
103087
+ init_nativePreparationContract();
103100
103088
  init_runtime_assets();
103101
103089
  init_workspace_root();
103102
103090
  setTimeoutNode = import_node_timers2.setTimeout;
103103
- OPEN_RECEIPT_MS = 30 * 60 * 1e3;
103104
- openRevisions = /* @__PURE__ */ new Map();
103105
- NativePreparationReceipts = class {
103091
+ RETENTION_MS = 30 * 60 * 1e3;
103092
+ watchedInputs = /* @__PURE__ */ new Map();
103093
+ NativePreparation = class {
103106
103094
  compiling = /* @__PURE__ */ new Map();
103107
- prepared = /* @__PURE__ */ new Map();
103095
+ prepared = /* @__PURE__ */ new WeakMap();
103108
103096
  receipts = /* @__PURE__ */ new Map();
103109
- async prepare(owner, root, token, compile2, isAvailable) {
103110
- const revision = token && isAvailable ? await openRevision(root, token) : null;
103111
- let pending2 = this.compiling.get(owner);
103112
- while (pending2) {
103113
- if (pending2.revision === revision) return pending2.result;
103114
- await pending2.result.catch(() => void 0);
103115
- pending2 = this.compiling.get(owner);
103116
- }
103117
- const prepared = this.prepared.get(owner);
103118
- if (prepared && prepared.revision === revision && isAvailable?.(prepared.value)) {
103119
- prepared.expiry.refresh();
103120
- return prepared.value;
103121
- }
103122
- if (prepared) (0, import_node_timers2.clearTimeout)(prepared.expiry);
103123
- this.prepared.delete(owner);
103124
- const result = compile2().then((value) => {
103125
- if (revision) {
103126
- const expiry = setTimeoutNode(
103127
- () => this.prepared.delete(owner),
103128
- OPEN_RECEIPT_MS
103129
- );
103130
- expiry.unref();
103131
- this.prepared.set(owner, { revision, value, expiry });
103132
- }
103133
- return value;
103134
- }).finally(() => this.compiling.delete(owner));
103135
- this.compiling.set(owner, { revision, result });
103136
- return result;
103097
+ async resolve(root, owner, params, compile2, reusable = () => true) {
103098
+ const receipt = this.take(owner, params.get(NATIVE_PREPARED_QUERY_PARAM));
103099
+ if (receipt) return receipt.value;
103100
+ const token = params.get(NATIVE_PREPARE_QUERY_PARAM);
103101
+ const inputs2 = token ? watchNativeInputs(root) : void 0;
103102
+ const key2 = inputs2 ? `${owner}\0${resolveActiveRuntimeRoot() ?? ""}` : owner;
103103
+ let pending2 = this.compiling;
103104
+ if (inputs2) {
103105
+ const prepared = this.prepared.get(inputs2);
103106
+ if (prepared) pending2 = prepared;
103107
+ else {
103108
+ pending2 = /* @__PURE__ */ new Map();
103109
+ this.prepared.set(inputs2, pending2);
103110
+ }
103111
+ }
103112
+ let preparation = pending2.get(key2);
103113
+ if (!preparation || preparation.ready && !reusable(preparation.ready.value)) {
103114
+ const next = { result: Promise.resolve().then(compile2) };
103115
+ preparation = next;
103116
+ pending2.set(key2, next);
103117
+ void next.result.then(
103118
+ (value2) => {
103119
+ if (!inputs2 || !reusable(value2)) pending2.delete(key2);
103120
+ else next.ready = { value: value2 };
103121
+ },
103122
+ () => pending2.delete(key2)
103123
+ );
103124
+ }
103125
+ const value = await preparation.result;
103126
+ this.store(owner, token, value);
103127
+ return value;
103137
103128
  }
103138
- // each open hands its own response to the first tenant request, including null.
103139
103129
  store(owner, token, value) {
103140
103130
  if (!token) return;
103141
103131
  const previous = this.receipts.get(token);
103142
103132
  if (previous) (0, import_node_timers2.clearTimeout)(previous.expiry);
103143
- const expiry = setTimeoutNode(() => this.receipts.delete(token), OPEN_RECEIPT_MS);
103133
+ const expiry = setTimeoutNode(() => this.receipts.delete(token), RETENTION_MS);
103144
103134
  expiry.unref();
103145
103135
  this.receipts.set(token, { owner, value, expiry });
103146
103136
  }
@@ -103270,7 +103260,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
103270
103260
  return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
103271
103261
  }
103272
103262
  function nativeStaticLibraryRecipe(bytes) {
103273
- const digest3 = (0, import_node_crypto65.createHash)("sha256").update(bytes).digest("hex");
103263
+ const digest3 = (0, import_node_crypto64.createHash)("sha256").update(bytes).digest("hex");
103274
103264
  return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
103275
103265
  }
103276
103266
  function nativeStaticLibrary(file, recipe2, moduleRoot) {
@@ -103313,7 +103303,7 @@ function isRustSymbol(name3, demangled) {
103313
103303
  function rustStaticLibrary(file, moduleRoot) {
103314
103304
  const toolchain = swiftModuleToolchain(moduleRoot);
103315
103305
  const bytes = import_node_fs109.default.readFileSync(file);
103316
- const key2 = (0, import_node_crypto65.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
103306
+ const key2 = (0, import_node_crypto64.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
103317
103307
  const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", key2);
103318
103308
  const archive = import_node_path110.default.join(directory2, "library.a");
103319
103309
  if (import_node_fs109.default.existsSync(archive)) return archive;
@@ -103342,7 +103332,7 @@ function rustStaticLibrary(file, moduleRoot) {
103342
103332
  const members2 = readArMembers(bytes, true);
103343
103333
  const seen = /* @__PURE__ */ new Set();
103344
103334
  const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
103345
- const identity2 = name3 + "\0" + (0, import_node_crypto65.createHash)("sha256").update(bytes2).digest("hex");
103335
+ const identity2 = name3 + "\0" + (0, import_node_crypto64.createHash)("sha256").update(bytes2).digest("hex");
103346
103336
  if (seen.has(identity2)) return false;
103347
103337
  seen.add(identity2);
103348
103338
  return true;
@@ -103389,14 +103379,14 @@ function rustStaticLibrary(file, moduleRoot) {
103389
103379
  function combineNativeStaticLibraries(files2, moduleRoot) {
103390
103380
  if (files2.length === 1) return files2[0];
103391
103381
  const toolchain = swiftModuleToolchain(moduleRoot);
103392
- const hash = (0, import_node_crypto65.createHash)("sha256").update(toolchain.release);
103382
+ const hash = (0, import_node_crypto64.createHash)("sha256").update(toolchain.release);
103393
103383
  for (const file of files2)
103394
103384
  hash.update("\0").update(import_node_path110.default.basename(file)).update("\0").update(import_node_fs109.default.readFileSync(file));
103395
103385
  const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", hash.digest("hex"));
103396
103386
  const archive = import_node_path110.default.join(directory2, "combined.a");
103397
103387
  if (import_node_fs109.default.existsSync(archive)) return archive;
103398
103388
  import_node_fs109.default.mkdirSync(directory2, { recursive: true });
103399
- const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto65.randomUUID)()}.a`);
103389
+ const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto64.randomUUID)()}.a`);
103400
103390
  try {
103401
103391
  (0, import_node_child_process50.execFileSync)(import_node_path110.default.join(toolchain.toolchainBin, "llvm-ar"), [
103402
103392
  "qcsDL",
@@ -103409,12 +103399,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
103409
103399
  }
103410
103400
  return archive;
103411
103401
  }
103412
- var import_node_child_process50, import_node_crypto65, import_node_fs109, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
103402
+ var import_node_child_process50, import_node_crypto64, import_node_fs109, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
103413
103403
  var init_native_static_libraries = __esm({
103414
103404
  "src/native-static-libraries.ts"() {
103415
103405
  "use strict";
103416
103406
  import_node_child_process50 = require("node:child_process");
103417
- import_node_crypto65 = require("node:crypto");
103407
+ import_node_crypto64 = require("node:crypto");
103418
103408
  import_node_fs109 = __toESM(require("node:fs"), 1);
103419
103409
  import_node_path110 = __toESM(require("node:path"), 1);
103420
103410
  init_home_paths();
@@ -103712,16 +103702,6 @@ var init_native_static_libraries = __esm({
103712
103702
  }
103713
103703
  });
103714
103704
 
103715
- // src/nativePreparationContract.ts
103716
- var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
103717
- var init_nativePreparationContract = __esm({
103718
- "src/nativePreparationContract.ts"() {
103719
- "use strict";
103720
- NATIVE_PREPARE_QUERY_PARAM = "prepare";
103721
- NATIVE_PREPARED_QUERY_PARAM = "prepared";
103722
- }
103723
- });
103724
-
103725
103705
  // ../../src/helpers/mapLimit.ts
103726
103706
  async function mapLimit(items2, limit, worker) {
103727
103707
  const results = new Array(items2.length);
@@ -103759,7 +103739,7 @@ function processAlive(pid) {
103759
103739
  }
103760
103740
  function tryAcquireNumberedLock(directory2, detail = "") {
103761
103741
  (0, import_node_fs110.mkdirSync)(directory2, { recursive: true });
103762
- const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto66.randomUUID)()}`);
103742
+ const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto65.randomUUID)()}`);
103763
103743
  for (; ; ) {
103764
103744
  const numbers = (0, import_node_fs110.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
103765
103745
  const top = Math.max(-1, ...numbers);
@@ -103798,11 +103778,11 @@ ${detail}` : ""}`);
103798
103778
  };
103799
103779
  }
103800
103780
  }
103801
- var import_node_crypto66, import_node_fs110, import_node_path111, errorCode2;
103781
+ var import_node_crypto65, import_node_fs110, import_node_path111, errorCode2;
103802
103782
  var init_numbered_lock = __esm({
103803
103783
  "src/numbered-lock.ts"() {
103804
103784
  "use strict";
103805
- import_node_crypto66 = require("node:crypto");
103785
+ import_node_crypto65 = require("node:crypto");
103806
103786
  import_node_fs110 = require("node:fs");
103807
103787
  import_node_path111 = require("node:path");
103808
103788
  errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
@@ -103829,7 +103809,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
103829
103809
  ];
103830
103810
  const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
103831
103811
  const xcode = (0, import_node_child_process51.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
103832
- const key2 = (0, import_node_crypto67.createHash)("sha256").update(
103812
+ const key2 = (0, import_node_crypto66.createHash)("sha256").update(
103833
103813
  JSON.stringify([
103834
103814
  RECIPE,
103835
103815
  (0, import_node_child_process51.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
@@ -103846,7 +103826,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
103846
103826
  if (!import_node_fs111.default.existsSync(complete)) {
103847
103827
  let release = tryAcquireNumberedLock(`${output}.lock`);
103848
103828
  while (!release) {
103849
- await (0, import_promises14.setTimeout)(1e3);
103829
+ await (0, import_promises13.setTimeout)(1e3);
103850
103830
  release = tryAcquireNumberedLock(`${output}.lock`);
103851
103831
  }
103852
103832
  try {
@@ -104040,16 +104020,16 @@ exec ${quote3(import_node_path112.default.join(toolchainBin, "llvm-ar"))} rcs "$
104040
104020
  );
104041
104021
  return directory2;
104042
104022
  }
104043
- var import_node_child_process51, import_node_crypto67, import_node_fs111, import_node_os22, import_node_path112, import_promises14, RECIPE, CONFIG, RUNTIME_LIBRARIES;
104023
+ var import_node_child_process51, import_node_crypto66, import_node_fs111, import_node_os22, import_node_path112, import_promises13, RECIPE, CONFIG, RUNTIME_LIBRARIES;
104044
104024
  var init_rive_runtime_dependencies = __esm({
104045
104025
  "src/rive-runtime-dependencies.ts"() {
104046
104026
  "use strict";
104047
104027
  import_node_child_process51 = require("node:child_process");
104048
- import_node_crypto67 = require("node:crypto");
104028
+ import_node_crypto66 = require("node:crypto");
104049
104029
  import_node_fs111 = __toESM(require("node:fs"), 1);
104050
104030
  import_node_os22 = __toESM(require("node:os"), 1);
104051
104031
  import_node_path112 = __toESM(require("node:path"), 1);
104052
- import_promises14 = require("node:timers/promises");
104032
+ import_promises13 = require("node:timers/promises");
104053
104033
  init_home_paths();
104054
104034
  init_numbered_lock();
104055
104035
  init_swift_compile();
@@ -104144,7 +104124,7 @@ var init_swift_shipped_binaries = __esm({
104144
104124
 
104145
104125
  // src/swift-packages.ts
104146
104126
  function remoteSwiftCheckouts(root) {
104147
- const key2 = (0, import_node_crypto68.createHash)("sha256").update(import_node_fs112.default.realpathSync(root)).digest("hex").slice(0, 32);
104127
+ const key2 = (0, import_node_crypto67.createHash)("sha256").update(import_node_fs112.default.realpathSync(root)).digest("hex").slice(0, 32);
104148
104128
  import_node_fs112.default.mkdirSync(cacheDir(), { recursive: true });
104149
104129
  return import_node_path113.default.join(import_node_fs112.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
104150
104130
  }
@@ -104251,7 +104231,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
104251
104231
  const lock = async () => {
104252
104232
  let release = tryAcquireNumberedLock(`${dir}.lock`);
104253
104233
  while (!release) {
104254
- await (0, import_promises15.setTimeout)(25, void 0, { signal });
104234
+ await (0, import_promises14.setTimeout)(25, void 0, { signal });
104255
104235
  release = tryAcquireNumberedLock(`${dir}.lock`);
104256
104236
  }
104257
104237
  return release;
@@ -104878,15 +104858,15 @@ function resolveSwiftPackages(options2) {
104878
104858
  result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
104879
104859
  return result;
104880
104860
  }
104881
- var import_node_child_process52, import_node_crypto68, import_node_fs112, import_node_path113, import_promises15, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
104861
+ var import_node_child_process52, import_node_crypto67, import_node_fs112, import_node_path113, import_promises14, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
104882
104862
  var init_swift_packages = __esm({
104883
104863
  "src/swift-packages.ts"() {
104884
104864
  "use strict";
104885
104865
  import_node_child_process52 = require("node:child_process");
104886
- import_node_crypto68 = require("node:crypto");
104866
+ import_node_crypto67 = require("node:crypto");
104887
104867
  import_node_fs112 = __toESM(require("node:fs"), 1);
104888
104868
  import_node_path113 = __toESM(require("node:path"), 1);
104889
- import_promises15 = require("node:timers/promises");
104869
+ import_promises14 = require("node:timers/promises");
104890
104870
  import_node_util13 = require("node:util");
104891
104871
  init_git_repo_env();
104892
104872
  init_home_paths();
@@ -105493,7 +105473,7 @@ var init_genrule_library_builds = __esm({
105493
105473
  function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105494
105474
  const distribution = swiftDistributionAt(moduleRoot);
105495
105475
  const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
105496
- const identity2 = (0, import_node_crypto69.createHash)("sha256").update(
105476
+ const identity2 = (0, import_node_crypto68.createHash)("sha256").update(
105497
105477
  JSON.stringify([
105498
105478
  distribution?.id,
105499
105479
  distribution?.link,
@@ -105519,7 +105499,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105519
105499
  for (const alias of product.frameworkAliases) {
105520
105500
  if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
105521
105501
  throw new Error(`framework SDK identity differs for ${alias.name}`);
105522
- if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105502
+ if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105523
105503
  throw new Error(`framework module map changed ${alias.moduleMap}`);
105524
105504
  const selected = /* @__PURE__ */ new Set();
105525
105505
  const reach = (name3) => {
@@ -105560,7 +105540,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105560
105540
  for (const alias of owner.frameworkAliases) {
105561
105541
  if (frameworkResponses[alias.name])
105562
105542
  throw new Error(`ambiguous declared framework ${alias.name}`);
105563
- if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105543
+ if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105564
105544
  throw new Error(`framework module map changed ${alias.moduleMap}`);
105565
105545
  const file = import_node_path116.default.join(root, `${alias.name}.rsp`);
105566
105546
  import_node_fs115.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
@@ -105654,11 +105634,11 @@ exec ${shellQuote(configuration.compiler)} "$@"
105654
105634
  };
105655
105635
  return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
105656
105636
  }
105657
- var import_node_crypto69, import_node_fs115, import_node_path116, v7;
105637
+ var import_node_crypto68, import_node_fs115, import_node_path116, v7;
105658
105638
  var init_native_framework_compiler = __esm({
105659
105639
  "src/native-framework-compiler.ts"() {
105660
105640
  "use strict";
105661
- import_node_crypto69 = require("node:crypto");
105641
+ import_node_crypto68 = require("node:crypto");
105662
105642
  import_node_fs115 = __toESM(require("node:fs"), 1);
105663
105643
  import_node_path116 = __toESM(require("node:path"), 1);
105664
105644
  v7 = __toESM(require("peachsim/vendor/valibot"), 1);
@@ -105688,7 +105668,7 @@ function llvmIdentity(toolchainBin, release) {
105688
105668
  ] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
105689
105669
  (name3) => swiftFileChecksum(import_node_path117.default.join(toolchainBin, name3))
105690
105670
  );
105691
- const identity2 = (0, import_node_crypto70.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
105671
+ const identity2 = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
105692
105672
  toolIdentities.set(toolchainBin, identity2);
105693
105673
  return identity2;
105694
105674
  }
@@ -105696,7 +105676,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
105696
105676
  const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
105697
105677
  const cached5 = sysrootIdentities.get(key2);
105698
105678
  if (cached5) return cached5;
105699
- const hash = (0, import_node_crypto70.createHash)("sha256");
105679
+ const hash = (0, import_node_crypto69.createHash)("sha256");
105700
105680
  const add2 = (root, relative6) => {
105701
105681
  const file = import_node_path117.default.join(root, relative6);
105702
105682
  const stat2 = import_node_fs116.default.statSync(file, { throwIfNoEntry: false });
@@ -105731,7 +105711,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105731
105711
  import_node_fs116.default.readFileSync(import_node_path117.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
105732
105712
  )
105733
105713
  );
105734
- const hash = (0, import_node_crypto70.createHash)("sha256").update(
105714
+ const hash = (0, import_node_crypto69.createHash)("sha256").update(
105735
105715
  JSON.stringify([
105736
105716
  headers,
105737
105717
  distribution.link,
@@ -105741,7 +105721,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105741
105721
  ])
105742
105722
  );
105743
105723
  const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
105744
- const objectKey = (0, import_node_crypto70.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
105724
+ const objectKey = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
105745
105725
  const cache = import_node_path117.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
105746
105726
  if (!import_node_fs116.default.existsSync(cache)) {
105747
105727
  import_node_fs116.default.mkdirSync(import_node_path117.default.dirname(cache), { recursive: true });
@@ -105776,7 +105756,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105776
105756
  const digest3 = import_node_path117.default.join(temporary, "digest");
105777
105757
  import_node_fs116.default.writeFileSync(
105778
105758
  digest3,
105779
- (0, import_node_crypto70.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
105759
+ (0, import_node_crypto69.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
105780
105760
  );
105781
105761
  import_node_fs116.default.renameSync(digest3, cache);
105782
105762
  } finally {
@@ -105831,7 +105811,7 @@ function buildable(declaration) {
105831
105811
  return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
105832
105812
  }
105833
105813
  function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
105834
- const hash = (0, import_node_crypto70.createHash)("sha256");
105814
+ const hash = (0, import_node_crypto69.createHash)("sha256");
105835
105815
  const files2 = declaration.sources.filter(
105836
105816
  (source) => !source.generator && !source.file.split(import_node_path117.default.sep).includes(".git")
105837
105817
  ).map((source) => import_node_path117.default.relative(declaration.packageDir, source.file));
@@ -105963,12 +105943,12 @@ function genruleArchive(declaration, library, moduleRoot) {
105963
105943
  }
105964
105944
  return combined;
105965
105945
  }
105966
- var import_node_child_process55, import_node_crypto70, import_node_fs116, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
105946
+ var import_node_child_process55, import_node_crypto69, import_node_fs116, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
105967
105947
  var init_genrule_archives = __esm({
105968
105948
  "src/genrule-archives.ts"() {
105969
105949
  "use strict";
105970
105950
  import_node_child_process55 = require("node:child_process");
105971
- import_node_crypto70 = require("node:crypto");
105951
+ import_node_crypto69 = require("node:crypto");
105972
105952
  import_node_fs116 = __toESM(require("node:fs"), 1);
105973
105953
  import_node_os23 = __toESM(require("node:os"), 1);
105974
105954
  import_node_path117 = __toESM(require("node:path"), 1);
@@ -106076,7 +106056,7 @@ function privateSentrySlice(entry, moduleRoot) {
106076
106056
  function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
106077
106057
  if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
106078
106058
  const native = simulatorNativeLibrary(artifact());
106079
- if (!native || (0, import_node_crypto71.createHash)("sha256").update(import_node_fs117.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
106059
+ if (!native || (0, import_node_crypto70.createHash)("sha256").update(import_node_fs117.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
106080
106060
  return standin;
106081
106061
  if (configured)
106082
106062
  throw new Error(
@@ -106134,12 +106114,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
106134
106114
  }
106135
106115
  };
106136
106116
  }
106137
- var import_node_child_process56, import_node_crypto71, import_node_fs117, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
106117
+ var import_node_child_process56, import_node_crypto70, import_node_fs117, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
106138
106118
  var init_native_swift_slices = __esm({
106139
106119
  "src/native-swift-slices.ts"() {
106140
106120
  "use strict";
106141
106121
  import_node_child_process56 = require("node:child_process");
106142
- import_node_crypto71 = require("node:crypto");
106122
+ import_node_crypto70 = require("node:crypto");
106143
106123
  import_node_fs117 = __toESM(require("node:fs"), 1);
106144
106124
  import_node_os24 = __toESM(require("node:os"), 1);
106145
106125
  import_node_path118 = __toESM(require("node:path"), 1);
@@ -106197,7 +106177,7 @@ async function cxxDeclarations(astFile, headers) {
106197
106177
  const result = [];
106198
106178
  let lastFile = "";
106199
106179
  let rootComplete = false;
106200
- await (0, import_promises16.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
106180
+ await (0, import_promises15.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
106201
106181
  for await (const value of tokens2) {
106202
106182
  if (!value || typeof value !== "object" || !("name" in value) || typeof value.name !== "string")
106203
106183
  throw new Error("invalid clang AST token");
@@ -106291,13 +106271,13 @@ async function cxxDeclarations(astFile, headers) {
106291
106271
  if (stack.length !== 0 || !rootComplete) throw new Error("truncated clang AST");
106292
106272
  return result;
106293
106273
  }
106294
- var import_node_fs119, import_node_path119, import_promises16, import_stream_json, DECLARATIONS;
106274
+ var import_node_fs119, import_node_path119, import_promises15, import_stream_json, DECLARATIONS;
106295
106275
  var init_swift_cxx_declarations = __esm({
106296
106276
  "src/swift-cxx-declarations.ts"() {
106297
106277
  "use strict";
106298
106278
  import_node_fs119 = __toESM(require("node:fs"), 1);
106299
106279
  import_node_path119 = __toESM(require("node:path"), 1);
106300
- import_promises16 = require("node:stream/promises");
106280
+ import_promises15 = require("node:stream/promises");
106301
106281
  import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
106302
106282
  DECLARATIONS = /* @__PURE__ */ new Set([
106303
106283
  "FunctionDecl",
@@ -106875,7 +106855,7 @@ function treeDigest2(root) {
106875
106855
  }).join("\n");
106876
106856
  const memo2 = digests.get(`tree\0${root}`);
106877
106857
  if (memo2?.stamp === stamp) return memo2.digest;
106878
- const hash = (0, import_node_crypto72.createHash)("sha256");
106858
+ const hash = (0, import_node_crypto71.createHash)("sha256");
106879
106859
  for (const name3 of names) {
106880
106860
  hash.update(`${name3}\0`);
106881
106861
  hash.update(import_node_fs121.default.readFileSync(import_node_path121.default.join(root, name3)));
@@ -106922,7 +106902,7 @@ function swiftBinaryFramework(binary2) {
106922
106902
  const found4 = locateXcframework(import_node_path121.default.join(dir, "tree"));
106923
106903
  if (found4) return { dir: found4, digest: stored.sha };
106924
106904
  }
106925
- const sha2 = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(binary2.dir)).digest("hex");
106905
+ const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(binary2.dir)).digest("hex");
106926
106906
  if (sha2 !== stored?.sha || !locateXcframework(import_node_path121.default.join(dir, "tree"))) {
106927
106907
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106928
106908
  import_node_fs121.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
@@ -106934,7 +106914,7 @@ function swiftBinaryFramework(binary2) {
106934
106914
  return { dir: found3, digest: sha2 };
106935
106915
  }
106936
106916
  if (stored && import_node_fs121.default.existsSync(archive)) {
106937
- const sha2 = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106917
+ const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106938
106918
  if (sha2 !== expected)
106939
106919
  throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
106940
106920
  const found3 = locateXcframework(import_node_path121.default.join(dir, "tree"));
@@ -106943,7 +106923,7 @@ function swiftBinaryFramework(binary2) {
106943
106923
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106944
106924
  import_node_fs121.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
106945
106925
  exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
106946
- const sha = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106926
+ const sha = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106947
106927
  if (sha !== expected) {
106948
106928
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106949
106929
  throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
@@ -107068,7 +107048,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
107068
107048
  });
107069
107049
  }
107070
107050
  }
107071
- const declaredDigest = (0, import_node_crypto72.createHash)("sha256");
107051
+ const declaredDigest = (0, import_node_crypto71.createHash)("sha256");
107072
107052
  for (const framework of providedFrameworks)
107073
107053
  declaredDigest.update(`provided/${import_node_path121.default.relative(artifact.dir, framework)}\0`);
107074
107054
  for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
@@ -107138,7 +107118,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
107138
107118
  import_node_fs121.default.copyFileSync(surface.modulemap, modulemap);
107139
107119
  }
107140
107120
  }
107141
- const contents2 = (0, import_node_crypto72.createHash)("sha256");
107121
+ const contents2 = (0, import_node_crypto71.createHash)("sha256");
107142
107122
  for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
107143
107123
  const modulemap = import_node_path121.default.join(
107144
107124
  pending2,
@@ -108553,7 +108533,7 @@ function crateSourceRoots(manifest, searchRoot) {
108553
108533
  return roots;
108554
108534
  }
108555
108535
  function crateSourceDigest(manifest, searchRoot) {
108556
- const hash = (0, import_node_crypto72.createHash)("sha256");
108536
+ const hash = (0, import_node_crypto71.createHash)("sha256");
108557
108537
  const walk4 = (dir, root) => {
108558
108538
  for (const entry of import_node_fs121.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
108559
108539
  const full = import_node_path121.default.join(dir, entry.name);
@@ -109000,7 +108980,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
109000
108980
  ...swiftSources.flags,
109001
108981
  ...swiftSources.sources.flatMap((source) => [
109002
108982
  source,
109003
- (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
108983
+ (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
109004
108984
  ])
109005
108985
  );
109006
108986
  continue;
@@ -109036,7 +109016,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
109036
109016
  );
109037
109017
  }
109038
109018
  }
109039
- return (0, import_node_crypto72.createHash)("sha256").update(parts.join("\0")).digest("hex");
109019
+ return (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex");
109040
109020
  }
109041
109021
  function missingArtifactGap(binary2) {
109042
109022
  if (swiftBinaryOnDisk(binary2)) return null;
@@ -109118,7 +109098,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
109118
109098
  return NO_IMPORTABLE_SURFACE;
109119
109099
  }
109120
109100
  const configured = new Map(Object.entries(behavior));
109121
- const hash = (0, import_node_crypto72.createHash)("sha256").update(
109101
+ const hash = (0, import_node_crypto71.createHash)("sha256").update(
109122
109102
  standinGenerationInputs([binary2], toolchain, behavior)
109123
109103
  );
109124
109104
  hash.update(digest3);
@@ -109358,7 +109338,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109358
109338
  );
109359
109339
  if (binary2.moduleSources !== void 0)
109360
109340
  frameworkInputs.push(
109361
- `${binary2.target}\0${(0, import_node_crypto72.createHash)("sha256").update(
109341
+ `${binary2.target}\0${(0, import_node_crypto71.createHash)("sha256").update(
109362
109342
  [iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
109363
109343
  "\0"
109364
109344
  )
@@ -109399,7 +109379,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109399
109379
  import_node_fs121.default.mkdirSync(sourceFrameworks);
109400
109380
  const frameworks = {
109401
109381
  dirs: [...frameworkDirs, sourceFrameworks].sort(),
109402
- digest: (0, import_node_crypto72.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
109382
+ digest: (0, import_node_crypto71.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
109403
109383
  surfaces: frameworkSurfaces
109404
109384
  };
109405
109385
  const siblings = new Map(
@@ -109518,12 +109498,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109518
109498
  import_node_fs121.default.rmSync(modules, { recursive: true, force: true });
109519
109499
  }
109520
109500
  }
109521
- var import_node_child_process58, import_node_crypto72, import_node_fs121, import_node_path121, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
109501
+ var import_node_child_process58, import_node_crypto71, import_node_fs121, import_node_path121, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
109522
109502
  var init_swift_standins = __esm({
109523
109503
  "src/swift-standins.ts"() {
109524
109504
  "use strict";
109525
109505
  import_node_child_process58 = require("node:child_process");
109526
- import_node_crypto72 = require("node:crypto");
109506
+ import_node_crypto71 = require("node:crypto");
109527
109507
  import_node_fs121 = __toESM(require("node:fs"), 1);
109528
109508
  import_node_path121 = __toESM(require("node:path"), 1);
109529
109509
  init_forked_script_contract();
@@ -109555,7 +109535,7 @@ var init_swift_standins = __esm({
109555
109535
  init_swiftTargetContract();
109556
109536
  TRIPLE = SWIFT_WASM_TRIPLE;
109557
109537
  cacheDir5 = import_node_path121.default.join(cacheDir(), "swift-standins");
109558
- key = (...parts) => (0, import_node_crypto72.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
109538
+ key = (...parts) => (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
109559
109539
  digests = /* @__PURE__ */ new Map();
109560
109540
  isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
109561
109541
  OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
@@ -109793,14 +109773,14 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
109793
109773
  Infinity
109794
109774
  );
109795
109775
  const backport = DOUBLE_CONVERSION_WASM64_BACKPORT;
109796
- if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
109776
+ if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
109797
109777
  sources.set(file, bytes);
109798
109778
  return;
109799
109779
  }
109800
109780
  const derived = Buffer.from(
109801
109781
  bytes.toString("utf8").replace(backport.before, backport.after)
109802
109782
  );
109803
- if ((0, import_node_crypto73.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
109783
+ if ((0, import_node_crypto72.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
109804
109784
  throw new Error(`DoubleConversion backport derived source differs: ${file}`);
109805
109785
  sources.set(file, derived);
109806
109786
  derivations[file] = {
@@ -110206,7 +110186,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
110206
110186
  const staged = withFrameworkCompanionImports(original);
110207
110187
  if (staged !== original) sources.set(file, Buffer.from(staged));
110208
110188
  }
110209
- const digest3 = (bytes) => (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex");
110189
+ const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
110210
110190
  const providers = /* @__PURE__ */ new Map();
110211
110191
  for (const target of targets) {
110212
110192
  if (!supplied.has(target.moduleName)) continue;
@@ -110560,7 +110540,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
110560
110540
  products
110561
110541
  );
110562
110542
  const checkouts = remoteSwiftCheckouts(app.rootDir);
110563
- const digest3 = (bytes) => (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex");
110543
+ const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
110564
110544
  const inputs2 = Object.fromEntries(
110565
110545
  [...sources].map(([file, bytes]) => [file, digest3(bytes)])
110566
110546
  );
@@ -110924,12 +110904,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
110924
110904
  import_node_fs122.default.closeSync(descriptor);
110925
110905
  }
110926
110906
  }
110927
- var import_node_child_process59, import_node_crypto73, import_node_fs122, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
110907
+ var import_node_child_process59, import_node_crypto72, import_node_fs122, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
110928
110908
  var init_swift_objc_compile = __esm({
110929
110909
  "src/swift-objc-compile.ts"() {
110930
110910
  "use strict";
110931
110911
  import_node_child_process59 = require("node:child_process");
110932
- import_node_crypto73 = require("node:crypto");
110912
+ import_node_crypto72 = require("node:crypto");
110933
110913
  import_node_fs122 = __toESM(require("node:fs"), 1);
110934
110914
  import_node_path122 = __toESM(require("node:path"), 1);
110935
110915
  init_mapLimit();
@@ -111431,7 +111411,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
111431
111411
  const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
111432
111412
  if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
111433
111413
  return;
111434
- const appRequire = (0, import_node_module15.createRequire)(manifestPath);
111414
+ const appRequire = (0, import_node_module14.createRequire)(manifestPath);
111435
111415
  const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
111436
111416
  for (const packageName2 of Object.keys(dependencies).sort()) {
111437
111417
  signal?.throwIfAborted();
@@ -111525,12 +111505,12 @@ public func ${register}() -> RCTModuleHost.Registration {
111525
111505
  }
111526
111506
  }
111527
111507
  }
111528
- var import_node_fs123, import_node_module15, import_node_path123, DIRECTIVE, swiftString, BRIDGE_MODULE_FILE_PREFIX;
111508
+ var import_node_fs123, import_node_module14, import_node_path123, DIRECTIVE, swiftString, BRIDGE_MODULE_FILE_PREFIX;
111529
111509
  var init_react_native_bridge_modules = __esm({
111530
111510
  "src/react-native-bridge-modules.ts"() {
111531
111511
  "use strict";
111532
111512
  import_node_fs123 = __toESM(require("node:fs"), 1);
111533
- import_node_module15 = require("node:module");
111513
+ import_node_module14 = require("node:module");
111534
111514
  import_node_path123 = __toESM(require("node:path"), 1);
111535
111515
  init_answeredNativePackages();
111536
111516
  init_swift_compile();
@@ -111671,6 +111651,41 @@ var init_nitro_adapter = __esm({
111671
111651
  }
111672
111652
  });
111673
111653
 
111654
+ // ../../src/ios/pngHeader.ts
111655
+ function readPngHeader(bytes) {
111656
+ if (bytes.byteLength < 26) return null;
111657
+ for (let i = 0; i < PNG_SIGNATURE.length; i++) {
111658
+ if (bytes[i] !== PNG_SIGNATURE[i]) return null;
111659
+ }
111660
+ if (bytes[12] !== 73 || bytes[13] !== 72 || bytes[14] !== 68 || bytes[15] !== 82) {
111661
+ return null;
111662
+ }
111663
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
111664
+ const width = view.getUint32(16, false);
111665
+ const height = view.getUint32(20, false);
111666
+ const bitDepth = bytes[24] ?? 0;
111667
+ const colorType = bytes[25] ?? 0;
111668
+ return {
111669
+ width,
111670
+ height,
111671
+ bitDepth,
111672
+ colorType,
111673
+ hasAlpha: ALPHA_COLOR_TYPES.has(colorType)
111674
+ };
111675
+ }
111676
+ function readPngDimensions(bytes) {
111677
+ const h = readPngHeader(bytes);
111678
+ return h ? { width: h.width, height: h.height } : null;
111679
+ }
111680
+ var PNG_SIGNATURE, ALPHA_COLOR_TYPES;
111681
+ var init_pngHeader = __esm({
111682
+ "../../src/ios/pngHeader.ts"() {
111683
+ "use strict";
111684
+ PNG_SIGNATURE = [137, 80, 78, 71, 13, 10, 26, 10];
111685
+ ALPHA_COLOR_TYPES = /* @__PURE__ */ new Set([4, 6]);
111686
+ }
111687
+ });
111688
+
111674
111689
  // ../../node_modules/svgpath/lib/path_parse.js
111675
111690
  var require_path_parse = __commonJS({
111676
111691
  "../../node_modules/svgpath/lib/path_parse.js"(exports2, module2) {
@@ -115059,11 +115074,11 @@ function coreDataModelDirectories(files2) {
115059
115074
  }
115060
115075
  return [...models].sort();
115061
115076
  }
115062
- var import_node_crypto74, import_node_fs126, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
115077
+ var import_node_crypto73, import_node_fs126, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
115063
115078
  var init_core_data_model = __esm({
115064
115079
  "src/core-data-model.ts"() {
115065
115080
  "use strict";
115066
- import_node_crypto74 = require("node:crypto");
115081
+ import_node_crypto73 = require("node:crypto");
115067
115082
  import_node_fs126 = require("node:fs");
115068
115083
  import_node_path126 = __toESM(require("node:path"), 1);
115069
115084
  init_core_data_entity_classes();
@@ -115182,7 +115197,7 @@ var init_core_data_model = __esm({
115182
115197
  });
115183
115198
  }
115184
115199
  };
115185
- sha2563 = (...parts) => (0, import_node_crypto74.createHash)("sha256").update(
115200
+ sha2563 = (...parts) => (0, import_node_crypto73.createHash)("sha256").update(
115186
115201
  Buffer.concat(
115187
115202
  parts.map(
115188
115203
  (part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
@@ -117380,7 +117395,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
117380
117395
  (binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
117381
117396
  ))
117382
117397
  return [...binaries];
117383
- const hash = (0, import_node_crypto75.createHash)("sha256");
117398
+ const hash = (0, import_node_crypto74.createHash)("sha256");
117384
117399
  hash.update(
117385
117400
  JSON.stringify([
117386
117401
  inputs2.targets,
@@ -117589,12 +117604,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
117589
117604
  );
117590
117605
  return result;
117591
117606
  }
117592
- var import_node_child_process61, import_node_crypto75, import_node_fs127, import_node_path127, cachedInputs;
117607
+ var import_node_child_process61, import_node_crypto74, import_node_fs127, import_node_path127, cachedInputs;
117593
117608
  var init_swift_cxx_reachable = __esm({
117594
117609
  "src/swift-cxx-reachable.ts"() {
117595
117610
  "use strict";
117596
117611
  import_node_child_process61 = require("node:child_process");
117597
- import_node_crypto75 = require("node:crypto");
117612
+ import_node_crypto74 = require("node:crypto");
117598
117613
  import_node_fs127 = __toESM(require("node:fs"), 1);
117599
117614
  import_node_path127 = __toESM(require("node:path"), 1);
117600
117615
  init_is_record();
@@ -118119,7 +118134,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
118119
118134
  if (!response.ok)
118120
118135
  throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
118121
118136
  const bytes = Buffer.from(await response.arrayBuffer());
118122
- if ((0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
118137
+ if ((0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
118123
118138
  throw new Error(`Swift SDK data plan ${address} failed its digest check`);
118124
118139
  return bytes;
118125
118140
  });
@@ -118217,7 +118232,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
118217
118232
  encode2(now),
118218
118233
  encodeNativeSdkLater({
118219
118234
  files: later.map((bytes) => ({
118220
- sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex"),
118235
+ sha256: (0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex"),
118221
118236
  byteLength: bytes.length
118222
118237
  })),
118223
118238
  ...needs && {
@@ -118233,11 +118248,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
118233
118248
  later
118234
118249
  };
118235
118250
  }
118236
- var import_node_crypto76, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
118251
+ var import_node_crypto75, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
118237
118252
  var init_swift_sdk_later_data = __esm({
118238
118253
  "src/swift-sdk-later-data.ts"() {
118239
118254
  "use strict";
118240
- import_node_crypto76 = require("node:crypto");
118255
+ import_node_crypto75 = require("node:crypto");
118241
118256
  init_nativeSdkBindingContract();
118242
118257
  init_nativeWasmContract();
118243
118258
  init_swift_sdk_image();
@@ -118295,14 +118310,14 @@ function resolvePlaywright() {
118295
118310
  roots.push(`${pinnedRoot}/`);
118296
118311
  for (const root of roots) {
118297
118312
  try {
118298
- const requireFromRoot = (0, import_node_module16.createRequire)(root);
118313
+ const requireFromRoot = (0, import_node_module15.createRequire)(root);
118299
118314
  for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
118300
118315
  try {
118301
118316
  const modulePath = requireFromRoot.resolve(spec);
118302
118317
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
118303
118318
  const parsed2 = JSON.parse((0, import_node_fs129.readFileSync)(packageJsonPath, "utf8"));
118304
118319
  if (!isRecord(parsed2) || typeof parsed2.version !== "string") continue;
118305
- const corePackagePath = (0, import_node_module16.createRequire)(modulePath).resolve(
118320
+ const corePackagePath = (0, import_node_module15.createRequire)(modulePath).resolve(
118306
118321
  "playwright-core/package.json"
118307
118322
  );
118308
118323
  const cliPath = (0, import_node_path129.join)((0, import_node_path129.dirname)(corePackagePath), "cli.js");
@@ -118530,7 +118545,7 @@ async function launchProvisionedPlaywright(options2 = {}) {
118530
118545
  const env = { ...process.env };
118531
118546
  const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
118532
118547
  if (!browser.ok) throw new Error(browser.message);
118533
- const playwright = (0, import_node_module16.createRequire)(resolved.modulePath)(
118548
+ const playwright = (0, import_node_module15.createRequire)(resolved.modulePath)(
118534
118549
  resolved.modulePath
118535
118550
  );
118536
118551
  const browserEnv = browser.libraryPath ? {
@@ -118542,13 +118557,13 @@ async function launchProvisionedPlaywright(options2 = {}) {
118542
118557
  { ...options2, headless: true }
118543
118558
  );
118544
118559
  }
118545
- var import_node_child_process63, import_node_fs129, import_node_module16, import_node_path129, CHROMIUM_PATHS_KEPT;
118560
+ var import_node_child_process63, import_node_fs129, import_node_module15, import_node_path129, CHROMIUM_PATHS_KEPT;
118546
118561
  var init_playwright_provisioning = __esm({
118547
118562
  "cli/drivers/playwright-provisioning.ts"() {
118548
118563
  "use strict";
118549
118564
  import_node_child_process63 = require("node:child_process");
118550
118565
  import_node_fs129 = require("node:fs");
118551
- import_node_module16 = require("node:module");
118566
+ import_node_module15 = require("node:module");
118552
118567
  import_node_path129 = require("node:path");
118553
118568
  init_src();
118554
118569
  init_home_paths();
@@ -118771,6 +118786,9 @@ var init_metro_runtime_source = __esm({
118771
118786
  });
118772
118787
 
118773
118788
  // src/guest-bundle.ts
118789
+ function productionNativeGuestSource(source) {
118790
+ return source.startsWith(productionPrelude) ? source : productionPrelude + source;
118791
+ }
118774
118792
  function swiftGuestBundle(packageName2) {
118775
118793
  return guestBundle(
118776
118794
  "peachsim/swift",
@@ -118811,8 +118829,7 @@ ${registration}`,
118811
118829
  return serializeGuestBundle(modules, { "react-native": import_package.default.version });
118812
118830
  }
118813
118831
  function serializeGuestBundle(modules, versions, footer = "") {
118814
- const bundle = [
118815
- `var __DEV__=false;`,
118832
+ const source = [
118816
118833
  `var __METRO_GLOBAL_PREFIX__='';`,
118817
118834
  `(function(global){${METRO_REQUIRE_POLYFILL}})(globalThis);`,
118818
118835
  ...modules.map(
@@ -118823,7 +118840,7 @@ ${module2.code}
118823
118840
  "__r(0);"
118824
118841
  ].join("\n");
118825
118842
  return appendRNXMetroModuleIdentityFooter(
118826
- insertPackageVersionsFooter(bundle + footer, versions),
118843
+ insertPackageVersionsFooter(productionNativeGuestSource(source) + footer, versions),
118827
118844
  {
118828
118845
  version: RNX_METRO_MODULE_IDENTITY_VERSION,
118829
118846
  identitySource: "contrast-bundler",
@@ -118834,7 +118851,7 @@ ${module2.code}
118834
118851
  }
118835
118852
  );
118836
118853
  }
118837
- var import_package;
118854
+ var import_package, productionPrelude;
118838
118855
  var init_guest_bundle = __esm({
118839
118856
  "src/guest-bundle.ts"() {
118840
118857
  "use strict";
@@ -118842,6 +118859,7 @@ var init_guest_bundle = __esm({
118842
118859
  import_package = __toESM(require("react-native/package.json"), 1);
118843
118860
  init_metro_production_bundle();
118844
118861
  init_metro_runtime_source();
118862
+ productionPrelude = "var __DEV__=false;\n";
118845
118863
  }
118846
118864
  });
118847
118865
 
@@ -119878,7 +119896,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
119878
119896
  sides.push({
119879
119897
  ...part,
119880
119898
  slots: slots2,
119881
- sha256: (0, import_node_crypto77.createHash)("sha256").update(bytes2).digest("hex")
119899
+ sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes2).digest("hex")
119882
119900
  });
119883
119901
  }
119884
119902
  if (!sides.length) return { primary: describePart(input), sides: [] };
@@ -119944,12 +119962,12 @@ function describePart(file) {
119944
119962
  );
119945
119963
  return { file, functions, byteLength: bytes.byteLength };
119946
119964
  }
119947
- var import_node_child_process64, import_node_crypto77, import_node_fs130, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
119965
+ var import_node_child_process64, import_node_crypto76, import_node_fs130, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
119948
119966
  var init_wasm_lazy_split = __esm({
119949
119967
  "src/wasm-lazy-split.ts"() {
119950
119968
  "use strict";
119951
119969
  import_node_child_process64 = require("node:child_process");
119952
- import_node_crypto77 = require("node:crypto");
119970
+ import_node_crypto76 = require("node:crypto");
119953
119971
  import_node_fs130 = require("node:fs");
119954
119972
  import_node_path130 = require("node:path");
119955
119973
  import_node_util14 = require("node:util");
@@ -120061,7 +120079,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch2, app) {
120061
120079
  const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
120062
120080
  const union = () => {
120063
120081
  const files2 = names().map((name3) => (0, import_node_path131.join)(profiles2, name3));
120064
- const hash = (0, import_node_crypto78.createHash)("sha256");
120082
+ const hash = (0, import_node_crypto77.createHash)("sha256");
120065
120083
  for (const file of files2) hash.update((0, import_node_fs131.readFileSync)(file));
120066
120084
  const cache = (0, import_node_path131.join)(
120067
120085
  directory2,
@@ -120328,11 +120346,11 @@ async function bootSwiftPreview(launch2, profile) {
120328
120346
  server.close();
120329
120347
  }
120330
120348
  }
120331
- var import_node_crypto78, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
120349
+ var import_node_crypto77, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
120332
120350
  var init_swift_startup_split = __esm({
120333
120351
  "src/swift-startup-split.ts"() {
120334
120352
  "use strict";
120335
- import_node_crypto78 = require("node:crypto");
120353
+ import_node_crypto77 = require("node:crypto");
120336
120354
  import_node_fs131 = require("node:fs");
120337
120355
  import_node_http3 = require("node:http");
120338
120356
  import_node_https2 = require("node:https");
@@ -120357,7 +120375,7 @@ var init_swift_startup_split = __esm({
120357
120375
  appPath = "/__peach/swift/startup.wasm";
120358
120376
  profileWindowMs = 3e4;
120359
120377
  postPaintProfileMs = 850;
120360
- digest2 = (bytes) => (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
120378
+ digest2 = (bytes) => (0, import_node_crypto77.createHash)("sha256").update(bytes).digest("hex");
120361
120379
  partDigest = /^[a-f0-9]{64}$/;
120362
120380
  platform = `${process.platform}-${process.arch}`;
120363
120381
  }
@@ -120573,7 +120591,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
120573
120591
  const clang = import_node_path132.default.join(toolchainBin, "clang");
120574
120592
  const empty = (binary2, file) => {
120575
120593
  const source = import_node_path132.default.join(binary2.dir, file);
120576
- const key2 = (0, import_node_crypto79.createHash)("sha256").update(
120594
+ const key2 = (0, import_node_crypto78.createHash)("sha256").update(
120577
120595
  JSON.stringify([
120578
120596
  clang,
120579
120597
  sdk2.sysroot,
@@ -120618,7 +120636,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
120618
120636
  return new Set(portable.flat());
120619
120637
  }
120620
120638
  async function swiftPackages(entry, app) {
120621
- const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto79.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
120639
+ const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto78.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
120622
120640
  const owners = [...app.frameworks, app].map((target) => ({
120623
120641
  module: target.moduleName,
120624
120642
  products: target.packageProducts ?? []
@@ -121781,7 +121799,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121781
121799
  const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
121782
121800
  bytes
121783
121801
  );
121784
- const sha2565 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
121802
+ const sha2565 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
121785
121803
  const bundle = swiftResourceBundleForFile(bundles, key2);
121786
121804
  if (!bundle && inputs2["Package.swift"])
121787
121805
  throw new Error(`metal source ${key2} has no resource target bundle`);
@@ -121804,7 +121822,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121804
121822
  const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
121805
121823
  pdfs.set(file, {
121806
121824
  file: disk,
121807
- sha256: (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex")
121825
+ sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex")
121808
121826
  });
121809
121827
  }
121810
121828
  const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
@@ -121850,13 +121868,15 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121850
121868
  throw new Error("swift image pack exceeds the compile service caps");
121851
121869
  }
121852
121870
  imageBytes += bytes.length;
121853
- const hash = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
121871
+ const hash = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
121854
121872
  const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
121873
+ const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
121855
121874
  const variant2 = {
121856
121875
  uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
121857
121876
  scale,
121858
121877
  ...appearance === void 0 ? {} : { appearance },
121859
- ...renderingMode ? { renderingMode } : {}
121878
+ ...renderingMode ? { renderingMode } : {},
121879
+ ...pixelSize?.width && pixelSize.height ? { pixelSize } : {}
121860
121880
  };
121861
121881
  for (const lookup5 of [name3, ...fileNames ?? []]) {
121862
121882
  const variants = bundle[lookup5] ??= [];
@@ -122158,7 +122178,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
122158
122178
  hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
122159
122179
  }
122160
122180
  function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
122161
- const hash = (0, import_node_crypto79.createHash)("sha256");
122181
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122162
122182
  hash.update(packagePath);
122163
122183
  updateSwiftConfigStamp(hash, packagePath);
122164
122184
  const libraries = projects().get(packagePath)?.libraries;
@@ -122187,7 +122207,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
122187
122207
  return hash.digest("hex").slice(0, 16);
122188
122208
  }
122189
122209
  function sourceContentStamp(packagePath, moduleRootOverride) {
122190
- const hash = (0, import_node_crypto79.createHash)("sha256");
122210
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122191
122211
  hash.update(compilerSourceDigest);
122192
122212
  updateSwiftConfigStamp(hash, packagePath);
122193
122213
  const libraries = projects().get(packagePath)?.libraries;
@@ -122219,7 +122239,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
122219
122239
  (root) => import_node_fs132.default.existsSync(import_node_path132.default.join(root, "toolchain.json"))
122220
122240
  );
122221
122241
  if (!moduleRoot) return "";
122222
- const hash = (0, import_node_crypto79.createHash)("sha256");
122242
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122223
122243
  hash.update(moduleRoot);
122224
122244
  for (const relative6 of swiftModuleInputFiles(moduleRoot)) {
122225
122245
  hash.update(relative6);
@@ -122229,7 +122249,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
122229
122249
  }
122230
122250
  function otherInputs(input, standalone) {
122231
122251
  const { files: _files, ...rest } = input;
122232
- return (0, import_node_crypto79.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
122252
+ return (0, import_node_crypto78.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
122233
122253
  }
122234
122254
  function entryRootId(packagePath, file) {
122235
122255
  const relative6 = import_node_path132.default.relative(packagePath, file).split(import_node_path132.default.sep).join(import_node_path132.default.posix.sep);
@@ -122251,7 +122271,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
122251
122271
  for (const standin of standins) {
122252
122272
  if (!standin.prebuilt) continue;
122253
122273
  const bytes = Buffer.from(standin.prebuilt.library, "base64");
122254
- const digest3 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
122274
+ const digest3 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
122255
122275
  const dir = import_node_path132.default.join(swiftCacheDir(), "native-archives", digest3);
122256
122276
  import_node_fs132.default.mkdirSync(dir, { recursive: true });
122257
122277
  const library = import_node_path132.default.join(dir, `lib${standin.module}.a`);
@@ -122582,7 +122602,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
122582
122602
  return import_node_path132.default.join(
122583
122603
  swiftCacheDir(),
122584
122604
  "swift-builds",
122585
- (0, import_node_crypto79.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
122605
+ (0, import_node_crypto78.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
122586
122606
  );
122587
122607
  }
122588
122608
  function installedWorkspaceInput(packagePath, entry, moduleRoot) {
@@ -122884,7 +122904,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
122884
122904
  const response = await fetch(url, { signal });
122885
122905
  if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
122886
122906
  const bytes = Buffer.from(await response.arrayBuffer());
122887
- if (bytes.length !== byteLength || (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
122907
+ if (bytes.length !== byteLength || (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
122888
122908
  throw new Error(`swift compile: ${url} does not match its module's index`);
122889
122909
  return { dyldTable: { sha256: sha2565, bytes } };
122890
122910
  }
@@ -123115,7 +123135,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
123115
123135
  });
123116
123136
  const image = {
123117
123137
  ...artifact,
123118
- hash: (0, import_node_crypto79.createHash)("sha256").update(result.primary).digest("hex"),
123138
+ hash: (0, import_node_crypto78.createHash)("sha256").update(result.primary).digest("hex"),
123119
123139
  bytes: result.primary,
123120
123140
  parts: result.parts
123121
123141
  };
@@ -123143,10 +123163,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
123143
123163
  sdk2.binding.bytes,
123144
123164
  plan
123145
123165
  );
123146
- const digest3 = (0, import_node_crypto79.createHash)("sha256").update(split.binding).digest("hex");
123166
+ const digest3 = (0, import_node_crypto78.createHash)("sha256").update(split.binding).digest("hex");
123147
123167
  sdkBindingFiles.set(digest3, split.binding);
123148
123168
  for (const later of split.later)
123149
- sdkBindingFiles.set((0, import_node_crypto79.createHash)("sha256").update(later).digest("hex"), later);
123169
+ sdkBindingFiles.set((0, import_node_crypto78.createHash)("sha256").update(later).digest("hex"), later);
123150
123170
  sdkSplitBindings.set(key2, digest3);
123151
123171
  }
123152
123172
  function swiftCodePartAssets(origin, appParts, sdkDigest) {
@@ -123174,7 +123194,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
123174
123194
  }
123175
123195
  function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, runtimeRootOverride) {
123176
123196
  const { key: key2 } = sdk2;
123177
- const app = (0, import_node_crypto79.createHash)("sha256").update(
123197
+ const app = (0, import_node_crypto78.createHash)("sha256").update(
123178
123198
  JSON.stringify([packagePath, launch2.environment, runtimeRootOverride?.origin])
123179
123199
  ).update(launch2.guest?.source ?? "").digest("hex").slice(0, 16);
123180
123200
  const cacheKey = `${key2}/${app}`;
@@ -123201,7 +123221,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, run
123201
123221
  },
123202
123222
  app
123203
123223
  );
123204
- const name3 = (0, import_node_crypto79.createHash)("sha256").update(split.primary).digest("hex");
123224
+ const name3 = (0, import_node_crypto78.createHash)("sha256").update(split.primary).digest("hex");
123205
123225
  sdkPieces2.set(name3, split.primary);
123206
123226
  for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
123207
123227
  sdkStartupParts.set(name3, split.parts);
@@ -123448,16 +123468,17 @@ function disposeSwiftProject(packagePath, signal) {
123448
123468
  xcodeProjects().delete(packagePath);
123449
123469
  sourceEntries().delete(packagePath);
123450
123470
  }
123451
- var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123471
+ var import_node_async_hooks2, import_node_child_process65, import_node_crypto78, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123452
123472
  var init_swift_host = __esm({
123453
123473
  "src/swift-host.ts"() {
123454
123474
  "use strict";
123455
123475
  import_node_async_hooks2 = require("node:async_hooks");
123456
123476
  import_node_child_process65 = require("node:child_process");
123457
- import_node_crypto79 = require("node:crypto");
123477
+ import_node_crypto78 = require("node:crypto");
123458
123478
  import_node_fs132 = __toESM(require("node:fs"), 1);
123459
123479
  import_node_os27 = __toESM(require("node:os"), 1);
123460
123480
  import_node_path132 = __toESM(require("node:path"), 1);
123481
+ init_pngHeader();
123461
123482
  init_nativeDyldTableContract();
123462
123483
  init_nativeSdkBindingContract();
123463
123484
  init_bundleAssets();
@@ -123913,7 +123934,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
123913
123934
  const podsRoot = import_node_path134.default.dirname(app.cocoapods.manifestLock);
123914
123935
  const localPods = app.cocoapods.localPodspecs;
123915
123936
  const reactNativeRoot = import_node_path134.default.dirname(
123916
- (0, import_node_module17.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
123937
+ (0, import_node_module16.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
123917
123938
  "react-native/package.json"
123918
123939
  )
123919
123940
  );
@@ -124123,12 +124144,12 @@ function installedPodBinaries(directory2) {
124123
124144
  }
124124
124145
  return binaries.sort();
124125
124146
  }
124126
- var import_node_fs134, import_node_module17, import_node_path134, BINARY_BUNDLE, SOURCE;
124147
+ var import_node_fs134, import_node_module16, import_node_path134, BINARY_BUNDLE, SOURCE;
124127
124148
  var init_installed_native_libraries = __esm({
124128
124149
  "src/installed-native-libraries.ts"() {
124129
124150
  "use strict";
124130
124151
  import_node_fs134 = __toESM(require("node:fs"), 1);
124131
- import_node_module17 = require("node:module");
124152
+ import_node_module16 = require("node:module");
124132
124153
  import_node_path134 = __toESM(require("node:path"), 1);
124133
124154
  init_is_record();
124134
124155
  init_native_static_libraries();
@@ -124211,7 +124232,7 @@ function hashTree(root) {
124211
124232
  for (const entry of import_node_fs135.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
124212
124233
  if (!entry.isFile()) continue;
124213
124234
  const file = import_node_path135.default.join(entry.parentPath, entry.name);
124214
- hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto80.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
124235
+ hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto79.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
124215
124236
  }
124216
124237
  return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
124217
124238
  }
@@ -124221,7 +124242,7 @@ function realTarget(target) {
124221
124242
  return import_node_path135.default.join(realTarget(import_node_path135.default.dirname(resolved)), import_node_path135.default.basename(resolved));
124222
124243
  }
124223
124244
  async function runInstalledTurboCodegen(appRoot, outDir, signal) {
124224
- const manifestPath = (0, import_node_module18.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
124245
+ const manifestPath = (0, import_node_module17.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
124225
124246
  "react-native/package.json"
124226
124247
  );
124227
124248
  const manifest = JSON.parse(import_node_fs135.default.readFileSync(manifestPath, "utf8"));
@@ -124261,14 +124282,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
124261
124282
  files: hashTree(generatedRoot)
124262
124283
  };
124263
124284
  }
124264
- var import_node_child_process66, import_node_crypto80, import_node_fs135, import_node_module18, import_node_path135, import_node_util15, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
124285
+ var import_node_child_process66, import_node_crypto79, import_node_fs135, import_node_module17, import_node_path135, import_node_util15, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
124265
124286
  var init_turbo_codegen_intake = __esm({
124266
124287
  "src/turbo-codegen-intake.ts"() {
124267
124288
  "use strict";
124268
124289
  import_node_child_process66 = require("node:child_process");
124269
- import_node_crypto80 = require("node:crypto");
124290
+ import_node_crypto79 = require("node:crypto");
124270
124291
  import_node_fs135 = __toESM(require("node:fs"), 1);
124271
- import_node_module18 = require("node:module");
124292
+ import_node_module17 = require("node:module");
124272
124293
  import_node_path135 = __toESM(require("node:path"), 1);
124273
124294
  import_node_util15 = require("node:util");
124274
124295
  init_forked_script_contract();
@@ -128106,11 +128127,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
128106
128127
  }
128107
128128
  `;
128108
128129
  }
128109
- var import_node_crypto81, import_node_fs136, import_node_path136, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
128130
+ var import_node_crypto80, import_node_fs136, import_node_path136, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
128110
128131
  var init_turbo_source = __esm({
128111
128132
  "src/turbo-source.ts"() {
128112
128133
  "use strict";
128113
- import_node_crypto81 = require("node:crypto");
128134
+ import_node_crypto80 = require("node:crypto");
128114
128135
  import_node_fs136 = __toESM(require("node:fs"), 1);
128115
128136
  import_node_path136 = __toESM(require("node:path"), 1);
128116
128137
  init_cocoapods_trunk();
@@ -128238,7 +128259,7 @@ var init_turbo_source = __esm({
128238
128259
  ];
128239
128260
  DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
128240
128261
  EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
128241
- sha2564 = (data) => (0, import_node_crypto81.createHash)("sha256").update(data).digest("hex");
128262
+ sha2564 = (data) => (0, import_node_crypto80.createHash)("sha256").update(data).digest("hex");
128242
128263
  podspecList = podspecAttribute;
128243
128264
  versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
128244
128265
  iosOf = (member) => object6(member.ios) ? member.ios : null;
@@ -128997,7 +129018,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
128997
129018
  const reactNative = [options2.appRoot, options2.projectRoot].map(
128998
129019
  (root) => import_node_path137.default.dirname(
128999
129020
  import_node_fs137.default.realpathSync(
129000
- (0, import_node_module19.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
129021
+ (0, import_node_module18.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
129001
129022
  "react-native/package.json"
129002
129023
  )
129003
129024
  )
@@ -129032,7 +129053,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
129032
129053
  }
129033
129054
  async function prepareTurboCompileInput(options2) {
129034
129055
  await prepareTurboSourceDependencies(options2.reactNativeRoot);
129035
- const key2 = (0, import_node_crypto82.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
129056
+ const key2 = (0, import_node_crypto81.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
129036
129057
  const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
129037
129058
  import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
129038
129059
  const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
@@ -129233,13 +129254,13 @@ async function compileTurboModule(options2) {
129233
129254
  collection
129234
129255
  };
129235
129256
  }
129236
- var import_node_crypto82, import_node_fs137, import_node_module19, import_node_os28, import_node_path137;
129257
+ var import_node_crypto81, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
129237
129258
  var init_turbo_compile = __esm({
129238
129259
  "src/turbo-compile.ts"() {
129239
129260
  "use strict";
129240
- import_node_crypto82 = require("node:crypto");
129261
+ import_node_crypto81 = require("node:crypto");
129241
129262
  import_node_fs137 = __toESM(require("node:fs"), 1);
129242
- import_node_module19 = require("node:module");
129263
+ import_node_module18 = require("node:module");
129243
129264
  import_node_os28 = __toESM(require("node:os"), 1);
129244
129265
  import_node_path137 = __toESM(require("node:path"), 1);
129245
129266
  init_native_app_identity_project();
@@ -129454,8 +129475,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
129454
129475
  );
129455
129476
  if (!isRecord(manifest) || typeof manifest.version !== "string")
129456
129477
  throw new Error(`${reactNativeRoot}: react-native has no version`);
129457
- const headers = (0, import_node_crypto83.createHash)("sha256");
129458
- const sources = (0, import_node_crypto83.createHash)("sha256");
129478
+ const headers = (0, import_node_crypto82.createHash)("sha256");
129479
+ const sources = (0, import_node_crypto82.createHash)("sha256");
129459
129480
  const walk4 = (relative6) => {
129460
129481
  for (const file of import_node_fs139.default.readdirSync(import_node_path139.default.join(reactNativeRoot, relative6), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
129461
129482
  if (file.name === "node_modules" || file.name.startsWith(".")) continue;
@@ -129471,7 +129492,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
129471
129492
  };
129472
129493
  walk4("");
129473
129494
  const codegenRoot = import_node_path139.default.dirname(
129474
- (0, import_node_module20.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
129495
+ (0, import_node_module19.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
129475
129496
  "@react-native/codegen/package.json"
129476
129497
  )
129477
129498
  );
@@ -129562,7 +129583,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
129562
129583
  const file = import_node_path139.default.join(
129563
129584
  cacheDir(),
129564
129585
  "native-archives",
129565
- `${(0, import_node_crypto83.createHash)("sha256").update(data).digest("hex")}.a`
129586
+ `${(0, import_node_crypto82.createHash)("sha256").update(data).digest("hex")}.a`
129566
129587
  );
129567
129588
  import_node_fs139.default.mkdirSync(import_node_path139.default.dirname(file), { recursive: true });
129568
129589
  if (!import_node_fs139.default.existsSync(file)) import_node_fs139.default.writeFileSync(file, Buffer.from(data, "base64"));
@@ -129572,13 +129593,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
129572
129593
  }
129573
129594
  }
129574
129595
  }
129575
- var import_node_crypto83, import_node_fs139, import_node_module20, import_node_path139, import_node_util16, recipe, strings4, building;
129596
+ var import_node_crypto82, import_node_fs139, import_node_module19, import_node_path139, import_node_util16, recipe, strings4, building;
129576
129597
  var init_react_native_core = __esm({
129577
129598
  "src/react-native-core.ts"() {
129578
129599
  "use strict";
129579
- import_node_crypto83 = require("node:crypto");
129600
+ import_node_crypto82 = require("node:crypto");
129580
129601
  import_node_fs139 = __toESM(require("node:fs"), 1);
129581
- import_node_module20 = require("node:module");
129602
+ import_node_module19 = require("node:module");
129582
129603
  import_node_path139 = __toESM(require("node:path"), 1);
129583
129604
  import_node_util16 = require("node:util");
129584
129605
  init_home_paths();
@@ -129601,7 +129622,7 @@ function exportedNames(moduleRoot, name3) {
129601
129622
  const modules = import_node_path140.default.join(moduleRoot, "modules");
129602
129623
  const module2 = import_node_path140.default.join(modules, `${name3}.swiftmodule`);
129603
129624
  if (!import_node_fs140.default.existsSync(module2)) return /* @__PURE__ */ new Set();
129604
- const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
129625
+ const key2 = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
129605
129626
  const directory2 = import_node_path140.default.join(swiftCacheDir(), "swift-public-names");
129606
129627
  const receipt = import_node_path140.default.join(directory2, `${key2}.json`);
129607
129628
  if (import_node_fs140.default.existsSync(receipt)) {
@@ -129684,12 +129705,12 @@ function clangTypeOwnership(moduleRoot, module2) {
129684
129705
  }
129685
129706
  );
129686
129707
  }
129687
- var import_node_child_process68, import_node_crypto84, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
129708
+ var import_node_child_process68, import_node_crypto83, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
129688
129709
  var init_swift_clang_type_ownership = __esm({
129689
129710
  "src/swift-clang-type-ownership.ts"() {
129690
129711
  "use strict";
129691
129712
  import_node_child_process68 = require("node:child_process");
129692
- import_node_crypto84 = require("node:crypto");
129713
+ import_node_crypto83 = require("node:crypto");
129693
129714
  import_node_fs140 = __toESM(require("node:fs"), 1);
129694
129715
  import_node_path140 = __toESM(require("node:path"), 1);
129695
129716
  init_is_record();
@@ -130165,7 +130186,7 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
130165
130186
  const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
130166
130187
  const reactNativeRoot = import_node_fs141.default.realpathSync(
130167
130188
  import_node_path141.default.dirname(
130168
- (0, import_node_module21.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
130189
+ (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
130169
130190
  "react-native/package.json"
130170
130191
  )
130171
130192
  )
@@ -130612,7 +130633,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
130612
130633
  signal?.throwIfAborted();
130613
130634
  appRoot = import_node_fs141.default.realpathSync(appRoot);
130614
130635
  const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
130615
- const appRequire = (0, import_node_module21.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
130636
+ const appRequire = (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
130616
130637
  let expoRoot;
130617
130638
  try {
130618
130639
  expoRoot = import_node_path141.default.dirname(appRequire.resolve("expo/package.json"));
@@ -131344,7 +131365,7 @@ function targetSettings2(units) {
131344
131365
  }
131345
131366
  function oneSDKStamp(oneSDK) {
131346
131367
  if (!oneSDK) return "";
131347
- const hash = (0, import_node_crypto85.createHash)("sha256");
131368
+ const hash = (0, import_node_crypto84.createHash)("sha256");
131348
131369
  for (const files2 of [oneSDK.targets, oneSDK.entry])
131349
131370
  for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
131350
131371
  hash.update(`${name3}\0${source}\0`);
@@ -131395,7 +131416,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
131395
131416
  `;
131396
131417
  }
131397
131418
  function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
131398
- const hash = (0, import_node_crypto85.createHash)("sha256");
131419
+ const hash = (0, import_node_crypto84.createHash)("sha256");
131399
131420
  hash.update(base2);
131400
131421
  hash.update(reactProviderStamp);
131401
131422
  for (const unit2 of units) {
@@ -131742,7 +131763,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
131742
131763
  const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
131743
131764
  const projectRoot = options2.installedWorkspace ? import_node_path141.default.dirname(import_node_path141.default.dirname(options2.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options2.iosTarget)).app;
131744
131765
  const reactNativeRoot = import_node_path141.default.dirname(
131745
- (0, import_node_module21.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
131766
+ (0, import_node_module20.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
131746
131767
  "react-native/package.json"
131747
131768
  )
131748
131769
  );
@@ -131769,8 +131790,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
131769
131790
  }
131770
131791
  return provider;
131771
131792
  })() : void 0;
131772
- const reactProviderStamp = reactProvider ? (0, import_node_crypto85.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
131773
- const key2 = (0, import_node_crypto85.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
131793
+ const reactProviderStamp = reactProvider ? (0, import_node_crypto84.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
131794
+ const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
131774
131795
  const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
131775
131796
  const failures = /* @__PURE__ */ new Map();
131776
131797
  const failureRecords = /* @__PURE__ */ new Map();
@@ -132156,13 +132177,11 @@ async function handleExpoSwiftRequest(req, res) {
132156
132177
  const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
132157
132178
  if (url.searchParams.get("discover") === "1") {
132158
132179
  try {
132159
- const units = await collectExpoSwiftSources(
132180
+ const units = await withConfiguredNativeSources(
132160
132181
  key2,
132161
- void 0,
132162
- void 0,
132163
- false,
132164
- iosTarget,
132165
- { metadataOnly: true }
132182
+ () => collectExpoSwiftSources(key2, void 0, void 0, false, iosTarget, {
132183
+ metadataOnly: true
132184
+ })
132166
132185
  );
132167
132186
  const metadata = units && {
132168
132187
  namespaces: units.map((unit2) => unit2.moduleId)
@@ -132179,30 +132198,19 @@ async function handleExpoSwiftRequest(req, res) {
132179
132198
  return true;
132180
132199
  }
132181
132200
  const flightKey = `${host2}\0${key2}\0${iosTarget ?? ""}`;
132182
- const prepared = openPreparations.take(
132183
- flightKey,
132184
- url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
132185
- );
132186
- if (prepared) {
132187
- res.writeHead(200, {
132188
- "Content-Type": "application/json",
132189
- "Cache-Control": "no-store"
132190
- });
132191
- res.end(JSON.stringify(prepared.value));
132192
- return true;
132193
- }
132201
+ const assetOrigin = `http://${host2}`;
132194
132202
  try {
132195
- const token = url.searchParams.get(NATIVE_PREPARE_QUERY_PARAM);
132196
- const assetOrigin = `http://${host2}`;
132197
- const metadata = await openPreparations.prepare(
132198
- flightKey,
132203
+ const metadata = await openPreparations.resolve(
132199
132204
  key2,
132200
- token,
132201
- () => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget }),
132202
- (value) => expoSwiftArtifactsAreAvailable(assetOrigin, value)
132205
+ flightKey,
132206
+ url.searchParams,
132207
+ () => withConfiguredNativeSources(
132208
+ key2,
132209
+ () => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
132210
+ ),
132211
+ (result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
132203
132212
  );
132204
132213
  if (!res.destroyed) {
132205
- openPreparations.store(flightKey, token, metadata);
132206
132214
  res.writeHead(200, {
132207
132215
  "Content-Type": "application/json",
132208
132216
  "Cache-Control": "no-store"
@@ -132225,15 +132233,15 @@ ${diagnostics}`}`
132225
132233
  }
132226
132234
  return true;
132227
132235
  }
132228
- var import_node_async_hooks3, import_node_child_process69, import_node_crypto85, import_node_fs141, import_node_module21, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132236
+ var import_node_async_hooks3, import_node_child_process69, import_node_crypto84, import_node_fs141, import_node_module20, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132229
132237
  var init_expo_swift_host = __esm({
132230
132238
  "src/expo-swift-host.ts"() {
132231
132239
  "use strict";
132232
132240
  import_node_async_hooks3 = require("node:async_hooks");
132233
132241
  import_node_child_process69 = require("node:child_process");
132234
- import_node_crypto85 = require("node:crypto");
132242
+ import_node_crypto84 = require("node:crypto");
132235
132243
  import_node_fs141 = __toESM(require("node:fs"), 1);
132236
- import_node_module21 = require("node:module");
132244
+ import_node_module20 = require("node:module");
132237
132245
  import_node_os29 = __toESM(require("node:os"), 1);
132238
132246
  import_node_path141 = __toESM(require("node:path"), 1);
132239
132247
  import_node_url7 = require("node:url");
@@ -132253,7 +132261,6 @@ var init_expo_swift_host = __esm({
132253
132261
  init_native_firebase_config();
132254
132262
  init_native_preparation();
132255
132263
  init_native_static_libraries();
132256
- init_nativePreparationContract();
132257
132264
  init_react_native_bridge_modules();
132258
132265
  init_react_native_core();
132259
132266
  init_swift_binary_modules();
@@ -132281,7 +132288,7 @@ var init_expo_swift_host = __esm({
132281
132288
  ownTemporaryRoots = /* @__PURE__ */ new Set();
132282
132289
  EXPO_MODULE_SCAN_TIMEOUT_MS = 6e4;
132283
132290
  preparedExpoSwift = /* @__PURE__ */ new Map();
132284
- openPreparations = new NativePreparationReceipts();
132291
+ openPreparations = new NativePreparation();
132285
132292
  ExpoSwiftLinkRefusal = class extends Error {
132286
132293
  };
132287
132294
  }
@@ -134942,7 +134949,7 @@ __export(rolldown_bundle_forward_exports, {
134942
134949
  async function forwardRolldownBundleResponse(upstream, res) {
134943
134950
  res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
134944
134951
  if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
134945
- await (0, import_promises17.pipeline)(upstream, res);
134952
+ await (0, import_promises16.pipeline)(upstream, res);
134946
134953
  return;
134947
134954
  }
134948
134955
  const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
@@ -134984,14 +134991,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
134984
134991
  }
134985
134992
  yield Buffer.from(annotated.slice(sent), "utf8");
134986
134993
  };
134987
- await (0, import_promises17.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
134994
+ await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
134988
134995
  }
134989
- var import_stream, import_promises17, ROLLDOWN_INVENTORY_HEADER;
134996
+ var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
134990
134997
  var init_rolldown_bundle_forward = __esm({
134991
134998
  "src/host/rolldown-bundle-forward.ts"() {
134992
134999
  "use strict";
134993
135000
  import_stream = require("stream");
134994
- import_promises17 = require("stream/promises");
135001
+ import_promises16 = require("stream/promises");
134995
135002
  init_cli_runtime();
134996
135003
  ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
134997
135004
  }
@@ -135306,7 +135313,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135306
135313
  await route.respond(proxyRes, hopCookies);
135307
135314
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
135308
135315
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
135309
- await (0, import_promises18.pipeline)(proxyRes, res);
135316
+ await (0, import_promises17.pipeline)(proxyRes, res);
135310
135317
  return;
135311
135318
  }
135312
135319
  if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
@@ -135317,7 +135324,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135317
135324
  const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
135318
135325
  const redirectUrl = resolveRedirectUrl(location, targetUrl);
135319
135326
  proxyRes.resume();
135320
- await (0, import_promises18.finished)(proxyRes);
135327
+ await (0, import_promises17.finished)(proxyRes);
135321
135328
  await proxy(
135322
135329
  redirectUrl,
135323
135330
  switchToGet ? "GET" : method,
@@ -135335,7 +135342,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135335
135342
  await forwardRolldownBundleResponse2(proxyRes, res);
135336
135343
  return;
135337
135344
  }
135338
- await (0, import_promises18.pipeline)(proxyRes, res);
135345
+ await (0, import_promises17.pipeline)(proxyRes, res);
135339
135346
  };
135340
135347
  let upstreamAnswered = false;
135341
135348
  let body;
@@ -135390,14 +135397,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135390
135397
  else req.socket.destroy();
135391
135398
  }
135392
135399
  }
135393
- var import_http3, import_https2, import_node_http22, import_promises18, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
135400
+ var import_http3, import_https2, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
135394
135401
  var init_fetch_proxy_handler = __esm({
135395
135402
  "src/host/fetch-proxy-handler.ts"() {
135396
135403
  "use strict";
135397
135404
  import_http3 = __toESM(require("http"), 1);
135398
135405
  import_https2 = __toESM(require("https"), 1);
135399
135406
  import_node_http22 = require("node:http2");
135400
- import_promises18 = require("stream/promises");
135407
+ import_promises17 = require("stream/promises");
135401
135408
  init_package_versions();
135402
135409
  init_backend_origin();
135403
135410
  init_fetch_proxy_overrides();
@@ -135455,7 +135462,7 @@ async function createIdentity() {
135455
135462
  const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
135456
135463
  const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
135457
135464
  {
135458
- serialNumber: (0, import_node_crypto86.randomBytes)(16).toString("hex"),
135465
+ serialNumber: (0, import_node_crypto85.randomBytes)(16).toString("hex"),
135459
135466
  name: "CN=localhost",
135460
135467
  notBefore: new Date(Date.now() - 6e4),
135461
135468
  notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
@@ -135474,7 +135481,7 @@ async function createIdentity() {
135474
135481
  ${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
135475
135482
  -----END PRIVATE KEY-----
135476
135483
  `,
135477
- spki: (0, import_node_crypto86.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
135484
+ spki: (0, import_node_crypto85.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
135478
135485
  };
135479
135486
  }
135480
135487
  async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
@@ -135548,11 +135555,11 @@ async function startFetchProxyTransport(identityPath, hasLiveSims = () => false)
135548
135555
  );
135549
135556
  }
135550
135557
  }
135551
- var import_node_crypto86, import_node_fs145, import_node_http23, import_node_path145, import_x5092;
135558
+ var import_node_crypto85, import_node_fs145, import_node_http23, import_node_path145, import_x5092;
135552
135559
  var init_fetch_proxy_transport = __esm({
135553
135560
  "src/host/fetch-proxy-transport.ts"() {
135554
135561
  "use strict";
135555
- import_node_crypto86 = require("node:crypto");
135562
+ import_node_crypto85 = require("node:crypto");
135556
135563
  import_node_fs145 = require("node:fs");
135557
135564
  import_node_http23 = require("node:http2");
135558
135565
  import_node_path145 = __toESM(require("node:path"), 1);
@@ -136542,7 +136549,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136542
136549
  }
136543
136550
  let resolvedTargetPath;
136544
136551
  try {
136545
- resolvedTargetPath = await import_promises19.default.realpath(targetPath);
136552
+ resolvedTargetPath = await import_promises18.default.realpath(targetPath);
136546
136553
  } catch (error) {
136547
136554
  const message = error instanceof Error ? error.message : String(error);
136548
136555
  res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
@@ -136550,7 +136557,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136550
136557
  return true;
136551
136558
  }
136552
136559
  if (servedRoots) {
136553
- const realRoots = (await Promise.all(servedRoots.map((root) => import_promises19.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
136560
+ const realRoots = (await Promise.all(servedRoots.map((root) => import_promises18.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
136554
136561
  if (!isInsideAny(realRoots, resolvedTargetPath)) {
136555
136562
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
136556
136563
  res.end("replacement file must be inside a folder the bundler serves");
@@ -136560,7 +136567,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136560
136567
  try {
136561
136568
  const compiled = compileReplacementModule({
136562
136569
  filePath: resolvedTargetPath,
136563
- source: await import_promises19.default.readFile(resolvedTargetPath, "utf8"),
136570
+ source: await import_promises18.default.readFile(resolvedTargetPath, "utf8"),
136564
136571
  runtimePackages,
136565
136572
  // the imported file's url is this request's with only its path changed,
136566
136573
  // so the token, cache key and runtime packages carry over.
@@ -136586,12 +136593,12 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136586
136593
  }
136587
136594
  return true;
136588
136595
  }
136589
- var import_node_fs148, import_promises19, import_node_path148, REPLACEMENT_MODULE_ROUTE;
136596
+ var import_node_fs148, import_promises18, import_node_path148, REPLACEMENT_MODULE_ROUTE;
136590
136597
  var init_replacement_module_handler = __esm({
136591
136598
  "src/host/replacement-module-handler.ts"() {
136592
136599
  "use strict";
136593
136600
  import_node_fs148 = require("node:fs");
136594
- import_promises19 = __toESM(require("node:fs/promises"), 1);
136601
+ import_promises18 = __toESM(require("node:fs/promises"), 1);
136595
136602
  import_node_path148 = __toESM(require("node:path"), 1);
136596
136603
  init_replacementModule();
136597
136604
  init_backend_origin();
@@ -136784,10 +136791,10 @@ function stageHostBytes(bytes, origin, extension = "") {
136784
136791
  }
136785
136792
  async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
136786
136793
  const directory2 = prepareStagedDirectory();
136787
- const inputDigest = (0, import_node_crypto87.createHash)("sha256").update(input).digest("hex");
136794
+ const inputDigest = (0, import_node_crypto86.createHash)("sha256").update(input).digest("hex");
136788
136795
  const index = import_node_path149.default.join(
136789
136796
  directory2,
136790
- `derived-${(0, import_node_crypto87.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
136797
+ `derived-${(0, import_node_crypto86.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
136791
136798
  );
136792
136799
  const recorded = import_node_fs149.default.existsSync(index) ? import_node_fs149.default.readFileSync(index, "utf8") : "";
136793
136800
  if (STAGED_NAME.test(recorded) && import_node_fs149.default.existsSync(import_node_path149.default.join(directory2, recorded))) {
@@ -136798,7 +136805,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
136798
136805
  return new URL(STAGED_PREFIX + recorded, origin).toString();
136799
136806
  }
136800
136807
  const staged = writeStagedBytes(await derive(), origin, extension, directory2);
136801
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136808
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136802
136809
  try {
136803
136810
  import_node_fs149.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
136804
136811
  flag: "wx"
@@ -136825,7 +136832,7 @@ function stageHostMetroAssets(assets2, origin) {
136825
136832
  const name3 = staged.pathname.slice(STAGED_PREFIX.length);
136826
136833
  const destination = import_node_path149.default.join(directory2, index);
136827
136834
  stagedCapture.getStore()?.add(index);
136828
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136835
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136829
136836
  try {
136830
136837
  import_node_fs149.default.writeFileSync(temporary, name3, { flag: "wx" });
136831
136838
  try {
@@ -136850,7 +136857,7 @@ function metroIndexName(url) {
136850
136857
  url.searchParams.get("unstable_path"),
136851
136858
  hashes[0]
136852
136859
  ]);
136853
- return `metro-${(0, import_node_crypto87.createHash)("sha256").update(key2).digest("hex")}`;
136860
+ return `metro-${(0, import_node_crypto86.createHash)("sha256").update(key2).digest("hex")}`;
136854
136861
  }
136855
136862
  function metroRequestIndex(rawUrl) {
136856
136863
  if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
@@ -136878,7 +136885,7 @@ function prepareStagedDirectory() {
136878
136885
  return directory2;
136879
136886
  }
136880
136887
  function writeStagedBytes(bytes, origin, extension, directory2) {
136881
- const digest3 = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
136888
+ const digest3 = (0, import_node_crypto86.createHash)("sha256").update(bytes).digest("hex");
136882
136889
  extension = extension.toLowerCase();
136883
136890
  const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
136884
136891
  stagedCapture.getStore()?.add(name3);
@@ -136887,7 +136894,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
136887
136894
  if (import_node_fs149.default.existsSync(destination)) {
136888
136895
  import_node_fs149.default.utimesSync(destination, new Date(now), new Date(now));
136889
136896
  } else {
136890
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136897
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136891
136898
  try {
136892
136899
  import_node_fs149.default.writeFileSync(temporary, bytes, { flag: "wx" });
136893
136900
  import_node_fs149.default.renameSync(temporary, destination);
@@ -136959,12 +136966,12 @@ async function handleStagedHostFileRequest(req, res) {
136959
136966
  throw error;
136960
136967
  }
136961
136968
  }
136962
- var import_node_async_hooks4, import_node_crypto87, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
136969
+ var import_node_async_hooks4, import_node_crypto86, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
136963
136970
  var init_staged_host_files = __esm({
136964
136971
  "src/host/staged-host-files.ts"() {
136965
136972
  "use strict";
136966
136973
  import_node_async_hooks4 = require("node:async_hooks");
136967
- import_node_crypto87 = require("node:crypto");
136974
+ import_node_crypto86 = require("node:crypto");
136968
136975
  import_node_fs149 = __toESM(require("node:fs"), 1);
136969
136976
  import_node_path149 = __toESM(require("node:path"), 1);
136970
136977
  init_uttype_mime();
@@ -137179,7 +137186,7 @@ async function readOneWidgetSources(appRoot) {
137179
137186
  if (!Buffer.from(text7).equals(bytes))
137180
137187
  throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
137181
137188
  files2.set(name3, text7);
137182
- sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto88.createHash)("sha256").update(bytes).digest("hex");
137189
+ sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
137183
137190
  }
137184
137191
  const contract = files2.get("OneWidgetContract.swift") ?? "";
137185
137192
  const source = files2.get("OneWidget.swift") ?? "";
@@ -137203,17 +137210,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
137203
137210
  return {
137204
137211
  metadata: source.widget,
137205
137212
  projectRoot: source.root,
137206
- appIdentity: (0, import_node_crypto88.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
137213
+ appIdentity: (0, import_node_crypto87.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
137207
137214
  bundleUrl,
137208
137215
  packageUrl,
137209
137216
  urlSchemes: source.urlSchemes
137210
137217
  };
137211
137218
  }
137212
- var import_node_crypto88, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
137219
+ var import_node_crypto87, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
137213
137220
  var init_one_widget_metadata = __esm({
137214
137221
  "src/one-widget-metadata.ts"() {
137215
137222
  "use strict";
137216
- import_node_crypto88 = require("node:crypto");
137223
+ import_node_crypto87 = require("node:crypto");
137217
137224
  import_node_fs151 = __toESM(require("node:fs"), 1);
137218
137225
  import_node_path151 = __toESM(require("node:path"), 1);
137219
137226
  init_is_record();
@@ -137247,7 +137254,7 @@ async function oneWidgetPackage(appRoot) {
137247
137254
  const packagePath = import_node_path152.default.join(
137248
137255
  import_node_os31.default.tmpdir(),
137249
137256
  "peach-one-widgets",
137250
- (0, import_node_crypto89.createHash)("sha256").update(root).digest("hex"),
137257
+ (0, import_node_crypto88.createHash)("sha256").update(root).digest("hex"),
137251
137258
  ONE_WIDGET_PACKAGE
137252
137259
  );
137253
137260
  import_node_fs152.default.mkdirSync(packagePath, { recursive: true });
@@ -137261,11 +137268,11 @@ async function oneWidgetPackage(appRoot) {
137261
137268
  widget
137262
137269
  };
137263
137270
  }
137264
- var import_node_crypto89, import_node_fs152, import_node_os31, import_node_path152;
137271
+ var import_node_crypto88, import_node_fs152, import_node_os31, import_node_path152;
137265
137272
  var init_one_widget_package = __esm({
137266
137273
  "src/one-widget-package.ts"() {
137267
137274
  "use strict";
137268
- import_node_crypto89 = require("node:crypto");
137275
+ import_node_crypto88 = require("node:crypto");
137269
137276
  import_node_fs152 = __toESM(require("node:fs"), 1);
137270
137277
  import_node_os31 = __toESM(require("node:os"), 1);
137271
137278
  import_node_path152 = __toESM(require("node:path"), 1);
@@ -137481,7 +137488,7 @@ var init_android_view_classes = __esm({
137481
137488
 
137482
137489
  // src/java-module-abi.ts
137483
137490
  async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
137484
- const digest3 = (0, import_node_crypto90.createHash)("sha256");
137491
+ const digest3 = (0, import_node_crypto89.createHash)("sha256");
137485
137492
  const parent = import_node_path154.default.join(kotlinHome(), "java-specs");
137486
137493
  import_node_fs154.default.mkdirSync(parent, { recursive: true });
137487
137494
  const work = import_node_fs154.default.mkdtempSync(import_node_path154.default.join(parent, ".read-"));
@@ -137578,12 +137585,12 @@ async function compileJavaModuleAbi(input) {
137578
137585
  );
137579
137586
  return library;
137580
137587
  }
137581
- var import_node_child_process72, import_node_crypto90, import_node_fs154, import_node_path154, import_node_util18, run14, JAVA_BINDINGS_INITIALIZER;
137588
+ var import_node_child_process72, import_node_crypto89, import_node_fs154, import_node_path154, import_node_util18, run14, JAVA_BINDINGS_INITIALIZER;
137582
137589
  var init_java_module_abi = __esm({
137583
137590
  "src/java-module-abi.ts"() {
137584
137591
  "use strict";
137585
137592
  import_node_child_process72 = require("node:child_process");
137586
- import_node_crypto90 = require("node:crypto");
137593
+ import_node_crypto89 = require("node:crypto");
137587
137594
  import_node_fs154 = __toESM(require("node:fs"), 1);
137588
137595
  import_node_path154 = __toESM(require("node:path"), 1);
137589
137596
  import_node_util18 = require("node:util");
@@ -137839,13 +137846,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
137839
137846
  if (!stat2.isFile() || stat2.nlink !== 1)
137840
137847
  throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
137841
137848
  const bytes = import_node_fs155.default.readFileSync(target);
137842
- if (bytes.length !== expected.bytes || (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
137849
+ if (bytes.length !== expected.bytes || (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
137843
137850
  throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
137844
137851
  }
137845
137852
  return manifest;
137846
137853
  }
137847
137854
  async function installKotlinSdkArchive(archive, compiler) {
137848
- const sha2565 = (0, import_node_crypto91.createHash)("sha256").update(archive).digest("hex");
137855
+ const sha2565 = (0, import_node_crypto90.createHash)("sha256").update(archive).digest("hex");
137849
137856
  const parent = import_node_path155.default.join(kotlinHome(), "sdk");
137850
137857
  const root = import_node_path155.default.join(parent, sha2565);
137851
137858
  if (import_node_fs155.default.existsSync(root))
@@ -137874,12 +137881,12 @@ async function installKotlinSdkArchive(archive, compiler) {
137874
137881
  import_node_fs155.default.rmSync(work, { recursive: true, force: true });
137875
137882
  }
137876
137883
  }
137877
- var import_node_child_process73, import_node_crypto91, import_node_fs155, import_node_path155, import_node_util19, run15;
137884
+ var import_node_child_process73, import_node_crypto90, import_node_fs155, import_node_path155, import_node_util19, run15;
137878
137885
  var init_kotlin_sdk = __esm({
137879
137886
  "src/kotlin-sdk.ts"() {
137880
137887
  "use strict";
137881
137888
  import_node_child_process73 = require("node:child_process");
137882
- import_node_crypto91 = require("node:crypto");
137889
+ import_node_crypto90 = require("node:crypto");
137883
137890
  import_node_fs155 = __toESM(require("node:fs"), 1);
137884
137891
  import_node_path155 = __toESM(require("node:path"), 1);
137885
137892
  import_node_util19 = require("node:util");
@@ -138016,7 +138023,7 @@ function peachKotlinModuleRoot() {
138016
138023
  return import_node_path156.default.resolve(import_node_path156.default.dirname((0, import_node_url8.fileURLToPath)(__sootsim_import_meta_url)), "..", "kotlin");
138017
138024
  if (installedRoot) return installedRoot;
138018
138025
  const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
138019
- const digest3 = (0, import_node_crypto92.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
138026
+ const digest3 = (0, import_node_crypto91.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
138020
138027
  const parent = import_node_path156.default.join(rnxHomeDir(), "kotlin", "modules");
138021
138028
  const root = import_node_path156.default.join(parent, digest3);
138022
138029
  import_node_fs156.default.mkdirSync(parent, { recursive: true });
@@ -138045,11 +138052,11 @@ function peachKotlinModuleRoot() {
138045
138052
  installedRoot = root;
138046
138053
  return root;
138047
138054
  }
138048
- var import_node_crypto92, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
138055
+ var import_node_crypto91, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
138049
138056
  var init_kotlin_module = __esm({
138050
138057
  "src/kotlin-module.ts"() {
138051
138058
  "use strict";
138052
- import_node_crypto92 = require("node:crypto");
138059
+ import_node_crypto91 = require("node:crypto");
138053
138060
  import_node_fs156 = __toESM(require("node:fs"), 1);
138054
138061
  import_node_path156 = __toESM(require("node:path"), 1);
138055
138062
  import_node_url8 = require("node:url");
@@ -138083,7 +138090,7 @@ async function resolveAndroidGradleSources(request) {
138083
138090
  const parent = import_node_path157.default.join(kotlinHome(), "gradle-sources");
138084
138091
  import_node_fs157.default.mkdirSync(parent, { recursive: true });
138085
138092
  const work = import_node_fs157.default.mkdtempSync(import_node_path157.default.join(parent, ".query-"));
138086
- const task = `peachAndroidSources${(0, import_node_crypto93.randomBytes)(8).toString("hex")}`;
138093
+ const task = `peachAndroidSources${(0, import_node_crypto92.randomBytes)(8).toString("hex")}`;
138087
138094
  const script = import_node_path157.default.join(work, "sources.gradle");
138088
138095
  const encoded = Buffer.from(
138089
138096
  JSON.stringify({
@@ -138204,12 +138211,12 @@ function readDependencySources(value) {
138204
138211
  };
138205
138212
  });
138206
138213
  }
138207
- var import_node_child_process74, import_node_crypto93, import_node_fs157, import_node_path157, import_node_util20, run16, modelQuery;
138214
+ var import_node_child_process74, import_node_crypto92, import_node_fs157, import_node_path157, import_node_util20, run16, modelQuery;
138208
138215
  var init_android_gradle_sources = __esm({
138209
138216
  "src/android-gradle-sources.ts"() {
138210
138217
  "use strict";
138211
138218
  import_node_child_process74 = require("node:child_process");
138212
- import_node_crypto93 = require("node:crypto");
138219
+ import_node_crypto92 = require("node:crypto");
138213
138220
  import_node_fs157 = __toESM(require("node:fs"), 1);
138214
138221
  import_node_path157 = __toESM(require("node:path"), 1);
138215
138222
  import_node_util20 = require("node:util");
@@ -138405,7 +138412,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
138405
138412
  }
138406
138413
  function appKotlinLanguage(root) {
138407
138414
  const reactNative = import_node_path158.default.dirname(
138408
- (0, import_node_module22.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
138415
+ (0, import_node_module21.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
138409
138416
  );
138410
138417
  const versions = import_node_fs158.default.readFileSync(
138411
138418
  import_node_path158.default.join(reactNative, "gradle", "libs.versions.toml"),
@@ -138580,7 +138587,7 @@ function readExpoTypes(output) {
138580
138587
  });
138581
138588
  }
138582
138589
  async function scanSources(tool, parse20, toolchain, moduleRoot, files2) {
138583
- const digest3 = (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
138590
+ const digest3 = (0, import_node_crypto93.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
138584
138591
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
138585
138592
  digest3.update(import_node_fs158.default.readFileSync(import_node_path158.default.join(moduleRoot, "sdk.tar.gz")));
138586
138593
  digest3.update(tool);
@@ -139240,7 +139247,7 @@ async function compileKotlin(input, origin) {
139240
139247
  bytes: import_node_fs158.default.readFileSync(file)
139241
139248
  }));
139242
139249
  const { composeArchive, ...compilerInputs } = toolchain;
139243
- const digest3 = (0, import_node_crypto94.createHash)("sha256");
139250
+ const digest3 = (0, import_node_crypto93.createHash)("sha256");
139244
139251
  digest3.update(
139245
139252
  JSON.stringify({
139246
139253
  format: BUILD_FORMAT,
@@ -139532,14 +139539,14 @@ async function serveKotlinRequest(pathname, res, app) {
139532
139539
  }
139533
139540
  return true;
139534
139541
  }
139535
- var import_node_child_process75, import_node_crypto94, import_node_fs158, import_node_module22, import_node_path158, import_node_util21, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
139542
+ var import_node_child_process75, import_node_crypto93, import_node_fs158, import_node_module21, import_node_path158, import_node_util21, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
139536
139543
  var init_kotlin_host = __esm({
139537
139544
  "src/kotlin-host.ts"() {
139538
139545
  "use strict";
139539
139546
  import_node_child_process75 = require("node:child_process");
139540
- import_node_crypto94 = require("node:crypto");
139547
+ import_node_crypto93 = require("node:crypto");
139541
139548
  import_node_fs158 = __toESM(require("node:fs"), 1);
139542
- import_node_module22 = require("node:module");
139549
+ import_node_module21 = require("node:module");
139543
139550
  import_node_path158 = __toESM(require("node:path"), 1);
139544
139551
  import_node_util21 = require("node:util");
139545
139552
  init_kotlinDiscoveryContract();
@@ -139683,7 +139690,7 @@ function send2(app, change) {
139683
139690
  if (client2.readyState === import_ws2.WebSocket.OPEN) client2.send(message);
139684
139691
  }
139685
139692
  async function swiftPackages2(root) {
139686
- const resolved = (0, import_node_module23.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
139693
+ const resolved = (0, import_node_module22.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
139687
139694
  "vxrn/swift-package-id"
139688
139695
  );
139689
139696
  const loaded4 = await import((0, import_node_url9.pathToFileURL)(resolved).href);
@@ -139831,12 +139838,12 @@ function handleOneNativeSourceUpgrade(req, socket, head) {
139831
139838
  });
139832
139839
  return true;
139833
139840
  }
139834
- var import_node_fs159, import_node_module23, import_node_path159, import_node_url9, import_ws2, apps;
139841
+ var import_node_fs159, import_node_module22, import_node_path159, import_node_url9, import_ws2, apps;
139835
139842
  var init_one_native_source = __esm({
139836
139843
  "src/one-native-source.ts"() {
139837
139844
  "use strict";
139838
139845
  import_node_fs159 = __toESM(require("node:fs"), 1);
139839
- import_node_module23 = require("node:module");
139846
+ import_node_module22 = require("node:module");
139840
139847
  import_node_path159 = __toESM(require("node:path"), 1);
139841
139848
  import_node_url9 = require("node:url");
139842
139849
  init_kotlinDiscoveryContract();
@@ -140055,7 +140062,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
140055
140062
  const ext = import_node_path162.default.extname(file);
140056
140063
  if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
140057
140064
  if (ext.toLowerCase() === ".pdf") {
140058
- const sha2565 = (0, import_node_crypto95.createHash)("sha256").update(bytes).digest("hex");
140065
+ const sha2565 = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
140059
140066
  const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
140060
140067
  return stageHostBytes(png, origin, ".png");
140061
140068
  }
@@ -140068,11 +140075,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
140068
140075
  const prepared = await prepareExpoNativeProject(appRoot);
140069
140076
  return stagePreparedExpoWidgetAssets(prepared.app, origin);
140070
140077
  }
140071
- var import_node_crypto95, import_node_fs161, import_node_path162;
140078
+ var import_node_crypto94, import_node_fs161, import_node_path162;
140072
140079
  var init_expo_widget_assets = __esm({
140073
140080
  "src/expo-widget-assets.ts"() {
140074
140081
  "use strict";
140075
- import_node_crypto95 = require("node:crypto");
140082
+ import_node_crypto94 = require("node:crypto");
140076
140083
  import_node_fs161 = __toESM(require("node:fs"), 1);
140077
140084
  import_node_path162 = __toESM(require("node:path"), 1);
140078
140085
  init_app_catalog();
@@ -140127,11 +140134,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
140127
140134
  "specifications",
140128
140135
  `${checksum}.json`
140129
140136
  );
140130
- const sha1 = (value) => (0, import_node_crypto96.createHash)("sha1").update(value).digest("hex");
140137
+ const sha1 = (value) => (0, import_node_crypto95.createHash)("sha1").update(value).digest("hex");
140131
140138
  let text7;
140132
140139
  if (import_node_fs162.default.existsSync(file)) text7 = import_node_fs162.default.readFileSync(file, "utf8");
140133
140140
  else {
140134
- const shard2 = (0, import_node_crypto96.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
140141
+ const shard2 = (0, import_node_crypto95.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
140135
140142
  const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
140136
140143
  const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
140137
140144
  if (!response.ok)
@@ -140260,7 +140267,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
140260
140267
  "end",
140261
140268
  ""
140262
140269
  ].join("\n");
140263
- const key2 = (0, import_node_crypto96.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
140270
+ const key2 = (0, import_node_crypto95.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
140264
140271
  JSON.stringify(
140265
140272
  Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
140266
140273
  )
@@ -140329,11 +140336,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
140329
140336
  );
140330
140337
  });
140331
140338
  }
140332
- var import_node_crypto96, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
140339
+ var import_node_crypto95, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
140333
140340
  var init_swift_source_pods = __esm({
140334
140341
  "src/swift-source-pods.ts"() {
140335
140342
  "use strict";
140336
- import_node_crypto96 = require("node:crypto");
140343
+ import_node_crypto95 = require("node:crypto");
140337
140344
  import_node_fs162 = __toESM(require("node:fs"), 1);
140338
140345
  import_node_path163 = __toESM(require("node:path"), 1);
140339
140346
  init_browser();
@@ -141010,7 +141017,7 @@ async function prepareNitroCompileInput(options2) {
141010
141017
  input.libraries ??= {};
141011
141018
  input.libraries[nitroProviderTarget({ name: name3 })] = library;
141012
141019
  }
141013
- const key2 = (0, import_node_crypto97.createHash)("sha256").update(
141020
+ const key2 = (0, import_node_crypto96.createHash)("sha256").update(
141014
141021
  collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
141015
141022
  ).update("\0").update(import_node_fs163.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
141016
141023
  const packagePath = import_node_path164.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
@@ -141067,11 +141074,11 @@ function nitrogenGeneratedSources(podDirectory) {
141067
141074
  ...sources(import_node_path164.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
141068
141075
  ];
141069
141076
  }
141070
- var import_node_crypto97, import_node_fs163, import_node_os32, import_node_path164, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141077
+ var import_node_crypto96, import_node_fs163, import_node_os32, import_node_path164, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141071
141078
  var init_nitro_compile = __esm({
141072
141079
  "src/nitro-compile.ts"() {
141073
141080
  "use strict";
141074
- import_node_crypto97 = require("node:crypto");
141081
+ import_node_crypto96 = require("node:crypto");
141075
141082
  import_node_fs163 = __toESM(require("node:fs"), 1);
141076
141083
  import_node_os32 = __toESM(require("node:os"), 1);
141077
141084
  import_node_path164 = __toESM(require("node:path"), 1);
@@ -141148,11 +141155,11 @@ var init_nitro_compile = __esm({
141148
141155
  });
141149
141156
 
141150
141157
  // src/nitro-compiler-digest.ts
141151
- var import_node_crypto98, import_node_fs164, import_node_path165;
141158
+ var import_node_crypto97, import_node_fs164, import_node_path165;
141152
141159
  var init_nitro_compiler_digest = __esm({
141153
141160
  "src/nitro-compiler-digest.ts"() {
141154
141161
  "use strict";
141155
- import_node_crypto98 = require("node:crypto");
141162
+ import_node_crypto97 = require("node:crypto");
141156
141163
  import_node_fs164 = require("node:fs");
141157
141164
  import_node_path165 = __toESM(require("node:path"), 1);
141158
141165
  init_swift_compiler_digest();
@@ -141161,7 +141168,7 @@ var init_nitro_compiler_digest = __esm({
141161
141168
 
141162
141169
  // src/nitro-superset-inputs.ts
141163
141170
  async function nitroSupersetInputs(options2) {
141164
- const resolve15 = (0, import_node_module24.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
141171
+ const resolve15 = (0, import_node_module23.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
141165
141172
  const pin2 = swiftNativePin();
141166
141173
  const inputs2 = {
141167
141174
  configuration: options2.configuration,
@@ -141178,12 +141185,12 @@ async function nitroSupersetInputs(options2) {
141178
141185
  inputs2[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
141179
141186
  return inputs2;
141180
141187
  }
141181
- var import_node_fs165, import_node_module24, import_node_path166, packageVersion;
141188
+ var import_node_fs165, import_node_module23, import_node_path166, packageVersion;
141182
141189
  var init_nitro_superset_inputs = __esm({
141183
141190
  "src/nitro-superset-inputs.ts"() {
141184
141191
  "use strict";
141185
141192
  import_node_fs165 = require("node:fs");
141186
- import_node_module24 = require("node:module");
141193
+ import_node_module23 = require("node:module");
141187
141194
  import_node_path166 = require("node:path");
141188
141195
  init_package_tree_digest();
141189
141196
  init_swift_native_pin();
@@ -141290,7 +141297,7 @@ var init_nitro_superset = __esm({
141290
141297
  init_nitroContract();
141291
141298
  init_swift_standin_digest();
141292
141299
  NITRO_SUPERSET_ENTRY_NAME = "superset";
141293
- NITRO_COMPILER_DIGEST = true ? "9dee7335ccf0b0e3f2015208d1542301fa24d16f960a1f550837dc44f8d7fb94" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141300
+ NITRO_COMPILER_DIGEST = true ? "b0c420cd284cebdbc1131ebcbd442b5e7e67c7636e380761381d183362fd120b" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141294
141301
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
141295
141302
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
141296
141303
  published3 = /* @__PURE__ */ new Map();
@@ -141387,8 +141394,8 @@ async function buildNitroBundle(appRoot, configuration, moduleRoot, shared = tru
141387
141394
  assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
141388
141395
  };
141389
141396
  }
141390
- function compiledModuleRequestHandler(label, compile2, isAvailable) {
141391
- const openPreparations2 = new NativePreparationReceipts();
141397
+ function compiledModuleRequestHandler(label, compile2, options2) {
141398
+ const preparations = new NativePreparation();
141392
141399
  return async (req, res) => {
141393
141400
  const url = new URL(req.url ?? "/", "http://localhost");
141394
141401
  const remote = req.socket.remoteAddress?.replace(/^::ffff:/, "");
@@ -141411,30 +141418,20 @@ function compiledModuleRequestHandler(label, compile2, isAvailable) {
141411
141418
  try {
141412
141419
  const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
141413
141420
  const app = import_node_fs166.default.realpathSync(root);
141414
- const assetOrigin = `http://${host2}`;
141415
141421
  const key2 = `${host2}\0${app}\0${iosTarget ?? ""}\0${url.searchParams.get("configuration") ?? ""}`;
141416
- const prepared = openPreparations2.take(
141417
- key2,
141418
- url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
141419
- );
141420
- if (prepared) {
141421
- res.writeHead(200, {
141422
- "Content-Type": "application/json",
141423
- "Cache-Control": "no-store"
141424
- });
141425
- res.end(JSON.stringify(prepared.value));
141426
- return;
141427
- }
141428
- const token = url.searchParams.get(NATIVE_PREPARE_QUERY_PARAM);
141429
- const metadata = await openPreparations2.prepare(
141430
- key2,
141422
+ const assetOrigin = `http://${host2}`;
141423
+ const build3 = () => compile2(app, assetOrigin, iosTarget, url.searchParams);
141424
+ const metadata = await preparations.resolve(
141431
141425
  app,
141432
- token,
141433
- async () => (await compile2(app, assetOrigin, iosTarget, url.searchParams))?.metadata ?? null,
141434
- isAvailable && ((metadata2) => metadata2 === null || isAvailable(assetOrigin, metadata2))
141426
+ key2,
141427
+ url.searchParams,
141428
+ async () => {
141429
+ const built2 = await (options2?.configuredNativeSources ? withConfiguredNativeSources(app, build3) : build3());
141430
+ return built2?.metadata ?? null;
141431
+ },
141432
+ (metadata2) => metadata2 === null || (options2?.reusable?.(assetOrigin, metadata2) ?? true)
141435
141433
  );
141436
141434
  if (res.destroyed) return;
141437
- openPreparations2.store(key2, token, metadata);
141438
141435
  res.writeHead(200, {
141439
141436
  "Content-Type": "application/json",
141440
141437
  "Cache-Control": "no-store"
@@ -141453,11 +141450,11 @@ var init_nitro_bundle = __esm({
141453
141450
  "use strict";
141454
141451
  import_node_fs166 = __toESM(require("node:fs"), 1);
141455
141452
  import_node_path167 = __toESM(require("node:path"), 1);
141453
+ init_app_config();
141456
141454
  init_backend_origin();
141457
141455
  init_expo_native_workspace();
141458
141456
  init_native_app_identity_project();
141459
141457
  init_native_preparation();
141460
- init_nativePreparationContract();
141461
141458
  init_nitro_app_providers();
141462
141459
  init_nitro_compile();
141463
141460
  init_swift_distribution();
@@ -141472,7 +141469,10 @@ var init_nitro_bundle = __esm({
141472
141469
  throw new Error("Nitro compilation needs configuration=Debug or Release");
141473
141470
  return compileNitroApp(root, origin, configuration, void 0, true, iosTarget);
141474
141471
  },
141475
- (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
141472
+ {
141473
+ configuredNativeSources: true,
141474
+ reusable: (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
141475
+ }
141476
141476
  );
141477
141477
  }
141478
141478
  });
@@ -141485,7 +141485,7 @@ __export(expo_widgets_bundle_exports, {
141485
141485
  handleExpoWidgetsRequest: () => handleExpoWidgetsRequest
141486
141486
  });
141487
141487
  async function buildExpoWidgetsBundle(appRoot, origin = "") {
141488
- const require4 = (0, import_node_module25.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
141488
+ const require4 = (0, import_node_module24.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
141489
141489
  let manifest;
141490
141490
  try {
141491
141491
  manifest = require4.resolve("expo-widgets/package.json");
@@ -141496,14 +141496,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
141496
141496
  }
141497
141497
  const packageDir = import_node_path168.default.dirname(manifest);
141498
141498
  const runtimeBundle = await withSwiftRootLock(
141499
- import_node_path168.default.join(await import_promises20.default.realpath(packageDir), "bundle"),
141499
+ import_node_path168.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
141500
141500
  async () => {
141501
141501
  await (0, import_node_util22.promisify)(import_node_child_process76.execFile)(
141502
141502
  process.env.NODE_BINARY || "node",
141503
141503
  [import_node_path168.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
141504
141504
  { cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
141505
141505
  );
141506
- return import_promises20.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
141506
+ return import_promises19.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
141507
141507
  }
141508
141508
  );
141509
141509
  const catalog = await stageExpoWidgetAssets(appRoot, origin);
@@ -141514,13 +141514,13 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
141514
141514
  }
141515
141515
  };
141516
141516
  }
141517
- var import_node_child_process76, import_promises20, import_node_module25, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
141517
+ var import_node_child_process76, import_promises19, import_node_module24, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
141518
141518
  var init_expo_widgets_bundle = __esm({
141519
141519
  "src/expo-widgets-bundle.ts"() {
141520
141520
  "use strict";
141521
141521
  import_node_child_process76 = require("node:child_process");
141522
- import_promises20 = __toESM(require("node:fs/promises"), 1);
141523
- import_node_module25 = require("node:module");
141522
+ import_promises19 = __toESM(require("node:fs/promises"), 1);
141523
+ import_node_module24 = require("node:module");
141524
141524
  import_node_path168 = __toESM(require("node:path"), 1);
141525
141525
  import_node_util22 = require("node:util");
141526
141526
  init_expo_widget_assets();
@@ -141531,9 +141531,11 @@ var init_expo_widgets_bundle = __esm({
141531
141531
  handleExpoWidgetsRequest = compiledModuleRequestHandler(
141532
141532
  "Expo widget extension",
141533
141533
  buildExpoWidgetsBundle,
141534
- (origin, { images }) => Object.values(images).every(
141535
- (variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
141536
- )
141534
+ {
141535
+ reusable: (origin, { images }) => Object.values(images).every(
141536
+ (variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
141537
+ )
141538
+ }
141537
141539
  );
141538
141540
  }
141539
141541
  });
@@ -142173,7 +142175,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
142173
142175
  const packagePath = import_node_path169.default.join(
142174
142176
  swiftCacheDir(),
142175
142177
  "peach-one-sdk-swift",
142176
- (0, import_node_crypto99.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
142178
+ (0, import_node_crypto98.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
142177
142179
  "sdk"
142178
142180
  );
142179
142181
  const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
@@ -142220,11 +142222,11 @@ async function buildOneSDKBundle(appRoot) {
142220
142222
  assets: await compiledModuleAssets(compiled.artifact)
142221
142223
  };
142222
142224
  }
142223
- var import_node_crypto99, import_node_fs167, import_node_path169, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
142225
+ var import_node_crypto98, import_node_fs167, import_node_path169, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
142224
142226
  var init_one_sdk_bundle = __esm({
142225
142227
  "src/one-sdk-bundle.ts"() {
142226
142228
  "use strict";
142227
- import_node_crypto99 = require("node:crypto");
142229
+ import_node_crypto98 = require("node:crypto");
142228
142230
  import_node_fs167 = __toESM(require("node:fs"), 1);
142229
142231
  import_node_path169 = __toESM(require("node:path"), 1);
142230
142232
  init_expo_native_workspace();
@@ -142241,7 +142243,8 @@ var init_one_sdk_bundle = __esm({
142241
142243
  ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
142242
142244
  handleOneSDKRequest = compiledModuleRequestHandler(
142243
142245
  "One SDK",
142244
- (root, origin) => compileOneSDKApp(root, origin)
142246
+ (root, origin) => compileOneSDKApp(root, origin),
142247
+ { configuredNativeSources: true }
142245
142248
  );
142246
142249
  }
142247
142250
  });
@@ -142303,7 +142306,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
142303
142306
  const { artifact, collection } = await compileTurboModule({
142304
142307
  appRoot,
142305
142308
  reactNativeRoot: import_node_path170.default.dirname(
142306
- (0, import_node_module26.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
142309
+ (0, import_node_module25.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
142307
142310
  "react-native/package.json"
142308
142311
  )
142309
142312
  ),
@@ -142341,11 +142344,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
142341
142344
  assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
142342
142345
  };
142343
142346
  }
142344
- var import_node_module26, import_node_path170, TURBO_ROUTE, handleTurboRequest;
142347
+ var import_node_module25, import_node_path170, TURBO_ROUTE, handleTurboRequest;
142345
142348
  var init_turbo_bundle = __esm({
142346
142349
  "src/turbo-bundle.ts"() {
142347
142350
  "use strict";
142348
- import_node_module26 = require("node:module");
142351
+ import_node_module25 = require("node:module");
142349
142352
  import_node_path170 = __toESM(require("node:path"), 1);
142350
142353
  init_app_project();
142351
142354
  init_app_config();
@@ -142363,7 +142366,10 @@ var init_turbo_bundle = __esm({
142363
142366
  handleTurboRequest = compiledModuleRequestHandler(
142364
142367
  "TurboModule",
142365
142368
  (root, origin, iosTarget) => compileTurboApp(root, origin, void 0, iosTarget),
142366
- (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
142369
+ {
142370
+ configuredNativeSources: true,
142371
+ reusable: (origin, { unavailable: unavailable2, url, hash }) => !unavailable2?.length && swiftArtifactIsAvailable(origin, url, hash)
142372
+ }
142367
142373
  );
142368
142374
  }
142369
142375
  });
@@ -142410,7 +142416,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
142410
142416
  async function resolveAndroidModules(appRoot) {
142411
142417
  let autolinker;
142412
142418
  try {
142413
- autolinker = (0, import_node_module27.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
142419
+ autolinker = (0, import_node_module26.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
142414
142420
  "expo-modules-autolinking/package.json"
142415
142421
  );
142416
142422
  } catch (error) {
@@ -142474,12 +142480,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
142474
142480
  }
142475
142481
  return linked;
142476
142482
  }
142477
- var import_node_fs168, import_node_module27, import_node_path171, resolving;
142483
+ var import_node_fs168, import_node_module26, import_node_path171, resolving;
142478
142484
  var init_android_autolinking = __esm({
142479
142485
  "src/android-autolinking.ts"() {
142480
142486
  "use strict";
142481
142487
  import_node_fs168 = __toESM(require("node:fs"), 1);
142482
- import_node_module27 = require("node:module");
142488
+ import_node_module26 = require("node:module");
142483
142489
  import_node_path171 = __toESM(require("node:path"), 1);
142484
142490
  init_androidAutolinkingContract();
142485
142491
  init_autolinker_process();
@@ -142910,7 +142916,7 @@ function writeSharedDesktopAuthSession(session) {
142910
142916
  validatedAt: session.validatedAt ?? same?.validatedAt,
142911
142917
  accountId: session.accountId?.trim() || same?.accountId
142912
142918
  };
142913
- const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto100.randomUUID)()}.tmp`;
142919
+ const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto99.randomUUID)()}.tmp`;
142914
142920
  try {
142915
142921
  (0, import_node_fs171.writeFileSync)(temporary, JSON.stringify(normalized, null, 2) + "\n", {
142916
142922
  mode: 384,
@@ -142962,11 +142968,11 @@ async function refreshSharedDesktopAuthSession(originOverride) {
142962
142968
  return readSharedDesktopAuthSession();
142963
142969
  }
142964
142970
  }
142965
- var import_node_crypto100, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
142971
+ var import_node_crypto99, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
142966
142972
  var init_shared_session = __esm({
142967
142973
  "src/auth/shared-session.ts"() {
142968
142974
  "use strict";
142969
- import_node_crypto100 = require("node:crypto");
142975
+ import_node_crypto99 = require("node:crypto");
142970
142976
  import_node_fs171 = require("node:fs");
142971
142977
  import_node_path174 = require("node:path");
142972
142978
  init_home_paths();
@@ -143007,7 +143013,7 @@ var init_run_rnx = __esm({
143007
143013
  // cli/secure-file.ts
143008
143014
  function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
143009
143015
  (0, import_node_fs172.mkdirSync)((0, import_node_path175.dirname)(filepath), { recursive: true });
143010
- const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto101.randomUUID)()}`;
143016
+ const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto100.randomUUID)()}`;
143011
143017
  let descriptor = null;
143012
143018
  try {
143013
143019
  descriptor = (0, import_node_fs172.openSync)(temporary, "wx", 384);
@@ -143024,11 +143030,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
143024
143030
  throw error;
143025
143031
  }
143026
143032
  }
143027
- var import_node_crypto101, import_node_fs172, import_node_path175;
143033
+ var import_node_crypto100, import_node_fs172, import_node_path175;
143028
143034
  var init_secure_file = __esm({
143029
143035
  "cli/secure-file.ts"() {
143030
143036
  "use strict";
143031
- import_node_crypto101 = require("node:crypto");
143037
+ import_node_crypto100 = require("node:crypto");
143032
143038
  import_node_fs172 = require("node:fs");
143033
143039
  import_node_path175 = require("node:path");
143034
143040
  }
@@ -145537,7 +145543,7 @@ function projectSessionFile() {
145537
145543
  }
145538
145544
  dir = parent;
145539
145545
  }
145540
- const key2 = (0, import_node_crypto102.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
145546
+ const key2 = (0, import_node_crypto101.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
145541
145547
  return (0, import_node_path177.join)(rnxHomeDir(), "remote-sessions", `${key2}.json`);
145542
145548
  }
145543
145549
  function readCloudSession() {
@@ -145551,11 +145557,11 @@ function readCloudSession() {
145551
145557
  }
145552
145558
  return parseCloudSession(saved.session);
145553
145559
  }
145554
- var import_node_crypto102, import_node_fs174, import_node_path177, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
145560
+ var import_node_crypto101, import_node_fs174, import_node_path177, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
145555
145561
  var init_cloud_session = __esm({
145556
145562
  "cli/cloud-session.ts"() {
145557
145563
  "use strict";
145558
- import_node_crypto102 = require("node:crypto");
145564
+ import_node_crypto101 = require("node:crypto");
145559
145565
  import_node_fs174 = require("node:fs");
145560
145566
  import_node_path177 = require("node:path");
145561
145567
  init_backend_origin();
@@ -146382,7 +146388,7 @@ function listMetroAssetDest(assetsPath) {
146382
146388
  return { directory: directory2, files: files2, truncated };
146383
146389
  }
146384
146390
  function metroDescriptorHash(scaleBytes) {
146385
- const hasher = (0, import_node_crypto103.createHash)("md5");
146391
+ const hasher = (0, import_node_crypto102.createHash)("md5");
146386
146392
  for (const bytes of scaleBytes) hasher.update(bytes);
146387
146393
  return hasher.digest("hex");
146388
146394
  }
@@ -146411,7 +146417,7 @@ function distinctByContent(directory2, options2) {
146411
146417
  } catch {
146412
146418
  continue;
146413
146419
  }
146414
- const digest3 = (0, import_node_crypto103.createHash)("md5").update(bytes).digest("hex");
146420
+ const digest3 = (0, import_node_crypto102.createHash)("md5").update(bytes).digest("hex");
146415
146421
  if (!byContent.has(digest3)) byContent.set(digest3, relative6);
146416
146422
  }
146417
146423
  return [...byContent.values()];
@@ -146459,7 +146465,7 @@ function placeMetroDescriptor(listing, descriptor) {
146459
146465
  continue;
146460
146466
  }
146461
146467
  const identical = fileHashes2 ? bytes.every((file, index) => {
146462
- const digest3 = (0, import_node_crypto103.createHash)("md5").update(file).digest("hex");
146468
+ const digest3 = (0, import_node_crypto102.createHash)("md5").update(file).digest("hex");
146463
146469
  return descriptor.scales.some(
146464
146470
  (scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
146465
146471
  );
@@ -146484,7 +146490,7 @@ function unverifiedContentKey(dest, fileDigests2) {
146484
146490
  const file = (0, import_node_path178.join)(dest.directory, relative6);
146485
146491
  let digest3 = fileDigests2.get(file);
146486
146492
  if (digest3 === void 0) {
146487
- digest3 = (0, import_node_crypto103.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
146493
+ digest3 = (0, import_node_crypto102.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
146488
146494
  fileDigests2.set(file, digest3);
146489
146495
  }
146490
146496
  return [scale, digest3];
@@ -146639,14 +146645,14 @@ async function producePreviewArtifact(bundlePath) {
146639
146645
  prepared.code
146640
146646
  );
146641
146647
  const bytes = Buffer.from(annotated, "utf8");
146642
- const sha2565 = (0, import_node_crypto103.createHash)("sha256").update(bytes).digest("hex");
146648
+ const sha2565 = (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex");
146643
146649
  return {
146644
146650
  bytes,
146645
146651
  sha256: sha2565,
146646
146652
  minified: false,
146647
146653
  receipt: {
146648
146654
  source: {
146649
- sha256: (0, import_node_crypto103.createHash)("sha256").update(prepared.source).digest("hex"),
146655
+ sha256: (0, import_node_crypto102.createHash)("sha256").update(prepared.source).digest("hex"),
146650
146656
  bytes: Buffer.byteLength(prepared.source, "utf8")
146651
146657
  },
146652
146658
  artifact: { sha256: sha2565, bytes: bytes.byteLength }
@@ -146802,7 +146808,7 @@ async function produceArtifact(prepared, maxBytes, command) {
146802
146808
  }
146803
146809
  return {
146804
146810
  bytes,
146805
- sha256: (0, import_node_crypto103.createHash)("sha256").update(bytes).digest("hex"),
146811
+ sha256: (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex"),
146806
146812
  receipt: artifact.receipt,
146807
146813
  assetsDirectory: prepared.dest?.directory ?? null,
146808
146814
  warnings
@@ -147315,11 +147321,11 @@ async function closeCloudSession(session) {
147315
147321
  throw responseError(response.status, text7);
147316
147322
  }
147317
147323
  }
147318
- var import_node_crypto103, import_node_fs175, import_node_path178, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
147324
+ var import_node_crypto102, import_node_fs175, import_node_path178, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
147319
147325
  var init_cloud_client = __esm({
147320
147326
  "cli/cloud-client.ts"() {
147321
147327
  "use strict";
147322
- import_node_crypto103 = require("node:crypto");
147328
+ import_node_crypto102 = require("node:crypto");
147323
147329
  import_node_fs175 = require("node:fs");
147324
147330
  import_node_path178 = require("node:path");
147325
147331
  import_node_vm = require("node:vm");
@@ -147390,7 +147396,7 @@ var init_cloud_client = __esm({
147390
147396
  const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
147391
147397
  const agent = commandAgent(command);
147392
147398
  const body = {
147393
- id: (0, import_node_crypto103.randomUUID)(),
147399
+ id: (0, import_node_crypto102.randomUUID)(),
147394
147400
  claimId: this.session.claimId,
147395
147401
  command: cloudCommand(agent ? { ...command, agent } : command)
147396
147402
  };
@@ -147460,7 +147466,7 @@ var init_cloud_client = __esm({
147460
147466
  plane = "cloud";
147461
147467
  async send(command, options2) {
147462
147468
  const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
147463
- const id = (0, import_node_crypto103.randomUUID)();
147469
+ const id = (0, import_node_crypto102.randomUUID)();
147464
147470
  const agent = commandAgent(command);
147465
147471
  const payload = cloudCommand(agent ? { ...command, agent } : command);
147466
147472
  let response;
@@ -147636,13 +147642,6 @@ function unrefTimer(timer) {
147636
147642
  timer.unref();
147637
147643
  }
147638
147644
  }
147639
- function withRequestNativeSources(req, serve) {
147640
- const root = new URL(req.url ?? "/", "http://localhost").searchParams.get("root");
147641
- if (!root || !import_path5.default.isAbsolute(root)) return serve();
147642
- return Promise.resolve().then(() => (init_app_config(), app_config_exports)).then(
147643
- ({ withConfiguredNativeSources: withConfiguredNativeSources2 }) => withConfiguredNativeSources2(root, serve)
147644
- );
147645
- }
147646
147645
  var import_child_process5, import_crypto2, import_fs6, import_http4, import_os3, import_path5, import_ws3, SOOTSIM_CROSS_ORIGIN_EMBEDDER_POLICY, EXPO_WIDGETS_ROUTE2, WIDGET_EXTENSION_ROUTE2, NITRO_ROUTE2, ONE_SDK_ROUTE2, TURBO_ROUTE2, FORCE_CLOSE_GRACE_MS, FORCE_CLOSE_TERMINATE_MS, MAX_RETAINED_DISCONNECTS, DAEMON_HEARTBEAT_INTERVAL_MS, DEFAULT_RUNTIME_UPDATE_INTERVAL_MS, RUNTIME_UPDATE_INTERVAL_ENV, HTTP_MIME_TYPES, CAMERA_FIXTURE_ROUTE, CAMERA_FIXTURE_NAME_RE, SootSimBridgeHost;
147647
147646
  var init_bridge_host = __esm({
147648
147647
  "src/host/bridge-host.ts"() {
@@ -148754,21 +148753,15 @@ var init_bridge_host = __esm({
148754
148753
  return;
148755
148754
  }
148756
148755
  if (route === ONE_SDK_ROUTE2) {
148757
- void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(
148758
- ({ handleOneSDKRequest: handleOneSDKRequest2 }) => withRequestNativeSources(req, () => handleOneSDKRequest2(req, res))
148759
- ).catch(failLazyRoute);
148756
+ void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(({ handleOneSDKRequest: handleOneSDKRequest2 }) => handleOneSDKRequest2(req, res)).catch(failLazyRoute);
148760
148757
  return;
148761
148758
  }
148762
148759
  if (route === NITRO_ROUTE2) {
148763
- void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(
148764
- ({ handleNitroRequest: handleNitroRequest2 }) => withRequestNativeSources(req, () => handleNitroRequest2(req, res))
148765
- ).catch(failLazyRoute);
148760
+ void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(({ handleNitroRequest: handleNitroRequest2 }) => handleNitroRequest2(req, res)).catch(failLazyRoute);
148766
148761
  return;
148767
148762
  }
148768
148763
  if (route === TURBO_ROUTE2) {
148769
- void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(
148770
- ({ handleTurboRequest: handleTurboRequest2 }) => withRequestNativeSources(req, () => handleTurboRequest2(req, res))
148771
- ).catch(failLazyRoute);
148764
+ void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(({ handleTurboRequest: handleTurboRequest2 }) => handleTurboRequest2(req, res)).catch(failLazyRoute);
148772
148765
  return;
148773
148766
  }
148774
148767
  if (route.startsWith(SWIFT_PACKAGE_PATH) || route === KOTLIN_PACKAGE_PATH || route === ONE_WIDGET_PATH) {
@@ -148778,9 +148771,7 @@ var init_bridge_host = __esm({
148778
148771
  return;
148779
148772
  }
148780
148773
  if (req.url?.startsWith("/__peach/expo-swift") || req.url?.startsWith("/__peach/swift")) {
148781
- void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(
148782
- ({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => withRequestNativeSources(req, () => handleExpoSwiftRequest2(req, res))
148783
- ).then((handled) => {
148774
+ void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => handleExpoSwiftRequest2(req, res)).then((handled) => {
148784
148775
  if (!handled) {
148785
148776
  res.writeHead(404);
148786
148777
  res.end("Swift artifact not found");
@@ -151536,17 +151527,17 @@ function splashImageUrls(spec) {
151536
151527
  if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
151537
151528
  return [...urls];
151538
151529
  }
151539
- var import_node_crypto104, import_node_module28, require2;
151530
+ var import_node_crypto103, import_node_module27, require2;
151540
151531
  var init_app_splash = __esm({
151541
151532
  "cli/app-splash.ts"() {
151542
151533
  "use strict";
151543
- import_node_crypto104 = require("node:crypto");
151544
- import_node_module28 = require("node:module");
151534
+ import_node_crypto103 = require("node:crypto");
151535
+ import_node_module27 = require("node:module");
151545
151536
  init_backend_origin();
151546
151537
  init_cli_runtime();
151547
151538
  init_native_firebase_config();
151548
151539
  init_app_project();
151549
- require2 = (0, import_node_module28.createRequire)(__sootsim_import_meta_url);
151540
+ require2 = (0, import_node_module27.createRequire)(__sootsim_import_meta_url);
151550
151541
  }
151551
151542
  });
151552
151543
 
@@ -151594,7 +151585,7 @@ function extractAppBinaryBundle(binary2) {
151594
151585
  );
151595
151586
  const sidecar = import_node_path183.default.posix.dirname(manifestEntry);
151596
151587
  const appRoot = import_node_path183.default.posix.dirname(sidecar);
151597
- const digest3 = (0, import_node_crypto105.createHash)("sha256").update(import_node_fs180.default.readFileSync(file)).digest("hex");
151588
+ const digest3 = (0, import_node_crypto104.createHash)("sha256").update(import_node_fs180.default.readFileSync(file)).digest("hex");
151598
151589
  const out = import_node_path183.default.join(cacheDir(), "app-binaries", digest3);
151599
151590
  const bundlePath = import_node_path183.default.join(out, "main.js");
151600
151591
  const extracted = import_node_path183.default.join(out, "extracted");
@@ -151612,7 +151603,7 @@ function extractAppBinaryBundle(binary2) {
151612
151603
  const bundle = (0, import_node_zlib10.brotliDecompressSync)(
151613
151604
  import_node_fs180.default.readFileSync(import_node_path183.default.join(extracted, sidecar, PEACH_SIDECAR_BUNDLE))
151614
151605
  );
151615
- if ((0, import_node_crypto105.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
151606
+ if ((0, import_node_crypto104.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
151616
151607
  throw new Error(`${binary2}: the peach sidecar bundle does not match its manifest`);
151617
151608
  const assets2 = manifest.platform === "ios" ? import_node_path183.default.join(extracted, appRoot, "assets") : import_node_path183.default.join(extracted, sidecar, PEACH_SIDECAR_ASSETS);
151618
151609
  if (import_node_fs180.default.existsSync(assets2)) import_node_fs180.default.renameSync(assets2, import_node_path183.default.join(out, "assets"));
@@ -151632,12 +151623,12 @@ function extractAppBinaryBundle(binary2) {
151632
151623
  );
151633
151624
  return { bundlePath, platform: platform3 };
151634
151625
  }
151635
- var import_node_child_process78, import_node_crypto105, import_node_fs180, import_node_path183, import_node_zlib10;
151626
+ var import_node_child_process78, import_node_crypto104, import_node_fs180, import_node_path183, import_node_zlib10;
151636
151627
  var init_binary_sidecar = __esm({
151637
151628
  "cli/binary-sidecar.ts"() {
151638
151629
  "use strict";
151639
151630
  import_node_child_process78 = require("node:child_process");
151640
- import_node_crypto105 = require("node:crypto");
151631
+ import_node_crypto104 = require("node:crypto");
151641
151632
  import_node_fs180 = __toESM(require("node:fs"), 1);
151642
151633
  import_node_path183 = __toESM(require("node:path"), 1);
151643
151634
  import_node_zlib10 = require("node:zlib");
@@ -152473,7 +152464,7 @@ var init_core = __esm({
152473
152464
  // cli/output-redaction.ts
152474
152465
  function mask(value) {
152475
152466
  if (MASKED.test(value)) return value;
152476
- return `<redacted:${(0, import_node_crypto106.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
152467
+ return `<redacted:${(0, import_node_crypto105.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
152477
152468
  }
152478
152469
  function maskQuoted(quoted2) {
152479
152470
  return `${quoted2[0]}${mask(quoted2.slice(1, -1))}${quoted2[0]}`;
@@ -152595,11 +152586,11 @@ function redactText(text7, configurationOnly, decodedString = false) {
152595
152586
  (line, prefix, name3, value) => SECRET_NAME.test(name3) ? `${prefix}${mask(value)}` : line
152596
152587
  ).replace(EMAIL, mask).replace(OPAQUE_ID, mask);
152597
152588
  }
152598
- var import_node_crypto106, import_node_util23, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
152589
+ var import_node_crypto105, import_node_util23, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
152599
152590
  var init_output_redaction = __esm({
152600
152591
  "cli/output-redaction.ts"() {
152601
152592
  "use strict";
152602
- import_node_crypto106 = require("node:crypto");
152593
+ import_node_crypto105 = require("node:crypto");
152603
152594
  import_node_util23 = require("node:util");
152604
152595
  init_config();
152605
152596
  SECRET_NAME = /^(?:[\w-]*(?:api[-_]?key|token|secret|password|passwd|authorization|cookie|signature|credential)s?|auth|sig|email|uid|[\w-]*(?:user|account|local|device|installation|client|app|project|sender|measurement|tenant)[-_]?id)$/i;
@@ -153102,7 +153093,7 @@ function macDesktopLaunchHome(bridgePort) {
153102
153093
  const dev = readDevBridgeLockfiles().find(
153103
153094
  (lock) => lock.bridgePort === bridgePort && isDevBridgeLockfileFresh(lock)
153104
153095
  );
153105
- const homeKey = (0, import_node_crypto107.createHash)("sha256").update(home).digest("hex");
153096
+ const homeKey = (0, import_node_crypto106.createHash)("sha256").update(home).digest("hex");
153106
153097
  const dir = (0, import_path7.join)((0, import_os4.tmpdir)(), "peach-desktop-launch", homeKey, String(bridgePort));
153107
153098
  (0, import_fs8.mkdirSync)(dir, { recursive: true });
153108
153099
  if ((0, import_fs8.existsSync)(home)) {
@@ -153208,13 +153199,13 @@ function buildMacLaunchUrl(url, opts, nativeApp = false) {
153208
153199
  }
153209
153200
  return deepLink.toString();
153210
153201
  }
153211
- var import_child_process6, import_fs8, import_node_crypto107, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
153202
+ var import_child_process6, import_fs8, import_node_crypto106, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
153212
153203
  var init_desktop_companion = __esm({
153213
153204
  "cli/desktop-companion.ts"() {
153214
153205
  "use strict";
153215
153206
  import_child_process6 = require("child_process");
153216
153207
  import_fs8 = require("fs");
153217
- import_node_crypto107 = require("node:crypto");
153208
+ import_node_crypto106 = require("node:crypto");
153218
153209
  import_os4 = require("os");
153219
153210
  import_path7 = require("path");
153220
153211
  import_url2 = require("url");
@@ -153943,11 +153934,11 @@ function trackCliDiagnostic(diagnostic) {
153943
153934
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
153944
153935
  });
153945
153936
  }
153946
- var import_node_crypto108, import_node_fs181, import_node_os34, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
153937
+ var import_node_crypto107, import_node_fs181, import_node_os34, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
153947
153938
  var init_telemetry = __esm({
153948
153939
  "cli/telemetry.ts"() {
153949
153940
  "use strict";
153950
- import_node_crypto108 = require("node:crypto");
153941
+ import_node_crypto107 = require("node:crypto");
153951
153942
  import_node_fs181 = require("node:fs");
153952
153943
  import_node_os34 = require("node:os");
153953
153944
  init_event_identity();
@@ -159696,18 +159687,18 @@ function stageAppBundleResources(appDir, origin, iosTarget, environment) {
159696
159687
  const content = bytes[index];
159697
159688
  result[base2] = {
159698
159689
  uri: urls[index],
159699
- sha256: (0, import_node_crypto109.createHash)("sha256").update(content).digest("hex"),
159690
+ sha256: (0, import_node_crypto108.createHash)("sha256").update(content).digest("hex"),
159700
159691
  contentType: preferredMimeType(base2) ?? "application/octet-stream",
159701
159692
  byteLength: content.byteLength
159702
159693
  };
159703
159694
  });
159704
159695
  return result;
159705
159696
  }
159706
- var import_node_crypto109, import_node_fs184, import_node_path185;
159697
+ var import_node_crypto108, import_node_fs184, import_node_path185;
159707
159698
  var init_app_bundle_resources = __esm({
159708
159699
  "cli/app-bundle-resources.ts"() {
159709
159700
  "use strict";
159710
- import_node_crypto109 = require("node:crypto");
159701
+ import_node_crypto108 = require("node:crypto");
159711
159702
  import_node_fs184 = __toESM(require("node:fs"), 1);
159712
159703
  import_node_path185 = __toESM(require("node:path"), 1);
159713
159704
  init_uttype_mime();
@@ -159811,7 +159802,7 @@ var init_material_symbol_fonts = __esm({
159811
159802
 
159812
159803
  // cli/material-symbol-fonts.ts
159813
159804
  function materialSymbolFontPaths(appDir) {
159814
- const appRequire = (0, import_node_module29.createRequire)(import_node_path186.default.join(appDir, "package.json"));
159805
+ const appRequire = (0, import_node_module28.createRequire)(import_node_path186.default.join(appDir, "package.json"));
159815
159806
  let nativeManifest;
159816
159807
  try {
159817
159808
  nativeManifest = appRequire.resolve("@react-navigation/native/package.json");
@@ -159822,7 +159813,7 @@ function materialSymbolFontPaths(appDir) {
159822
159813
  const dependencies = nativePackage && typeof nativePackage === "object" ? Reflect.get(nativePackage, "dependencies") : null;
159823
159814
  if (!dependencies || typeof dependencies !== "object" || !Reflect.has(dependencies, "@react-navigation/material-symbols"))
159824
159815
  return [];
159825
- const nativeRequire = (0, import_node_module29.createRequire)(nativeManifest);
159816
+ const nativeRequire = (0, import_node_module28.createRequire)(nativeManifest);
159826
159817
  const symbolsDir = import_node_path186.default.dirname(
159827
159818
  nativeRequire.resolve("@react-navigation/material-symbols/package.json")
159828
159819
  );
@@ -159845,7 +159836,7 @@ function materialSymbolFontAssets(fontPaths) {
159845
159836
  const directory2 = import_node_path186.default.dirname(selected[0]);
159846
159837
  const codepointsFile = import_node_path186.default.join(directory2, "MaterialSymbols.codepoints");
159847
159838
  const mirroredFile = import_node_path186.default.join(directory2, "MaterialSymbols.mirrored");
159848
- const digest3 = (0, import_node_crypto110.createHash)("md5");
159839
+ const digest3 = (0, import_node_crypto109.createHash)("md5");
159849
159840
  for (const asset of [...selected, codepointsFile, mirroredFile].sort(
159850
159841
  (a, b) => import_node_path186.default.basename(a) < import_node_path186.default.basename(b) ? -1 : import_node_path186.default.basename(a) > import_node_path186.default.basename(b) ? 1 : 0
159851
159842
  )) {
@@ -159857,13 +159848,13 @@ function materialSymbolFontAssets(fontPaths) {
159857
159848
  mirroredPath: mirroredFile
159858
159849
  };
159859
159850
  }
159860
- var import_node_crypto110, import_node_fs185, import_node_module29, import_node_path186;
159851
+ var import_node_crypto109, import_node_fs185, import_node_module28, import_node_path186;
159861
159852
  var init_material_symbol_fonts2 = __esm({
159862
159853
  "cli/material-symbol-fonts.ts"() {
159863
159854
  "use strict";
159864
- import_node_crypto110 = require("node:crypto");
159855
+ import_node_crypto109 = require("node:crypto");
159865
159856
  import_node_fs185 = __toESM(require("node:fs"), 1);
159866
- import_node_module29 = require("node:module");
159857
+ import_node_module28 = require("node:module");
159867
159858
  import_node_path186 = __toESM(require("node:path"), 1);
159868
159859
  init_material_symbol_fonts();
159869
159860
  }
@@ -159912,7 +159903,7 @@ function resolveDeclaredFontPath(appDir, declared) {
159912
159903
  let resolved = import_node_path187.default.resolve(appDir, declared);
159913
159904
  if (!import_node_fs186.default.existsSync(resolved)) {
159914
159905
  try {
159915
- resolved = (0, import_node_module30.createRequire)(import_node_path187.default.join(appDir, "package.json")).resolve(declared);
159906
+ resolved = (0, import_node_module29.createRequire)(import_node_path187.default.join(appDir, "package.json")).resolve(declared);
159916
159907
  } catch {
159917
159908
  return [];
159918
159909
  }
@@ -160008,7 +159999,7 @@ function discoverNativeLinkedAppFontAssets(opts) {
160008
159999
  if (!relativeRoot.startsWith("..") && !import_node_path187.default.isAbsolute(relativeRoot)) {
160009
160000
  collectFontFiles(root);
160010
160001
  }
160011
- const vectorIconRequire = (0, import_node_module30.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160002
+ const vectorIconRequire = (0, import_node_module29.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160012
160003
  for (const dependencyName of vectorIconDependencies) {
160013
160004
  try {
160014
160005
  const entryPath = vectorIconRequire.resolve(dependencyName);
@@ -160028,7 +160019,7 @@ function discoverNativeLinkedAppFontAssets(opts) {
160028
160019
  try {
160029
160020
  const configPath = import_node_path187.default.join(selectedAppDir, "react-native.config.js");
160030
160021
  if (import_node_fs186.default.statSync(configPath).isFile()) {
160031
- const appConfigRequire = (0, import_node_module30.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160022
+ const appConfigRequire = (0, import_node_module29.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160032
160023
  const rnConfig = appConfigRequire(configPath);
160033
160024
  const assets2 = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
160034
160025
  if (Array.isArray(assets2)) {
@@ -160100,13 +160091,13 @@ function discoverNativeLinkedAppFontAssets(opts) {
160100
160091
  materialSymbols: materialSymbolFontAssets(materialFonts)
160101
160092
  };
160102
160093
  }
160103
- var import_node_crypto111, import_node_fs186, import_node_module30, import_node_path187, require3;
160094
+ var import_node_crypto110, import_node_fs186, import_node_module29, import_node_path187, require3;
160104
160095
  var init_app_fonts = __esm({
160105
160096
  "cli/app-fonts.ts"() {
160106
160097
  "use strict";
160107
- import_node_crypto111 = require("node:crypto");
160098
+ import_node_crypto110 = require("node:crypto");
160108
160099
  import_node_fs186 = __toESM(require("node:fs"), 1);
160109
- import_node_module30 = require("node:module");
160100
+ import_node_module29 = require("node:module");
160110
160101
  import_node_path187 = __toESM(require("node:path"), 1);
160111
160102
  init_cli_runtime();
160112
160103
  init_staged_host_files();
@@ -160115,7 +160106,7 @@ var init_app_fonts = __esm({
160115
160106
  init_xcode_project();
160116
160107
  init_app_project();
160117
160108
  init_material_symbol_fonts2();
160118
- require3 = (0, import_node_module30.createRequire)(__sootsim_import_meta_url);
160109
+ require3 = (0, import_node_module29.createRequire)(__sootsim_import_meta_url);
160119
160110
  }
160120
160111
  });
160121
160112
 
@@ -161324,11 +161315,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
161324
161315
  return import_node_fs188.default.readFileSync(import_node_path189.default.join(search.dest.directory, relative6));
161325
161316
  });
161326
161317
  const verified2 = perFile && hashes ? bytes.every((content, i) => {
161327
- const hash = (0, import_node_crypto112.createHash)("md5").update(content).digest("hex");
161318
+ const hash = (0, import_node_crypto111.createHash)("md5").update(content).digest("hex");
161328
161319
  return descriptor.scales.some(
161329
161320
  (scale, j) => scale === scales[i] && hashes[j] === hash
161330
161321
  );
161331
- }) : scales.length === descriptor.scales.length && (0, import_node_crypto112.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
161322
+ }) : scales.length === descriptor.scales.length && (0, import_node_crypto111.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
161332
161323
  if (!verified2)
161333
161324
  throw new Error(`Metro asset changed while staging: ${descriptor.name}`);
161334
161325
  scales.forEach((scale, i) => {
@@ -161355,11 +161346,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
161355
161346
  });
161356
161347
  stageHostMetroAssets(staged, origin);
161357
161348
  }
161358
- var import_node_crypto112, import_node_fs188, import_node_path189;
161349
+ var import_node_crypto111, import_node_fs188, import_node_path189;
161359
161350
  var init_metro_bundle_assets = __esm({
161360
161351
  "cli/metro-bundle-assets.ts"() {
161361
161352
  "use strict";
161362
- import_node_crypto112 = require("node:crypto");
161353
+ import_node_crypto111 = require("node:crypto");
161363
161354
  import_node_fs188 = __toESM(require("node:fs"), 1);
161364
161355
  import_node_path189 = __toESM(require("node:path"), 1);
161365
161356
  init_metroAssetArtifact();
@@ -161400,7 +161391,7 @@ async function chooseAccount(session, requested, chooseLater) {
161400
161391
  }
161401
161392
  console.log(" which account should remote simulators and boxes bill to?");
161402
161393
  accounts.forEach((account, index) => console.log(` ${index + 1}. ${account.name}`));
161403
- const prompt = (0, import_promises21.createInterface)({ input: process.stdin, output: process.stdout });
161394
+ const prompt = (0, import_promises20.createInterface)({ input: process.stdin, output: process.stdout });
161404
161395
  try {
161405
161396
  for (; ; ) {
161406
161397
  const answer2 = (await prompt.question(` account [1-${accounts.length}]: `)).trim();
@@ -161511,7 +161502,7 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
161511
161502
  ` dev-login not available (${devResult.error}); falling back to browser`
161512
161503
  );
161513
161504
  }
161514
- const state = (0, import_node_crypto113.randomBytes)(16).toString("hex");
161505
+ const state = (0, import_node_crypto112.randomBytes)(16).toString("hex");
161515
161506
  const LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
161516
161507
  const result = await new Promise((resolve15) => {
161517
161508
  let timer;
@@ -161620,13 +161611,13 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
161620
161611
  dev: false
161621
161612
  };
161622
161613
  }
161623
- var import_node_crypto113, import_node_http4, import_promises21, REMOTE_DEFAULT_ORIGIN;
161614
+ var import_node_crypto112, import_node_http4, import_promises20, REMOTE_DEFAULT_ORIGIN;
161624
161615
  var init_login = __esm({
161625
161616
  "cli/commands/login.ts"() {
161626
161617
  "use strict";
161627
- import_node_crypto113 = require("node:crypto");
161618
+ import_node_crypto112 = require("node:crypto");
161628
161619
  import_node_http4 = __toESM(require("node:http"), 1);
161629
- import_promises21 = require("node:readline/promises");
161620
+ import_promises20 = require("node:readline/promises");
161630
161621
  init_shared_session();
161631
161622
  init_backend_origin();
161632
161623
  init_public_brand();
@@ -161834,7 +161825,7 @@ async function requireAccount(commandLabel, options2 = {}, signedInAgain = false
161834
161825
  if (auth.kind === "github") return;
161835
161826
  const header = authHeaderValue(auth);
161836
161827
  const origin = await billingOriginFor(auth);
161837
- const credential = (0, import_node_crypto114.createHash)("sha256").update(`${origin}
161828
+ const credential = (0, import_node_crypto113.createHash)("sha256").update(`${origin}
161838
161829
  ${header}`).digest("hex");
161839
161830
  const check2 = readCheck();
161840
161831
  const known = check2?.credential === credential ? check2 : null;
@@ -161882,11 +161873,11 @@ ${header}`).digest("hex");
161882
161873
  `${name3} could not reach ${origin} to verify your account${status ? ` (${status})` : ""}; connect once and run it again`
161883
161874
  );
161884
161875
  }
161885
- var import_node_crypto114, import_node_fs189, import_node_path190, import_zod4, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
161876
+ var import_node_crypto113, import_node_fs189, import_node_path190, import_zod4, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
161886
161877
  var init_account_gate = __esm({
161887
161878
  "cli/account-gate.ts"() {
161888
161879
  "use strict";
161889
- import_node_crypto114 = require("node:crypto");
161880
+ import_node_crypto113 = require("node:crypto");
161890
161881
  import_node_fs189 = require("node:fs");
161891
161882
  import_node_path190 = __toESM(require("node:path"), 1);
161892
161883
  import_zod4 = require("peachsim/vendor/zod");
@@ -174287,7 +174278,7 @@ function zipSources(bytes, where) {
174287
174278
  return entries2;
174288
174279
  }
174289
174280
  function extract(bytes, where) {
174290
- const key2 = (0, import_node_crypto115.createHash)("sha256").update(bytes).digest("hex");
174281
+ const key2 = (0, import_node_crypto114.createHash)("sha256").update(bytes).digest("hex");
174291
174282
  const cached5 = pending.get(key2);
174292
174283
  if (cached5) return cached5;
174293
174284
  const request = (async () => {
@@ -174398,11 +174389,11 @@ async function kotlinSources2(bytes, where) {
174398
174389
  if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
174399
174390
  return kotlin;
174400
174391
  }
174401
- var import_node_crypto115, import_node_fs195, import_node_os36, import_node_path196, import_node_zlib11, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174392
+ var import_node_crypto114, import_node_fs195, import_node_os36, import_node_path196, import_node_zlib11, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174402
174393
  var init_kotlin_maven_sources = __esm({
174403
174394
  "src/kotlin-maven-sources.ts"() {
174404
174395
  "use strict";
174405
- import_node_crypto115 = require("node:crypto");
174396
+ import_node_crypto114 = require("node:crypto");
174406
174397
  import_node_fs195 = __toESM(require("node:fs"), 1);
174407
174398
  import_node_os36 = __toESM(require("node:os"), 1);
174408
174399
  import_node_path196 = __toESM(require("node:path"), 1);