peachsim 0.1.2611 → 0.1.2612

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 (129) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +1205 -681
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-BKODFARF.mjs → acorn-QO4N4OBM.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-FWUDTM5Y.mjs → chunk-252KNQUF.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-4C3LKD3A.mjs → chunk-3ZTDI2MF.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-3JA6XLP4.mjs → chunk-4JTACUL3.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-NUISME6Y.mjs → chunk-6VWQEI2U.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-CAFNSCPD.mjs → chunk-6ZP7JWNX.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-YFSTB4CX.mjs → chunk-7OAXAYW7.mjs} +4 -4
  33. package/dist-lib/esm-chunks/{chunk-SNMPI3I2.mjs → chunk-BWWPWGZW.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-KOT7HREP.mjs → chunk-GRDRKYB5.mjs} +6 -6
  35. package/dist-lib/esm-chunks/{chunk-LNZNCA7M.mjs → chunk-HEPU5HEE.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-SKW2UNWS.mjs → chunk-HHQHP6NX.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-C4BW35N7.mjs → chunk-HQGPI7FM.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-XSRZQWH5.mjs → chunk-LDYLSTVC.mjs} +5 -5
  39. package/dist-lib/esm-chunks/{chunk-H2JPB73X.mjs → chunk-O5VA25UA.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-CWLKT7TD.mjs → chunk-PDKX5WGD.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-J6N5KKMZ.mjs → chunk-PPDXMRAA.mjs} +6 -6
  42. package/dist-lib/esm-chunks/{chunk-JWA5AIJM.mjs → chunk-THHH7IPK.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-45CENTIY.mjs → chunk-UGPX2JTI.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-4CJMDUKF.mjs → chunk-VAIU3RSQ.mjs} +14 -14
  45. package/dist-lib/esm-chunks/{chunk-SFDNE5S2.mjs → chunk-VM5QGKMB.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-LDV2MZFL.mjs → chunk-WMQA6U5H.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-HWMD7II5.mjs → chunk-WTTIS3AY.mjs} +2 -2
  48. package/dist-lib/esm-chunks/{chunk-A6GNAMLP.mjs → chunk-XPVBWRWY.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-7L5LUPZA.mjs → chunk-YAK7RNDV.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-52XQJZ6O.mjs → chunk-ZRJG25JE.mjs} +3 -3
  51. package/dist-lib/esm-chunks/{metro-layout-parser-BMN3E2RD.mjs → metro-layout-parser-UUA4AJ2Q.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-VMBB763C.mjs → swift-package-prebuilt-EVJIROFN.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-SJ6OZAVA.mjs → swift-sdk-app-module-M5TKMPU6.mjs} +16 -16
  54. package/dist-lib/esm-chunks/{swift-sdk-image-U53EKCZW.mjs → swift-sdk-image-4FST3VAH.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-TQQ33C3G.mjs → swift-sdk-image-producer-4DUU7RUD.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +3 -3
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +1536 -1012
  61. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +676 -171
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +1 -1
  75. package/dist-lib/native-app-identity-project.mjs +15 -15
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +85 -85
  87. package/dist-lib/public-origins-lib.json +76 -65
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +2092 -1629
  95. package/dist-lib/swift-compile.cjs +1 -1
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/package.json +1 -1
  123. package/src/android-gradle-sources.ts +97 -2
  124. package/src/androidGradleContract.ts +11 -0
  125. package/src/gitignore.ts +1 -1
  126. package/src/kotlin-app.ts +37 -4
  127. package/src/kotlin-gradle-library-plan.ts +142 -0
  128. package/src/kotlin-host.ts +32 -3
  129. package/src/kotlin-maven-sources.ts +0 -7
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2611 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2612 | (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;
@@ -273,8 +273,8 @@ function getDefaultPortForProtocol(protocol) {
273
273
  return protocol === "https:" ? 443 : 80;
274
274
  }
275
275
  function isBaseServerUrl(url) {
276
- const path140 = url.pathname || "/";
277
- return (path140 === "/" || path140 === "") && !url.search && !url.hash;
276
+ const path143 = url.pathname || "/";
277
+ return (path143 === "/" || path143 === "") && !url.search && !url.hash;
278
278
  }
279
279
  async function resolvePortViaServerScan(port) {
280
280
  try {
@@ -4687,10 +4687,10 @@ function* nativePackageVersionsWalk(projectRoot) {
4687
4687
  const manifest = yield* readManifest(import_path2.default.join(appRoot, "package.json"));
4688
4688
  if (!manifest) throw new Error("app package.json must contain an object");
4689
4689
  const readInstalledPackage = createInstalledPackageReader();
4690
- const pending = [{ root: appRoot, manifest }];
4690
+ const pending2 = [{ root: appRoot, manifest }];
4691
4691
  const visited = /* @__PURE__ */ new Set();
4692
4692
  const needed = /* @__PURE__ */ new Map();
4693
- for (let next = pending.pop(); next; next = pending.pop()) {
4693
+ for (let next = pending2.pop(); next; next = pending2.pop()) {
4694
4694
  const root = yield* realpath(next.root);
4695
4695
  if (visited.has(root)) continue;
4696
4696
  visited.add(root);
@@ -4710,7 +4710,7 @@ function* nativePackageVersionsWalk(projectRoot) {
4710
4710
  if (!installed) continue;
4711
4711
  if (nativeNames.has(name3) && !needed.has(name3))
4712
4712
  needed.set(name3, (yield* readInstalledPackage(appRoot, name3)) ?? installed);
4713
- pending.push(installed);
4713
+ pending2.push(installed);
4714
4714
  }
4715
4715
  }
4716
4716
  }
@@ -5768,13 +5768,13 @@ function detectPackageManager(root, files2 = nodeRepoFileReader) {
5768
5768
  }
5769
5769
  function scanRepository(root) {
5770
5770
  const directories = [];
5771
- const pending = [{ dir: root, depth: 0 }];
5771
+ const pending2 = [{ dir: root, depth: 0 }];
5772
5772
  let entries2 = 0;
5773
5773
  let cursor = 0;
5774
5774
  let truncated = false;
5775
5775
  let unreadable = 0;
5776
- while (cursor < pending.length && entries2 < 2e5 && directories.length < 1e4) {
5777
- const next = pending[cursor++];
5776
+ while (cursor < pending2.length && entries2 < 2e5 && directories.length < 1e4) {
5777
+ const next = pending2[cursor++];
5778
5778
  if (!next) break;
5779
5779
  directories.push(next.dir);
5780
5780
  let handle;
@@ -5794,7 +5794,7 @@ function scanRepository(root) {
5794
5794
  truncated = true;
5795
5795
  continue;
5796
5796
  }
5797
- pending.push({ dir: (0, import_node_path8.join)(next.dir, entry.name), depth: next.depth + 1 });
5797
+ pending2.push({ dir: (0, import_node_path8.join)(next.dir, entry.name), depth: next.depth + 1 });
5798
5798
  }
5799
5799
  } finally {
5800
5800
  handle.closeSync();
@@ -5802,7 +5802,7 @@ function scanRepository(root) {
5802
5802
  }
5803
5803
  return {
5804
5804
  directories: directories.sort(),
5805
- truncated: truncated || cursor < pending.length || entries2 >= 2e5,
5805
+ truncated: truncated || cursor < pending2.length || entries2 >= 2e5,
5806
5806
  unreadable
5807
5807
  };
5808
5808
  }
@@ -5813,8 +5813,8 @@ function metadataValue(value, key2) {
5813
5813
  if (!value || typeof value !== "object") return void 0;
5814
5814
  return Object.getOwnPropertyDescriptor(value, key2)?.value;
5815
5815
  }
5816
- function readProjectJson(path140, files2 = nodeRepoFileReader) {
5817
- const text7 = readProjectMetadata(path140, files2);
5816
+ function readProjectJson(path143, files2 = nodeRepoFileReader) {
5817
+ const text7 = readProjectMetadata(path143, files2);
5818
5818
  if (text7 === null) return null;
5819
5819
  try {
5820
5820
  const value = JSON.parse(text7);
@@ -5995,7 +5995,7 @@ function globToRegexSource(pattern) {
5995
5995
  if (j < pattern.length) {
5996
5996
  let body = pattern.slice(i + 1, j);
5997
5997
  if (body.startsWith("!")) body = `^${body.slice(1)}`;
5998
- out += `[${body}]`;
5998
+ out += `(?!/)[${body}]`;
5999
5999
  i = j + 1;
6000
6000
  continue;
6001
6001
  }
@@ -6071,16 +6071,16 @@ function createGitignoreMatcher() {
6071
6071
  return matcher;
6072
6072
  },
6073
6073
  test(relativePath2) {
6074
- const { path: path140, isDirectory: isDirectory5 } = normalizePath(relativePath2);
6075
- if (!path140) return { ignored: false, unignored: false };
6076
- const parts = path140.split("/");
6074
+ const { path: path143, isDirectory: isDirectory5 } = normalizePath(relativePath2);
6075
+ if (!path143) return { ignored: false, unignored: false };
6076
+ const parts = path143.split("/");
6077
6077
  let prefix = "";
6078
6078
  for (let i = 0; i < parts.length - 1; i++) {
6079
6079
  prefix = prefix ? `${prefix}/${parts[i]}` : parts[i];
6080
6080
  const parent = matchSingle(prefix, true);
6081
6081
  if (parent.ignored) return { ignored: true, unignored: false };
6082
6082
  }
6083
- return matchSingle(path140, isDirectory5);
6083
+ return matchSingle(path143, isDirectory5);
6084
6084
  },
6085
6085
  ignores(relativePath2) {
6086
6086
  return matcher.test(relativePath2).ignored;
@@ -10620,8 +10620,8 @@ export *
10620
10620
  }`;
10621
10621
  }
10622
10622
  function swiftPackageIdentity(url) {
10623
- const path140 = url.endsWith("/") ? url.slice(0, -1) : url;
10624
- return (path140.split("/").pop() ?? path140).replace(/\.git$/, "").toLowerCase();
10623
+ const path143 = url.endsWith("/") ? url.slice(0, -1) : url;
10624
+ return (path143.split("/").pop() ?? path143).replace(/\.git$/, "").toLowerCase();
10625
10625
  }
10626
10626
  function clangSettingEntries(settings, tool) {
10627
10627
  return (settings ?? []).flatMap(
@@ -11267,10 +11267,10 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
11267
11267
  const enclosing = scopes.length > 0 ? scopes[scopes.length - 1].prefix : [];
11268
11268
  if (scope2?.[3] === "enum" && opens > 0 && /(^|\s)(public|open)\s/.test(scope2[2] ?? "") && !/\bwhere\b/.test(first.masked) && first.masked[scope2.index + scope2[0].length] !== "<") {
11269
11269
  const name3 = scope2[4];
11270
- const path140 = scopeOf(name3, enclosing, false);
11271
- if (!byPath.has(path140.join(".")) && (path140.length === 1 || byPath.has(path140.slice(0, -1).join(".")))) {
11270
+ const path143 = scopeOf(name3, enclosing, false);
11271
+ if (!byPath.has(path143.join(".")) && (path143.length === 1 || byPath.has(path143.slice(0, -1).join(".")))) {
11272
11272
  const keptAttrs = [...(scope2[1] ?? "").matchAll(/@\w+(?:\([^)]*\))?/g)].map((attr) => attr[0]).filter((attr) => !attr.startsWith("@objc"));
11273
- const id = `s:peach-synthesized-${module2}-${path140.join(".")}`;
11273
+ const id = `s:peach-synthesized-${module2}-${path143.join(".")}`;
11274
11274
  const body = [];
11275
11275
  let inner = 1;
11276
11276
  let closed = false;
@@ -11325,15 +11325,15 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
11325
11325
  symbols.push({
11326
11326
  kind: { identifier: "swift.enum" },
11327
11327
  identifier: { precise: id },
11328
- pathComponents: path140,
11328
+ pathComponents: path143,
11329
11329
  declarationFragments: fragments,
11330
11330
  accessLevel: "public"
11331
11331
  });
11332
- if (path140.length > 1)
11332
+ if (path143.length > 1)
11333
11333
  relationships.push({
11334
11334
  kind: "memberOf",
11335
11335
  source: id,
11336
- target: byPath.get(path140.slice(0, -1).join("."))
11336
+ target: byPath.get(path143.slice(0, -1).join("."))
11337
11337
  });
11338
11338
  for (const kase of cases) {
11339
11339
  const memberId = `${id}-${kase.leaf}`;
@@ -11342,7 +11342,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
11342
11342
  symbols.push({
11343
11343
  kind: { identifier: "swift.enum.case" },
11344
11344
  identifier: { precise: memberId },
11345
- pathComponents: [...path140, kase.leaf],
11345
+ pathComponents: [...path143, kase.leaf],
11346
11346
  declarationFragments: [
11347
11347
  { kind: "keyword", spelling: "case" },
11348
11348
  { kind: "text", spelling: " " },
@@ -11358,7 +11358,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
11358
11358
  symbols.push({
11359
11359
  kind: { identifier: "swift.init" },
11360
11360
  identifier: { precise: initId },
11361
- pathComponents: [...path140, "init(rawValue:)"],
11361
+ pathComponents: [...path143, "init(rawValue:)"],
11362
11362
  declarationFragments: [
11363
11363
  { kind: "keyword", spelling: "init" },
11364
11364
  { kind: "text", spelling: "?(" },
@@ -11437,7 +11437,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
11437
11437
  })
11438
11438
  )
11439
11439
  );
11440
- const trap = (path140) => `fatalError("${path140} is ${options2.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
11440
+ const trap = (path143) => `fatalError("${path143} is ${options2.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
11441
11441
  const skipped = [];
11442
11442
  const behavior = options2.behavior ?? /* @__PURE__ */ new Map();
11443
11443
  const used = /* @__PURE__ */ new Set();
@@ -11788,34 +11788,34 @@ function emitSwiftStandin(sourceGraphs, options2) {
11788
11788
  lines.push(...physical);
11789
11789
  owners.push(...physical.map(() => current2));
11790
11790
  };
11791
- const emitAt = (path140, line) => {
11792
- if (omit.has(path140)) return;
11791
+ const emitAt = (path143, line) => {
11792
+ if (omit.has(path143)) return;
11793
11793
  const previous = current2;
11794
- current2 = path140;
11794
+ current2 = path143;
11795
11795
  emit(line);
11796
11796
  current2 = previous;
11797
11797
  };
11798
11798
  const emitInertState = (id, indent2, build2) => {
11799
- const path140 = pathOf(byId.get(id));
11799
+ const path143 = pathOf(byId.get(id));
11800
11800
  emitAt(hiddenInit(id), `${indent2}init(_peachInert: Void) { ${build2} }`);
11801
11801
  const list2 = conforms.get(id) ?? [];
11802
11802
  const has = (name3) => (children.get(id) ?? []).some((member) => leaf(member) === name3);
11803
11803
  if (list2.includes("Encodable") && !has("encode(to:)"))
11804
11804
  emitAt(
11805
- `${path140}.encode(to:)`,
11805
+ `${path143}.encode(to:)`,
11806
11806
  `${indent2}public func encode(to encoder: Encoder) throws {}`
11807
11807
  );
11808
11808
  if (list2.includes("Decodable") && !has("init(from:)"))
11809
11809
  emitAt(
11810
- `${path140}.init(from:)`,
11810
+ `${path143}.init(from:)`,
11811
11811
  `${indent2}public init(from decoder: Decoder) throws { self.init(_peachInert: ()) }`
11812
11812
  );
11813
11813
  };
11814
11814
  const scoped = (body) => (symbol2, ...rest) => {
11815
- const path140 = pathOf(symbol2);
11816
- if (omit.has(path140)) return void skipped.push({ path: path140, reason: omit.get(path140) });
11815
+ const path143 = pathOf(symbol2);
11816
+ if (omit.has(path143)) return void skipped.push({ path: path143, reason: omit.get(path143) });
11817
11817
  const previous = current2;
11818
- current2 = path140;
11818
+ current2 = path143;
11819
11819
  try {
11820
11820
  body(symbol2, ...rest);
11821
11821
  } finally {
@@ -11847,7 +11847,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
11847
11847
  };
11848
11848
  const emitMember = scoped(
11849
11849
  (member, indent2, context) => {
11850
- const path140 = pathOf(member);
11850
+ const path143 = pathOf(member);
11851
11851
  if (TYPE_KINDS.has(member.kind.identifier)) {
11852
11852
  const origin = origins.get(member.identifier.precise)?.split(".")[0];
11853
11853
  const parent = owner.get(member.identifier.precise);
@@ -11864,7 +11864,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
11864
11864
  ))
11865
11865
  return;
11866
11866
  if (!MEMBER_KINDS.has(member.kind.identifier)) {
11867
- skipped.push({ path: path140, reason: `unhandled ${member.kind.identifier}` });
11867
+ skipped.push({ path: path143, reason: `unhandled ${member.kind.identifier}` });
11868
11868
  return;
11869
11869
  }
11870
11870
  const { 1: spelledAttrs, 2: rest } = LEADING_ATTRS.exec(text(member));
@@ -11875,15 +11875,15 @@ function emitSwiftStandin(sourceGraphs, options2) {
11875
11875
  const selector = context.inClass && !options2.inert && member.kind.identifier === "swift.type.method" && !/\basync\b/.test(rest) ? /^c:objc\(cs\)\w+\(cm\)([A-Za-z_][A-Za-z_0-9:]*)$/.exec(
11876
11876
  member.identifier.precise
11877
11877
  )?.[1] : void 0;
11878
- const attrs = options2.unobjc?.has(path140) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : `${wrapped}${selector ? `@objc(${selector}) ` : ""}`;
11878
+ const attrs = options2.unobjc?.has(path143) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : `${wrapped}${selector ? `@objc(${selector}) ` : ""}`;
11879
11879
  const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
11880
11880
  rest
11881
11881
  );
11882
11882
  const flags = new Set(
11883
11883
  modifiers[1].trim().split(/\s+/).filter(Boolean).map((flag) => flag.replace(/\(.*/, ""))
11884
11884
  );
11885
- const requiredInit = context.inClass && !!options2.requiredInits?.has(path140);
11886
- const restatesRequired = context.inClass && path140.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
11885
+ const requiredInit = context.inClass && !!options2.requiredInits?.has(path143);
11886
+ const restatesRequired = context.inClass && path143.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
11887
11887
  (at) => options2.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
11888
11888
  );
11889
11889
  const protocolInit = member.kind.identifier === "swift.init" && /^c:objc\(pl\)\w+\(im\).*::SYNTHESIZED::c:objc\(cs\)/.test(
@@ -11893,7 +11893,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
11893
11893
  const final = context.inClass && flags.has("final") ? "final " : "";
11894
11894
  const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
11895
11895
  let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
11896
- for (const type of options2.unwrappedParameters?.get(path140) ?? [])
11896
+ for (const type of options2.unwrappedParameters?.get(path143) ?? [])
11897
11897
  core = core.replace(
11898
11898
  new RegExp(
11899
11899
  `(:\\s*(?:\\w+\\.)*${type.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})(?=\\s*[,)])`,
@@ -11901,12 +11901,12 @@ function emitSwiftStandin(sourceGraphs, options2) {
11901
11901
  ),
11902
11902
  "$1!"
11903
11903
  );
11904
- const override = context.inClass && !options2.plain?.has(path140) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options2.forcedOverride?.has(path140) || isObjC(member) && path140.endsWith(".init()")) ? "override " : "";
11904
+ const override = context.inClass && !options2.plain?.has(path143) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options2.forcedOverride?.has(path143) || isObjC(member) && path143.endsWith(".init()")) ? "override " : "";
11905
11905
  const head = `${indent2}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
11906
- const measured = behavior.get(path140);
11907
- if (measured) used.add(path140);
11906
+ const measured = behavior.get(path143);
11907
+ if (measured) used.add(path143);
11908
11908
  const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
11909
- const body = overloadBody ?? measured?.body ?? (options2.inert ? inertBody(member) : trap(path140));
11909
+ const body = overloadBody ?? measured?.body ?? (options2.inert ? inertBody(member) : trap(path143));
11910
11910
  switch (member.kind.identifier) {
11911
11911
  case "swift.property":
11912
11912
  case "swift.type.property":
@@ -11919,13 +11919,13 @@ function emitSwiftStandin(sourceGraphs, options2) {
11919
11919
  const parameter = !measured && !options2.inert && !settable && /:\s*some\s/.test(decl) ? opaqueParameter(member) : void 0;
11920
11920
  const getter = parameter ? `return ({ () -> ${parameter} in ${body} })()` : body;
11921
11921
  const computed = decl.replace(/^((?:static |class )*)let /, "$1var ");
11922
- const wrapper = options2.projections?.get(path140);
11922
+ const wrapper = options2.projections?.get(path143);
11923
11923
  if (wrapper) {
11924
11924
  const type = /^var\s+`?\w+`?\s*:\s*(.+)$/s.exec(computed)?.[1];
11925
- const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path140]);
11925
+ const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path143]);
11926
11926
  if (!initial)
11927
11927
  return void skipped.push({
11928
- path: path140,
11928
+ path: path143,
11929
11929
  reason: `wrapped by ${wrapper} with no inert initial value`
11930
11930
  });
11931
11931
  const own2 = new RegExp(
@@ -11946,7 +11946,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
11946
11946
  return;
11947
11947
  }
11948
11948
  emit(
11949
- `${head.replace(/@NSCopying\b\s*/g, "")}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed2.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options2.inert ? "" : trap(path140))} }` : ""} }`
11949
+ `${head.replace(/@NSCopying\b\s*/g, "")}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed2.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options2.inert ? "" : trap(path143))} }` : ""} }`
11950
11950
  );
11951
11951
  return;
11952
11952
  }
@@ -12005,7 +12005,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12005
12005
  };
12006
12006
  const emitType = scoped(
12007
12007
  (symbol2, indent2) => {
12008
- const path140 = pathOf(symbol2);
12008
+ const path143 = pathOf(symbol2);
12009
12009
  const id = symbol2.identifier.precise;
12010
12010
  const inner = `${indent2} `;
12011
12011
  switch (symbol2.kind.identifier) {
@@ -12022,10 +12022,10 @@ function emitSwiftStandin(sourceGraphs, options2) {
12022
12022
  case "swift.class": {
12023
12023
  const shape = header(symbol2, "class", indent2);
12024
12024
  if (!shape)
12025
- return void skipped.push({ path: path140, reason: `unparsed class ${text(symbol2)}` });
12026
- const parent = options2.superclasses?.get(path140) ?? superclass.get(id);
12025
+ return void skipped.push({ path: path143, reason: `unparsed class ${text(symbol2)}` });
12026
+ const parent = options2.superclasses?.get(path143) ?? superclass.get(id);
12027
12027
  const blocked = classBlocked(id);
12028
- if (blocked) return void skipped.push({ path: path140, reason: blocked });
12028
+ if (blocked) return void skipped.push({ path: path143, reason: blocked });
12029
12029
  const ancestors = /* @__PURE__ */ new Set();
12030
12030
  const inherited = /* @__PURE__ */ new Set();
12031
12031
  for (let at = superId.get(id); at; at = superId.get(at)) {
@@ -12041,7 +12041,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12041
12041
  "Equatable",
12042
12042
  "CustomStringConvertible",
12043
12043
  "CustomDebugStringConvertible"
12044
- ].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options2.unconformed?.get(path140)?.has(name3.split(/::|\./).pop()) && !options2.unconformed?.get(path140)?.has(name3)
12044
+ ].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options2.unconformed?.get(path143)?.has(name3.split(/::|\./).pop()) && !options2.unconformed?.get(path143)?.has(name3)
12045
12045
  )
12046
12046
  ].filter((name3, at, all2) => all2.indexOf(name3) === at);
12047
12047
  const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
@@ -12053,9 +12053,9 @@ function emitSwiftStandin(sourceGraphs, options2) {
12053
12053
  `${indent2}${shape.attrs}${objcName ? `@objc(${objcName}) ` : ""}${shape.final}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
12054
12054
  );
12055
12055
  const members2 = membersOf(id);
12056
- const extra = options2.behavior?.get(path140)?.members;
12056
+ const extra = options2.behavior?.get(path143)?.members;
12057
12057
  if (extra) {
12058
- used.add(path140);
12058
+ used.add(path143);
12059
12059
  emit(`${inner}${extra}`);
12060
12060
  }
12061
12061
  for (const member of members2)
@@ -12111,11 +12111,11 @@ function emitSwiftStandin(sourceGraphs, options2) {
12111
12111
  if (protocol && member.kind.identifier === "swift.method" && leaf(member).endsWith("()") && have.has(`instance|leaf|${leaf(member).slice(0, -2)}`))
12112
12112
  propertyWitnesses.push({
12113
12113
  owner: current2,
12114
- head: `extension ${pathOf(protocol)} where Self: ${path140} {`,
12114
+ head: `extension ${pathOf(protocol)} where Self: ${path143} {`,
12115
12115
  member,
12116
- path: path140
12116
+ path: path143
12117
12117
  });
12118
- else emitWitness(member, inner, path140, open && isObjC(member));
12118
+ else emitWitness(member, inner, path143, open && isObjC(member));
12119
12119
  }
12120
12120
  }
12121
12121
  if (options2.inert && designated2 && classBuild(id) === "hidden")
@@ -12123,13 +12123,13 @@ function emitSwiftStandin(sourceGraphs, options2) {
12123
12123
  const coder = members2.some((member) => leaf(member) === "init(coder:)");
12124
12124
  if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
12125
12125
  emit(
12126
- `${inner}public required init${options2.coderNonfailable?.has(path140) ? "" : "?"}(coder: NSCoder) { ${options2.inert && !options2.coderNonfailable?.has(path140) ? "return nil" : trap(`${path140}.init(coder:)`)} }`
12126
+ `${inner}public required init${options2.coderNonfailable?.has(path143) ? "" : "?"}(coder: NSCoder) { ${options2.inert && !options2.coderNonfailable?.has(path143) ? "return nil" : trap(`${path143}.init(coder:)`)} }`
12127
12127
  );
12128
12128
  if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
12129
12129
  (at) => options2.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
12130
12130
  ))
12131
12131
  emit(
12132
- `${inner}public required init() { ${options2.inert ? superInit(id) : trap(`${path140}.init()`)} }`
12132
+ `${inner}public required init() { ${options2.inert ? superInit(id) : trap(`${path143}.init()`)} }`
12133
12133
  );
12134
12134
  emit(`${indent2}}`);
12135
12135
  return;
@@ -12137,7 +12137,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12137
12137
  case "swift.struct": {
12138
12138
  const shape = header(symbol2, "struct", indent2);
12139
12139
  if (!shape)
12140
- return void skipped.push({ path: path140, reason: `unparsed struct ${text(symbol2)}` });
12140
+ return void skipped.push({ path: path143, reason: `unparsed struct ${text(symbol2)}` });
12141
12141
  const members2 = membersOf(id);
12142
12142
  const raw2 = rawType(members2);
12143
12143
  const list2 = inheritance(id);
@@ -12177,7 +12177,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12177
12177
  emitInertState(
12178
12178
  id,
12179
12179
  inner,
12180
- raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path140]) ?? "0"}` : ""
12180
+ raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path143]) ?? "0"}` : ""
12181
12181
  );
12182
12182
  emit(`${indent2}}`);
12183
12183
  return;
@@ -12185,7 +12185,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12185
12185
  case "swift.enum": {
12186
12186
  const shape = header(symbol2, "enum", indent2);
12187
12187
  if (!shape)
12188
- return void skipped.push({ path: path140, reason: `unparsed enum ${text(symbol2)}` });
12188
+ return void skipped.push({ path: path143, reason: `unparsed enum ${text(symbol2)}` });
12189
12189
  const members2 = membersOf(id);
12190
12190
  const cases = members2.filter(
12191
12191
  (member) => member.kind.identifier === "swift.enum.case"
@@ -12195,7 +12195,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12195
12195
  const missing2 = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
12196
12196
  if (raw2 && (isObjC(symbol2) || /^c:@C?M@[^@]+@E@/.test(id)) && missing2.length > 0)
12197
12197
  return void skipped.push({
12198
- path: path140,
12198
+ path: path143,
12199
12199
  reason: `no header value for ${missing2.map(leaf).join(", ")}`
12200
12200
  });
12201
12201
  const list2 = inheritance(id, raw2 ?? void 0).filter(
@@ -12234,8 +12234,8 @@ function emitSwiftStandin(sourceGraphs, options2) {
12234
12234
  });
12235
12235
  }
12236
12236
  if (options2.inert) {
12237
- const value = options2.trapped?.has(hiddenInit(id)) ? null : inertValue(path140, /* @__PURE__ */ new Set(), []);
12238
- emitInertState(id, inner, value === null ? trap(path140) : `self = ${value}`);
12237
+ const value = options2.trapped?.has(hiddenInit(id)) ? null : inertValue(path143, /* @__PURE__ */ new Set(), []);
12238
+ emitInertState(id, inner, value === null ? trap(path143) : `self = ${value}`);
12239
12239
  }
12240
12240
  emit(`${indent2}}`);
12241
12241
  return;
@@ -12244,14 +12244,14 @@ function emitSwiftStandin(sourceGraphs, options2) {
12244
12244
  const shape = header(symbol2, "protocol", indent2);
12245
12245
  if (!shape)
12246
12246
  return void skipped.push({
12247
- path: path140,
12247
+ path: path143,
12248
12248
  reason: `unparsed protocol ${text(symbol2)}`
12249
12249
  });
12250
12250
  const native = nativeObjcProtocols.has(id);
12251
12251
  const objcName = native ? /^c:objc\(pl\)(\w+)$/.exec(id)?.[1] : void 0;
12252
12252
  if (native && !objcName)
12253
12253
  return void skipped.push({
12254
- path: path140,
12254
+ path: path143,
12255
12255
  reason: `unknown Objective-C protocol identity ${id}`
12256
12256
  });
12257
12257
  const list2 = [
@@ -12279,7 +12279,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12279
12279
  }
12280
12280
  emit(`${indent2}}`);
12281
12281
  if (defaults.length > 0) {
12282
- emit(`${indent2}extension ${path140} {`);
12282
+ emit(`${indent2}extension ${path143} {`);
12283
12283
  for (const member of defaults) {
12284
12284
  const decl = text(member);
12285
12285
  if (optional3.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
@@ -12373,7 +12373,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12373
12373
  return null;
12374
12374
  };
12375
12375
  const emitGlobal = scoped((symbol2) => {
12376
- const path140 = pathOf(symbol2);
12376
+ const path143 = pathOf(symbol2);
12377
12377
  const kind = symbol2.kind.identifier;
12378
12378
  if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
12379
12379
  const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol2));
@@ -12382,20 +12382,20 @@ function emitSwiftStandin(sourceGraphs, options2) {
12382
12382
  if (leaf(symbol2).endsWith("(_:)") && !/^(?:prefix|infix|postfix)\b/.test(spelled2))
12383
12383
  spelled2 = `prefix ${spelled2}`;
12384
12384
  }
12385
- const measured = behavior.get(path140);
12386
- if (measured) used.add(path140);
12385
+ const measured = behavior.get(path143);
12386
+ if (measured) used.add(path143);
12387
12387
  const overloadBody = /\basync\b/.test(spelled2) ? measured?.asyncBody : /\bResult</.test(spelled2) ? measured?.resultBody : void 0;
12388
12388
  emit(
12389
- `${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path140))} }`
12389
+ `${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path143))} }`
12390
12390
  );
12391
12391
  } else if (kind === "swift.var") {
12392
12392
  const parsed2 = splitAccessors(text(symbol2).replace(/^let /, "var "));
12393
- const measured = behavior.get(path140);
12394
- if (measured) used.add(path140);
12393
+ const measured = behavior.get(path143);
12394
+ if (measured) used.add(path143);
12395
12395
  emit(
12396
- `public ${parsed2.decl} { ${measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path140))} }`
12396
+ `public ${parsed2.decl} { ${measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path143))} }`
12397
12397
  );
12398
- } else skipped.push({ path: path140, reason: `unhandled top-level ${kind}` });
12398
+ } else skipped.push({ path: path143, reason: `unhandled top-level ${kind}` });
12399
12399
  });
12400
12400
  const cExports = new Set(
12401
12401
  [...byId.values()].flatMap((symbol2) => {
@@ -12412,7 +12412,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
12412
12412
  return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
12413
12413
  }).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
12414
12414
  for (const symbol2 of roots) {
12415
- const path140 = pathOf(symbol2);
12415
+ const path143 = pathOf(symbol2);
12416
12416
  if (TYPE_KINDS.has(symbol2.kind.identifier)) emitType(symbol2, "");
12417
12417
  else emitGlobal(symbol2);
12418
12418
  }
@@ -12492,9 +12492,9 @@ function emitSwiftStandin(sourceGraphs, options2) {
12492
12492
  "#endif",
12493
12493
  ""
12494
12494
  ];
12495
- for (const path140 of behavior.keys())
12496
- if (!used.has(path140))
12497
- skipped.push({ path: path140, reason: "behavior names no emitted declaration" });
12495
+ for (const path143 of behavior.keys())
12496
+ if (!used.has(path143))
12497
+ skipped.push({ path: path143, reason: "behavior names no emitted declaration" });
12498
12498
  return {
12499
12499
  source: `${[...banner, ...lines].join("\n")}
12500
12500
  `,
@@ -14785,9 +14785,9 @@ function originalColumn(line, column) {
14785
14785
  }
14786
14786
  function designTimeDiagnostic(output, files2) {
14787
14787
  const rewritten = /* @__PURE__ */ new Map();
14788
- const linesOf = (path140) => {
14788
+ const linesOf = (path143) => {
14789
14789
  const file = Object.keys(files2).find(
14790
- (name3) => name3.endsWith(".swift") && (path140 === name3 || path140.endsWith(`/${name3}`))
14790
+ (name3) => name3.endsWith(".swift") && (path143 === name3 || path143.endsWith(`/${name3}`))
14791
14791
  );
14792
14792
  if (file === void 0) return null;
14793
14793
  let lines = rewritten.get(file);
@@ -16136,18 +16136,18 @@ function* guestLinkLines(file) {
16136
16136
  try {
16137
16137
  const decoder = new import_node_string_decoder.StringDecoder("utf8");
16138
16138
  const buffer = Buffer.allocUnsafe(64 * 1024);
16139
- let pending = "";
16139
+ let pending2 = "";
16140
16140
  let count;
16141
16141
  while ((count = (0, import_node_fs28.readSync)(input, buffer, 0, buffer.length, null)) > 0) {
16142
- const text7 = pending + decoder.write(buffer.subarray(0, count));
16142
+ const text7 = pending2 + decoder.write(buffer.subarray(0, count));
16143
16143
  let start = 0;
16144
16144
  for (let end = text7.indexOf("\n"); end !== -1; end = text7.indexOf("\n", start)) {
16145
16145
  yield text7.slice(start, end);
16146
16146
  start = end + 1;
16147
16147
  }
16148
- pending = text7.slice(start);
16148
+ pending2 = text7.slice(start);
16149
16149
  }
16150
- yield pending + decoder.end();
16150
+ yield pending2 + decoder.end();
16151
16151
  } finally {
16152
16152
  (0, import_node_fs28.closeSync)(input);
16153
16153
  }
@@ -20126,25 +20126,25 @@ function vectorSection(id, count, parts) {
20126
20126
  }
20127
20127
  function rewriteSections(bytes, sections, changes) {
20128
20128
  const out = [bytes.subarray(0, 8)];
20129
- const pending = new Map(changes);
20129
+ const pending2 = new Map(changes);
20130
20130
  const flushBefore = (id) => {
20131
- for (const [missing2, section2] of pending) {
20131
+ for (const [missing2, section2] of pending2) {
20132
20132
  if (SECTION_ORDER.indexOf(missing2) >= SECTION_ORDER.indexOf(id)) continue;
20133
20133
  if (section2) out.push(section2);
20134
- pending.delete(missing2);
20134
+ pending2.delete(missing2);
20135
20135
  }
20136
20136
  };
20137
20137
  for (const s of sections) {
20138
20138
  if (s.id !== 0) flushBefore(s.id);
20139
- if (!pending.has(s.id)) {
20139
+ if (!pending2.has(s.id)) {
20140
20140
  out.push(bytes.subarray(s.offset, s.end));
20141
20141
  continue;
20142
20142
  }
20143
- const section2 = pending.get(s.id);
20144
- pending.delete(s.id);
20143
+ const section2 = pending2.get(s.id);
20144
+ pending2.delete(s.id);
20145
20145
  if (section2) out.push(section2);
20146
20146
  }
20147
- for (const section2 of pending.values()) if (section2) out.push(section2);
20147
+ for (const section2 of pending2.values()) if (section2) out.push(section2);
20148
20148
  return Buffer.concat(out);
20149
20149
  }
20150
20150
  function entries(bytes, section2, entry) {
@@ -25773,15 +25773,15 @@ function projectOutputFile(root, file, user) {
25773
25773
  return real;
25774
25774
  }
25775
25775
  function removeProjectLinks(root) {
25776
- const pending = [root];
25777
- for (let directory2 = pending.pop(); directory2; directory2 = pending.pop()) {
25776
+ const pending2 = [root];
25777
+ for (let directory2 = pending2.pop(); directory2; directory2 = pending2.pop()) {
25778
25778
  for (const entry of (0, import_node_fs36.readdirSync)(directory2, { withFileTypes: true })) {
25779
25779
  const full = import_node_path34.default.join(directory2, entry.name);
25780
25780
  if (directory2 === root && entry.name === ".build") continue;
25781
25781
  if (directory2 === root && entry.name.startsWith(".peach-modules-")) {
25782
25782
  (0, import_node_fs36.rmSync)(full, { recursive: true, force: true });
25783
25783
  } else if (entry.isSymbolicLink()) (0, import_node_fs36.rmSync)(full);
25784
- else if (entry.isDirectory()) pending.push(full);
25784
+ else if (entry.isDirectory()) pending2.push(full);
25785
25785
  }
25786
25786
  }
25787
25787
  }
@@ -25901,13 +25901,13 @@ function swiftSdkGuestLookups(moduleRoot, sdkRoot, objects) {
25901
25901
  const shared = /* @__PURE__ */ new Set();
25902
25902
  const sdkWeakReferences = /* @__PURE__ */ new Map();
25903
25903
  for (const objects2 of groups.values())
25904
- for (const { path: path140, bytes } of objects2) {
25904
+ for (const { path: path143, bytes } of objects2) {
25905
25905
  const defined = guestWasmSymbols(bytes);
25906
25906
  for (const name3 of defined.defined) symbols.add(name3);
25907
25907
  for (const name3 of defined.tags) shared.add(name3);
25908
25908
  for (const name3 of defined.globals) shared.add(name3);
25909
25909
  if (defined.weakUndefined.length)
25910
- sdkWeakReferences.set(path140, new Set(defined.weakUndefined));
25910
+ sdkWeakReferences.set(path143, new Set(defined.weakUndefined));
25911
25911
  }
25912
25912
  return createGuestImageLedger({
25913
25913
  images,
@@ -29396,7 +29396,7 @@ function dumpInputs(dir, xcode) {
29396
29396
  swiftCodeScan(source).lineStarts,
29397
29397
  (line) => line.replace(
29398
29398
  MANIFEST_HOST_OS,
29399
- (match, os24) => (os24 === "macOS" ? "true" : "false").padEnd(match.length)
29399
+ (match, os25) => (os25 === "macOS" ? "true" : "false").padEnd(match.length)
29400
29400
  )
29401
29401
  );
29402
29402
  if (projected !== source) overlays.push({ name: name3, source: projected });
@@ -29468,8 +29468,8 @@ async function prepareSwiftPackageManifest(dir, xcode) {
29468
29468
  await prepareSwiftManifestToolchain();
29469
29469
  const { command, env, key: key2, overlays, cached: cached2 } = dumpInputs(dir, xcode);
29470
29470
  if (import_node_fs41.default.existsSync(cached2)) return;
29471
- const pending = manifestPreparations.get(key2);
29472
- if (pending) return pending;
29471
+ const pending2 = manifestPreparations.get(key2);
29472
+ if (pending2) return pending2;
29473
29473
  const work = (async () => {
29474
29474
  import_node_fs41.default.mkdirSync(cacheDir2, { recursive: true });
29475
29475
  const scratch2 = import_node_fs41.default.mkdtempSync(import_node_path39.default.join(cacheDir2, `${key2}-`));
@@ -29536,12 +29536,12 @@ function defaultTraits(manifest) {
29536
29536
  ])
29537
29537
  );
29538
29538
  const enabled = /* @__PURE__ */ new Set();
29539
- const pending = [...traits.get("default") ?? []];
29540
- while (pending.length > 0) {
29541
- const name3 = pending.pop();
29539
+ const pending2 = [...traits.get("default") ?? []];
29540
+ while (pending2.length > 0) {
29541
+ const name3 = pending2.pop();
29542
29542
  if (enabled.has(name3)) continue;
29543
29543
  enabled.add(name3);
29544
- pending.push(...traits.get(name3) ?? []);
29544
+ pending2.push(...traits.get(name3) ?? []);
29545
29545
  }
29546
29546
  return enabled;
29547
29547
  }
@@ -30025,9 +30025,9 @@ async function swiftDistributionRoot(signal) {
30025
30025
  "swift-distributions",
30026
30026
  `${lock.id}-${host2}-${lock.hosts[host2].sha256}`
30027
30027
  );
30028
- let pending = installs.get(dir);
30029
- if (pending?.controller.signal.aborted) pending = void 0;
30030
- if (!pending) {
30028
+ let pending2 = installs.get(dir);
30029
+ if (pending2?.controller.signal.aborted) pending2 = void 0;
30030
+ if (!pending2) {
30031
30031
  const controller = new AbortController();
30032
30032
  const promise = (async () => {
30033
30033
  if (!import_node_fs42.default.existsSync(import_node_path40.default.join(dir, SWIFT_DISTRIBUTION_MANIFEST))) {
@@ -30056,10 +30056,10 @@ async function swiftDistributionRoot(signal) {
30056
30056
  })().finally(() => {
30057
30057
  if (installs.get(dir)?.controller === controller) installs.delete(dir);
30058
30058
  });
30059
- pending = { promise, controller, clients: 0 };
30060
- installs.set(dir, pending);
30059
+ pending2 = { promise, controller, clients: 0 };
30060
+ installs.set(dir, pending2);
30061
30061
  }
30062
- const current2 = pending;
30062
+ const current2 = pending2;
30063
30063
  current2.clients++;
30064
30064
  let released = false;
30065
30065
  const release = () => {
@@ -30389,13 +30389,13 @@ function lockDirectoryFor(root) {
30389
30389
  function acquireSwiftRootReadHold(root) {
30390
30390
  const directory2 = lockDirectoryFor(root);
30391
30391
  const token = (0, import_node_crypto26.randomUUID)();
30392
- const pending = import_node_path41.default.join(directory2, `pending.reader.${token}`);
30392
+ const pending2 = import_node_path41.default.join(directory2, `pending.reader.${token}`);
30393
30393
  const reader = import_node_path41.default.join(directory2, `reader.${token}`);
30394
- (0, import_node_fs43.writeFileSync)(pending, JSON.stringify(ownIdentity(process.pid)));
30394
+ (0, import_node_fs43.writeFileSync)(pending2, JSON.stringify(ownIdentity(process.pid)));
30395
30395
  try {
30396
- (0, import_node_fs43.linkSync)(pending, reader);
30396
+ (0, import_node_fs43.linkSync)(pending2, reader);
30397
30397
  } finally {
30398
- (0, import_node_fs43.rmSync)(pending, { force: true });
30398
+ (0, import_node_fs43.rmSync)(pending2, { force: true });
30399
30399
  }
30400
30400
  let released = false;
30401
30401
  return {
@@ -30446,7 +30446,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
30446
30446
  );
30447
30447
  if (!ownRow) throw new Error(`swift root lock cannot find process ${process.pid}`);
30448
30448
  const owner = JSON.stringify({ pid: process.pid, start: ownRow.start });
30449
- const pending = import_node_path41.default.join(directory2, `pending.${token}`);
30449
+ const pending2 = import_node_path41.default.join(directory2, `pending.${token}`);
30450
30450
  let held = 0;
30451
30451
  let announced = 0;
30452
30452
  let current2 = null;
@@ -30485,14 +30485,14 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
30485
30485
  }
30486
30486
  }
30487
30487
  }
30488
- (0, import_node_fs43.writeFileSync)(pending, owner);
30488
+ (0, import_node_fs43.writeFileSync)(pending2, owner);
30489
30489
  try {
30490
- (0, import_node_fs43.linkSync)(pending, import_node_path41.default.join(directory2, name(newest + 1, "owner")));
30490
+ (0, import_node_fs43.linkSync)(pending2, import_node_path41.default.join(directory2, name(newest + 1, "owner")));
30491
30491
  } catch (error) {
30492
30492
  if (errorCode(error) === "EEXIST") continue;
30493
30493
  throw error;
30494
30494
  } finally {
30495
- (0, import_node_fs43.rmSync)(pending, { force: true });
30495
+ (0, import_node_fs43.rmSync)(pending2, { force: true });
30496
30496
  }
30497
30497
  const numbers = generationNumbers(directory2);
30498
30498
  if (numbers.at(-1) !== newest + 1) {
@@ -30513,7 +30513,7 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
30513
30513
  register(child) {
30514
30514
  const index = children.push(child);
30515
30515
  if (child.pid === void 0) throw new Error("could not register compiler process");
30516
- const childPending = `${pending}.child.${index}`;
30516
+ const childPending = `${pending2}.child.${index}`;
30517
30517
  try {
30518
30518
  (0, import_node_fs43.writeFileSync)(childPending, JSON.stringify(ownIdentity(child.pid)));
30519
30519
  (0, import_node_fs43.linkSync)(childPending, import_node_path41.default.join(directory2, name(held, `child.${index}`)));
@@ -33316,7 +33316,7 @@ async function compileGuestLink(options2) {
33316
33316
  let lazyFunctions = [];
33317
33317
  let dyldSymbols = [];
33318
33318
  const bundlePaths = new Map(
33319
- options2.resourceBundles.map(({ target, path: path140 }) => [target, path140])
33319
+ options2.resourceBundles.map(({ target, path: path143 }) => [target, path143])
33320
33320
  );
33321
33321
  const imageMetadata = (products) => {
33322
33322
  const source = sourceImages.map((image) => {
@@ -34580,8 +34580,8 @@ function sourceEntryPath() {
34580
34580
  return null;
34581
34581
  }
34582
34582
  }
34583
- function isCliEntry(path140) {
34584
- const name3 = (0, import_node_path49.basename)(path140);
34583
+ function isCliEntry(path143) {
34584
+ const name3 = (0, import_node_path49.basename)(path143);
34585
34585
  return name3 === "bin.ts" || name3 === "bin.js";
34586
34586
  }
34587
34587
  function rnxSelfInvocation() {
@@ -34737,16 +34737,16 @@ function collectSwiftSourceClosure(files2, roots, swiftCodeMask2, extensionMembe
34737
34737
  sources.set(file, references);
34738
34738
  }
34739
34739
  const included = /* @__PURE__ */ new Set();
34740
- const pending = [...roots];
34740
+ const pending2 = [...roots];
34741
34741
  const seen = /* @__PURE__ */ new Set();
34742
- while (pending.length) {
34743
- const name3 = pending.pop();
34742
+ while (pending2.length) {
34743
+ const name3 = pending2.pop();
34744
34744
  if (seen.has(name3)) continue;
34745
34745
  seen.add(name3);
34746
34746
  for (const file of owners.get(name3) ?? []) {
34747
34747
  if (included.has(file)) continue;
34748
34748
  included.add(file);
34749
- for (const reference of sources.get(file)) pending.push(reference);
34749
+ for (const reference of sources.get(file)) pending2.push(reference);
34750
34750
  }
34751
34751
  }
34752
34752
  return Object.fromEntries(Object.entries(files2).filter(([file]) => included.has(file)));
@@ -35539,7 +35539,7 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
35539
35539
  );
35540
35540
  const names = /* @__PURE__ */ new Set([...frameworks, ...targets.map((target) => target.name)]);
35541
35541
  const entriesByPrefix = new Map(
35542
- targets.map(({ path: path140 }) => [path140 === "." ? "" : `${path140}/`, []])
35542
+ targets.map(({ path: path143 }) => [path143 === "." ? "" : `${path143}/`, []])
35543
35543
  );
35544
35544
  const targetByPrefix = /* @__PURE__ */ new Map();
35545
35545
  for (const target of targets) {
@@ -38813,14 +38813,14 @@ function readCompiledArtifact(directory2, hash) {
38813
38813
  function saveCompiledArtifact(root, artifact) {
38814
38814
  const directory2 = import_node_path55.default.join(root, "artifact");
38815
38815
  (0, import_node_fs55.mkdirSync)(directory2, { recursive: true });
38816
- const pending = (0, import_node_fs55.mkdtempSync)(import_node_path55.default.join(root, ".artifact-"));
38816
+ const pending2 = (0, import_node_fs55.mkdtempSync)(import_node_path55.default.join(root, ".artifact-"));
38817
38817
  try {
38818
- (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending, "app.wasm"), artifact.bytes);
38819
- (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending, "icu.gz"), artifact.icu.gzip);
38818
+ (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending2, "app.wasm"), artifact.bytes);
38819
+ (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending2, "icu.gz"), artifact.icu.gzip);
38820
38820
  if (artifact.sdk)
38821
- (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending, "sdk-binding.bin"), artifact.sdk.binding.bytes);
38821
+ (0, import_node_fs55.writeFileSync)(import_node_path55.default.join(pending2, "sdk-binding.bin"), artifact.sdk.binding.bytes);
38822
38822
  (0, import_node_fs55.writeFileSync)(
38823
- import_node_path55.default.join(pending, "artifact.json"),
38823
+ import_node_path55.default.join(pending2, "artifact.json"),
38824
38824
  JSON.stringify({
38825
38825
  hash: artifact.hash,
38826
38826
  wasm: (0, import_node_crypto34.createHash)("sha256").update(artifact.bytes).digest("hex"),
@@ -38835,10 +38835,10 @@ function saveCompiledArtifact(root, artifact) {
38835
38835
  const outputs = ["app.wasm", "icu.gz"];
38836
38836
  if (artifact.sdk) outputs.push("sdk-binding.bin");
38837
38837
  for (const file of [...outputs, "artifact.json"]) {
38838
- (0, import_node_fs55.renameSync)(import_node_path55.default.join(pending, file), import_node_path55.default.join(directory2, file));
38838
+ (0, import_node_fs55.renameSync)(import_node_path55.default.join(pending2, file), import_node_path55.default.join(directory2, file));
38839
38839
  }
38840
38840
  } finally {
38841
- (0, import_node_fs55.rmSync)(pending, { recursive: true, force: true });
38841
+ (0, import_node_fs55.rmSync)(pending2, { recursive: true, force: true });
38842
38842
  }
38843
38843
  }
38844
38844
  function vanished(error) {
@@ -39037,7 +39037,7 @@ function frameworkLinkClosure(scratch2, roots) {
39037
39037
  const dependencies = /* @__PURE__ */ new Map();
39038
39038
  const moduleMaps = /* @__PURE__ */ new Map();
39039
39039
  const objcHeaders = /* @__PURE__ */ new Map();
39040
- let pending = null;
39040
+ let pending2 = null;
39041
39041
  let compiling = null;
39042
39042
  for (const line of (0, import_node_fs55.readFileSync)(import_node_path55.default.join(scratch2, "release.yaml"), "utf8").split(
39043
39043
  "\n"
@@ -39045,12 +39045,12 @@ function frameworkLinkClosure(scratch2, roots) {
39045
39045
  const phony = phonyHeader.exec(line);
39046
39046
  const shell = shellHeader.exec(line);
39047
39047
  if (phony) {
39048
- pending = { kind: "phony", name: phony[1] };
39048
+ pending2 = { kind: "phony", name: phony[1] };
39049
39049
  compiling = null;
39050
39050
  continue;
39051
39051
  }
39052
39052
  if (shell) {
39053
- pending = { kind: "shell", name: shell[1] };
39053
+ pending2 = { kind: "shell", name: shell[1] };
39054
39054
  compiling = shell[1];
39055
39055
  continue;
39056
39056
  }
@@ -39065,12 +39065,12 @@ function frameworkLinkClosure(scratch2, roots) {
39065
39065
  if (objcHeader) objcHeaders.set(compiling, JSON.parse(objcHeader));
39066
39066
  compiling = null;
39067
39067
  }
39068
- if (!pending) continue;
39068
+ if (!pending2) continue;
39069
39069
  if (line.startsWith(" inputs:")) {
39070
39070
  const paths = [...line.matchAll(/"([^"]*)"/g)].map((match) => match[1]);
39071
- if (pending.kind === "phony") {
39071
+ if (pending2.kind === "phony") {
39072
39072
  objects.set(
39073
- pending.name,
39073
+ pending2.name,
39074
39074
  paths.filter((file) => file.endsWith(".o"))
39075
39075
  );
39076
39076
  } else {
@@ -39079,12 +39079,12 @@ function frameworkLinkClosure(scratch2, roots) {
39079
39079
  const module2 = /\/Modules\/([^/]+)\.swiftmodule$/.exec(file);
39080
39080
  const object8 = /\/release\/([^/]+)\.build\/.+\.o$/.exec(file);
39081
39081
  if (module2) deps.add(module2[1]);
39082
- else if (object8 && object8[1] !== pending.name) deps.add(object8[1]);
39082
+ else if (object8 && object8[1] !== pending2.name) deps.add(object8[1]);
39083
39083
  }
39084
- dependencies.set(pending.name, deps);
39084
+ dependencies.set(pending2.name, deps);
39085
39085
  }
39086
- pending = null;
39087
- } else if (!line.startsWith(" ") && line.trim() !== "") pending = null;
39086
+ pending2 = null;
39087
+ } else if (!line.startsWith(" ") && line.trim() !== "") pending2 = null;
39088
39088
  }
39089
39089
  const modules = /* @__PURE__ */ new Set();
39090
39090
  const stack = [...roots];
@@ -41565,17 +41565,17 @@ function visit(node, visitor) {
41565
41565
  } else
41566
41566
  visit_(null, node, visitor_, Object.freeze([]));
41567
41567
  }
41568
- function visit_(key2, node, visitor, path140) {
41569
- const ctrl = callVisitor(key2, node, visitor, path140);
41568
+ function visit_(key2, node, visitor, path143) {
41569
+ const ctrl = callVisitor(key2, node, visitor, path143);
41570
41570
  if (isNode(ctrl) || isPair(ctrl)) {
41571
- replaceNode(key2, path140, ctrl);
41572
- return visit_(key2, ctrl, visitor, path140);
41571
+ replaceNode(key2, path143, ctrl);
41572
+ return visit_(key2, ctrl, visitor, path143);
41573
41573
  }
41574
41574
  if (typeof ctrl !== "symbol") {
41575
41575
  if (isCollection(node)) {
41576
- path140 = Object.freeze(path140.concat(node));
41576
+ path143 = Object.freeze(path143.concat(node));
41577
41577
  for (let i = 0; i < node.items.length; ++i) {
41578
- const ci = visit_(i, node.items[i], visitor, path140);
41578
+ const ci = visit_(i, node.items[i], visitor, path143);
41579
41579
  if (typeof ci === "number")
41580
41580
  i = ci - 1;
41581
41581
  else if (ci === BREAK)
@@ -41586,13 +41586,13 @@ function visit_(key2, node, visitor, path140) {
41586
41586
  }
41587
41587
  }
41588
41588
  } else if (isPair(node)) {
41589
- path140 = Object.freeze(path140.concat(node));
41590
- const ck = visit_("key", node.key, visitor, path140);
41589
+ path143 = Object.freeze(path143.concat(node));
41590
+ const ck = visit_("key", node.key, visitor, path143);
41591
41591
  if (ck === BREAK)
41592
41592
  return BREAK;
41593
41593
  else if (ck === REMOVE)
41594
41594
  node.key = null;
41595
- const cv = visit_("value", node.value, visitor, path140);
41595
+ const cv = visit_("value", node.value, visitor, path143);
41596
41596
  if (cv === BREAK)
41597
41597
  return BREAK;
41598
41598
  else if (cv === REMOVE)
@@ -41610,17 +41610,17 @@ async function visitAsync(node, visitor) {
41610
41610
  } else
41611
41611
  await visitAsync_(null, node, visitor_, Object.freeze([]));
41612
41612
  }
41613
- async function visitAsync_(key2, node, visitor, path140) {
41614
- const ctrl = await callVisitor(key2, node, visitor, path140);
41613
+ async function visitAsync_(key2, node, visitor, path143) {
41614
+ const ctrl = await callVisitor(key2, node, visitor, path143);
41615
41615
  if (isNode(ctrl) || isPair(ctrl)) {
41616
- replaceNode(key2, path140, ctrl);
41617
- return visitAsync_(key2, ctrl, visitor, path140);
41616
+ replaceNode(key2, path143, ctrl);
41617
+ return visitAsync_(key2, ctrl, visitor, path143);
41618
41618
  }
41619
41619
  if (typeof ctrl !== "symbol") {
41620
41620
  if (isCollection(node)) {
41621
- path140 = Object.freeze(path140.concat(node));
41621
+ path143 = Object.freeze(path143.concat(node));
41622
41622
  for (let i = 0; i < node.items.length; ++i) {
41623
- const ci = await visitAsync_(i, node.items[i], visitor, path140);
41623
+ const ci = await visitAsync_(i, node.items[i], visitor, path143);
41624
41624
  if (typeof ci === "number")
41625
41625
  i = ci - 1;
41626
41626
  else if (ci === BREAK)
@@ -41631,13 +41631,13 @@ async function visitAsync_(key2, node, visitor, path140) {
41631
41631
  }
41632
41632
  }
41633
41633
  } else if (isPair(node)) {
41634
- path140 = Object.freeze(path140.concat(node));
41635
- const ck = await visitAsync_("key", node.key, visitor, path140);
41634
+ path143 = Object.freeze(path143.concat(node));
41635
+ const ck = await visitAsync_("key", node.key, visitor, path143);
41636
41636
  if (ck === BREAK)
41637
41637
  return BREAK;
41638
41638
  else if (ck === REMOVE)
41639
41639
  node.key = null;
41640
- const cv = await visitAsync_("value", node.value, visitor, path140);
41640
+ const cv = await visitAsync_("value", node.value, visitor, path143);
41641
41641
  if (cv === BREAK)
41642
41642
  return BREAK;
41643
41643
  else if (cv === REMOVE)
@@ -41664,23 +41664,23 @@ function initVisitor(visitor) {
41664
41664
  }
41665
41665
  return visitor;
41666
41666
  }
41667
- function callVisitor(key2, node, visitor, path140) {
41667
+ function callVisitor(key2, node, visitor, path143) {
41668
41668
  if (typeof visitor === "function")
41669
- return visitor(key2, node, path140);
41669
+ return visitor(key2, node, path143);
41670
41670
  if (isMap(node))
41671
- return visitor.Map?.(key2, node, path140);
41671
+ return visitor.Map?.(key2, node, path143);
41672
41672
  if (isSeq(node))
41673
- return visitor.Seq?.(key2, node, path140);
41673
+ return visitor.Seq?.(key2, node, path143);
41674
41674
  if (isPair(node))
41675
- return visitor.Pair?.(key2, node, path140);
41675
+ return visitor.Pair?.(key2, node, path143);
41676
41676
  if (isScalar(node))
41677
- return visitor.Scalar?.(key2, node, path140);
41677
+ return visitor.Scalar?.(key2, node, path143);
41678
41678
  if (isAlias(node))
41679
- return visitor.Alias?.(key2, node, path140);
41679
+ return visitor.Alias?.(key2, node, path143);
41680
41680
  return void 0;
41681
41681
  }
41682
- function replaceNode(key2, path140, node) {
41683
- const parent = path140[path140.length - 1];
41682
+ function replaceNode(key2, path143, node) {
41683
+ const parent = path143[path143.length - 1];
41684
41684
  if (isCollection(parent)) {
41685
41685
  parent.items[key2] = node;
41686
41686
  } else if (isPair(parent)) {
@@ -42280,10 +42280,10 @@ var init_createNode = __esm({
42280
42280
  });
42281
42281
 
42282
42282
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
42283
- function collectionFromPath(schema4, path140, value) {
42283
+ function collectionFromPath(schema4, path143, value) {
42284
42284
  let v9 = value;
42285
- for (let i = path140.length - 1; i >= 0; --i) {
42286
- const k = path140[i];
42285
+ for (let i = path143.length - 1; i >= 0; --i) {
42286
+ const k = path143[i];
42287
42287
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
42288
42288
  const a = [];
42289
42289
  a[k] = v9;
@@ -42308,7 +42308,7 @@ var init_Collection = __esm({
42308
42308
  init_createNode();
42309
42309
  init_identity();
42310
42310
  init_Node();
42311
- isEmptyPath = (path140) => path140 == null || typeof path140 === "object" && !!path140[Symbol.iterator]().next().done;
42311
+ isEmptyPath = (path143) => path143 == null || typeof path143 === "object" && !!path143[Symbol.iterator]().next().done;
42312
42312
  Collection = class extends NodeBase {
42313
42313
  constructor(type, schema4) {
42314
42314
  super(type);
@@ -42338,11 +42338,11 @@ var init_Collection = __esm({
42338
42338
  * be a Pair instance or a `{ key, value }` object, which may not have a key
42339
42339
  * that already exists in the map.
42340
42340
  */
42341
- addIn(path140, value) {
42342
- if (isEmptyPath(path140))
42341
+ addIn(path143, value) {
42342
+ if (isEmptyPath(path143))
42343
42343
  this.add(value);
42344
42344
  else {
42345
- const [key2, ...rest] = path140;
42345
+ const [key2, ...rest] = path143;
42346
42346
  const node = this.get(key2, true);
42347
42347
  if (isCollection(node))
42348
42348
  node.addIn(rest, value);
@@ -42356,8 +42356,8 @@ var init_Collection = __esm({
42356
42356
  * Removes a value from the collection.
42357
42357
  * @returns `true` if the item was found and removed.
42358
42358
  */
42359
- deleteIn(path140) {
42360
- const [key2, ...rest] = path140;
42359
+ deleteIn(path143) {
42360
+ const [key2, ...rest] = path143;
42361
42361
  if (rest.length === 0)
42362
42362
  return this.delete(key2);
42363
42363
  const node = this.get(key2, true);
@@ -42371,8 +42371,8 @@ var init_Collection = __esm({
42371
42371
  * scalar values from their surrounding node; to disable set `keepScalar` to
42372
42372
  * `true` (collections are always returned intact).
42373
42373
  */
42374
- getIn(path140, keepScalar) {
42375
- const [key2, ...rest] = path140;
42374
+ getIn(path143, keepScalar) {
42375
+ const [key2, ...rest] = path143;
42376
42376
  const node = this.get(key2, true);
42377
42377
  if (rest.length === 0)
42378
42378
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -42390,8 +42390,8 @@ var init_Collection = __esm({
42390
42390
  /**
42391
42391
  * Checks if the collection includes a value with the key `key`.
42392
42392
  */
42393
- hasIn(path140) {
42394
- const [key2, ...rest] = path140;
42393
+ hasIn(path143) {
42394
+ const [key2, ...rest] = path143;
42395
42395
  if (rest.length === 0)
42396
42396
  return this.has(key2);
42397
42397
  const node = this.get(key2, true);
@@ -42401,8 +42401,8 @@ var init_Collection = __esm({
42401
42401
  * Sets a value in this collection. For `!!set`, `value` needs to be a
42402
42402
  * boolean to add/remove the item from the set.
42403
42403
  */
42404
- setIn(path140, value) {
42405
- const [key2, ...rest] = path140;
42404
+ setIn(path143, value) {
42405
+ const [key2, ...rest] = path143;
42406
42406
  if (rest.length === 0) {
42407
42407
  this.set(key2, value);
42408
42408
  } else {
@@ -44836,9 +44836,9 @@ var init_Document = __esm({
44836
44836
  this.contents.add(value);
44837
44837
  }
44838
44838
  /** Adds a value to the document. */
44839
- addIn(path140, value) {
44839
+ addIn(path143, value) {
44840
44840
  if (assertCollection(this.contents))
44841
- this.contents.addIn(path140, value);
44841
+ this.contents.addIn(path143, value);
44842
44842
  }
44843
44843
  /**
44844
44844
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -44913,14 +44913,14 @@ var init_Document = __esm({
44913
44913
  * Removes a value from the document.
44914
44914
  * @returns `true` if the item was found and removed.
44915
44915
  */
44916
- deleteIn(path140) {
44917
- if (isEmptyPath(path140)) {
44916
+ deleteIn(path143) {
44917
+ if (isEmptyPath(path143)) {
44918
44918
  if (this.contents == null)
44919
44919
  return false;
44920
44920
  this.contents = null;
44921
44921
  return true;
44922
44922
  }
44923
- return assertCollection(this.contents) ? this.contents.deleteIn(path140) : false;
44923
+ return assertCollection(this.contents) ? this.contents.deleteIn(path143) : false;
44924
44924
  }
44925
44925
  /**
44926
44926
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -44935,10 +44935,10 @@ var init_Document = __esm({
44935
44935
  * scalar values from their surrounding node; to disable set `keepScalar` to
44936
44936
  * `true` (collections are always returned intact).
44937
44937
  */
44938
- getIn(path140, keepScalar) {
44939
- if (isEmptyPath(path140))
44938
+ getIn(path143, keepScalar) {
44939
+ if (isEmptyPath(path143))
44940
44940
  return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
44941
- return isCollection(this.contents) ? this.contents.getIn(path140, keepScalar) : void 0;
44941
+ return isCollection(this.contents) ? this.contents.getIn(path143, keepScalar) : void 0;
44942
44942
  }
44943
44943
  /**
44944
44944
  * Checks if the document includes a value with the key `key`.
@@ -44949,10 +44949,10 @@ var init_Document = __esm({
44949
44949
  /**
44950
44950
  * Checks if the document includes a value at `path`.
44951
44951
  */
44952
- hasIn(path140) {
44953
- if (isEmptyPath(path140))
44952
+ hasIn(path143) {
44953
+ if (isEmptyPath(path143))
44954
44954
  return this.contents !== void 0;
44955
- return isCollection(this.contents) ? this.contents.hasIn(path140) : false;
44955
+ return isCollection(this.contents) ? this.contents.hasIn(path143) : false;
44956
44956
  }
44957
44957
  /**
44958
44958
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -44969,13 +44969,13 @@ var init_Document = __esm({
44969
44969
  * Sets a value in this document. For `!!set`, `value` needs to be a
44970
44970
  * boolean to add/remove the item from the set.
44971
44971
  */
44972
- setIn(path140, value) {
44973
- if (isEmptyPath(path140)) {
44972
+ setIn(path143, value) {
44973
+ if (isEmptyPath(path143)) {
44974
44974
  this.contents = value;
44975
44975
  } else if (this.contents == null) {
44976
- this.contents = collectionFromPath(this.schema, Array.from(path140), value);
44976
+ this.contents = collectionFromPath(this.schema, Array.from(path143), value);
44977
44977
  } else if (assertCollection(this.contents)) {
44978
- this.contents.setIn(path140, value);
44978
+ this.contents.setIn(path143, value);
44979
44979
  }
44980
44980
  }
44981
44981
  /**
@@ -46880,15 +46880,15 @@ function visit2(cst, visitor) {
46880
46880
  cst = { start: cst.start, value: cst.value };
46881
46881
  _visit(Object.freeze([]), cst, visitor);
46882
46882
  }
46883
- function _visit(path140, item, visitor) {
46884
- let ctrl = visitor(item, path140);
46883
+ function _visit(path143, item, visitor) {
46884
+ let ctrl = visitor(item, path143);
46885
46885
  if (typeof ctrl === "symbol")
46886
46886
  return ctrl;
46887
46887
  for (const field of ["key", "value"]) {
46888
46888
  const token = item[field];
46889
46889
  if (token && "items" in token) {
46890
46890
  for (let i = 0; i < token.items.length; ++i) {
46891
- const ci = _visit(Object.freeze(path140.concat([[field, i]])), token.items[i], visitor);
46891
+ const ci = _visit(Object.freeze(path143.concat([[field, i]])), token.items[i], visitor);
46892
46892
  if (typeof ci === "number")
46893
46893
  i = ci - 1;
46894
46894
  else if (ci === BREAK2)
@@ -46899,10 +46899,10 @@ function _visit(path140, item, visitor) {
46899
46899
  }
46900
46900
  }
46901
46901
  if (typeof ctrl === "function" && field === "key")
46902
- ctrl = ctrl(item, path140);
46902
+ ctrl = ctrl(item, path143);
46903
46903
  }
46904
46904
  }
46905
- return typeof ctrl === "function" ? ctrl(item, path140) : ctrl;
46905
+ return typeof ctrl === "function" ? ctrl(item, path143) : ctrl;
46906
46906
  }
46907
46907
  var BREAK2, SKIP2, REMOVE2;
46908
46908
  var init_cst_visit = __esm({
@@ -46913,9 +46913,9 @@ var init_cst_visit = __esm({
46913
46913
  visit2.BREAK = BREAK2;
46914
46914
  visit2.SKIP = SKIP2;
46915
46915
  visit2.REMOVE = REMOVE2;
46916
- visit2.itemAtPath = (cst, path140) => {
46916
+ visit2.itemAtPath = (cst, path143) => {
46917
46917
  let item = cst;
46918
- for (const [field, index] of path140) {
46918
+ for (const [field, index] of path143) {
46919
46919
  const tok = item?.[field];
46920
46920
  if (tok && "items" in tok) {
46921
46921
  item = tok.items[index];
@@ -46924,9 +46924,9 @@ var init_cst_visit = __esm({
46924
46924
  }
46925
46925
  return item;
46926
46926
  };
46927
- visit2.parentCollection = (cst, path140) => {
46928
- const parent = visit2.itemAtPath(cst, path140.slice(0, -1));
46929
- const field = path140[path140.length - 1][0];
46927
+ visit2.parentCollection = (cst, path143) => {
46928
+ const parent = visit2.itemAtPath(cst, path143.slice(0, -1));
46929
+ const field = path143[path143.length - 1][0];
46930
46930
  const coll = parent?.[field];
46931
46931
  if (coll && "items" in coll)
46932
46932
  return coll;
@@ -48229,14 +48229,14 @@ var init_parser = __esm({
48229
48229
  case "scalar":
48230
48230
  case "single-quoted-scalar":
48231
48231
  case "double-quoted-scalar": {
48232
- const fs103 = this.flowScalar(this.type);
48232
+ const fs106 = this.flowScalar(this.type);
48233
48233
  if (atNextItem || it.value) {
48234
- map2.items.push({ start, key: fs103, sep: [] });
48234
+ map2.items.push({ start, key: fs106, sep: [] });
48235
48235
  this.onKeyLine = true;
48236
48236
  } else if (it.sep) {
48237
- this.stack.push(fs103);
48237
+ this.stack.push(fs106);
48238
48238
  } else {
48239
- Object.assign(it, { key: fs103, sep: [] });
48239
+ Object.assign(it, { key: fs106, sep: [] });
48240
48240
  this.onKeyLine = true;
48241
48241
  }
48242
48242
  return;
@@ -48364,13 +48364,13 @@ var init_parser = __esm({
48364
48364
  case "scalar":
48365
48365
  case "single-quoted-scalar":
48366
48366
  case "double-quoted-scalar": {
48367
- const fs103 = this.flowScalar(this.type);
48367
+ const fs106 = this.flowScalar(this.type);
48368
48368
  if (!it || it.value)
48369
- fc.items.push({ start: [], key: fs103, sep: [] });
48369
+ fc.items.push({ start: [], key: fs106, sep: [] });
48370
48370
  else if (it.sep)
48371
- this.stack.push(fs103);
48371
+ this.stack.push(fs106);
48372
48372
  else
48373
- Object.assign(it, { key: fs103, sep: [] });
48373
+ Object.assign(it, { key: fs106, sep: [] });
48374
48374
  return;
48375
48375
  }
48376
48376
  case "flow-map-end":
@@ -52179,9 +52179,9 @@ var init_podspec_ruby = __esm({
52179
52179
  }
52180
52180
  // ---- errors
52181
52181
  exceptionClass(name3) {
52182
- const path140 = name3.split("::");
52182
+ const path143 = name3.split("::");
52183
52183
  let module2 = this.object;
52184
- for (const part of path140) {
52184
+ for (const part of path143) {
52185
52185
  const next = module2.consts.get(part);
52186
52186
  if (!(next instanceof RModule))
52187
52187
  throw new UnsupportedRuby(`no exception class ${name3}`);
@@ -59005,16 +59005,16 @@ var init_pods_files = __esm({
59005
59005
  };
59006
59006
  unique = (values) => [...new Set(values)];
59007
59007
  XCFramework = class {
59008
- constructor(targetName, path140) {
59008
+ constructor(targetName, path143) {
59009
59009
  this.targetName = targetName;
59010
- this.path = path140;
59011
- const plist2 = parsePlistBytes(import_node_fs65.default.readFileSync(`${path140}/Info.plist`));
59010
+ this.path = path143;
59011
+ const plist2 = parsePlistBytes(import_node_fs65.default.readFileSync(`${path143}/Info.plist`));
59012
59012
  if (!isRecord(plist2) || !Array.isArray(plist2.AvailableLibraries))
59013
- throw new Error(`${path140}/Info.plist declares no AvailableLibraries`);
59013
+ throw new Error(`${path143}/Info.plist declares no AvailableLibraries`);
59014
59014
  this.slices = plist2.AvailableLibraries.map((library) => {
59015
59015
  if (!isRecord(library) || typeof library.LibraryIdentifier !== "string" || typeof library.LibraryPath !== "string" || typeof library.SupportedPlatform !== "string")
59016
- throw new Error(`${path140}/Info.plist has an invalid library entry`);
59017
- const root = `${path140}/${library.LibraryIdentifier}`;
59016
+ throw new Error(`${path143}/Info.plist has an invalid library entry`);
59017
+ const root = `${path143}/${library.LibraryIdentifier}`;
59018
59018
  const slicePath = `${root}/${library.LibraryPath}`;
59019
59019
  const extension = slicePath.slice(slicePath.lastIndexOf("."));
59020
59020
  const packaging = extension === ".framework" ? "framework" : extension === ".a" || extension === ".dylib" ? "library" : null;
@@ -59036,7 +59036,7 @@ var init_pods_files = __esm({
59036
59036
  }).sort((a, b) => byBytes2(a.identifier, b.identifier));
59037
59037
  if (this.slices.length === 0)
59038
59038
  throw new Error(
59039
- `XCFramework at ${path140} does not contain any frameworks or libraries.`
59039
+ `XCFramework at ${path143} does not contain any frameworks or libraries.`
59040
59040
  );
59041
59041
  }
59042
59042
  slices;
@@ -60890,9 +60890,9 @@ echo "SUCCESS" > "\${SCRIPT_OUTPUT_FILE_0}"
60890
60890
  DEFAULT_SHELL_SCRIPT = "# Type a script or drag a script file from your workspace to insert its path.\n";
60891
60891
  stringList2 = (value) => Array.isArray(value) && value.every((item) => typeof item === "string") ? value : null;
60892
60892
  UserProject = class {
60893
- constructor(table, path140, objectVersion) {
60893
+ constructor(table, path143, objectVersion) {
60894
60894
  this.table = table;
60895
- this.path = path140;
60895
+ this.path = path143;
60896
60896
  this.objectVersion = objectVersion;
60897
60897
  }
60898
60898
  get projectDir() {
@@ -67983,14 +67983,14 @@ function addAsset(into, asset) {
67983
67983
  function checkStack(dir, type, devices2) {
67984
67984
  const sets = (parent, allowed) => (0, import_node_fs76.readdirSync)(parent, { withFileTypes: true }).flatMap((entry) => {
67985
67985
  if (entry.name.startsWith(".") || entry.isFile()) return [];
67986
- const path140 = (0, import_node_path76.join)(parent, entry.name);
67986
+ const path143 = (0, import_node_path76.join)(parent, entry.name);
67987
67987
  const extension = (0, import_node_path76.extname)(entry.name);
67988
67988
  if (!entry.isDirectory() || !allowed.includes(extension))
67989
67989
  return refuse(
67990
- path140,
67990
+ path143,
67991
67991
  `image stack content other than ${allowed.join(", ")} is unproven`
67992
67992
  );
67993
- return [{ path: path140, extension }];
67993
+ return [{ path: path143, extension }];
67994
67994
  });
67995
67995
  for (const layer of sets(dir, [`.${type}layer`, ".imageset", ".colorset"])) {
67996
67996
  if (layer.extension !== `.${type}layer`) continue;
@@ -68002,37 +68002,37 @@ function checkStack(dir, type, devices2) {
68002
68002
  function walk2(dir, into, devices2, extensions) {
68003
68003
  for (const entry of (0, import_node_fs76.readdirSync)(dir, { withFileTypes: true })) {
68004
68004
  if (entry.name.startsWith(".") || entry.isFile()) continue;
68005
- const path140 = (0, import_node_path76.join)(dir, entry.name);
68006
- if (!entry.isDirectory()) return refuse(path140, "it is neither a file nor a directory");
68005
+ const path143 = (0, import_node_path76.join)(dir, entry.name);
68006
+ if (!entry.isDirectory()) return refuse(path143, "it is neither a file nor a directory");
68007
68007
  const extension = (0, import_node_path76.extname)(entry.name).slice(1);
68008
68008
  const type = extension.toLowerCase();
68009
68009
  const base2 = entry.name.slice(0, entry.name.length - extension.length - 1);
68010
68010
  if (type !== extension && knownTypes.has(type))
68011
- return refuse(path140, "its type extension is not lowercase");
68011
+ return refuse(path143, "its type extension is not lowercase");
68012
68012
  if (type === "colorset" || type === "imageset" || type === "symbolset") {
68013
68013
  addAsset(into, {
68014
68014
  kind: type === "colorset" ? "color" : "image",
68015
68015
  name: base2,
68016
- ...assetState(path140, type, devices2),
68016
+ ...assetState(path143, type, devices2),
68017
68017
  extensions,
68018
- source: path140
68018
+ source: path143
68019
68019
  });
68020
68020
  continue;
68021
68021
  }
68022
68022
  if (silentTypes.has(type)) continue;
68023
68023
  if (stackTypes.has(type)) {
68024
- checkStack(path140, type, devices2);
68024
+ checkStack(path143, type, devices2);
68025
68025
  continue;
68026
68026
  }
68027
- if (unprovenTypes.has(type)) return refuse(path140, `${type} assets are unproven`);
68027
+ if (unprovenTypes.has(type)) return refuse(path143, `${type} assets are unproven`);
68028
68028
  const name3 = type === "spriteatlas" ? base2 : entry.name;
68029
- if (!folderProperties((0, import_node_path76.join)(path140, "Contents.json")).namespace) {
68030
- walk2(path140, into, devices2, extensions);
68029
+ if (!folderProperties((0, import_node_path76.join)(path143, "Contents.json")).namespace) {
68030
+ walk2(path143, into, devices2, extensions);
68031
68031
  continue;
68032
68032
  }
68033
- const child = into.namespaces.get(name3) ?? scope(path140);
68033
+ const child = into.namespaces.get(name3) ?? scope(path143);
68034
68034
  into.namespaces.set(name3, child);
68035
- walk2(path140, child, devices2, extensions);
68035
+ walk2(path143, child, devices2, extensions);
68036
68036
  }
68037
68037
  }
68038
68038
  function words(name3) {
@@ -68079,11 +68079,11 @@ function members(into, kind, prefix, extensions) {
68079
68079
  const assets2 = /* @__PURE__ */ new Set();
68080
68080
  const out = [];
68081
68081
  for (const entry of entries2) {
68082
- const path140 = `${prefix}${entry.name}`;
68082
+ const path143 = `${prefix}${entry.name}`;
68083
68083
  const source = entry.child ? entry.child.source : entry.asset.source;
68084
68084
  if (Array.from(entry.name).some((char) => char.charCodeAt(0) > 127))
68085
68085
  refuse(source, "its name is not ASCII");
68086
- const named = (text8) => `The \\"${escape(path140)}\\" ${text8}`;
68086
+ const named = (text8) => `The \\"${escape(path143)}\\" ${text8}`;
68087
68087
  if (entry.child) {
68088
68088
  const text8 = symbol(entry.name, true);
68089
68089
  if (!text8)
@@ -68106,9 +68106,9 @@ function members(into, kind, prefix, extensions) {
68106
68106
  namespaces.add(text8);
68107
68107
  out.push({
68108
68108
  type: "namespace",
68109
- path: path140,
68109
+ path: path143,
68110
68110
  symbol: spelled(text8),
68111
- members: members(entry.child, kind, `${path140}/`, extensions)
68111
+ members: members(entry.child, kind, `${path143}/`, extensions)
68112
68112
  });
68113
68113
  }
68114
68114
  continue;
@@ -68135,7 +68135,7 @@ function members(into, kind, prefix, extensions) {
68135
68135
  else if (!omitted)
68136
68136
  out.push({
68137
68137
  type: "asset",
68138
- path: path140,
68138
+ path: path143,
68139
68139
  name: entry.name,
68140
68140
  symbol: spelled(text7),
68141
68141
  thinnable: asset.thinnable,
@@ -68416,8 +68416,8 @@ var init_xcode_asset_symbols = __esm({
68416
68416
  import_node_path76 = require("node:path");
68417
68417
  Refusal = class extends Error {
68418
68418
  };
68419
- refuse = (path140, reason) => {
68420
- throw new Refusal(`Generated asset symbols are unproven for ${path140}: ${reason}`);
68419
+ refuse = (path143, reason) => {
68420
+ throw new Refusal(`Generated asset symbols are unproven for ${path143}: ${reason}`);
68421
68421
  };
68422
68422
  isRecord5 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
68423
68423
  scope = (source) => ({
@@ -68863,11 +68863,11 @@ function catalogDigest(directory2) {
68863
68863
  for (const entry of (0, import_node_fs77.readdirSync)(dir, { withFileTypes: true }).sort(
68864
68864
  (a, b) => a.name.localeCompare(b.name)
68865
68865
  )) {
68866
- const path140 = (0, import_node_path77.join)(dir, entry.name);
68867
- if (entry.isDirectory()) walk4(path140);
68868
- else if (entry.isFile() && (0, import_node_fs77.statSync)(path140).size <= 64 * 1024 * 1024)
68869
- hashes.push([(0, import_node_path77.relative)(directory2, path140), sha2562((0, import_node_fs77.readFileSync)(path140))]);
68870
- else throw new Error(`Unsupported asset catalog entry: ${path140}`);
68866
+ const path143 = (0, import_node_path77.join)(dir, entry.name);
68867
+ if (entry.isDirectory()) walk4(path143);
68868
+ else if (entry.isFile() && (0, import_node_fs77.statSync)(path143).size <= 64 * 1024 * 1024)
68869
+ hashes.push([(0, import_node_path77.relative)(directory2, path143), sha2562((0, import_node_fs77.readFileSync)(path143))]);
68870
+ else throw new Error(`Unsupported asset catalog entry: ${path143}`);
68871
68871
  }
68872
68872
  };
68873
68873
  walk4(directory2);
@@ -68878,7 +68878,7 @@ function symbolSource(plan, root) {
68878
68878
  const known = symbolTexts.get(key2);
68879
68879
  if (known !== void 0) return { status: "source", text: known };
68880
68880
  const source = assetSymbolSource(
68881
- plan.catalogs.map(({ path: path140 }) => (0, import_node_path77.join)(root, path140)),
68881
+ plan.catalogs.map(({ path: path143 }) => (0, import_node_path77.join)(root, path143)),
68882
68882
  plan.settings
68883
68883
  );
68884
68884
  if (source.status === "source") symbolTexts.set(key2, source.text);
@@ -68937,9 +68937,9 @@ function planAssetSymbols(resources, root, settings) {
68937
68937
  `Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
68938
68938
  );
68939
68939
  const plan = {
68940
- catalogs: catalogs.map((path140) => ({
68941
- path: path140,
68942
- sha256: catalogDigest((0, import_node_path77.join)(root, path140))
68940
+ catalogs: catalogs.map((path143) => ({
68941
+ path: path143,
68942
+ sha256: catalogDigest((0, import_node_path77.join)(root, path143))
68943
68943
  })),
68944
68944
  settings: { deployment: target, devices: devices2, extensions: extensions === "YES" }
68945
68945
  };
@@ -73171,10 +73171,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
73171
73171
  if (!isDict(entry)) return [];
73172
73172
  if (entry.isa === "PBXFileSystemSynchronizedRootGroup") {
73173
73173
  const folder = project2.resolvePath(id);
73174
- const pending = folder ? [folder] : [];
73174
+ const pending2 = folder ? [folder] : [];
73175
73175
  const packages = [];
73176
- while (pending.length > 0) {
73177
- const dir = pending.pop();
73176
+ while (pending2.length > 0) {
73177
+ const dir = pending2.pop();
73178
73178
  if (import_node_fs79.default.existsSync(import_node_path80.default.join(dir, "Package.swift"))) {
73179
73179
  packages.push(dir);
73180
73180
  continue;
@@ -73182,7 +73182,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
73182
73182
  if (!isDirectory3(dir)) continue;
73183
73183
  for (const child of import_node_fs79.default.readdirSync(dir, { withFileTypes: true }))
73184
73184
  if (child.isDirectory() && !child.name.startsWith("."))
73185
- pending.push(import_node_path80.default.join(dir, child.name));
73185
+ pending2.push(import_node_path80.default.join(dir, child.name));
73186
73186
  }
73187
73187
  return packages;
73188
73188
  }
@@ -73673,14 +73673,14 @@ function localPackageDirectories(root, app) {
73673
73673
  }
73674
73674
  async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
73675
73675
  const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
73676
- let pending = hashing.get(key2);
73677
- if (!pending) {
73678
- pending = walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment).finally(
73676
+ let pending2 = hashing.get(key2);
73677
+ if (!pending2) {
73678
+ pending2 = walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment).finally(
73679
73679
  () => hashing.delete(key2)
73680
73680
  );
73681
- hashing.set(key2, pending);
73681
+ hashing.set(key2, pending2);
73682
73682
  }
73683
- const inputs2 = await pending;
73683
+ const inputs2 = await pending2;
73684
73684
  signal?.throwIfAborted();
73685
73685
  return inputs2;
73686
73686
  }
@@ -74834,8 +74834,8 @@ async function ensureCompose(toolchain) {
74834
74834
  }
74835
74835
  function ensureToolchain(toolchain) {
74836
74836
  const key2 = JSON.stringify(toolchain);
74837
- const pending = toolchains.get(key2);
74838
- if (pending) return pending;
74837
+ const pending2 = toolchains.get(key2);
74838
+ if (pending2) return pending2;
74839
74839
  const ready = (async () => {
74840
74840
  const dir = import_node_path83.default.join(kotlinHome(), toolchain.compiler.version);
74841
74841
  const compilerDir = import_node_path83.default.join(dir, `compiler-${toolchain.compiler.sha256}`);
@@ -77308,13 +77308,13 @@ function packageNativeRequests(dir) {
77308
77308
  }
77309
77309
  function dependencyNativeOwners(appDir, manifest) {
77310
77310
  const owners = /* @__PURE__ */ new Map();
77311
- const pending = Object.keys({
77311
+ const pending2 = Object.keys({
77312
77312
  ...manifest?.devDependencies,
77313
77313
  ...manifest?.dependencies
77314
77314
  }).map((name3) => ({ from: appDir, name: name3 }));
77315
77315
  const visited = /* @__PURE__ */ new Set();
77316
- for (let index = 0; index < pending.length; index++) {
77317
- const { from, name: name3 } = pending[index];
77316
+ for (let index = 0; index < pending2.length; index++) {
77317
+ const { from, name: name3 } = pending2[index];
77318
77318
  const dir = installedPackageDir(from, name3);
77319
77319
  if (!dir || visited.has(dir)) continue;
77320
77320
  visited.add(dir);
@@ -77329,7 +77329,7 @@ function dependencyNativeOwners(appDir, manifest) {
77329
77329
  ...dependency?.dependencies,
77330
77330
  ...isRecord(optional3) ? optional3 : {}
77331
77331
  }))
77332
- pending.push({ from: dir, name: child });
77332
+ pending2.push({ from: dir, name: child });
77333
77333
  }
77334
77334
  return owners;
77335
77335
  }
@@ -77504,7 +77504,7 @@ function scanLocalNative(appDir, pkg, answered, platform2, knownPackages = /* @_
77504
77504
  expoModule: moduleDir ? (0, import_node_path88.relative)(appDir, moduleDir) || "." : null,
77505
77505
  optional: optional3,
77506
77506
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
77507
- (path140) => path140.endsWith(".swift") && [...(readSmallFile(path140) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
77507
+ (path143) => path143.endsWith(".swift") && [...(readSmallFile(path143) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
77508
77508
  (match) => match[1] === name3
77509
77509
  )
77510
77510
  ) : false,
@@ -79597,26 +79597,26 @@ var init_native_preparation = __esm({
79597
79597
  const token = params.get(NATIVE_PREPARE_QUERY_PARAM);
79598
79598
  const inputs2 = token ? watchNativeInputs(root) : void 0;
79599
79599
  const key2 = inputs2 ? `${owner}\0${resolveActiveRuntimeRoot() ?? ""}` : owner;
79600
- let pending = this.compiling;
79600
+ let pending2 = this.compiling;
79601
79601
  if (inputs2) {
79602
79602
  const prepared = this.prepared.get(inputs2);
79603
- if (prepared) pending = prepared;
79603
+ if (prepared) pending2 = prepared;
79604
79604
  else {
79605
- pending = /* @__PURE__ */ new Map();
79606
- this.prepared.set(inputs2, pending);
79605
+ pending2 = /* @__PURE__ */ new Map();
79606
+ this.prepared.set(inputs2, pending2);
79607
79607
  }
79608
79608
  }
79609
- let preparation = pending.get(key2);
79609
+ let preparation = pending2.get(key2);
79610
79610
  if (!preparation || preparation.ready && !reusable(preparation.ready.value)) {
79611
79611
  const next = { result: Promise.resolve().then(compile2) };
79612
79612
  preparation = next;
79613
- pending.set(key2, next);
79613
+ pending2.set(key2, next);
79614
79614
  void next.result.then(
79615
79615
  (value2) => {
79616
- if (!inputs2 || !reusable(value2)) pending.delete(key2);
79616
+ if (!inputs2 || !reusable(value2)) pending2.delete(key2);
79617
79617
  else next.ready = { value: value2 };
79618
79618
  },
79619
- () => pending.delete(key2)
79619
+ () => pending2.delete(key2)
79620
79620
  );
79621
79621
  }
79622
79622
  const value = await preparation.result;
@@ -80489,12 +80489,12 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
80489
80489
  function installedPodBinaries(directory2) {
80490
80490
  if (!import_node_fs93.default.existsSync(directory2)) return [];
80491
80491
  const binaries = [];
80492
- const pending = [directory2];
80493
- for (let current2 = pending.pop(); current2; current2 = pending.pop())
80492
+ const pending2 = [directory2];
80493
+ for (let current2 = pending2.pop(); current2; current2 = pending2.pop())
80494
80494
  for (const entry of import_node_fs93.default.readdirSync(current2, { withFileTypes: true })) {
80495
80495
  const file = import_node_path95.default.join(current2, entry.name);
80496
80496
  if (entry.isDirectory() && BINARY_BUNDLE.test(entry.name)) binaries.push(file);
80497
- else if (entry.isDirectory()) pending.push(file);
80497
+ else if (entry.isDirectory()) pending2.push(file);
80498
80498
  else if (entry.name.endsWith(".a")) binaries.push(file);
80499
80499
  else if (SOURCE.test(entry.name)) return [];
80500
80500
  }
@@ -80749,10 +80749,10 @@ var require_path_parse = __commonJS({
80749
80749
  code === 45 || /* - */
80750
80750
  code === 46;
80751
80751
  }
80752
- function State(path140) {
80752
+ function State(path143) {
80753
80753
  this.index = 0;
80754
- this.path = path140;
80755
- this.max = path140.length;
80754
+ this.path = path143;
80755
+ this.max = path143.length;
80756
80756
  this.result = [];
80757
80757
  this.param = 0;
80758
80758
  this.err = "";
@@ -81126,7 +81126,7 @@ var require_a2c = __commonJS({
81126
81126
  }
81127
81127
  return sign * Math.acos(dot);
81128
81128
  }
81129
- function get_arc_center(x1, y1, x2, y2, fa, fs103, rx, ry, sin_phi, cos_phi) {
81129
+ function get_arc_center(x1, y1, x2, y2, fa, fs106, rx, ry, sin_phi, cos_phi) {
81130
81130
  var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
81131
81131
  var y1p = -sin_phi * (x1 - x2) / 2 + cos_phi * (y1 - y2) / 2;
81132
81132
  var rx_sq = rx * rx;
@@ -81138,7 +81138,7 @@ var require_a2c = __commonJS({
81138
81138
  radicant = 0;
81139
81139
  }
81140
81140
  radicant /= rx_sq * y1p_sq + ry_sq * x1p_sq;
81141
- radicant = Math.sqrt(radicant) * (fa === fs103 ? -1 : 1);
81141
+ radicant = Math.sqrt(radicant) * (fa === fs106 ? -1 : 1);
81142
81142
  var cxp = radicant * rx / ry * y1p;
81143
81143
  var cyp = radicant * -ry / rx * x1p;
81144
81144
  var cx = cos_phi * cxp - sin_phi * cyp + (x1 + x2) / 2;
@@ -81149,10 +81149,10 @@ var require_a2c = __commonJS({
81149
81149
  var v2y = (-y1p - cyp) / ry;
81150
81150
  var theta1 = unit_vector_angle(1, 0, v1x, v1y);
81151
81151
  var delta_theta = unit_vector_angle(v1x, v1y, v2x, v2y);
81152
- if (fs103 === 0 && delta_theta > 0) {
81152
+ if (fs106 === 0 && delta_theta > 0) {
81153
81153
  delta_theta -= TAU;
81154
81154
  }
81155
- if (fs103 === 1 && delta_theta < 0) {
81155
+ if (fs106 === 1 && delta_theta < 0) {
81156
81156
  delta_theta += TAU;
81157
81157
  }
81158
81158
  return [cx, cy, theta1, delta_theta];
@@ -81165,7 +81165,7 @@ var require_a2c = __commonJS({
81165
81165
  var y2 = Math.sin(theta1 + delta_theta);
81166
81166
  return [x1, y1, x1 - y1 * alpha, y1 + x1 * alpha, x2 + y2 * alpha, y2 - x2 * alpha, x2, y2];
81167
81167
  }
81168
- module2.exports = function a2c(x1, y1, x2, y2, fa, fs103, rx, ry, phi) {
81168
+ module2.exports = function a2c(x1, y1, x2, y2, fa, fs106, rx, ry, phi) {
81169
81169
  var sin_phi = Math.sin(phi * TAU / 360);
81170
81170
  var cos_phi = Math.cos(phi * TAU / 360);
81171
81171
  var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
@@ -81183,7 +81183,7 @@ var require_a2c = __commonJS({
81183
81183
  rx *= Math.sqrt(lambda);
81184
81184
  ry *= Math.sqrt(lambda);
81185
81185
  }
81186
- var cc = get_arc_center(x1, y1, x2, y2, fa, fs103, rx, ry, sin_phi, cos_phi);
81186
+ var cc = get_arc_center(x1, y1, x2, y2, fa, fs106, rx, ry, sin_phi, cos_phi);
81187
81187
  var result = [];
81188
81188
  var theta1 = cc[2];
81189
81189
  var delta_theta = cc[3];
@@ -81272,11 +81272,11 @@ var require_svgpath = __commonJS({
81272
81272
  var matrix = require_matrix();
81273
81273
  var a2c = require_a2c();
81274
81274
  var ellipse = require_ellipse();
81275
- function SvgPath(path140) {
81275
+ function SvgPath(path143) {
81276
81276
  if (!(this instanceof SvgPath)) {
81277
- return new SvgPath(path140);
81277
+ return new SvgPath(path143);
81278
81278
  }
81279
- var pstate = pathParse(path140);
81279
+ var pstate = pathParse(path143);
81280
81280
  this.segments = pstate.segments;
81281
81281
  this.err = pstate.err;
81282
81282
  this.__stack = [];
@@ -81759,8 +81759,8 @@ function imagesetFiles(images) {
81759
81759
  function bundleImageRenditionKey(file, scale) {
81760
81760
  return extOf(file) === ".svg" ? `${file}/${scale}x.png` : file;
81761
81761
  }
81762
- function flatScale(path140) {
81763
- const match = /@([23])x\.[^./]+$/.exec(path140);
81762
+ function flatScale(path143) {
81763
+ const match = /@([23])x\.[^./]+$/.exec(path143);
81764
81764
  return match ? Number(match[1]) : 1;
81765
81765
  }
81766
81766
  function providesNamespace(text7) {
@@ -81787,8 +81787,8 @@ function catalogEntryName(contentsPath, kind, readText2) {
81787
81787
  }
81788
81788
  return segments.join("/");
81789
81789
  }
81790
- function isFlatResourceImage(path140) {
81791
- return path140.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path140));
81790
+ function isFlatResourceImage(path143) {
81791
+ return path143.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path143));
81792
81792
  }
81793
81793
  function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
81794
81794
  const table = [];
@@ -81801,7 +81801,7 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
81801
81801
  seen.set(bundlePath, names);
81802
81802
  return { bundlePath, names };
81803
81803
  };
81804
- const catalogs = paths.filter((path140) => baseOf(path140) === "Contents.json");
81804
+ const catalogs = paths.filter((path143) => baseOf(path143) === "Contents.json");
81805
81805
  for (const contentsPath of catalogs) {
81806
81806
  const name3 = catalogEntryName(contentsPath, ".imageset", readText2);
81807
81807
  if (name3 === null) continue;
@@ -81834,16 +81834,16 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
81834
81834
  ...intent === "template" || intent === "original" ? { renderingMode: intent } : {}
81835
81835
  });
81836
81836
  }
81837
- for (const path140 of paths) {
81838
- if (!isFlatResourceImage(path140)) continue;
81839
- const filename = baseOf(path140);
81837
+ for (const path143 of paths) {
81838
+ if (!isFlatResourceImage(path143)) continue;
81839
+ const filename = baseOf(path143);
81840
81840
  const name3 = filename.slice(0, -extOf(filename).length);
81841
- const { bundlePath, names } = namesFor(path140);
81841
+ const { bundlePath, names } = namesFor(path143);
81842
81842
  if (name3 === "" || names.has(name3)) continue;
81843
81843
  names.add(name3);
81844
81844
  const scaledFilename = filename.replace(/@[23]x(?=\.[^./]+$)/, "");
81845
81845
  const fileNames = (scaledFilename === filename ? [filename] : [filename, scaledFilename]).filter((lookup2) => !names.has(lookup2));
81846
- table.push({ name: name3, file: path140, scale: flatScale(path140), bundlePath, fileNames });
81846
+ table.push({ name: name3, file: path143, scale: flatScale(path143), bundlePath, fileNames });
81847
81847
  }
81848
81848
  return table;
81849
81849
  }
@@ -81878,7 +81878,7 @@ function colorsetValue(color) {
81878
81878
  }
81879
81879
  function enumerateBundleColors(paths, readText2) {
81880
81880
  const table = {};
81881
- for (const contentsPath of paths.filter((path140) => baseOf(path140) === "Contents.json")) {
81881
+ for (const contentsPath of paths.filter((path143) => baseOf(path143) === "Contents.json")) {
81882
81882
  const name3 = catalogEntryName(contentsPath, ".colorset", readText2);
81883
81883
  if (name3 === null || name3 in table) continue;
81884
81884
  let colors;
@@ -81942,8 +81942,8 @@ function axisExtremes(points) {
81942
81942
  function pathBounds(d) {
81943
81943
  const xs = [];
81944
81944
  const ys = [];
81945
- for (const path140 of d)
81946
- (0, import_svgpath.default)(path140).abs().unshort().unarc().iterate((segment3, _index, x, y) => {
81945
+ for (const path143 of d)
81946
+ (0, import_svgpath.default)(path143).abs().unshort().unarc().iterate((segment3, _index, x, y) => {
81947
81947
  const [command, ...args] = segment3;
81948
81948
  if (command === "M" || command === "L") {
81949
81949
  xs.push(Number(args[0]));
@@ -82009,7 +82009,7 @@ function guide(elements, id, axis) {
82009
82009
  }
82010
82010
  function enumerateBundleSymbols(paths, readText2, bundleForFile) {
82011
82011
  const table = {};
82012
- for (const contentsPath of paths.filter((path140) => baseOf(path140) === "Contents.json")) {
82012
+ for (const contentsPath of paths.filter((path143) => baseOf(path143) === "Contents.json")) {
82013
82013
  const name3 = catalogEntryName(contentsPath, ".symbolset", readText2);
82014
82014
  if (name3 === null) continue;
82015
82015
  const bundle = bundleForFile(contentsPath);
@@ -82075,8 +82075,8 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
82075
82075
  advance,
82076
82076
  box: [12 - wide2 / 2, 12 - tall / 2, wide2, tall],
82077
82077
  ...bearings ? { customLayout: { bearings, verticalOutset, descent } } : {},
82078
- layers: d.map((path140) => ({
82079
- d: (0, import_svgpath.default)(path140).abs().scale(em).translate(translateX, translateY).round(3).toString()
82078
+ layers: d.map((path143) => ({
82079
+ d: (0, import_svgpath.default)(path143).abs().scale(em).translate(translateX, translateY).round(3).toString()
82080
82080
  }))
82081
82081
  };
82082
82082
  table[vectorKey] = vector;
@@ -82087,13 +82087,13 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
82087
82087
  }
82088
82088
  return table;
82089
82089
  }
82090
- function isCopiedResource(path140, copiedBundle, copyLooseRasters) {
82091
- const segments = path140.split("/");
82090
+ function isCopiedResource(path143, copiedBundle, copyLooseRasters) {
82091
+ const segments = path143.split("/");
82092
82092
  if (segments.some((segment3) => /\.(atlasc|bundle|storyboardc|nib|momd)$/.test(segment3)))
82093
82093
  return true;
82094
82094
  if (segments.some((segment3) => /\.xcdatamodeld?$/.test(segment3))) return false;
82095
82095
  if (copiedBundle) return true;
82096
- const ext = extOf(path140);
82096
+ const ext = extOf(path143);
82097
82097
  if (ext === ".json" || ext === ".xcstrings") return true;
82098
82098
  return !COMPILED_EXTENSIONS.has(ext) && (copyLooseRasters || !RASTER_EXTENSIONS.has(ext)) && !segments.some((segment3) => segment3.endsWith(".xcassets"));
82099
82099
  }
@@ -82101,7 +82101,7 @@ function enumerateBundleResources(paths, { copiedBundle = false, copyLooseRaster
82101
82101
  const found = [];
82102
82102
  const seen = /* @__PURE__ */ new Set();
82103
82103
  const ordered = [...paths].filter(
82104
- (path140) => path140.split("/").includes("Resources") && path140.split("/").every((segment3) => segment3 !== "" && segment3 !== "..") && isCopiedResource(path140, copiedBundle, copyLooseRasters)
82104
+ (path143) => path143.split("/").includes("Resources") && path143.split("/").every((segment3) => segment3 !== "" && segment3 !== "..") && isCopiedResource(path143, copiedBundle, copyLooseRasters)
82105
82105
  ).sort((a, b) => {
82106
82106
  const aDepth = a.split("/").length;
82107
82107
  const bDepth = b.split("/").length;
@@ -82249,31 +82249,31 @@ function tokens(text7) {
82249
82249
  }
82250
82250
  return result;
82251
82251
  }
82252
- function qualified(language, key2, path140) {
82253
- return `(${language}: ${key2}${path140 === "" ? "" : "|==|" + path140})`;
82252
+ function qualified(language, key2, path143) {
82253
+ return `(${language}: ${key2}${path143 === "" ? "" : "|==|" + path143})`;
82254
82254
  }
82255
- function requiresNumber(language, key2, path140) {
82255
+ function requiresNumber(language, key2, path143) {
82256
82256
  return Error(
82257
- "Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path140)
82257
+ "Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path143)
82258
82258
  );
82259
82259
  }
82260
- function moreThanOne(language, key2, path140) {
82260
+ function moreThanOne(language, key2, path143) {
82261
82261
  return Error(
82262
- "Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path140)
82262
+ "Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path143)
82263
82263
  );
82264
82264
  }
82265
82265
  function schemaPath(segments) {
82266
82266
  return segments.map((segment3) => `'${segment3}'`).join(" -> ");
82267
82267
  }
82268
- function checkUnitShape(node, path140) {
82268
+ function checkUnitShape(node, path143) {
82269
82269
  const raw2 = node.stringUnit;
82270
82270
  if (raw2 === void 0)
82271
- throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path140)}`);
82271
+ throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path143)}`);
82272
82272
  if (raw2 === null)
82273
- throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path140)}`);
82273
+ throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path143)}`);
82274
82274
  if (!isRecord6(raw2))
82275
- throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path140)}`);
82276
- const unitPath = [...path140, "stringUnit"];
82275
+ throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path143)}`);
82276
+ const unitPath = [...path143, "stringUnit"];
82277
82277
  if (!Object.hasOwn(raw2, "state"))
82278
82278
  throw Error(`Missing required key 'state' inside ${schemaPath(unitPath)}`);
82279
82279
  const state = raw2.state;
@@ -82290,38 +82290,38 @@ function checkUnitShape(node, path140) {
82290
82290
  throw Error(`Expected string for key 'value' inside ${schemaPath(unitPath)}`);
82291
82291
  return value;
82292
82292
  }
82293
- function checkPluralShape(node, path140) {
82293
+ function checkPluralShape(node, path143) {
82294
82294
  for (const [category, raw2] of Object.entries(node)) {
82295
- const categoryPath = [...path140, category];
82295
+ const categoryPath = [...path143, category];
82296
82296
  if (raw2 === null)
82297
82297
  throw Error(
82298
- `Missing required value for key '${category}' inside ${schemaPath(path140)}`
82298
+ `Missing required value for key '${category}' inside ${schemaPath(path143)}`
82299
82299
  );
82300
82300
  if (!isRecord6(raw2))
82301
- throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path140)}`);
82301
+ throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path143)}`);
82302
82302
  checkUnitShape(raw2, categoryPath);
82303
82303
  }
82304
82304
  }
82305
- function checkLocalizationShape(node, path140, deviceValue = false) {
82305
+ function checkLocalizationShape(node, path143, deviceValue = false) {
82306
82306
  if (node === null)
82307
82307
  throw Error(
82308
- `Missing required value for key '${path140[path140.length - 1]}' inside ${schemaPath(path140.slice(0, -1))}`
82308
+ `Missing required value for key '${path143[path143.length - 1]}' inside ${schemaPath(path143.slice(0, -1))}`
82309
82309
  );
82310
82310
  if (!isRecord6(node))
82311
82311
  throw Error(
82312
- `Expected dictionary for key '${path140[path140.length - 1]}' inside ${schemaPath(path140.slice(0, -1))}`
82312
+ `Expected dictionary for key '${path143[path143.length - 1]}' inside ${schemaPath(path143.slice(0, -1))}`
82313
82313
  );
82314
- if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path140);
82314
+ if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path143);
82315
82315
  if (!deviceValue && Object.hasOwn(node, "substitutions"))
82316
- checkSubstitutionsShape(node.substitutions, path140);
82317
- if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path140);
82316
+ checkSubstitutionsShape(node.substitutions, path143);
82317
+ if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path143);
82318
82318
  }
82319
- function checkVariationsShape(variations, path140) {
82319
+ function checkVariationsShape(variations, path143) {
82320
82320
  if (variations === null)
82321
- throw Error(`Missing required value for key 'variations' inside ${schemaPath(path140)}`);
82321
+ throw Error(`Missing required value for key 'variations' inside ${schemaPath(path143)}`);
82322
82322
  if (!isRecord6(variations))
82323
- throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path140)}`);
82324
- const variationsPath = [...path140, "variations"];
82323
+ throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path143)}`);
82324
+ const variationsPath = [...path143, "variations"];
82325
82325
  for (const [type, raw2] of Object.entries(variations)) {
82326
82326
  if (raw2 === null)
82327
82327
  throw Error(
@@ -82347,11 +82347,11 @@ function checkVariationsShape(variations, path140) {
82347
82347
  }
82348
82348
  }
82349
82349
  }
82350
- function checkSubstitutionsShape(substitutions, path140) {
82350
+ function checkSubstitutionsShape(substitutions, path143) {
82351
82351
  if (substitutions === null) return;
82352
82352
  if (!isRecord6(substitutions))
82353
- throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path140)}`);
82354
- const substitutionsPath = [...path140, "substitutions"];
82353
+ throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path143)}`);
82354
+ const substitutionsPath = [...path143, "substitutions"];
82355
82355
  for (const [name3, raw2] of Object.entries(substitutions)) {
82356
82356
  const subPath = [...substitutionsPath, name3];
82357
82357
  if (raw2 === null)
@@ -82393,10 +82393,10 @@ function scanSpecs(forms) {
82393
82393
  }
82394
82394
  return specs;
82395
82395
  }
82396
- function inferPlural(forms, language, key2, path140) {
82396
+ function inferPlural(forms, language, key2, path143) {
82397
82397
  const specs = scanSpecs(forms);
82398
- if (specs.size === 0) throw requiresNumber(language, key2, path140);
82399
- if (specs.size > 1) throw moreThanOne(language, key2, path140);
82398
+ if (specs.size === 0) throw requiresNumber(language, key2, path143);
82399
+ if (specs.size > 1) throw moreThanOne(language, key2, path143);
82400
82400
  return [...specs.values()][0] ?? { specifier: "", argument: 0 };
82401
82401
  }
82402
82402
  function unit(value) {
@@ -82552,13 +82552,13 @@ function substitutionRules(format, subs, resolver, language, refPath) {
82552
82552
  );
82553
82553
  const reaches = (from, target) => {
82554
82554
  const seen = /* @__PURE__ */ new Set();
82555
- const pending = [...edges.get(from) ?? []];
82556
- while (pending.length > 0) {
82557
- const name3 = pending.pop() ?? "";
82555
+ const pending2 = [...edges.get(from) ?? []];
82556
+ while (pending2.length > 0) {
82557
+ const name3 = pending2.pop() ?? "";
82558
82558
  if (name3 === target) return true;
82559
82559
  if (seen.has(name3)) continue;
82560
82560
  seen.add(name3);
82561
- pending.push(...edges.get(name3) ?? []);
82561
+ pending2.push(...edges.get(name3) ?? []);
82562
82562
  }
82563
82563
  return false;
82564
82564
  };
@@ -82865,8 +82865,8 @@ function plist(value, depth) {
82865
82865
  }
82866
82866
  function compileStringCatalog(source, name3) {
82867
82867
  return Object.fromEntries(
82868
- Object.entries(compileCatalogTables(source, name3)).map(([path140, table]) => [
82869
- path140,
82868
+ Object.entries(compileCatalogTables(source, name3)).map(([path143, table]) => [
82869
+ path143,
82870
82870
  '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n' + plist(table, 0) + "</plist>\n"
82871
82871
  ])
82872
82872
  );
@@ -88432,8 +88432,8 @@ function withBuiltinStandinBehavior(behavior) {
88432
88432
  for (const [module2, members2] of Object.entries(BUILTIN_STANDIN_BEHAVIOR))
88433
88433
  merged[module2] = {
88434
88434
  ...Object.fromEntries(
88435
- Object.entries(members2).map(([path140, entry]) => [
88436
- path140,
88435
+ Object.entries(members2).map(([path143, entry]) => [
88436
+ path143,
88437
88437
  { ...entry, builtin: true }
88438
88438
  ])
88439
88439
  ),
@@ -88946,8 +88946,8 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88946
88946
  );
88947
88947
  const revision = import_node_path110.default.join(staging, "revisions", STANDIN_SOURCE_DIGEST.slice(0, 32));
88948
88948
  const stageTree = () => {
88949
- const pending = import_node_path110.default.join(staging, `pending.${process.pid}`);
88950
- import_node_fs108.default.rmSync(pending, { recursive: true, force: true });
88949
+ const pending2 = import_node_path110.default.join(staging, `pending.${process.pid}`);
88950
+ import_node_fs108.default.rmSync(pending2, { recursive: true, force: true });
88951
88951
  for (const framework of frameworks) {
88952
88952
  const swift = declared.get(framework);
88953
88953
  if (swift) {
@@ -88956,7 +88956,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88956
88956
  swift.declared,
88957
88957
  swift.imports,
88958
88958
  swift.sdkHeader,
88959
- pending
88959
+ pending2
88960
88960
  );
88961
88961
  continue;
88962
88962
  }
@@ -88964,7 +88964,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88964
88964
  if (import_node_fs108.default.existsSync(import_node_path110.default.join(framework, part)))
88965
88965
  import_node_fs108.default.cpSync(
88966
88966
  import_node_path110.default.join(framework, part),
88967
- import_node_path110.default.join(pending, "frameworks", import_node_path110.default.basename(framework), part),
88967
+ import_node_path110.default.join(pending2, "frameworks", import_node_path110.default.basename(framework), part),
88968
88968
  {
88969
88969
  recursive: true,
88970
88970
  dereference: true,
@@ -88976,7 +88976,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88976
88976
  );
88977
88977
  if (surface && "modulemap" in surface) {
88978
88978
  const modules = import_node_path110.default.join(
88979
- pending,
88979
+ pending2,
88980
88980
  "frameworks",
88981
88981
  import_node_path110.default.basename(framework),
88982
88982
  "Modules"
@@ -88988,7 +88988,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88988
88988
  }
88989
88989
  }
88990
88990
  for (const [index, directory2] of headers.entries()) {
88991
- import_node_fs108.default.cpSync(directory2, import_node_path110.default.join(pending, "headers", String(index)), {
88991
+ import_node_fs108.default.cpSync(directory2, import_node_path110.default.join(pending2, "headers", String(index)), {
88992
88992
  recursive: true,
88993
88993
  dereference: true,
88994
88994
  ...standalone ? {
@@ -88999,7 +88999,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88999
88999
  (item) => "headers" in item && item.headers === directory2
89000
89000
  );
89001
89001
  if (surface && "modulemap" in surface) {
89002
- const modulemap = import_node_path110.default.join(pending, "headers", String(index), "module.modulemap");
89002
+ const modulemap = import_node_path110.default.join(pending2, "headers", String(index), "module.modulemap");
89003
89003
  import_node_fs108.default.rmSync(modulemap, { force: true });
89004
89004
  import_node_fs108.default.copyFileSync(surface.modulemap, modulemap);
89005
89005
  }
@@ -89007,7 +89007,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
89007
89007
  const contents2 = (0, import_node_crypto64.createHash)("sha256");
89008
89008
  for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
89009
89009
  const modulemap = import_node_path110.default.join(
89010
- pending,
89010
+ pending2,
89011
89011
  "frameworks",
89012
89012
  import_node_path110.default.basename(framework),
89013
89013
  "Modules/module.modulemap"
@@ -89023,16 +89023,16 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
89023
89023
  )
89024
89024
  );
89025
89025
  }
89026
- for (const relative4 of import_node_fs108.default.readdirSync(pending, { recursive: true, encoding: "utf8" }).sort()) {
89027
- const file = import_node_path110.default.join(pending, relative4);
89026
+ for (const relative4 of import_node_fs108.default.readdirSync(pending2, { recursive: true, encoding: "utf8" }).sort()) {
89027
+ const file = import_node_path110.default.join(pending2, relative4);
89028
89028
  contents2.update(`${relative4}\0`);
89029
89029
  if (import_node_fs108.default.statSync(file).isFile()) contents2.update(import_node_fs108.default.readFileSync(file));
89030
89030
  }
89031
89031
  const name3 = contents2.digest("hex").slice(0, 32);
89032
89032
  try {
89033
- import_node_fs108.default.renameSync(pending, import_node_path110.default.join(staging, name3));
89033
+ import_node_fs108.default.renameSync(pending2, import_node_path110.default.join(staging, name3));
89034
89034
  } catch (error) {
89035
- import_node_fs108.default.rmSync(pending, { recursive: true, force: true });
89035
+ import_node_fs108.default.rmSync(pending2, { recursive: true, force: true });
89036
89036
  if (!import_node_fs108.default.existsSync(import_node_path110.default.join(staging, name3))) throw error;
89037
89037
  }
89038
89038
  import_node_fs108.default.mkdirSync(import_node_path110.default.dirname(revision), { recursive: true });
@@ -89185,9 +89185,9 @@ function generatedModuleMap(text7, framework) {
89185
89185
  import_node_fs108.default.mkdirSync(dir, { recursive: true });
89186
89186
  const file = import_node_path110.default.join(dir, "module.modulemap");
89187
89187
  if (!import_node_fs108.default.existsSync(file)) {
89188
- const pending = `${file}.${process.pid}.tmp`;
89189
- import_node_fs108.default.writeFileSync(pending, text7);
89190
- import_node_fs108.default.renameSync(pending, file);
89188
+ const pending2 = `${file}.${process.pid}.tmp`;
89189
+ import_node_fs108.default.writeFileSync(pending2, text7);
89190
+ import_node_fs108.default.renameSync(pending2, file);
89191
89191
  }
89192
89192
  return file;
89193
89193
  }
@@ -90773,9 +90773,9 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
90773
90773
  for (const [target, reason] of gaps) result.gaps.set(target, reason);
90774
90774
  if (result.gaps.size === 0 && isRecord(receipt)) {
90775
90775
  import_node_fs108.default.mkdirSync(import_node_path110.default.dirname(cached2), { recursive: true });
90776
- const pending = `${cached2}.${process.pid}.tmp`;
90777
- import_node_fs108.default.writeFileSync(pending, JSON.stringify({ ...receipt, generation }));
90778
- import_node_fs108.default.renameSync(pending, cached2);
90776
+ const pending2 = `${cached2}.${process.pid}.tmp`;
90777
+ import_node_fs108.default.writeFileSync(pending2, JSON.stringify({ ...receipt, generation }));
90778
+ import_node_fs108.default.renameSync(pending2, cached2);
90779
90779
  }
90780
90780
  return result;
90781
90781
  } finally {
@@ -91024,9 +91024,9 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
91024
91024
  }
91025
91025
  const publish2 = (value) => {
91026
91026
  import_node_fs108.default.mkdirSync(import_node_path110.default.dirname(cached2), { recursive: true });
91027
- const pending = `${cached2}.${process.pid}.tmp`;
91028
- import_node_fs108.default.writeFileSync(pending, JSON.stringify(value));
91029
- import_node_fs108.default.renameSync(pending, cached2);
91027
+ const pending2 = `${cached2}.${process.pid}.tmp`;
91028
+ import_node_fs108.default.writeFileSync(pending2, JSON.stringify(value));
91029
+ import_node_fs108.default.renameSync(pending2, cached2);
91030
91030
  built.set(id, value);
91031
91031
  };
91032
91032
  let result;
@@ -91124,7 +91124,7 @@ function standinDependencies(binaries, packages, provided) {
91124
91124
  for (const candidate of packages.moduleSources)
91125
91125
  byModule.set(swiftTargetModuleName(candidate.target), candidate);
91126
91126
  const shipped = /* @__PURE__ */ new Set();
91127
- const pending = [];
91127
+ const pending2 = [];
91128
91128
  const read = (dir, sources) => sources.flatMap(
91129
91129
  (source) => swiftImportNames(import_node_fs108.default.readFileSync(import_node_path110.default.join(dir, source), "utf8"))
91130
91130
  );
@@ -91138,21 +91138,21 @@ function standinDependencies(binaries, packages, provided) {
91138
91138
  for (const binary2 of binaries) {
91139
91139
  if (binary2.placeholder !== void 0) {
91140
91140
  shipped.add(swiftTargetModuleName(binary2.target));
91141
- pending.push(...read(binary2.dir, binary2.placeholder.sources));
91141
+ pending2.push(...read(binary2.dir, binary2.placeholder.sources));
91142
91142
  continue;
91143
91143
  }
91144
91144
  if (binary2.publicHeaders !== void 0) continue;
91145
91145
  for (const surface of binarySurfaces(binary2)) {
91146
91146
  shipped.add(surface.module);
91147
- pending.push(...surfaceImports(surface));
91147
+ pending2.push(...surfaceImports(surface));
91148
91148
  }
91149
91149
  }
91150
91150
  const selected = /* @__PURE__ */ new Map();
91151
- for (let module2 = pending.pop(); module2 !== void 0; module2 = pending.pop()) {
91151
+ for (let module2 = pending2.pop(); module2 !== void 0; module2 = pending2.pop()) {
91152
91152
  const candidate = byModule.get(module2);
91153
91153
  if (!candidate || shipped.has(module2) || selected.has(module2)) continue;
91154
91154
  selected.set(module2, candidate);
91155
- pending.push(
91155
+ pending2.push(
91156
91156
  ...candidate.moduleSources ? read(candidate.dir, candidate.moduleSources.sources) : binarySurfaces(candidate).flatMap(surfaceImports)
91157
91157
  );
91158
91158
  }
@@ -91722,7 +91722,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
91722
91722
  const generated = new Map(
91723
91723
  products?.files.map(({ path: declared, file }) => [declared, file])
91724
91724
  );
91725
- const pending = new Set(
91725
+ const pending2 = new Set(
91726
91726
  app.frameworks.flatMap((target) => {
91727
91727
  const compatibility = target.swift?.compatibility;
91728
91728
  return compatibility ? [
@@ -91738,7 +91738,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
91738
91738
  sources.set(file, import_node_fs109.default.readFileSync(generatedFile));
91739
91739
  return;
91740
91740
  }
91741
- if (pending.has(file)) return;
91741
+ if (pending2.has(file)) return;
91742
91742
  if (sources.has(file)) return;
91743
91743
  const resolved = header ? import_node_fs109.default.realpathSync.native(file) : file;
91744
91744
  if (resolved !== file) links[file] = resolved;
@@ -91927,7 +91927,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
91927
91927
  if (moduleMap2) {
91928
91928
  const requested = import_node_path111.default.resolve(app.rootDir, moduleMap2);
91929
91929
  const file = products ? requested : app.moduleMapSources?.[requested] ?? requested;
91930
- if (generated.has(file) || !pending.has(file) && import_node_fs109.default.existsSync(file))
91930
+ if (generated.has(file) || !pending2.has(file) && import_node_fs109.default.existsSync(file))
91931
91931
  queue.push({ file });
91932
91932
  }
91933
91933
  const directory2 = ["-I", "-F", "-iquote", "-isystem", "-iframework"].includes(
@@ -91957,7 +91957,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
91957
91957
  const availableHeader = (candidate) => {
91958
91958
  const source = productHeaders[candidate] ?? candidate;
91959
91959
  if (generated.has(source)) return source;
91960
- if (pending.has(source)) return null;
91960
+ if (pending2.has(source)) return null;
91961
91961
  let regular = regularFiles.get(source);
91962
91962
  if (regular === void 0) {
91963
91963
  const parent = import_node_path111.default.dirname(source);
@@ -93790,7 +93790,7 @@ function resolveSwiftPackages(options2) {
93790
93790
  headers.set(name3, import_node_path113.default.relative(binary2.dir, dir));
93791
93791
  };
93792
93792
  visit3(pkg, binary2.target);
93793
- binary2.headerDependencies = [...headers].map(([module2, path140]) => ({ module: module2, path: path140 }));
93793
+ binary2.headerDependencies = [...headers].map(([module2, path143]) => ({ module: module2, path: path143 }));
93794
93794
  }
93795
93795
  for (const owner of options2.owners ?? []) {
93796
93796
  const found = productClosure(owner.products);
@@ -94258,7 +94258,7 @@ var init_swift_cxx_reachable = __esm({
94258
94258
  // src/swift-pdf-raster.ts
94259
94259
  function rasterizePdfFiles(inputs2, { imageBytes, imageTotalBytes } = { imageBytes: Infinity, imageTotalBytes: Infinity }) {
94260
94260
  const rendered = /* @__PURE__ */ new Map();
94261
- const pending = /* @__PURE__ */ new Map();
94261
+ const pending2 = /* @__PURE__ */ new Map();
94262
94262
  const renderer = process.platform === "darwin" ? "30774891a9db216d" : "pdfium-1";
94263
94263
  const cache = cacheDir();
94264
94264
  const cached2 = (sha2565) => import_node_path115.default.join(cache, `swift-pdf-png-${renderer}-${sha2565}.png`);
@@ -94272,22 +94272,22 @@ function rasterizePdfFiles(inputs2, { imageBytes, imageTotalBytes } = { imageByt
94272
94272
  rendered.set(sha2565, bytes);
94273
94273
  };
94274
94274
  for (const input of inputs2) {
94275
- if (rendered.has(input.sha256) || pending.has(input.sha256)) continue;
94275
+ if (rendered.has(input.sha256) || pending2.has(input.sha256)) continue;
94276
94276
  let bytes;
94277
94277
  try {
94278
94278
  bytes = import_node_fs113.default.readFileSync(cached2(input.sha256));
94279
94279
  } catch {
94280
- pending.set(input.sha256, input);
94280
+ pending2.set(input.sha256, input);
94281
94281
  continue;
94282
94282
  }
94283
94283
  record5(input, bytes);
94284
94284
  }
94285
- if (!pending.size) return rendered;
94285
+ if (!pending2.size) return rendered;
94286
94286
  const work = import_node_fs113.default.mkdtempSync(import_node_path115.default.join(import_node_os23.default.tmpdir(), "swift-pdf-png-"));
94287
94287
  let cacheWork;
94288
94288
  let writeCache = true;
94289
94289
  try {
94290
- const requests = [...pending.values()].map((input, index) => ({
94290
+ const requests = [...pending2.values()].map((input, index) => ({
94291
94291
  ...input,
94292
94292
  file: import_node_path115.default.resolve(input.file),
94293
94293
  output: import_node_path115.default.join(work, `${index}.png`)
@@ -94821,7 +94821,7 @@ async function buildXcodeLayout(root) {
94821
94821
  });
94822
94822
  if (framework.moduleName !== module2 || framework.allSources.length === 0)
94823
94823
  throw new Error(`${project2}: ${target} did not produce source module ${module2}`);
94824
- if (framework.linkedProducts.length > 0 || framework.binaryFrameworks.some(({ path: path140 }) => path140))
94824
+ if (framework.linkedProducts.length > 0 || framework.binaryFrameworks.some(({ path: path143 }) => path143))
94825
94825
  throw new Error(
94826
94826
  `${project2}: ${target} has external dependencies outside the source framework build`
94827
94827
  );
@@ -97828,11 +97828,11 @@ function stringList3(value) {
97828
97828
  function externalSpecMembers(root, requested) {
97829
97829
  const children = (spec) => Array.isArray(spec.subspecs) ? spec.subspecs.filter(object7) : [];
97830
97830
  const chains = /* @__PURE__ */ new Map();
97831
- const select = (path140) => {
97832
- const key2 = path140.join("/");
97831
+ const select = (path143) => {
97832
+ const key2 = path143.join("/");
97833
97833
  if (chains.has(key2)) return;
97834
97834
  const chain = [root];
97835
- for (const part of path140) {
97835
+ for (const part of path143) {
97836
97836
  const child = children(chain.at(-1)).find((sub) => sub.name === part);
97837
97837
  if (!child) throw new Error(`${String(root.name)} has no subspec ${key2}`);
97838
97838
  chain.push(child);
@@ -97841,7 +97841,7 @@ function externalSpecMembers(root, requested) {
97841
97841
  const spec = chain.at(-1);
97842
97842
  const defaults = stringList3(spec.default_subspecs ?? spec.default_subspec);
97843
97843
  const activated = defaults[0] === "none" ? [] : defaults.length > 0 ? defaults : children(spec).map((sub) => String(sub.name));
97844
- for (const name3 of activated) select([...path140, ...name3.split("/")]);
97844
+ for (const name3 of activated) select([...path143, ...name3.split("/")]);
97845
97845
  for (const member of chain)
97846
97846
  for (const dependencies of [member.dependencies, iosOf(member)?.dependencies])
97847
97847
  for (const dependency of object7(dependencies) ? Object.keys(dependencies) : []) {
@@ -98483,10 +98483,10 @@ async function collectTurboSources(options2) {
98483
98483
  throw new Error(`TurboModule source is not UTF-8: ${disk}`);
98484
98484
  add(key2, text7);
98485
98485
  result.sources.push({ file: key2, source: disk, sha256: sha2564(bytes) });
98486
- pending.push({ key: key2, targetName, label, root, relative: relative4 });
98486
+ pending2.push({ key: key2, targetName, label, root, relative: relative4 });
98487
98487
  return key2;
98488
98488
  };
98489
- const pending = [];
98489
+ const pending2 = [];
98490
98490
  const pendingCodegen = [];
98491
98491
  const dependencyHeader = nitroDependencyReader(reactNative.version, reactNative.root);
98492
98492
  const dependencyTrees = /* @__PURE__ */ new Set();
@@ -99606,7 +99606,7 @@ async function collectTurboSources(options2) {
99606
99606
  );
99607
99607
  }
99608
99608
  for (; ; ) {
99609
- for (let next = pending.shift(); next; next = pending.shift())
99609
+ for (let next = pending2.shift(); next; next = pending2.shift())
99610
99610
  scanText(next, result.files[next.key]);
99611
99611
  let addedDep = false;
99612
99612
  for (let i = deferredDepUnits.length - 1; i >= 0; i--) {
@@ -99626,7 +99626,7 @@ async function collectTurboSources(options2) {
99626
99626
  if (pendingCodegen.length) {
99627
99627
  codegen ??= (await runInstalledTurboCodegen(options2.appRoot, options2.codegenDir)).generatedRoot;
99628
99628
  for (const { from, include, quoted: quoted2 } of pendingCodegen) resolve4(from, include, quoted2);
99629
- for (let next = pending.shift(); next; next = pending.shift())
99629
+ for (let next = pending2.shift(); next; next = pending2.shift())
99630
99630
  scanText(next, result.files[next.key]);
99631
99631
  }
99632
99632
  for (const file of textualSources) {
@@ -102931,17 +102931,17 @@ async function prebuiltReactNativeCore(project2, reactNativeRoot, moduleRoot, mo
102931
102931
  const entry = reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode);
102932
102932
  let dir = fetchNativeEntry("react-native", entry.name, entry.key);
102933
102933
  if (!dir) {
102934
- let pending = building.get(entry.key);
102935
- if (!pending) {
102934
+ let pending2 = building.get(entry.key);
102935
+ if (!pending2) {
102936
102936
  console.error(
102937
102937
  `[peach] no published React Native ${entry.name} core at ${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("react-native", entry.name, entry.key)}; building it locally`
102938
102938
  );
102939
- pending = Promise.resolve().then(() => (init_react_native_core_build(), react_native_core_build_exports)).then(
102939
+ pending2 = Promise.resolve().then(() => (init_react_native_core_build(), react_native_core_build_exports)).then(
102940
102940
  ({ buildReactNativeCore: buildReactNativeCore2 }) => buildReactNativeCore2(project2, reactNativeRoot, mode, moduleRoot)
102941
102941
  ).finally(() => building.delete(entry.key));
102942
- building.set(entry.key, pending);
102942
+ building.set(entry.key, pending2);
102943
102943
  }
102944
- dir = await pending;
102944
+ dir = await pending2;
102945
102945
  }
102946
102946
  const file = import_node_path123.default.join(dir, "core.json");
102947
102947
  const descriptor = JSON.parse(
@@ -104078,9 +104078,9 @@ function hashPackageTree(root, options2) {
104078
104078
  (a, b) => options2.compareNames(a.name, b.name)
104079
104079
  )) {
104080
104080
  if (entry.name === "node_modules") continue;
104081
- const path140 = `${relative4}${entry.name}`;
104082
- if (entry.isDirectory()) walk4((0, import_node_path127.join)(directory2, entry.name), `${path140}/`);
104083
- else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path140);
104081
+ const path143 = `${relative4}${entry.name}`;
104082
+ if (entry.isDirectory()) walk4((0, import_node_path127.join)(directory2, entry.name), `${path143}/`);
104083
+ else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path143);
104084
104084
  }
104085
104085
  };
104086
104086
  walk4(root, "");
@@ -104247,14 +104247,14 @@ var init_nitro_superset = __esm({
104247
104247
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
104248
104248
  published = /* @__PURE__ */ new Map();
104249
104249
  publishedMetadata = (url) => {
104250
- let pending = published.get(url);
104251
- if (!pending) {
104252
- pending = fetch(url).then(
104250
+ let pending2 = published.get(url);
104251
+ if (!pending2) {
104252
+ pending2 = fetch(url).then(
104253
104253
  async (response) => response.ok ? readNitroMetadata(await response.json()) : null
104254
104254
  ).catch(() => null);
104255
- published.set(url, pending);
104255
+ published.set(url, pending2);
104256
104256
  }
104257
- return pending;
104257
+ return pending2;
104258
104258
  };
104259
104259
  }
104260
104260
  });
@@ -104816,7 +104816,7 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
104816
104816
  `;
104817
104817
  const chunks = [];
104818
104818
  let depth = 0;
104819
- let pending = [];
104819
+ let pending2 = [];
104820
104820
  let hadBrace = false;
104821
104821
  let activeEnum = null;
104822
104822
  let memberLines = [];
@@ -104835,29 +104835,29 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
104835
104835
  if (depth === 0 && !hadBrace && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*private\b/.test(maskedLine)) {
104836
104836
  return [[name3, source]];
104837
104837
  }
104838
- const enumMatch = depth === 0 && !hadBrace && pending.every((item) => item.trim() === "" || item.trim().startsWith("//")) ? /^enum (OneSDK_\w+)\s*\{\s*$/.exec(maskedLine) : null;
104838
+ const enumMatch = depth === 0 && !hadBrace && pending2.every((item) => item.trim() === "" || item.trim().startsWith("//")) ? /^enum (OneSDK_\w+)\s*\{\s*$/.exec(maskedLine) : null;
104839
104839
  if (enumMatch && delta === 1) {
104840
104840
  const enumName = enumMatch[1];
104841
- const prefix = pending.filter((item) => item.trim() !== "");
104841
+ const prefix = pending2.filter((item) => item.trim() !== "");
104842
104842
  chunks.push({
104843
104843
  kind: "top",
104844
104844
  text: [...prefix, `enum ${enumName} {}`].join("\n")
104845
104845
  });
104846
- pending = [];
104846
+ pending2 = [];
104847
104847
  activeEnum = enumName;
104848
104848
  depth = 1;
104849
104849
  continue;
104850
104850
  }
104851
- if (depth === 0 && !hadBrace && line.trim() === "" && pending.length === 0) {
104851
+ if (depth === 0 && !hadBrace && line.trim() === "" && pending2.length === 0) {
104852
104852
  continue;
104853
104853
  }
104854
- pending.push(line);
104854
+ pending2.push(line);
104855
104855
  if (delta !== 0 || depth > 0) hadBrace = true;
104856
104856
  depth += delta;
104857
104857
  if (depth < 0) return [[name3, source]];
104858
104858
  if (hadBrace && depth === 0) {
104859
- chunks.push({ kind: "top", text: pending.join("\n") });
104860
- pending = [];
104859
+ chunks.push({ kind: "top", text: pending2.join("\n") });
104860
+ pending2 = [];
104861
104861
  hadBrace = false;
104862
104862
  }
104863
104863
  } else {
@@ -104898,7 +104898,7 @@ function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SH
104898
104898
  }
104899
104899
  }
104900
104900
  }
104901
- if (depth !== 0 || activeEnum !== null || pending.some((item) => item.trim() !== "" && !item.trim().startsWith("//")) || chunks.length < shardCount) {
104901
+ if (depth !== 0 || activeEnum !== null || pending2.some((item) => item.trim() !== "" && !item.trim().startsWith("//")) || chunks.length < shardCount) {
104902
104902
  return [[name3, source]];
104903
104903
  }
104904
104904
  const totalChars = chunks.reduce((sum, chunk) => sum + chunk.text.length, 0);
@@ -105110,7 +105110,7 @@ var init_expo_eager_seam_contract = __esm({
105110
105110
 
105111
105111
  // src/expo-native-compiler-digest.ts
105112
105112
  function expoNativeCompilerDigestValue() {
105113
- return true ? "587abe71f8ffa4c9a9681563b49d62ef0c8e41df27f31054748faca214f30400" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
105113
+ return true ? "bb35d3d7190ca4daafe4d1b7234ffcf4363d65e94ca03eb1092ca87ac7310bea" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
105114
105114
  }
105115
105115
  var import_node_crypto78;
105116
105116
  var init_expo_native_compiler_digest = __esm({
@@ -105843,14 +105843,14 @@ async function lookup(appRoot) {
105843
105843
  const app = await expoNativeInputs(appRoot);
105844
105844
  if (!app) return null;
105845
105845
  const url = expoNativeEntryUrl(nativeEntryKey(app.inputs), "metadata.json");
105846
- let pending = published2.get(url);
105847
- if (!pending) {
105848
- pending = fetch(url).then(
105846
+ let pending2 = published2.get(url);
105847
+ if (!pending2) {
105848
+ pending2 = fetch(url).then(
105849
105849
  async (response) => response.ok ? readExpoNativeEntry(await response.json()) : null
105850
105850
  ).catch(() => null);
105851
- published2.set(url, pending);
105851
+ published2.set(url, pending2);
105852
105852
  }
105853
- const entry = await pending;
105853
+ const entry = await pending2;
105854
105854
  if (!entry) return null;
105855
105855
  const digests2 = await expoNativePackageDigests(app.packages);
105856
105856
  return (0, import_node_util17.isDeepStrictEqual)(digests2, entry.packages) ? entry : null;
@@ -105858,12 +105858,12 @@ async function lookup(appRoot) {
105858
105858
  function prebuiltExpoNative(appRoot, iosTarget) {
105859
105859
  if (iosTarget !== void 0) return Promise.resolve(null);
105860
105860
  const root = import_node_fs131.default.realpathSync(appRoot);
105861
- let pending = lookups.get(root);
105862
- if (!pending) {
105863
- pending = answer(root).finally(() => lookups.delete(root));
105864
- lookups.set(root, pending);
105861
+ let pending2 = lookups.get(root);
105862
+ if (!pending2) {
105863
+ pending2 = answer(root).finally(() => lookups.delete(root));
105864
+ lookups.set(root, pending2);
105865
105865
  }
105866
- return pending;
105866
+ return pending2;
105867
105867
  }
105868
105868
  async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
105869
105869
  const prepared = await prepareExpoNativeProject(
@@ -107275,7 +107275,7 @@ ${source}`;
107275
107275
  const name3 = moduleMapName(text7);
107276
107276
  return name3 && provided.has(name3) && /\bumbrella\s+header\s+"[^"]+"/.test(text7) ? [{ file, text: text7, name: name3, reached: /* @__PURE__ */ new Set() }] : [];
107277
107277
  });
107278
- const pending = [
107278
+ const pending2 = [
107279
107279
  ...units.flatMap((unit2) => Object.entries(unit2.files)),
107280
107280
  ...units.flatMap(
107281
107281
  (unit2) => (unit2.nativeTargets ?? []).flatMap(
@@ -107291,8 +107291,8 @@ ${source}`;
107291
107291
  )
107292
107292
  ];
107293
107293
  const visited = /* @__PURE__ */ new Set();
107294
- while (pending.length) {
107295
- const [file, source] = pending.pop();
107294
+ while (pending2.length) {
107295
+ const [file, source] = pending2.pop();
107296
107296
  if (visited.has(file)) continue;
107297
107297
  visited.add(file);
107298
107298
  for (const match of source.matchAll(/#\s*(?:import|include)\s*[<"]([^>"]+)[>"]/g)) {
@@ -107303,12 +107303,12 @@ ${source}`;
107303
107303
  const candidate = import_node_path136.default.posix.join(import_node_path136.default.posix.dirname(map3.file), include);
107304
107304
  if (support[candidate] === void 0) continue;
107305
107305
  map3.reached.add(header);
107306
- pending.push([candidate, support[candidate]]);
107306
+ pending2.push([candidate, support[candidate]]);
107307
107307
  }
107308
107308
  const relative4 = import_node_path136.default.posix.normalize(
107309
107309
  import_node_path136.default.posix.join(import_node_path136.default.posix.dirname(file), include)
107310
107310
  );
107311
- if (support[relative4] !== void 0) pending.push([relative4, support[relative4]]);
107311
+ if (support[relative4] !== void 0) pending2.push([relative4, support[relative4]]);
107312
107312
  }
107313
107313
  }
107314
107314
  for (const map3 of maps) {
@@ -109255,12 +109255,12 @@ async function resolveExpoAndroidAutolinking(appRoot) {
109255
109255
  const root = import_node_fs135.default.realpathSync(appRoot);
109256
109256
  const existing = resolving.get(root);
109257
109257
  if (existing) return existing;
109258
- const pending = resolveAndroidModules(root);
109259
- resolving.set(root, pending);
109258
+ const pending2 = resolveAndroidModules(root);
109259
+ resolving.set(root, pending2);
109260
109260
  try {
109261
- return await pending;
109261
+ return await pending2;
109262
109262
  } finally {
109263
- if (resolving.get(root) === pending) resolving.delete(root);
109263
+ if (resolving.get(root) === pending2) resolving.delete(root);
109264
109264
  }
109265
109265
  }
109266
109266
  async function resolveAndroidModules(appRoot) {
@@ -109438,6 +109438,7 @@ async function resolveAndroidGradleSources(request) {
109438
109438
  }
109439
109439
  );
109440
109440
  const dependencySources = includeDependencySources ? readDependencySources(value.dependencySources) : void 0;
109441
+ const dependencyGraph = includeDependencySources ? readDependencyGraph(value.dependencyGraph) : void 0;
109441
109442
  return {
109442
109443
  projectDir,
109443
109444
  projectPath: value.projectPath,
@@ -109455,13 +109456,43 @@ async function resolveAndroidGradleSources(request) {
109455
109456
  linkedResourcePackage: linkedResource("linkedResourcePackage")
109456
109457
  } : {},
109457
109458
  dependencies,
109458
- ...dependencySources ? { dependencySources } : {}
109459
+ ...dependencySources ? { dependencySources, dependencyGraph } : {}
109459
109460
  };
109460
109461
  });
109461
109462
  } finally {
109462
109463
  import_node_fs136.default.rmSync(work, { recursive: true, force: true });
109463
109464
  }
109464
109465
  }
109466
+ function readDependencyGraph(value) {
109467
+ if (!isRecord(value) || !Array.isArray(value.javaClasspath) || !value.javaClasspath.every(
109468
+ (file) => typeof file === "string" && import_node_path139.default.isAbsolute(file)
109469
+ )) {
109470
+ throw new Error("Gradle printed invalid module graphs");
109471
+ }
109472
+ return {
109473
+ compile: readModules(value.compile),
109474
+ runtime: readModules(value.runtime),
109475
+ javaClasspath: value.javaClasspath.map(String)
109476
+ };
109477
+ }
109478
+ function readModules(value) {
109479
+ if (!Array.isArray(value)) throw new Error("Gradle printed an invalid module graph");
109480
+ const modules = value.map((entry) => {
109481
+ if (!isRecord(entry) || typeof entry.coordinate !== "string" || !/^[^:]+:[^:]+:[^:]+$/.test(entry.coordinate) || !Array.isArray(entry.dependencies) || !entry.dependencies.every((coordinate) => typeof coordinate === "string") || !Array.isArray(entry.jars) || !entry.jars.every((file) => typeof file === "string" && import_node_path139.default.isAbsolute(file)))
109482
+ throw new Error("Gradle printed an invalid module");
109483
+ return {
109484
+ coordinate: entry.coordinate,
109485
+ dependencies: entry.dependencies.map(String),
109486
+ jars: entry.jars.map(String)
109487
+ };
109488
+ });
109489
+ const coordinates = new Set(modules.map(({ coordinate }) => coordinate));
109490
+ if (coordinates.size !== modules.length || modules.some(
109491
+ ({ dependencies }) => dependencies.some((dependency) => !coordinates.has(dependency))
109492
+ ))
109493
+ throw new Error("Gradle printed duplicate modules or unresolved module edges");
109494
+ return modules;
109495
+ }
109465
109496
  function readDependencySources(value) {
109466
109497
  if (!Array.isArray(value)) throw new Error("Gradle printed invalid dependency sources");
109467
109498
  const coordinates = /* @__PURE__ */ new Set();
@@ -109523,6 +109554,42 @@ def resolveDependencySources = { project, configurations ->
109523
109554
  }
109524
109555
  }.sort { it.group + ':' + it.name + ':' + it.version }
109525
109556
  }
109557
+ def moduleCoordinate = { id -> id.group + ':' + id.module + ':' + id.version }
109558
+ def resolveModuleGraph = { configuration ->
109559
+ def classArtifacts = configuration.incoming.artifactView { view ->
109560
+ view.attributes.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, 'android-classes-jar')
109561
+ }.artifacts.artifacts.findAll { it.id.componentIdentifier instanceof ModuleComponentIdentifier }
109562
+ def classJars = classArtifacts.groupBy { moduleCoordinate(it.id.componentIdentifier) }
109563
+ def resolution = configuration.incoming.resolutionResult
109564
+ def byCoordinate = [:]
109565
+ def seen = [] as Set
109566
+ def visit
109567
+ visit = { component, selectedVariant ->
109568
+ if (!seen.add([component.id, selectedVariant])) return
109569
+ def edges = component.getDependenciesForVariant(selectedVariant).findAll { edge ->
109570
+ if (edge.constraint) return false
109571
+ if (!(edge instanceof ResolvedDependencyResult)) {
109572
+ throw new GradleException('Unresolved Android dependency: ' + edge.requested, edge.failure)
109573
+ }
109574
+ def category = edge.resolvedVariant.attributes.getAttribute(Category.CATEGORY_ATTRIBUTE)?.name
109575
+ category != Category.REGULAR_PLATFORM && category != Category.ENFORCED_PLATFORM
109576
+ }
109577
+ if (component.id instanceof ModuleComponentIdentifier) {
109578
+ def coordinate = moduleCoordinate(component.id)
109579
+ def entry = byCoordinate.get(coordinate, [coordinate:coordinate, dependencies:[] as Set,
109580
+ jars:classJars.get(coordinate, []).collect { it.file.absolutePath }.unique().sort()])
109581
+ edges.findAll { it.selected.id instanceof ModuleComponentIdentifier }.each { edge ->
109582
+ entry.dependencies.add(moduleCoordinate(edge.selected.id))
109583
+ }
109584
+ }
109585
+ edges.each { edge -> visit(edge.selected, edge.resolvedVariant) }
109586
+ }
109587
+ visit(resolution.rootComponent.get(), resolution.rootVariant.get())
109588
+ def modules = byCoordinate.values().collect { entry ->
109589
+ [coordinate:entry.coordinate, dependencies:entry.dependencies.toList().sort(), jars:entry.jars]
109590
+ }.sort { it.coordinate }
109591
+ [modules:modules, classpath:classArtifacts.collect { it.file.absolutePath }.unique()]
109592
+ }
109526
109593
  gradle.beforeProject { project ->
109527
109594
  def directory = project.projectDir.canonicalPath
109528
109595
  if (project.rootProject.projectDir.canonicalPath != request.root || !request.projects.contains(directory)) return
@@ -109626,10 +109693,17 @@ gradle.projectsEvaluated {
109626
109693
  linkedResourcePackage = packages[0].outputFile
109627
109694
  }
109628
109695
  def bootClasspath = []
109629
- if (request.includeJavaClasspath || runtimeClasses != null) {
109696
+ if (request.includeJavaClasspath || runtimeClasses != null || request.includeDependencySources) {
109630
109697
  def sdk = project.extensions.getByName('androidComponents').sdkComponents
109631
109698
  bootClasspath = sdk.bootClasspath.get().collect { it.asFile }
109632
109699
  }
109700
+ def dependencyGraph = null
109701
+ if (request.includeDependencySources) {
109702
+ def compile = resolveModuleGraph(configurations[0])
109703
+ def runtime = resolveModuleGraph(configurations[1])
109704
+ dependencyGraph = [compile:compile.modules, runtime:runtime.modules,
109705
+ javaClasspath:(bootClasspath.collect { it.absolutePath } + compile.classpath).unique()]
109706
+ }
109633
109707
  new File(request.output, index.toString() + '.json').text = JsonOutput.toJson([
109634
109708
  projectDir:project.projectDir.canonicalPath,
109635
109709
  projectPath:project.path,
@@ -109643,6 +109717,7 @@ gradle.projectsEvaluated {
109643
109717
  dependencies:dependencies,
109644
109718
  dependencySources:request.includeDependencySources
109645
109719
  ? resolveDependencySources(project, configurations) : null,
109720
+ dependencyGraph:dependencyGraph,
109646
109721
  javaClasspath:request.includeJavaClasspath
109647
109722
  ? (bootClasspath + javac.classpath.files.findAll { it.exists() }).unique().collect { it.absolutePath } : null,
109648
109723
  runtimeJavaClasspath:runtimeClasses != null
@@ -110187,21 +110262,21 @@ function peachKotlinModuleRoot() {
110187
110262
  const root = import_node_path144.default.join(parent, digest3);
110188
110263
  import_node_fs141.default.mkdirSync(parent, { recursive: true });
110189
110264
  if (!import_node_fs141.default.existsSync(root)) {
110190
- const pending = import_node_fs141.default.mkdtempSync(import_node_path144.default.join(parent, ".install-"));
110265
+ const pending2 = import_node_fs141.default.mkdtempSync(import_node_path144.default.join(parent, ".install-"));
110191
110266
  try {
110192
110267
  for (const [name3, contents2] of Object.entries(files2)) {
110193
- const file = import_node_path144.default.join(pending, name3);
110268
+ const file = import_node_path144.default.join(pending2, name3);
110194
110269
  import_node_fs141.default.mkdirSync(import_node_path144.default.dirname(file), { recursive: true });
110195
110270
  import_node_fs141.default.writeFileSync(file, Buffer.from(contents2, "base64"));
110196
110271
  }
110197
110272
  try {
110198
- import_node_fs141.default.renameSync(pending, root);
110273
+ import_node_fs141.default.renameSync(pending2, root);
110199
110274
  } catch (error) {
110200
110275
  if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY")
110201
110276
  throw error;
110202
110277
  }
110203
110278
  } finally {
110204
- import_node_fs141.default.rmSync(pending, { recursive: true, force: true });
110279
+ import_node_fs141.default.rmSync(pending2, { recursive: true, force: true });
110205
110280
  }
110206
110281
  }
110207
110282
  for (const [name3, contents2] of Object.entries(files2)) {
@@ -110278,6 +110353,430 @@ var init_kotlin_browser_seams = __esm({
110278
110353
  }
110279
110354
  });
110280
110355
 
110356
+ // src/kotlin-library-sources.ts
110357
+ function runCompiler2(file, args, options2, operation) {
110358
+ return new Promise((resolve4, reject) => {
110359
+ const child = (0, import_node_child_process69.spawn)(file, args, options2);
110360
+ child.once("error", reject);
110361
+ child.once("close", (code, signal) => {
110362
+ if (code === 0) resolve4();
110363
+ else reject(new Error(operation + " stopped with " + (code ?? signal)));
110364
+ });
110365
+ });
110366
+ }
110367
+ function kotlinFragmentFlags(filename, kotlinSources2, translatedSources) {
110368
+ const input = JSON.parse(import_node_fs142.default.readFileSync(filename, "utf8"));
110369
+ if (!Array.isArray(input) || !input.length)
110370
+ throw new Error("Kotlin fragments must be a nonempty array");
110371
+ const fragments = input.map(
110372
+ (fragment) => {
110373
+ if (!isRecord(fragment) || typeof fragment.name !== "string" || !/^[a-zA-Z][a-zA-Z0-9_]*$/.test(fragment.name) || !Array.isArray(fragment.sources) || !fragment.sources.every((source) => typeof source === "string") || !Array.isArray(fragment.refines) || !fragment.refines.every((parent) => typeof parent === "string") || fragment.java !== void 0 && typeof fragment.java !== "boolean")
110374
+ throw new Error(
110375
+ "Each Kotlin fragment needs a name, source paths and refined fragments"
110376
+ );
110377
+ return {
110378
+ name: fragment.name,
110379
+ sources: fragment.sources.map((source) => import_node_path145.default.resolve(source)),
110380
+ refines: fragment.refines,
110381
+ java: fragment.java === true
110382
+ };
110383
+ }
110384
+ );
110385
+ const names = new Set(fragments.map(({ name: name3 }) => name3));
110386
+ const refined = new Set(fragments.flatMap(({ refines }) => refines));
110387
+ const [platform2, ...otherPlatforms] = [...names].filter((name3) => !refined.has(name3));
110388
+ const javaFragments = fragments.filter(({ java }) => java);
110389
+ if (names.size !== fragments.length || [...refined].some((name3) => !names.has(name3)) || !platform2 || otherPlatforms.length || javaFragments.length > 1)
110390
+ throw new Error(
110391
+ "Kotlin fragments need unique names, known parents, one platform fragment and at most one Java source fragment"
110392
+ );
110393
+ const sources = fragments.flatMap(({ sources: sources2 }) => sources2);
110394
+ const selected = new Set(kotlinSources2);
110395
+ if (sources.length !== selected.size || new Set(sources).size !== sources.length || sources.some((source) => !selected.has(source)) || [...sources, ...translatedSources].some((source) => source.includes(",")))
110396
+ throw new Error("Each Kotlin library source must belong to exactly one fragment");
110397
+ const mappings = fragments.flatMap(
110398
+ ({ name: name3, sources: sources2 }) => sources2.map((source) => `${name3}:${source}`)
110399
+ );
110400
+ const javaFragment = javaFragments[0]?.name ?? platform2;
110401
+ mappings.push(...translatedSources.map((source) => `${javaFragment}:${source}`));
110402
+ const edges = fragments.flatMap(
110403
+ ({ name: name3, refines }) => refines.map((parent) => `${name3}:${parent}`)
110404
+ );
110405
+ return [
110406
+ "-Xmulti-platform",
110407
+ `-Xfragments=${[...names].join(",")}`,
110408
+ ...edges.length ? [`-Xfragment-refines=${edges.join(",")}`] : [],
110409
+ `-Xfragment-sources=${mappings.join(",")}`
110410
+ ];
110411
+ }
110412
+ async function compileKotlinLibrarySources(input) {
110413
+ const output = import_node_path145.default.resolve(input.output);
110414
+ const name3 = import_node_path145.default.basename(output, ".klib");
110415
+ if (!name3 || !output.endsWith(".klib") || input.source.kind === "files" && !input.source.java.length && !input.source.kotlin.length)
110416
+ throw new Error("Android library compilation requires sources and a KLIB output");
110417
+ const { ready, sdkRoot, libraries } = input;
110418
+ const parent = import_node_path145.default.dirname(output);
110419
+ import_node_fs142.default.mkdirSync(parent, { recursive: true });
110420
+ const work = import_node_fs142.default.mkdtempSync(import_node_path145.default.join(parent, ".android-library-"));
110421
+ try {
110422
+ const compileLibraries = [...libraries, ...input.dependencies];
110423
+ let javaSources;
110424
+ if (input.source.kind === "resources") {
110425
+ const generated = import_node_path145.default.join(work, "resources");
110426
+ await runKotlinTool(
110427
+ ready,
110428
+ sdkRoot,
110429
+ "dev.peach.tools.platform.AndroidResourceClassesKt",
110430
+ [import_node_path145.default.resolve(input.source.archive), generated]
110431
+ );
110432
+ javaSources = import_node_fs142.default.readdirSync(generated, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".java")).sort().map((file) => import_node_path145.default.join(generated, file));
110433
+ } else {
110434
+ javaSources = input.source.java;
110435
+ }
110436
+ const kotlinSources2 = input.source.kind === "files" ? input.source.kotlin.map((file) => import_node_path145.default.resolve(file)) : [];
110437
+ const commonSources = (input.commonSources ?? []).map((file) => import_node_path145.default.resolve(file));
110438
+ if (commonSources.length && input.kotlinFragments)
110439
+ throw new Error("Choose common sources or a Kotlin fragment graph");
110440
+ if (commonSources.some((file) => file.includes(",") || !kotlinSources2.includes(file)))
110441
+ throw new Error("Common Kotlin sources must be included in the library source list");
110442
+ const kotlinJvmAbi = input.kotlinJvmAbi && import_node_path145.default.resolve(input.kotlinJvmAbi);
110443
+ if (kotlinJvmAbi && (!javaSources.length || !kotlinSources2.length || !kotlinJvmAbi.endsWith(".jar") || !input.javaClasspath.some((file) => import_node_path145.default.resolve(file) === kotlinJvmAbi)))
110444
+ throw new Error(
110445
+ "The Kotlin JVM ABI must be a JAR on the mixed library\u2019s Java classpath"
110446
+ );
110447
+ const dependencyAbiFlags = [];
110448
+ if (input.dependencyJvmAbi) {
110449
+ const dependencyPaths = new Set(
110450
+ input.dependencies.map((file) => import_node_path145.default.resolve(file))
110451
+ );
110452
+ const classpathPaths = new Set(
110453
+ input.javaClasspath.map((file) => import_node_path145.default.resolve(file))
110454
+ );
110455
+ const value = JSON.parse(import_node_fs142.default.readFileSync(input.dependencyJvmAbi, "utf8"));
110456
+ if (!Array.isArray(value) || !value.length || !javaSources.length)
110457
+ throw new Error(
110458
+ "Dependency JVM ABIs require Java sources and a nonempty array of KLIB/JAR pairs"
110459
+ );
110460
+ for (const pair of value) {
110461
+ if (!isRecord(pair) || typeof pair.klib !== "string" || typeof pair.jar !== "string")
110462
+ throw new Error("Each dependency JVM ABI requires a klib and a jar path");
110463
+ const klib = import_node_path145.default.resolve(pair.klib);
110464
+ const jar = import_node_path145.default.resolve(pair.jar);
110465
+ if (!klib.endsWith(".klib") || !dependencyPaths.has(klib) || !jar.endsWith(".jar") || !classpathPaths.has(jar) || jar === kotlinJvmAbi)
110466
+ throw new Error(
110467
+ "Dependency JVM ABI pairs must refer to a dependency KLIB and its Java classpath JAR"
110468
+ );
110469
+ dependencyAbiFlags.push("--dependency-jvm-abi", klib, jar);
110470
+ }
110471
+ }
110472
+ let translatedSources = [];
110473
+ if (javaSources.length) {
110474
+ const platform2 = import_node_path145.default.join(work, "platform.txt");
110475
+ const members2 = kotlinToolCommand(
110476
+ ready,
110477
+ sdkRoot,
110478
+ "dev.peach.tools.platform.KlibClassesKt",
110479
+ [
110480
+ ...compileLibraries.map((file) => import_node_path145.default.resolve(file)),
110481
+ ...kotlinJvmAbi ? ["--same-library-jvm-abi", kotlinJvmAbi] : [],
110482
+ ...dependencyAbiFlags
110483
+ ]
110484
+ );
110485
+ const fd = import_node_fs142.default.openSync(platform2, "w");
110486
+ try {
110487
+ await runCompiler2(
110488
+ members2.file,
110489
+ members2.args,
110490
+ { stdio: ["ignore", fd, "inherit"] },
110491
+ "Android library " + name3 + " metadata read"
110492
+ );
110493
+ } finally {
110494
+ import_node_fs142.default.closeSync(fd);
110495
+ }
110496
+ const sourceList = import_node_path145.default.join(work, "sources.txt");
110497
+ import_node_fs142.default.writeFileSync(
110498
+ sourceList,
110499
+ javaSources.map((file) => import_node_path145.default.resolve(file)).join("\n")
110500
+ );
110501
+ const translated = import_node_path145.default.join(work, "translated");
110502
+ const diagnostics = await runKotlinTool(
110503
+ ready,
110504
+ sdkRoot,
110505
+ "dev.peach.tools.java.JavaTranslatorKt",
110506
+ [
110507
+ "--target",
110508
+ "wasm",
110509
+ "--release",
110510
+ input.release,
110511
+ "--classpath",
110512
+ input.javaClasspath.map((file) => import_node_path145.default.resolve(file)).join(import_node_path145.default.delimiter),
110513
+ "--platform",
110514
+ platform2,
110515
+ ...input.processorPath ? ["--processorpath", input.processorPath] : [],
110516
+ "--out",
110517
+ translated,
110518
+ `@${sourceList}`
110519
+ ]
110520
+ );
110521
+ if (/^refuses /m.test(diagnostics))
110522
+ throw new Error(
110523
+ `Android library ${name3} requires unsupported platform members:
110524
+ ${diagnostics.trimEnd()}`
110525
+ );
110526
+ translatedSources = input.kotlinFragments ? import_node_fs142.default.readdirSync(translated, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".kt")).sort().map((file) => import_node_path145.default.join(translated, file)) : [translated];
110527
+ }
110528
+ const multiplatform = input.kotlinFragments ? kotlinFragmentFlags(input.kotlinFragments, kotlinSources2, translatedSources) : commonSources.length ? ["-Xmulti-platform", `-Xcommon-sources=${commonSources.join(",")}`] : [];
110529
+ const language = input.kotlinLanguage ?? "2.1";
110530
+ const raw2 = import_node_path145.default.join(work, "raw");
110531
+ await runCompiler2(
110532
+ ready.kotlinc,
110533
+ [
110534
+ "-J-Xmx4g",
110535
+ "-Xwasm-target=js",
110536
+ "-nowarn",
110537
+ `-Xplugin=${import_node_path145.default.join(sdkRoot, "plugin.jar")}`,
110538
+ "-P",
110539
+ "plugin:dev.peach.jni:android=true",
110540
+ "-language-version",
110541
+ language,
110542
+ "-api-version",
110543
+ language,
110544
+ ...(input.kotlinOptIns ?? []).map((marker) => `-opt-in=${marker}`),
110545
+ ...multiplatform,
110546
+ "-libraries",
110547
+ compileLibraries.join(import_node_path145.default.delimiter),
110548
+ "-ir-output-dir",
110549
+ raw2,
110550
+ "-ir-output-name",
110551
+ name3,
110552
+ ...kotlinSources2,
110553
+ ...translatedSources
110554
+ ],
110555
+ { stdio: "inherit", env: { ...process.env, JAVA_HOME: ready.javaHome } },
110556
+ "Android library " + name3 + " compilation"
110557
+ );
110558
+ const compiled = import_node_path145.default.join(raw2, `${name3}.klib`);
110559
+ if (!javaSources.length) {
110560
+ import_node_fs142.default.renameSync(compiled, output);
110561
+ return;
110562
+ }
110563
+ const normalized = import_node_path145.default.join(work, "normalized.klib");
110564
+ await runKotlinTool(ready, sdkRoot, "dev.peach.tools.platform.JavaPlatformTypesKt", [
110565
+ compiled,
110566
+ normalized,
110567
+ "--java-classes"
110568
+ ]);
110569
+ import_node_fs142.default.renameSync(normalized, output);
110570
+ } finally {
110571
+ import_node_fs142.default.rmSync(work, { recursive: true, force: true });
110572
+ }
110573
+ }
110574
+ var import_node_child_process69, import_node_fs142, import_node_path145;
110575
+ var init_kotlin_library_sources = __esm({
110576
+ "src/kotlin-library-sources.ts"() {
110577
+ "use strict";
110578
+ import_node_child_process69 = require("node:child_process");
110579
+ import_node_fs142 = __toESM(require("node:fs"), 1);
110580
+ import_node_path145 = __toESM(require("node:path"), 1);
110581
+ init_is_record();
110582
+ init_kotlin_toolchain();
110583
+ }
110584
+ });
110585
+
110586
+ // src/kotlin-maven-sources.ts
110587
+ function zipSources(bytes, where) {
110588
+ let end = -1;
110589
+ const earliest = Math.max(0, bytes.length - 22 - 65535);
110590
+ for (let index = bytes.length - 22; index >= earliest; index--) {
110591
+ if (bytes.readUInt32LE(index) === 101010256) {
110592
+ end = index;
110593
+ break;
110594
+ }
110595
+ }
110596
+ if (end < 0) throw new Error(`${where}: sources jar is not a zip`);
110597
+ const count = bytes.readUInt16LE(end + 8);
110598
+ if (count !== bytes.readUInt16LE(end + 10))
110599
+ throw new Error(`${where}: sources jar spans zip disks`);
110600
+ let offset = bytes.readUInt32LE(end + 16);
110601
+ if (offset === 4294967295) throw new Error(`${where}: sources jar is zip64`);
110602
+ const entries2 = [];
110603
+ let totalExtractedBytes = 0;
110604
+ for (let index = 0; index < count; index++) {
110605
+ if (bytes.readUInt32LE(offset) !== 33639248)
110606
+ throw new Error(`${where}: sources jar has a broken central directory`);
110607
+ const flags = bytes.readUInt16LE(offset + 8);
110608
+ const method = bytes.readUInt16LE(offset + 10);
110609
+ const compressed = bytes.readUInt32LE(offset + 20);
110610
+ const uncompressed = bytes.readUInt32LE(offset + 24);
110611
+ const nameLength = bytes.readUInt16LE(offset + 28);
110612
+ const extraLength = bytes.readUInt16LE(offset + 30);
110613
+ const commentLength = bytes.readUInt16LE(offset + 32);
110614
+ const localOffset = bytes.readUInt32LE(offset + 42);
110615
+ const name3 = bytes.toString("utf8", offset + 46, offset + 46 + nameLength);
110616
+ offset += 46 + nameLength + extraLength + commentLength;
110617
+ if (name3.endsWith("/")) continue;
110618
+ if (flags & 1) throw new Error(`${where}: ${name3} is encrypted`);
110619
+ if (name3.includes("\0") || name3.includes("\\") || name3.includes("\n") || name3.includes("\r") || name3.startsWith("/") || name3.split("/").includes(".."))
110620
+ throw new Error(`${where}: ${name3} escapes the sources jar`);
110621
+ if (!name3.endsWith(".kt") && !name3.endsWith(".java")) continue;
110622
+ if (uncompressed > MAX_SOURCE_ENTRY_BYTES || totalExtractedBytes + uncompressed > MAX_TOTAL_EXTRACTED_BYTES) {
110623
+ throw new Error(`${where}: ${name3} exceeds sources jar extraction budget`);
110624
+ }
110625
+ if (bytes.readUInt32LE(localOffset) !== 67324752)
110626
+ throw new Error(`${where}: ${name3} has no local header`);
110627
+ const localName = bytes.readUInt16LE(localOffset + 26);
110628
+ const localExtra = bytes.readUInt16LE(localOffset + 28);
110629
+ const start = localOffset + 30 + localName + localExtra;
110630
+ if (start + compressed > bytes.byteLength)
110631
+ throw new Error(`${where}: ${name3} exceeds sources jar bounds`);
110632
+ const remainingBudget = Math.min(
110633
+ MAX_SOURCE_ENTRY_BYTES,
110634
+ MAX_TOTAL_EXTRACTED_BYTES - totalExtractedBytes
110635
+ );
110636
+ const payload = bytes.subarray(start, start + compressed);
110637
+ let data = null;
110638
+ if (method === 0) {
110639
+ if (payload.byteLength > remainingBudget) {
110640
+ throw new Error(`${where}: ${name3} exceeds sources jar extraction budget`);
110641
+ }
110642
+ data = Buffer.from(payload);
110643
+ } else if (method === 8) {
110644
+ data = (0, import_node_zlib9.inflateRawSync)(payload, { maxOutputLength: remainingBudget });
110645
+ }
110646
+ if (!data) throw new Error(`${where}: ${name3} uses zip method ${method}`);
110647
+ totalExtractedBytes += data.byteLength;
110648
+ if (totalExtractedBytes > MAX_TOTAL_EXTRACTED_BYTES) {
110649
+ throw new Error(`${where}: sources jar exceeds extraction budget`);
110650
+ }
110651
+ entries2.push({ name: name3, data });
110652
+ }
110653
+ return entries2;
110654
+ }
110655
+ function extract(bytes, where) {
110656
+ const key2 = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
110657
+ const cached2 = pending.get(key2);
110658
+ if (cached2) return cached2;
110659
+ const request = (async () => {
110660
+ const dest = import_node_path146.default.join(import_node_os29.default.tmpdir(), "peach-maven-sources", key2);
110661
+ const marker = import_node_path146.default.join(dest, ".complete");
110662
+ if (!import_node_fs143.default.existsSync(marker)) {
110663
+ const sources = zipSources(bytes, where);
110664
+ const staging = `${dest}.partial-${process.pid}`;
110665
+ import_node_fs143.default.rmSync(staging, { recursive: true, force: true });
110666
+ const stagingRoot = import_node_path146.default.resolve(staging);
110667
+ import_node_fs143.default.mkdirSync(stagingRoot, { recursive: true });
110668
+ for (const entry of sources) {
110669
+ const file = import_node_path146.default.resolve(stagingRoot, entry.name);
110670
+ if (!file.startsWith(`${stagingRoot}${import_node_path146.default.sep}`)) {
110671
+ throw new Error(`${where}: ${entry.name} escapes the sources jar`);
110672
+ }
110673
+ import_node_fs143.default.mkdirSync(import_node_path146.default.dirname(file), { recursive: true });
110674
+ import_node_fs143.default.writeFileSync(file, entry.data);
110675
+ }
110676
+ import_node_fs143.default.writeFileSync(import_node_path146.default.join(staging, ".complete"), "");
110677
+ try {
110678
+ import_node_fs143.default.renameSync(staging, dest);
110679
+ } catch (error) {
110680
+ import_node_fs143.default.rmSync(staging, { recursive: true, force: true });
110681
+ if (!import_node_fs143.default.existsSync(marker)) throw error;
110682
+ }
110683
+ }
110684
+ const files2 = import_node_fs143.default.readdirSync(dest, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path146.default.join(entry.parentPath, entry.name)).sort();
110685
+ return {
110686
+ directory: dest,
110687
+ java: files2.filter((file) => file.endsWith(".java")),
110688
+ kotlin: files2.filter((file) => file.endsWith(".kt"))
110689
+ };
110690
+ })().catch((error) => {
110691
+ pending.delete(key2);
110692
+ throw error;
110693
+ });
110694
+ pending.set(key2, request);
110695
+ return request;
110696
+ }
110697
+ function readSourcesJar(archive, where) {
110698
+ if (import_node_fs143.default.statSync(archive).size > MAX_SOURCES_JAR_BYTES)
110699
+ throw new Error(`${where}: ${archive} exceeds sources jar size limit`);
110700
+ return import_node_fs143.default.readFileSync(archive);
110701
+ }
110702
+ function readMavenSourcesArchive(archive) {
110703
+ return extract(readSourcesJar(archive, archive), archive);
110704
+ }
110705
+ var import_node_crypto87, import_node_fs143, import_node_os29, import_node_path146, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
110706
+ var init_kotlin_maven_sources = __esm({
110707
+ "src/kotlin-maven-sources.ts"() {
110708
+ "use strict";
110709
+ import_node_crypto87 = require("node:crypto");
110710
+ import_node_fs143 = __toESM(require("node:fs"), 1);
110711
+ import_node_os29 = __toESM(require("node:os"), 1);
110712
+ import_node_path146 = __toESM(require("node:path"), 1);
110713
+ import_node_zlib9 = require("node:zlib");
110714
+ pending = /* @__PURE__ */ new Map();
110715
+ MAX_SOURCES_JAR_BYTES = 64 * 1024 * 1024;
110716
+ MAX_SOURCE_ENTRY_BYTES = 16 * 1024 * 1024;
110717
+ MAX_TOTAL_EXTRACTED_BYTES = 64 * 1024 * 1024;
110718
+ }
110719
+ });
110720
+
110721
+ // src/kotlin-gradle-library-plan.ts
110722
+ async function compileKotlinGradleLibraries(input) {
110723
+ const compiled = /* @__PURE__ */ new Map();
110724
+ for (const library of input.plan.libraries) {
110725
+ const { java: archiveJava, kotlin } = await readMavenSourcesArchive(library.archive);
110726
+ const java = archiveJava.filter((file) => import_node_path147.default.basename(file) !== "module-info.java");
110727
+ const dependencies = library.dependencies.map((name4) => {
110728
+ const dependency = compiled.get(name4);
110729
+ if (!dependency) throw new Error(`${library.coordinate} depends on missing ${name4}`);
110730
+ return dependency;
110731
+ });
110732
+ const classpath = [
110733
+ .../* @__PURE__ */ new Set([
110734
+ ...library.jars,
110735
+ ...dependencies.flatMap(({ jars }) => jars),
110736
+ ...input.plan.classpath
110737
+ ])
110738
+ ];
110739
+ const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
110740
+ const suffix = (0, import_node_crypto88.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
110741
+ const klib = import_node_path147.default.join(input.output, `${name3}-${suffix}.klib`);
110742
+ const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
110743
+ const abiPairs = java.length ? dependencies.flatMap(
110744
+ ({ klib: klib2, jars }) => jars.length === 1 ? [{ klib: klib2, jar: jars[0] }] : []
110745
+ ) : [];
110746
+ const dependencyJvmAbi = abiPairs.length ? `${klib}.json` : void 0;
110747
+ if (dependencyJvmAbi) {
110748
+ import_node_fs144.default.mkdirSync(input.output, { recursive: true });
110749
+ import_node_fs144.default.writeFileSync(dependencyJvmAbi, JSON.stringify(abiPairs));
110750
+ }
110751
+ await compileKotlinLibrarySources({
110752
+ ready: input.ready,
110753
+ sdkRoot: input.sdkRoot,
110754
+ libraries: input.libraries,
110755
+ source: { kind: "files", java, kotlin },
110756
+ javaClasspath: classpath,
110757
+ release: "17",
110758
+ kotlinJvmAbi,
110759
+ dependencyJvmAbi,
110760
+ kotlinLanguage: input.language,
110761
+ dependencies: dependencies.map(({ klib: klib2 }) => klib2),
110762
+ output: klib
110763
+ });
110764
+ compiled.set(library.coordinate, { klib, jars: library.jars });
110765
+ }
110766
+ return [...compiled.values()].map(({ klib }) => klib);
110767
+ }
110768
+ var import_node_crypto88, import_node_fs144, import_node_path147;
110769
+ var init_kotlin_gradle_library_plan = __esm({
110770
+ "src/kotlin-gradle-library-plan.ts"() {
110771
+ "use strict";
110772
+ import_node_crypto88 = require("node:crypto");
110773
+ import_node_fs144 = __toESM(require("node:fs"), 1);
110774
+ import_node_path147 = __toESM(require("node:path"), 1);
110775
+ init_kotlin_library_sources();
110776
+ init_kotlin_maven_sources();
110777
+ }
110778
+ });
110779
+
110281
110780
  // src/kotlin-instance-source.ts
110282
110781
  function bindingNames(pattern) {
110283
110782
  if (pattern.type === "Identifier") return [pattern.name];
@@ -110412,7 +110911,7 @@ var init_kotlin_instance_source = __esm({
110412
110911
 
110413
110912
  // src/kotlin-skiko-source.ts
110414
110913
  function kotlinSkikoSource(loader) {
110415
- const upstream = (0, import_acorn4.parse)((0, import_node_zlib9.gunzipSync)(loader).toString("utf8"), {
110914
+ const upstream = (0, import_acorn4.parse)((0, import_node_zlib10.gunzipSync)(loader).toString("utf8"), {
110416
110915
  ecmaVersion: "latest",
110417
110916
  sourceType: "module"
110418
110917
  });
@@ -110440,11 +110939,11 @@ function kotlinSkikoSource(loader) {
110440
110939
  ""
110441
110940
  ].join("\n");
110442
110941
  }
110443
- var import_node_zlib9, import_acorn4;
110942
+ var import_node_zlib10, import_acorn4;
110444
110943
  var init_kotlin_skiko_source = __esm({
110445
110944
  "src/kotlin-skiko-source.ts"() {
110446
110945
  "use strict";
110447
- import_node_zlib9 = require("node:zlib");
110946
+ import_node_zlib10 = require("node:zlib");
110448
110947
  import_acorn4 = require("peachsim/vendor/acorn");
110449
110948
  }
110450
110949
  });
@@ -110546,16 +111045,16 @@ __export(kotlin_host_exports, {
110546
111045
  });
110547
111046
  function loadKotlinSdk(moduleRoot, toolchain) {
110548
111047
  return installKotlinSdkArchive(
110549
- import_node_fs142.default.readFileSync(import_node_path145.default.join(moduleRoot, "sdk.tar.gz")),
111048
+ import_node_fs145.default.readFileSync(import_node_path148.default.join(moduleRoot, "sdk.tar.gz")),
110550
111049
  toolchain.compiler
110551
111050
  );
110552
111051
  }
110553
111052
  function appKotlinLanguage(root) {
110554
- const reactNative = import_node_path145.default.dirname(
110555
- (0, import_node_module23.createRequire)(import_node_path145.default.join(root, "package.json")).resolve("react-native/package.json")
111053
+ const reactNative = import_node_path148.default.dirname(
111054
+ (0, import_node_module23.createRequire)(import_node_path148.default.join(root, "package.json")).resolve("react-native/package.json")
110556
111055
  );
110557
- const versions = import_node_fs142.default.readFileSync(
110558
- import_node_path145.default.join(reactNative, "gradle", "libs.versions.toml"),
111056
+ const versions = import_node_fs145.default.readFileSync(
111057
+ import_node_path148.default.join(reactNative, "gradle", "libs.versions.toml"),
110559
111058
  "utf8"
110560
111059
  );
110561
111060
  const match = /^kotlin\s*=\s*"(\d+)\.(\d+)/m.exec(versions);
@@ -110566,9 +111065,9 @@ function appKotlinLanguage(root) {
110566
111065
  function kotlinSources(root, skip = SKIP_DIRS) {
110567
111066
  const sources = [];
110568
111067
  const walk4 = (dir) => {
110569
- for (const entry of import_node_fs142.default.readdirSync(dir, { withFileTypes: true })) {
111068
+ for (const entry of import_node_fs145.default.readdirSync(dir, { withFileTypes: true })) {
110570
111069
  if (entry.name.startsWith(".") || skip.has(entry.name)) continue;
110571
- const full = import_node_path145.default.join(dir, entry.name);
111070
+ const full = import_node_path148.default.join(dir, entry.name);
110572
111071
  if (entry.isDirectory()) walk4(full);
110573
111072
  else if (entry.isFile() && entry.name.endsWith(".kt")) sources.push(full);
110574
111073
  }
@@ -110625,7 +111124,7 @@ function entrySource(ids) {
110625
111124
  ].join("\n");
110626
111125
  }
110627
111126
  function buildsDir() {
110628
- return import_node_path145.default.join(kotlinHome(), "builds");
111127
+ return import_node_path148.default.join(kotlinHome(), "builds");
110629
111128
  }
110630
111129
  async function kotlinArtifact(root, moduleRoot, origin, target = "app") {
110631
111130
  const { kotlinSourceId, nativeSourceContract, renderKotlinSourceGlue } = await import("vxrn/native-source-contract");
@@ -110638,7 +111137,7 @@ async function kotlinArtifact(root, moduleRoot, origin, target = "app") {
110638
111137
  const viewIds = [];
110639
111138
  let usesCompose = false;
110640
111139
  for (const file of sources) {
110641
- const source = import_node_fs142.default.readFileSync(file, "utf8");
111140
+ const source = import_node_fs145.default.readFileSync(file, "utf8");
110642
111141
  if (/\bandroidx\.compose\./.test(source)) usesCompose = true;
110643
111142
  const contract = nativeSourceContract(file, source);
110644
111143
  if (contract.modules.length === 0 && contract.views.length === 0) continue;
@@ -110727,11 +111226,11 @@ function readExpoTypes(output) {
110727
111226
  });
110728
111227
  }
110729
111228
  async function scanSources(tool, parse16, toolchain, moduleRoot, files2) {
110730
- const digest3 = (0, import_node_crypto87.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
111229
+ const digest3 = (0, import_node_crypto89.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
110731
111230
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
110732
- digest3.update(import_node_fs142.default.readFileSync(import_node_path145.default.join(moduleRoot, "sdk.tar.gz")));
111231
+ digest3.update(import_node_fs145.default.readFileSync(import_node_path148.default.join(moduleRoot, "sdk.tar.gz")));
110733
111232
  digest3.update(tool);
110734
- for (const file of files2) digest3.update(`${file}\0${import_node_fs142.default.readFileSync(file, "utf8")}\0`);
111233
+ for (const file of files2) digest3.update(`${file}\0${import_node_fs145.default.readFileSync(file, "utf8")}\0`);
110735
111234
  const key2 = digest3.digest("hex");
110736
111235
  let scan3 = toolScans.get(key2);
110737
111236
  if (!scan3) {
@@ -110746,7 +111245,7 @@ async function scanSources(tool, parse16, toolchain, moduleRoot, files2) {
110746
111245
  async function scanExpoTypes(toolchain, moduleRoot, sources) {
110747
111246
  const candidates = sources.filter(
110748
111247
  (file) => /\bRecord\b|\benum\s+class\b|\bExpoComposeView\b|\bExpoView\b|\bComposeProps\b|:\s*(?:[A-Za-z0-9_.]+\.)?(?:View|FrameLayout|LinearLayout|ViewGroup)\b/.test(
110749
- import_node_fs142.default.readFileSync(file, "utf8")
111248
+ import_node_fs145.default.readFileSync(file, "utf8")
110750
111249
  )
110751
111250
  );
110752
111251
  if (candidates.length === 0) return [];
@@ -110890,7 +111389,7 @@ function expoTypeSources(files2) {
110890
111389
  )
110891
111390
  ];
110892
111391
  if (edits.length > 0 || views.length > 0) {
110893
- let text7 = import_node_fs142.default.readFileSync(file.file, "utf8").replaceAll("\r\n", "\n");
111392
+ let text7 = import_node_fs145.default.readFileSync(file.file, "utf8").replaceAll("\r\n", "\n");
110894
111393
  for (const { range: range3, owner, field } of edits.sort((a, b) => b.range[0] - a.range[0]))
110895
111394
  text7 = `${text7.slice(0, range3[0])}dev.peach.expo.PeachExpoTypes.initial(${owner}::class, ${literal2(field.key)}, ${field.required}) { ${text7.slice(range3[0], range3[1])} }${text7.slice(range3[1])}`;
110896
111395
  if (views.length > 0) {
@@ -110906,7 +111405,7 @@ function expoTypeSources(files2) {
110906
111405
  `${file.package ? `${file.package}.` : ""}peachExpoViews${index}()`
110907
111406
  );
110908
111407
  }
110909
- const name3 = `PeachExpoSource_${index}_${import_node_path145.default.basename(file.file)}`;
111408
+ const name3 = `PeachExpoSource_${index}_${import_node_path148.default.basename(file.file)}`;
110910
111409
  generated[name3] = text7;
110911
111410
  origins[name3] = file.file;
110912
111411
  }
@@ -110948,7 +111447,7 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
110948
111447
  const language = appKotlinLanguage(root);
110949
111448
  const scanned = await scanExpoTypes(toolchain, moduleRoot, modules.sources);
110950
111449
  const usesCompose = scanned.some((file) => file.views.length > 0) || modules.sources.some(
110951
- (file) => /\bandroidx\.compose\./.test(import_node_fs142.default.readFileSync(file, "utf8"))
111450
+ (file) => /\bandroidx\.compose\./.test(import_node_fs145.default.readFileSync(file, "utf8"))
110952
111451
  );
110953
111452
  const types2 = expoTypeSources(scanned);
110954
111453
  const rewritten = new Set(Object.values(types2.origins));
@@ -111114,6 +111613,7 @@ async function kotlinAppArtifact(app, moduleRoot, origin) {
111114
111613
  kotlinOptIns: app.kotlinOptIns,
111115
111614
  sources: app.sources,
111116
111615
  javaSpecs: app.javaSources,
111616
+ gradleLibraries: app.gradleLibraries,
111117
111617
  generated,
111118
111618
  sdkProfile: "app",
111119
111619
  usesCompose: true,
@@ -111166,7 +111666,7 @@ function appResourceSources(app) {
111166
111666
  entries: app.drawables.map((drawable) => ({
111167
111667
  name: drawable.name,
111168
111668
  init: `listOf(
111169
- ${drawable.files.map((file) => drawableInit(file, import_node_path145.default.relative(app.moduleDir, file.file))).join(",\n")}
111669
+ ${drawable.files.map((file) => drawableInit(file, import_node_path148.default.relative(app.moduleDir, file.file))).join(",\n")}
111170
111670
  )`
111171
111671
  }))
111172
111672
  },
@@ -111290,7 +111790,7 @@ function drawableInit(drawable, file) {
111290
111790
  if (drawable.kind === "xml") return `PeachDrawable.Xml(${where})`;
111291
111791
  if (drawable.kind === "bitmap")
111292
111792
  return `PeachDrawable.Bitmap(${where}, ${drawable.ninePatch}, ${literal2(
111293
- import_node_fs142.default.readFileSync(drawable.file).toString("base64")
111793
+ import_node_fs145.default.readFileSync(drawable.file).toString("base64")
111294
111794
  )})`;
111295
111795
  const vector = drawable.vector;
111296
111796
  const float3 = (value) => `${value}f`;
@@ -111352,11 +111852,12 @@ async function compileKotlin(input, origin) {
111352
111852
  usesCompose,
111353
111853
  usesSerialization = false,
111354
111854
  viewModels,
111355
- javaSpecs = []
111855
+ javaSpecs = [],
111856
+ gradleLibraries
111356
111857
  } = input;
111357
111858
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
111358
- const plugin = import_node_path145.default.join(sdk2.root, "plugin.jar");
111359
- const sdkLibrary = import_node_path145.default.join(sdk2.root, `${sdkProfile}.klib`);
111859
+ const plugin = import_node_path148.default.join(sdk2.root, "plugin.jar");
111860
+ const sdkLibrary = import_node_path148.default.join(sdk2.root, `${sdkProfile}.klib`);
111360
111861
  const javaRead = javaSpecs.length ? await readJavaModuleSpecs(javaSpecs, sdk2.root, await ensureToolchain(toolchain)) : null;
111361
111862
  const java = javaRead && javaRead.specs.some((spec) => !spec.application) ? { ...javaRead, specs: javaRead.specs.filter((spec) => !spec.application) } : null;
111362
111863
  const applicationJava = javaRead?.specs.filter((spec) => spec.application) ?? [];
@@ -111384,10 +111885,10 @@ async function compileKotlin(input, origin) {
111384
111885
  };
111385
111886
  const inputs2 = sources.map((file) => ({
111386
111887
  file,
111387
- bytes: import_node_fs142.default.readFileSync(file)
111888
+ bytes: import_node_fs145.default.readFileSync(file)
111388
111889
  }));
111389
111890
  const { composeArchive, ...compilerInputs } = toolchain;
111390
- const digest3 = (0, import_node_crypto87.createHash)("sha256");
111891
+ const digest3 = (0, import_node_crypto89.createHash)("sha256");
111391
111892
  digest3.update(
111392
111893
  JSON.stringify({
111393
111894
  format: BUILD_FORMAT,
@@ -111401,7 +111902,17 @@ async function compileKotlin(input, origin) {
111401
111902
  })
111402
111903
  );
111403
111904
  for (const { file, bytes } of inputs2)
111404
- digest3.update(import_node_path145.default.relative(root, file)).update("\0").update(bytes).update("\0");
111905
+ digest3.update(import_node_path148.default.relative(root, file)).update("\0").update(bytes).update("\0");
111906
+ if (gradleLibraries) {
111907
+ digest3.update(JSON.stringify(gradleLibraries));
111908
+ const files2 = /* @__PURE__ */ new Set([
111909
+ ...gradleLibraries.classpath,
111910
+ ...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
111911
+ ]);
111912
+ for (const file of files2) {
111913
+ digest3.update((0, import_node_crypto89.createHash)("sha256").update(import_node_fs145.default.readFileSync(file)).digest());
111914
+ }
111915
+ }
111405
111916
  if (viewModels) digest3.update(viewModels.toolClass);
111406
111917
  for (const [name3, text7] of Object.entries(generated))
111407
111918
  digest3.update(`${name3}\0${text7}\0`);
@@ -111410,49 +111921,49 @@ async function compileKotlin(input, origin) {
111410
111921
  url: `${origin}${KOTLIN_ARTIFACT_PREFIX}${hash}/app.mjs`,
111411
111922
  hash
111412
111923
  };
111413
- const out = import_node_path145.default.join(buildsDir(), hash);
111414
- if (import_node_fs142.default.existsSync(import_node_path145.default.join(out, "js", "app.wasm"))) return artifact;
111415
- const pending = builds.get(hash);
111416
- if (pending) return pending;
111924
+ const out = import_node_path148.default.join(buildsDir(), hash);
111925
+ if (import_node_fs145.default.existsSync(import_node_path148.default.join(out, "js", "app.wasm"))) return artifact;
111926
+ const pending2 = builds.get(hash);
111927
+ if (pending2) return pending2;
111417
111928
  const build2 = (async () => {
111418
111929
  const ready = await ensureToolchain(toolchain);
111419
111930
  const { kotlinc } = ready;
111420
- const libraries = [...ready.libraries, sdkLibrary, import_node_path145.default.join(sdk2.root, "java.klib")];
111931
+ const libraries = [...ready.libraries, sdkLibrary, import_node_path148.default.join(sdk2.root, "java.klib")];
111421
111932
  const compose = usesCompose ? await ensureCompose(toolchain) : null;
111422
111933
  if (compose) libraries.push(...compose.libraries);
111423
- import_node_fs142.default.mkdirSync(buildsDir(), { recursive: true });
111424
- const work = import_node_fs142.default.mkdtempSync(import_node_path145.default.join(buildsDir(), `${hash}-`));
111425
- const javaLibrary = java ? import_node_path145.default.join(work, "java-abi", "java-abi.klib") : null;
111934
+ import_node_fs145.default.mkdirSync(buildsDir(), { recursive: true });
111935
+ const work = import_node_fs145.default.mkdtempSync(import_node_path148.default.join(buildsDir(), `${hash}-`));
111936
+ const javaLibrary = java ? import_node_path148.default.join(work, "java-abi", "java-abi.klib") : null;
111426
111937
  if (javaLibrary) libraries.push(javaLibrary);
111427
- const generatedDir = import_node_path145.default.join(work, "generated");
111428
- import_node_fs142.default.mkdirSync(generatedDir);
111938
+ const generatedDir = import_node_path148.default.join(work, "generated");
111939
+ import_node_fs145.default.mkdirSync(generatedDir);
111429
111940
  for (const [name3, text7] of Object.entries(generated))
111430
- import_node_fs142.default.writeFileSync(import_node_path145.default.join(generatedDir, name3), text7);
111941
+ import_node_fs145.default.writeFileSync(import_node_path148.default.join(generatedDir, name3), text7);
111431
111942
  const compiledSources = inputs2.map(({ file, bytes }, index) => {
111432
- const target = import_node_path145.default.join(work, "sources", String(index), import_node_path145.default.basename(file));
111433
- import_node_fs142.default.mkdirSync(import_node_path145.default.dirname(target), { recursive: true });
111434
- import_node_fs142.default.writeFileSync(target, bytes);
111943
+ const target = import_node_path148.default.join(work, "sources", String(index), import_node_path148.default.basename(file));
111944
+ import_node_fs145.default.mkdirSync(import_node_path148.default.dirname(target), { recursive: true });
111945
+ import_node_fs145.default.writeFileSync(target, bytes);
111435
111946
  return { file, target };
111436
111947
  });
111437
- const common2 = [
111948
+ const common2 = () => [
111438
111949
  // the full upstream Compose graph exceeds kotlinc's 512 mib default heap.
111439
111950
  "-J-Xmx2g",
111440
111951
  "-Xallow-kotlin-package",
111441
111952
  "-Xwasm-target=js",
111442
111953
  "-libraries",
111443
- libraries.join(import_node_path145.default.delimiter)
111954
+ libraries.join(import_node_path148.default.delimiter)
111444
111955
  ];
111445
111956
  const compileKlib = (outputDir) => run15(
111446
111957
  kotlinc,
111447
111958
  [
111448
- ...common2,
111959
+ ...common2(),
111449
111960
  `-Xplugin=${plugin}`,
111450
- `-Xfriend-modules=${[sdkLibrary, ...javaLibrary ? [javaLibrary] : []].join(import_node_path145.default.delimiter)}`,
111961
+ `-Xfriend-modules=${[sdkLibrary, ...javaLibrary ? [javaLibrary] : []].join(import_node_path148.default.delimiter)}`,
111451
111962
  ...usesCompose ? [
111452
- `-Xplugin=${import_node_path145.default.resolve(import_node_path145.default.dirname(kotlinc), "../lib/compose-compiler-plugin.jar")}`
111963
+ `-Xplugin=${import_node_path148.default.resolve(import_node_path148.default.dirname(kotlinc), "../lib/compose-compiler-plugin.jar")}`
111453
111964
  ] : [],
111454
111965
  ...usesSerialization ? [
111455
- `-Xplugin=${import_node_path145.default.resolve(import_node_path145.default.dirname(kotlinc), "../lib/kotlinx-serialization-compiler-plugin.jar")}`
111966
+ `-Xplugin=${import_node_path148.default.resolve(import_node_path148.default.dirname(kotlinc), "../lib/kotlinx-serialization-compiler-plugin.jar")}`
111456
111967
  ] : [],
111457
111968
  "-language-version",
111458
111969
  language,
@@ -111466,11 +111977,23 @@ async function compileKotlin(input, origin) {
111466
111977
  "-ir-output-name",
111467
111978
  "app",
111468
111979
  ...compiledSources.map(({ target }) => target),
111469
- ...Object.keys(generated).map((name3) => import_node_path145.default.join(generatedDir, name3))
111980
+ ...Object.keys(generated).map((name3) => import_node_path148.default.join(generatedDir, name3))
111470
111981
  ],
111471
111982
  { maxBuffer: 16 * 1024 * 1024 }
111472
111983
  );
111473
111984
  try {
111985
+ if (gradleLibraries) {
111986
+ libraries.push(
111987
+ ...await compileKotlinGradleLibraries({
111988
+ plan: gradleLibraries,
111989
+ ready,
111990
+ sdkRoot: sdk2.root,
111991
+ libraries: libraries.filter((library) => library !== javaLibrary),
111992
+ language,
111993
+ output: import_node_path148.default.join(work, "gradle-libraries")
111994
+ })
111995
+ );
111996
+ }
111474
111997
  if (java)
111475
111998
  await compileJavaModuleAbi({
111476
111999
  specs: java,
@@ -111485,49 +112008,49 @@ async function compileKotlin(input, origin) {
111485
112008
  if (viewModels && inputs2.some(
111486
112009
  ({ file, bytes }) => sources.includes(file) && bytes.includes("ViewModel")
111487
112010
  )) {
111488
- await compileKlib(import_node_path145.default.join(work, "abi"));
112011
+ await compileKlib(import_node_path148.default.join(work, "abi"));
111489
112012
  const stdout = await runKotlinTool(
111490
112013
  ready,
111491
112014
  sdk2.root,
111492
112015
  viewModels.toolClass,
111493
- [import_node_path145.default.join(work, "abi")],
112016
+ [import_node_path148.default.join(work, "abi")],
111494
112017
  64 * 1024 * 1024
111495
112018
  );
111496
- import_node_fs142.default.writeFileSync(
111497
- import_node_path145.default.join(generatedDir, viewModels.file),
112019
+ import_node_fs145.default.writeFileSync(
112020
+ import_node_path148.default.join(generatedDir, viewModels.file),
111498
112021
  viewModels.render(viewModelClasses(readAbiClasses(stdout)))
111499
112022
  );
111500
112023
  }
111501
- await compileKlib(import_node_path145.default.join(work, "klib"));
112024
+ await compileKlib(import_node_path148.default.join(work, "klib"));
111502
112025
  await run15(
111503
112026
  kotlinc,
111504
112027
  [
111505
- ...common2,
112028
+ ...common2(),
111506
112029
  "-nowarn",
111507
112030
  "-Xpartial-linkage-loglevel=error",
111508
- `-Xinclude=${import_node_path145.default.join(work, "klib")}`,
112031
+ `-Xinclude=${import_node_path148.default.join(work, "klib")}`,
111509
112032
  "-Xir-produce-js",
111510
112033
  "-Xir-dce",
111511
112034
  "-ir-output-dir",
111512
- import_node_path145.default.join(work, "js"),
112035
+ import_node_path148.default.join(work, "js"),
111513
112036
  "-ir-output-name",
111514
112037
  "app"
111515
112038
  ],
111516
112039
  { maxBuffer: 16 * 1024 * 1024 }
111517
112040
  );
111518
112041
  if (compose) {
111519
- import_node_fs142.default.writeFileSync(
111520
- import_node_path145.default.join(work, "js", "skiko.mjs"),
111521
- kotlinSkikoSource(import_node_fs142.default.readFileSync(compose.loader))
112042
+ import_node_fs145.default.writeFileSync(
112043
+ import_node_path148.default.join(work, "js", "skiko.mjs"),
112044
+ kotlinSkikoSource(import_node_fs145.default.readFileSync(compose.loader))
111522
112045
  );
111523
112046
  }
111524
112047
  if (usesCompose) {
111525
112048
  for (const library of toolchain.composeJsLibraries) {
111526
112049
  let imported = false;
111527
- for (const file of import_node_fs142.default.readdirSync(import_node_path145.default.join(work, "js"))) {
112050
+ for (const file of import_node_fs145.default.readdirSync(import_node_path148.default.join(work, "js"))) {
111528
112051
  if (!file.endsWith(".mjs")) continue;
111529
- const target = import_node_path145.default.join(work, "js", file);
111530
- const source = import_node_fs142.default.readFileSync(target, "utf8");
112052
+ const target = import_node_path148.default.join(work, "js", file);
112053
+ const source = import_node_fs145.default.readFileSync(target, "utf8");
111531
112054
  let next = source;
111532
112055
  for (const quote3 of ["'", '"'])
111533
112056
  next = next.replaceAll(
@@ -111535,11 +112058,11 @@ async function compileKotlin(input, origin) {
111535
112058
  `from ${quote3}./${library.file}${quote3}`
111536
112059
  );
111537
112060
  if (next === source) continue;
111538
- import_node_fs142.default.writeFileSync(target, next);
112061
+ import_node_fs145.default.writeFileSync(target, next);
111539
112062
  imported = true;
111540
112063
  }
111541
112064
  if (!imported) continue;
111542
- const archive = import_node_path145.default.join(
112065
+ const archive = import_node_path148.default.join(
111543
112066
  kotlinHome(),
111544
112067
  toolchain.compiler.version,
111545
112068
  library.name
@@ -111548,24 +112071,24 @@ async function compileKotlin(input, origin) {
111548
112071
  const { stdout } = await run15("tar", ["-xOf", archive, library.archiveEntry], {
111549
112072
  maxBuffer: 16 * 1024 * 1024
111550
112073
  });
111551
- import_node_fs142.default.writeFileSync(import_node_path145.default.join(work, "js", library.file), stdout);
112074
+ import_node_fs145.default.writeFileSync(import_node_path148.default.join(work, "js", library.file), stdout);
111552
112075
  }
111553
112076
  }
111554
112077
  } catch (error) {
111555
- import_node_fs142.default.rmSync(work, { recursive: true, force: true });
112078
+ import_node_fs145.default.rmSync(work, { recursive: true, force: true });
111556
112079
  let output = isRecord(error) ? `${String(error.stderr ?? "")}${String(error.stdout ?? "")}` : "";
111557
112080
  for (const [name3, source] of Object.entries(origins))
111558
- output = output.replaceAll(import_node_path145.default.join(generatedDir, name3), source);
112081
+ output = output.replaceAll(import_node_path148.default.join(generatedDir, name3), source);
111559
112082
  for (const [index, spec] of applicationJava.entries())
111560
112083
  output = output.replaceAll(
111561
- import_node_path145.default.join(generatedDir, `JavaApplication${index}.kt`),
112084
+ import_node_path148.default.join(generatedDir, `JavaApplication${index}.kt`),
111562
112085
  spec.file
111563
112086
  );
111564
112087
  for (const { file, target } of compiledSources)
111565
- output = output.replaceAll(target, file).replaceAll(import_node_path145.default.relative(process.cwd(), target), file);
112088
+ output = output.replaceAll(target, file).replaceAll(import_node_path148.default.relative(process.cwd(), target), file);
111566
112089
  for (const [index, spec] of (java?.specs ?? []).entries())
111567
112090
  output = output.replaceAll(
111568
- import_node_path145.default.join(work, "java-abi", `Spec${index}.kt`),
112091
+ import_node_path148.default.join(work, "java-abi", `Spec${index}.kt`),
111569
112092
  spec.file
111570
112093
  );
111571
112094
  output = output.replace(
@@ -111578,20 +112101,20 @@ ${output.trim() || (error instanceof Error ? error.message : String(error))}`
111578
112101
  );
111579
112102
  }
111580
112103
  const seams = [kotlinNodeDetection];
111581
- const js = import_node_fs142.default.readdirSync(import_node_path145.default.join(work, "js")).filter((file) => file.endsWith(".mjs"));
112104
+ const js = import_node_fs145.default.readdirSync(import_node_path148.default.join(work, "js")).filter((file) => file.endsWith(".mjs"));
111582
112105
  if (js.some(
111583
- (file) => import_node_fs142.default.readFileSync(import_node_path145.default.join(work, "js", file), "utf8").includes("'kotlinx.coroutines.")
112106
+ (file) => import_node_fs145.default.readFileSync(import_node_path148.default.join(work, "js", file), "utf8").includes("'kotlinx.coroutines.")
111584
112107
  ))
111585
112108
  seams.push(kotlinCoroutineDispatcher);
111586
112109
  for (const [from, to] of seams) {
111587
112110
  let patched = 0;
111588
112111
  for (const file of js) {
111589
- const target = import_node_path145.default.join(work, "js", file);
111590
- const text7 = import_node_fs142.default.readFileSync(target, "utf8");
112112
+ const target = import_node_path148.default.join(work, "js", file);
112113
+ const text7 = import_node_fs145.default.readFileSync(target, "utf8");
111591
112114
  const next = text7.replaceAll(from, to);
111592
112115
  if (next !== text7) {
111593
112116
  patched++;
111594
- import_node_fs142.default.writeFileSync(target, next);
112117
+ import_node_fs145.default.writeFileSync(target, next);
111595
112118
  }
111596
112119
  }
111597
112120
  if (patched === 0)
@@ -111599,11 +112122,11 @@ ${output.trim() || (error instanceof Error ? error.message : String(error))}`
111599
112122
  `kotlin output no longer contains ${from}; recheck how it detects its host in Peach`
111600
112123
  );
111601
112124
  }
111602
- const entry = import_node_path145.default.join(work, "js/app.mjs");
111603
- const entrySource2 = import_node_fs142.default.readFileSync(entry, "utf8");
111604
- const importsPath = import_node_path145.default.join(work, "js/app.import-object.mjs");
112125
+ const entry = import_node_path148.default.join(work, "js/app.mjs");
112126
+ const entrySource2 = import_node_fs145.default.readFileSync(entry, "utf8");
112127
+ const importsPath = import_node_path148.default.join(work, "js/app.import-object.mjs");
111605
112128
  const importsFactory = kotlinInstanceSource(
111606
- import_node_fs142.default.readFileSync(importsPath, "utf8"),
112129
+ import_node_fs145.default.readFileSync(importsPath, "utf8"),
111607
112130
  "createKotlinImportObject"
111608
112131
  );
111609
112132
  const runtimeFactory = kotlinInstanceSource(
@@ -111611,9 +112134,9 @@ ${output.trim() || (error instanceof Error ? error.message : String(error))}`
111611
112134
  "createKotlinInstance",
111612
112135
  /* @__PURE__ */ new Map([["./app.import-object.mjs", "createKotlinImportObject"]])
111613
112136
  );
111614
- import_node_fs142.default.writeFileSync(importsPath, importsFactory.source);
111615
- import_node_fs142.default.writeFileSync(import_node_path145.default.join(work, "js/app-runtime.mjs"), runtimeFactory.source);
111616
- import_node_fs142.default.writeFileSync(
112137
+ import_node_fs145.default.writeFileSync(importsPath, importsFactory.source);
112138
+ import_node_fs145.default.writeFileSync(import_node_path148.default.join(work, "js/app-runtime.mjs"), runtimeFactory.source);
112139
+ import_node_fs145.default.writeFileSync(
111617
112140
  entry,
111618
112141
  [
111619
112142
  "import { createKotlinInstance } from './app-runtime.mjs';",
@@ -111626,10 +112149,10 @@ ${output.trim() || (error instanceof Error ? error.message : String(error))}`
111626
112149
  ].join("\n")
111627
112150
  );
111628
112151
  try {
111629
- import_node_fs142.default.renameSync(work, out);
112152
+ import_node_fs145.default.renameSync(work, out);
111630
112153
  } catch (error) {
111631
- if (!import_node_fs142.default.existsSync(import_node_path145.default.join(out, "js", "app.wasm"))) throw error;
111632
- import_node_fs142.default.rmSync(work, { recursive: true, force: true });
112154
+ if (!import_node_fs145.default.existsSync(import_node_path148.default.join(out, "js", "app.wasm"))) throw error;
112155
+ import_node_fs145.default.rmSync(work, { recursive: true, force: true });
111633
112156
  }
111634
112157
  return artifact;
111635
112158
  })().finally(() => builds.delete(hash));
@@ -111637,24 +112160,24 @@ ${output.trim() || (error instanceof Error ? error.message : String(error))}`
111637
112160
  return build2;
111638
112161
  }
111639
112162
  function kotlinArtifactFiles(hash) {
111640
- const dir = import_node_path145.default.join(buildsDir(), hash, "js");
111641
- return import_node_fs142.default.readdirSync(dir).sort().map((name3) => {
111642
- const contentType = CONTENT_TYPES[import_node_path145.default.extname(name3)];
112163
+ const dir = import_node_path148.default.join(buildsDir(), hash, "js");
112164
+ return import_node_fs145.default.readdirSync(dir).sort().map((name3) => {
112165
+ const contentType = CONTENT_TYPES[import_node_path148.default.extname(name3)];
111643
112166
  if (!contentType) throw new Error(`unexpected kotlin artifact file ${name3}`);
111644
- return { name: name3, bytes: import_node_fs142.default.readFileSync(import_node_path145.default.join(dir, name3)), contentType };
112167
+ return { name: name3, bytes: import_node_fs145.default.readFileSync(import_node_path148.default.join(dir, name3)), contentType };
111645
112168
  });
111646
112169
  }
111647
112170
  function serveKotlinArtifact(pathname, res) {
111648
112171
  if (!pathname.startsWith(KOTLIN_ARTIFACT_PREFIX)) return false;
111649
112172
  const [hash, file, ...rest] = pathname.slice(KOTLIN_ARTIFACT_PREFIX.length).split("/");
111650
- const type = file ? CONTENT_TYPES[import_node_path145.default.extname(file)] : void 0;
112173
+ const type = file ? CONTENT_TYPES[import_node_path148.default.extname(file)] : void 0;
111651
112174
  if (!hash || !/^[0-9a-f]+$/.test(hash) || !file || rest.length > 0 || !type || file.includes("..")) {
111652
112175
  res.statusCode = 404;
111653
112176
  res.end("not a kotlin artifact");
111654
112177
  return true;
111655
112178
  }
111656
- const target = import_node_path145.default.join(buildsDir(), hash, "js", file);
111657
- if (!import_node_fs142.default.existsSync(target)) {
112179
+ const target = import_node_path148.default.join(buildsDir(), hash, "js", file);
112180
+ if (!import_node_fs145.default.existsSync(target)) {
111658
112181
  res.statusCode = 404;
111659
112182
  res.end(`kotlin artifact ${hash}/${file} was not built`);
111660
112183
  return true;
@@ -111662,7 +112185,7 @@ function serveKotlinArtifact(pathname, res) {
111662
112185
  res.setHeader("access-control-allow-origin", "*");
111663
112186
  res.setHeader("content-type", type);
111664
112187
  res.setHeader("cache-control", "public, max-age=31536000, immutable");
111665
- res.end(import_node_fs142.default.readFileSync(target));
112188
+ res.end(import_node_fs145.default.readFileSync(target));
111666
112189
  return true;
111667
112190
  }
111668
112191
  async function serveKotlinRequest(pathname, res, app) {
@@ -111679,15 +112202,15 @@ async function serveKotlinRequest(pathname, res, app) {
111679
112202
  }
111680
112203
  return true;
111681
112204
  }
111682
- var import_node_child_process69, import_node_crypto87, import_node_fs142, import_node_module23, import_node_path145, import_node_util22, run15, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
112205
+ var import_node_child_process70, import_node_crypto89, import_node_fs145, import_node_module23, import_node_path148, import_node_util22, run15, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
111683
112206
  var init_kotlin_host = __esm({
111684
112207
  "src/kotlin-host.ts"() {
111685
112208
  "use strict";
111686
- import_node_child_process69 = require("node:child_process");
111687
- import_node_crypto87 = require("node:crypto");
111688
- import_node_fs142 = __toESM(require("node:fs"), 1);
112209
+ import_node_child_process70 = require("node:child_process");
112210
+ import_node_crypto89 = require("node:crypto");
112211
+ import_node_fs145 = __toESM(require("node:fs"), 1);
111689
112212
  import_node_module23 = require("node:module");
111690
- import_node_path145 = __toESM(require("node:path"), 1);
112213
+ import_node_path148 = __toESM(require("node:path"), 1);
111691
112214
  import_node_util22 = require("node:util");
111692
112215
  init_kotlinDiscoveryContract();
111693
112216
  init_android_bridge_packages();
@@ -111695,13 +112218,14 @@ var init_kotlin_host = __esm({
111695
112218
  init_is_record();
111696
112219
  init_java_module_abi();
111697
112220
  init_kotlin_browser_seams();
112221
+ init_kotlin_gradle_library_plan();
111698
112222
  init_kotlin_instance_source();
111699
112223
  init_kotlin_sdk();
111700
112224
  init_kotlin_skiko_source();
111701
112225
  init_kotlin_toolchain();
111702
112226
  init_kotlin_view_models();
111703
112227
  init_kotlin_module();
111704
- run15 = (0, import_node_util22.promisify)(import_node_child_process69.execFile);
112228
+ run15 = (0, import_node_util22.promisify)(import_node_child_process70.execFile);
111705
112229
  KOTLIN_ARTIFACT_PREFIX = "/__peach/kotlin-artifact/";
111706
112230
  SKIP_DIRS = /* @__PURE__ */ new Set([
111707
112231
  "node_modules",
@@ -111805,8 +112329,8 @@ async function collectExpoKotlinModules(appRoot) {
111805
112329
  for (const project2 of entry.projects) {
111806
112330
  if (!isRecord(project2) || typeof project2.sourceDir !== "string" || !Array.isArray(project2.modules))
111807
112331
  throw new Error("invalid Expo Android project");
111808
- const sourceDir = import_node_fs143.default.realpathSync(project2.sourceDir);
111809
- const installed = sourceDir.split(import_node_path146.default.sep).includes("node_modules");
112332
+ const sourceDir = import_node_fs146.default.realpathSync(project2.sourceDir);
112333
+ const installed = sourceDir.split(import_node_path149.default.sep).includes("node_modules");
111810
112334
  if (installed) {
111811
112335
  if (typeof entry.packageName !== "string") continue;
111812
112336
  if (peachAnsweredNativePackages().has(entry.packageName)) {
@@ -111834,9 +112358,9 @@ async function collectExpoKotlinModules(appRoot) {
111834
112358
  group.unsupported ??= reason;
111835
112359
  };
111836
112360
  const walk4 = (dir) => {
111837
- if (!import_node_fs143.default.existsSync(dir)) return;
111838
- for (const child of import_node_fs143.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
111839
- const file = import_node_path146.default.join(dir, child.name);
112361
+ if (!import_node_fs146.default.existsSync(dir)) return;
112362
+ for (const child of import_node_fs146.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
112363
+ const file = import_node_path149.default.join(dir, child.name);
111840
112364
  if (child.isSymbolicLink()) reject(`Expo Kotlin source is a symlink: ${file}`);
111841
112365
  else if (child.isDirectory()) walk4(file);
111842
112366
  else if (child.name.endsWith(".java"))
@@ -111844,8 +112368,8 @@ async function collectExpoKotlinModules(appRoot) {
111844
112368
  else if (child.name.endsWith(".kt")) group.sources.push(file);
111845
112369
  }
111846
112370
  };
111847
- walk4(import_node_path146.default.join(sourceDir, "src", "main", "java"));
111848
- walk4(import_node_path146.default.join(sourceDir, "src", "main", "kotlin"));
112371
+ walk4(import_node_path149.default.join(sourceDir, "src", "main", "java"));
112372
+ walk4(import_node_path149.default.join(sourceDir, "src", "main", "kotlin"));
111849
112373
  result.push(group);
111850
112374
  }
111851
112375
  }
@@ -111858,7 +112382,7 @@ async function collectBridgePackages(appRoot) {
111858
112382
  );
111859
112383
  const app = androidAppSources(appRoot);
111860
112384
  if (!app || !app.kotlin.some(
111861
- (file) => /\b(?:Base|Turbo)?ReactPackage\b/.test(import_node_fs143.default.readFileSync(file, "utf8"))
112385
+ (file) => /\b(?:Base|Turbo)?ReactPackage\b/.test(import_node_fs146.default.readFileSync(file, "utf8"))
111862
112386
  ))
111863
112387
  return dependencies;
111864
112388
  const { scanBridgeFiles: scanBridgeFiles2 } = await Promise.resolve().then(() => (init_kotlin_host(), kotlin_host_exports));
@@ -111949,12 +112473,12 @@ async function compileExpoKotlinModules(root, origin) {
111949
112473
  }
111950
112474
  }
111951
112475
  }
111952
- var import_node_fs143, import_node_path146;
112476
+ var import_node_fs146, import_node_path149;
111953
112477
  var init_expo_kotlin_host = __esm({
111954
112478
  "src/expo-kotlin-host.ts"() {
111955
112479
  "use strict";
111956
- import_node_fs143 = __toESM(require("node:fs"), 1);
111957
- import_node_path146 = __toESM(require("node:path"), 1);
112480
+ import_node_fs146 = __toESM(require("node:fs"), 1);
112481
+ import_node_path149 = __toESM(require("node:path"), 1);
111958
112482
  init_android_autolinking();
111959
112483
  init_android_bridge_dependencies();
111960
112484
  init_android_bridge_packages();
@@ -112376,16 +112900,16 @@ var init_replacementModule = __esm({
112376
112900
 
112377
112901
  // src/host/replacement-module-handler.ts
112378
112902
  function resolveReplacementModuleFile(fromFile, specifier) {
112379
- const base2 = import_node_path151.default.resolve(import_node_path151.default.dirname(fromFile), specifier);
112903
+ const base2 = import_node_path154.default.resolve(import_node_path154.default.dirname(fromFile), specifier);
112380
112904
  const candidates = [
112381
112905
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
112382
- (ext) => ext === import_node_path151.default.extname(base2).toLowerCase()
112906
+ (ext) => ext === import_node_path154.default.extname(base2).toLowerCase()
112383
112907
  ) ? [base2] : [],
112384
112908
  ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => base2 + ext),
112385
- ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path151.default.join(base2, `index${ext}`))
112909
+ ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path154.default.join(base2, `index${ext}`))
112386
112910
  ];
112387
112911
  const found = candidates.find(
112388
- (candidate) => (0, import_node_fs147.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
112912
+ (candidate) => (0, import_node_fs150.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
112389
112913
  );
112390
112914
  if (!found) {
112391
112915
  throw new Error(
@@ -112394,13 +112918,13 @@ function resolveReplacementModuleFile(fromFile, specifier) {
112394
112918
  }
112395
112919
  return found;
112396
112920
  }
112397
- var import_node_fs147, import_promises12, import_node_path151;
112921
+ var import_node_fs150, import_promises12, import_node_path154;
112398
112922
  var init_replacement_module_handler = __esm({
112399
112923
  "src/host/replacement-module-handler.ts"() {
112400
112924
  "use strict";
112401
- import_node_fs147 = require("node:fs");
112925
+ import_node_fs150 = require("node:fs");
112402
112926
  import_promises12 = __toESM(require("node:fs/promises"), 1);
112403
- import_node_path151 = __toESM(require("node:path"), 1);
112927
+ import_node_path154 = __toESM(require("node:path"), 1);
112404
112928
  init_replacementModule();
112405
112929
  init_backend_origin();
112406
112930
  }
@@ -112430,14 +112954,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
112430
112954
  const neededPackages = /* @__PURE__ */ new Set();
112431
112955
  const factories = [];
112432
112956
  const visit3 = (filePath) => {
112433
- const real = import_node_fs148.default.realpathSync(filePath);
112957
+ const real = import_node_fs151.default.realpathSync(filePath);
112434
112958
  const previous = files2.get(real);
112435
112959
  if (previous !== void 0) return previous;
112436
112960
  const id = "peach-config-file:" + files2.size;
112437
112961
  files2.set(real, id);
112438
112962
  const compiled = compileReplacementModule({
112439
112963
  filePath: real,
112440
- source: import_node_fs148.default.readFileSync(real, "utf8"),
112964
+ source: import_node_fs151.default.readFileSync(real, "utf8"),
112441
112965
  runtimePackages,
112442
112966
  localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
112443
112967
  });
@@ -112461,7 +112985,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
112461
112985
  if (!entries2 || typeof entries2 !== "object") continue;
112462
112986
  for (const resolution2 of Object.values(entries2)) {
112463
112987
  if (resolution2 && typeof resolution2 === "object" && "file" in resolution2 && typeof resolution2.file === "string") {
112464
- resolution2.file = visit3(import_node_path152.default.resolve(resolution2.file));
112988
+ resolution2.file = visit3(import_node_path155.default.resolve(resolution2.file));
112465
112989
  }
112466
112990
  }
112467
112991
  }
@@ -112485,12 +113009,12 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
112485
113009
  const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
112486
113010
  return prefix + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
112487
113011
  }
112488
- var import_node_fs148, import_node_path152, import_sucrase5, import_terser, PREFIX_START, PREFIX_END;
113012
+ var import_node_fs151, import_node_path155, import_sucrase5, import_terser, PREFIX_START, PREFIX_END;
112489
113013
  var init_configured_bundle_producer = __esm({
112490
113014
  "src/configured-bundle-producer.ts"() {
112491
113015
  "use strict";
112492
- import_node_fs148 = __toESM(require("node:fs"), 1);
112493
- import_node_path152 = __toESM(require("node:path"), 1);
113016
+ import_node_fs151 = __toESM(require("node:fs"), 1);
113017
+ import_node_path155 = __toESM(require("node:path"), 1);
112494
113018
  init_bundle_global_footer();
112495
113019
  import_sucrase5 = require("peachsim/vendor/sucrase");
112496
113020
  import_terser = require("peachsim/vendor/terser");
@@ -112513,11 +113037,11 @@ __export(bundle_channel_exports, {
112513
113037
  snapshotOneProductionBundle: () => snapshotOneProductionBundle
112514
113038
  });
112515
113039
  module.exports = __toCommonJS(bundle_channel_exports);
112516
- var import_node_crypto89 = require("node:crypto");
112517
- var import_node_fs149 = require("node:fs");
112518
- var import_node_path153 = require("node:path");
113040
+ var import_node_crypto91 = require("node:crypto");
113041
+ var import_node_fs152 = require("node:fs");
113042
+ var import_node_path156 = require("node:path");
112519
113043
  var import_node_vm = require("node:vm");
112520
- var import_node_zlib10 = require("node:zlib");
113044
+ var import_node_zlib11 = require("node:zlib");
112521
113045
  init_backend_origin();
112522
113046
  init_dev_bundle_resolution();
112523
113047
  init_home_paths();
@@ -112682,16 +113206,16 @@ init_package_versions();
112682
113206
  init_process_group();
112683
113207
 
112684
113208
  // cli/app-catalog.ts
112685
- var import_node_fs146 = __toESM(require("node:fs"), 1);
112686
- var import_node_path150 = __toESM(require("node:path"), 1);
113209
+ var import_node_fs149 = __toESM(require("node:fs"), 1);
113210
+ var import_node_path153 = __toESM(require("node:path"), 1);
112687
113211
  init_bundleAssets();
112688
113212
  init_expo_native_workspace();
112689
113213
 
112690
113214
  // src/host/staged-host-files.ts
112691
113215
  var import_node_async_hooks4 = require("node:async_hooks");
112692
- var import_node_crypto88 = require("node:crypto");
112693
- var import_node_fs144 = __toESM(require("node:fs"), 1);
112694
- var import_node_path147 = __toESM(require("node:path"), 1);
113216
+ var import_node_crypto90 = require("node:crypto");
113217
+ var import_node_fs147 = __toESM(require("node:fs"), 1);
113218
+ var import_node_path150 = __toESM(require("node:path"), 1);
112695
113219
 
112696
113220
  // ../peach-kit/src/uttype-mime.ts
112697
113221
  var MIME_BY_EXTENSION = {
@@ -112766,17 +113290,17 @@ async function captureStagedHostFiles(prepare3) {
112766
113290
  const value = await stagedCapture.run(names, prepare3);
112767
113291
  return {
112768
113292
  value,
112769
- files: new Map([...names].map((name3) => [name3, import_node_path147.default.join(stagedDir(), name3)]))
113293
+ files: new Map([...names].map((name3) => [name3, import_node_path150.default.join(stagedDir(), name3)]))
112770
113294
  };
112771
113295
  }
112772
113296
  var STAGED_PREFIX = "/__peach/staged/";
112773
113297
  var STAGED_NAME = /^([a-f0-9]{64})(\.[a-z0-9]{1,10})?$/;
112774
113298
  var STAGED_RETENTION_MS = 30 * 24 * 60 * 60 * 1e3;
112775
113299
  function stagedDir() {
112776
- return import_node_path147.default.join(cacheDir(), "staged");
113300
+ return import_node_path150.default.join(cacheDir(), "staged");
112777
113301
  }
112778
113302
  function stageHostFile(filePath, origin) {
112779
- return stageHostBytes(import_node_fs144.default.readFileSync(filePath), origin, import_node_path147.default.extname(filePath));
113303
+ return stageHostBytes(import_node_fs147.default.readFileSync(filePath), origin, import_node_path150.default.extname(filePath));
112780
113304
  }
112781
113305
  function stageHostBytes(bytes, origin, extension = "") {
112782
113306
  const directory2 = prepareStagedDirectory();
@@ -112784,72 +113308,72 @@ function stageHostBytes(bytes, origin, extension = "") {
112784
113308
  }
112785
113309
  async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
112786
113310
  const directory2 = prepareStagedDirectory();
112787
- const inputDigest = (0, import_node_crypto88.createHash)("sha256").update(input).digest("hex");
112788
- const index = import_node_path147.default.join(
113311
+ const inputDigest = (0, import_node_crypto90.createHash)("sha256").update(input).digest("hex");
113312
+ const index = import_node_path150.default.join(
112789
113313
  directory2,
112790
- `derived-${(0, import_node_crypto88.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
113314
+ `derived-${(0, import_node_crypto90.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
112791
113315
  );
112792
- const recorded = import_node_fs144.default.existsSync(index) ? import_node_fs144.default.readFileSync(index, "utf8") : "";
112793
- if (STAGED_NAME.test(recorded) && import_node_fs144.default.existsSync(import_node_path147.default.join(directory2, recorded))) {
113316
+ const recorded = import_node_fs147.default.existsSync(index) ? import_node_fs147.default.readFileSync(index, "utf8") : "";
113317
+ if (STAGED_NAME.test(recorded) && import_node_fs147.default.existsSync(import_node_path150.default.join(directory2, recorded))) {
112794
113318
  const now = /* @__PURE__ */ new Date();
112795
- import_node_fs144.default.utimesSync(index, now, now);
112796
- import_node_fs144.default.utimesSync(import_node_path147.default.join(directory2, recorded), now, now);
113319
+ import_node_fs147.default.utimesSync(index, now, now);
113320
+ import_node_fs147.default.utimesSync(import_node_path150.default.join(directory2, recorded), now, now);
112797
113321
  stagedCapture.getStore()?.add(recorded);
112798
113322
  return new URL(STAGED_PREFIX + recorded, origin).toString();
112799
113323
  }
112800
113324
  const staged = writeStagedBytes(await derive(), origin, extension, directory2);
112801
- const temporary = import_node_path147.default.join(directory2, (0, import_node_crypto88.randomUUID)());
113325
+ const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto90.randomUUID)());
112802
113326
  try {
112803
- import_node_fs144.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
113327
+ import_node_fs147.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
112804
113328
  flag: "wx"
112805
113329
  });
112806
- import_node_fs144.default.renameSync(temporary, index);
113330
+ import_node_fs147.default.renameSync(temporary, index);
112807
113331
  } finally {
112808
- import_node_fs144.default.rmSync(temporary, { force: true });
113332
+ import_node_fs147.default.rmSync(temporary, { force: true });
112809
113333
  }
112810
113334
  return staged;
112811
113335
  }
112812
113336
  function prepareStagedDirectory() {
112813
113337
  const directory2 = stagedDir();
112814
- import_node_fs144.default.mkdirSync(directory2, { recursive: true });
113338
+ import_node_fs147.default.mkdirSync(directory2, { recursive: true });
112815
113339
  const now = Date.now();
112816
- for (const entry of import_node_fs144.default.readdirSync(directory2, { withFileTypes: true })) {
113340
+ for (const entry of import_node_fs147.default.readdirSync(directory2, { withFileTypes: true })) {
112817
113341
  if (!entry.isFile()) continue;
112818
- const stale = import_node_path147.default.join(directory2, entry.name);
112819
- const stat = import_node_fs144.default.statSync(stale, { throwIfNoEntry: false });
113342
+ const stale = import_node_path150.default.join(directory2, entry.name);
113343
+ const stat = import_node_fs147.default.statSync(stale, { throwIfNoEntry: false });
112820
113344
  if (stat && now - stat.mtimeMs > STAGED_RETENTION_MS)
112821
- import_node_fs144.default.rmSync(stale, { force: true });
113345
+ import_node_fs147.default.rmSync(stale, { force: true });
112822
113346
  }
112823
113347
  return directory2;
112824
113348
  }
112825
113349
  function writeStagedBytes(bytes, origin, extension, directory2) {
112826
- const digest3 = (0, import_node_crypto88.createHash)("sha256").update(bytes).digest("hex");
113350
+ const digest3 = (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex");
112827
113351
  extension = extension.toLowerCase();
112828
113352
  const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
112829
113353
  stagedCapture.getStore()?.add(name3);
112830
- const destination = import_node_path147.default.join(directory2, name3);
113354
+ const destination = import_node_path150.default.join(directory2, name3);
112831
113355
  const now = Date.now();
112832
- if (import_node_fs144.default.existsSync(destination)) {
112833
- import_node_fs144.default.utimesSync(destination, new Date(now), new Date(now));
113356
+ if (import_node_fs147.default.existsSync(destination)) {
113357
+ import_node_fs147.default.utimesSync(destination, new Date(now), new Date(now));
112834
113358
  } else {
112835
- const temporary = import_node_path147.default.join(directory2, (0, import_node_crypto88.randomUUID)());
113359
+ const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto90.randomUUID)());
112836
113360
  try {
112837
- import_node_fs144.default.writeFileSync(temporary, bytes, { flag: "wx" });
112838
- import_node_fs144.default.renameSync(temporary, destination);
113361
+ import_node_fs147.default.writeFileSync(temporary, bytes, { flag: "wx" });
113362
+ import_node_fs147.default.renameSync(temporary, destination);
112839
113363
  } finally {
112840
- import_node_fs144.default.rmSync(temporary, { force: true });
113364
+ import_node_fs147.default.rmSync(temporary, { force: true });
112841
113365
  }
112842
113366
  }
112843
113367
  return new URL(STAGED_PREFIX + name3, origin).toString();
112844
113368
  }
112845
113369
 
112846
113370
  // src/one-native-app-catalog.ts
112847
- var import_node_path149 = __toESM(require("node:path"), 1);
113371
+ var import_node_path152 = __toESM(require("node:path"), 1);
112848
113372
  init_is_record();
112849
113373
 
112850
113374
  // src/one-native-app-config.ts
112851
- var import_node_fs145 = __toESM(require("node:fs"), 1);
112852
- var import_node_path148 = __toESM(require("node:path"), 1);
113375
+ var import_node_fs148 = __toESM(require("node:fs"), 1);
113376
+ var import_node_path151 = __toESM(require("node:path"), 1);
112853
113377
  var import_acorn5 = require("peachsim/vendor/acorn");
112854
113378
  var import_sucrase4 = require("peachsim/vendor/sucrase");
112855
113379
  init_estree_walk();
@@ -112872,13 +113396,13 @@ var MODULE_EXTENSIONS = [
112872
113396
  ];
112873
113397
  function oneConfigPath(root) {
112874
113398
  for (const name3 of CONFIG_FILES) {
112875
- const file = import_node_path148.default.join(root, name3);
112876
- if (import_node_fs145.default.existsSync(file)) return file;
113399
+ const file = import_node_path151.default.join(root, name3);
113400
+ if (import_node_fs148.default.existsSync(file)) return file;
112877
113401
  }
112878
113402
  return null;
112879
113403
  }
112880
113404
  function readModule2(file) {
112881
- const { code } = (0, import_sucrase4.transform)(import_node_fs145.default.readFileSync(file, "utf8"), {
113405
+ const { code } = (0, import_sucrase4.transform)(import_node_fs148.default.readFileSync(file, "utf8"), {
112882
113406
  transforms: /\.[cm]?tsx?$/.test(file) ? ["typescript"] : [],
112883
113407
  disableESTransforms: true
112884
113408
  });
@@ -112902,9 +113426,9 @@ function resolveName(module2, name3, seen) {
112902
113426
  if (!source.startsWith(".")) continue;
112903
113427
  for (const specifier of statement.specifiers) {
112904
113428
  if (specifier.type !== "ImportSpecifier" || specifier.local.name !== name3) continue;
112905
- const base2 = import_node_path148.default.resolve(import_node_path148.default.dirname(module2.file), source);
113429
+ const base2 = import_node_path151.default.resolve(import_node_path151.default.dirname(module2.file), source);
112906
113430
  const target = MODULE_EXTENSIONS.map((ext) => base2 + ext).find(
112907
- (file) => import_node_fs145.default.existsSync(file) && import_node_fs145.default.statSync(file).isFile()
113431
+ (file) => import_node_fs148.default.existsSync(file) && import_node_fs148.default.statSync(file).isFile()
112908
113432
  );
112909
113433
  if (!target) return NOT_STATIC;
112910
113434
  const imported = specifier.imported.type === "Identifier" ? specifier.imported.name : String(specifier.imported.value);
@@ -112988,7 +113512,7 @@ function readOneNativeAppCatalog(root) {
112988
113512
  const ios = readOneNativeApp(root)?.ios;
112989
113513
  if (!isRecord(ios)) return null;
112990
113514
  const accentColor = parseAccent(ios.accentColor);
112991
- const assetCatalog = typeof ios.assetCatalog === "string" ? import_node_path149.default.resolve(root, ios.assetCatalog) : null;
113515
+ const assetCatalog = typeof ios.assetCatalog === "string" ? import_node_path152.default.resolve(root, ios.assetCatalog) : null;
112992
113516
  return accentColor || assetCatalog ? { accentColor, assetCatalog } : null;
112993
113517
  }
112994
113518
 
@@ -112998,21 +113522,21 @@ var ACCENT_BUILD_SETTING = /ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "?(
112998
113522
  var PLIST_ACCENT = /<key>NSAccentColorName<\/key>\s*<string>([^<]+)<\/string>/;
112999
113523
  function listDir2(dir) {
113000
113524
  try {
113001
- return import_node_fs146.default.readdirSync(dir, { withFileTypes: true });
113525
+ return import_node_fs149.default.readdirSync(dir, { withFileTypes: true });
113002
113526
  } catch {
113003
113527
  return [];
113004
113528
  }
113005
113529
  }
113006
113530
  function readText(file) {
113007
113531
  try {
113008
- return import_node_fs146.default.readFileSync(file, "utf8");
113532
+ return import_node_fs149.default.readFileSync(file, "utf8");
113009
113533
  } catch {
113010
113534
  return null;
113011
113535
  }
113012
113536
  }
113013
113537
  function catalogFiles(dir, found) {
113014
113538
  for (const entry of listDir2(dir)) {
113015
- const full = import_node_path150.default.join(dir, entry.name);
113539
+ const full = import_node_path153.default.join(dir, entry.name);
113016
113540
  if (entry.isDirectory()) catalogFiles(full, found);
113017
113541
  else if (entry.name === "Contents.json") found.push(full);
113018
113542
  }
@@ -113060,38 +113584,38 @@ async function stageCatalogSvg(file, scale, origin, bytes) {
113060
113584
  );
113061
113585
  }
113062
113586
  function stageCatalogImage(file, scale, origin) {
113063
- if (import_node_path150.default.extname(file).toLowerCase() === ".svg")
113064
- return stageCatalogSvg(file, scale, origin, import_node_fs146.default.readFileSync(file));
113587
+ if (import_node_path153.default.extname(file).toLowerCase() === ".svg")
113588
+ return stageCatalogSvg(file, scale, origin, import_node_fs149.default.readFileSync(file));
113065
113589
  return stageHostFile(file, origin);
113066
113590
  }
113067
113591
  async function discoverAppCatalog(appDir, assetOrigin) {
113068
- if (!import_node_fs146.default.existsSync(import_node_path150.default.join(appDir, "ios")) && findExpoAppConfig(appDir)) {
113069
- const packageJson = readText(import_node_path150.default.join(appDir, "package.json"));
113592
+ if (!import_node_fs149.default.existsSync(import_node_path153.default.join(appDir, "ios")) && findExpoAppConfig(appDir)) {
113593
+ const packageJson = readText(import_node_path153.default.join(appDir, "package.json"));
113070
113594
  if (packageJson) {
113071
113595
  const manifest = JSON.parse(packageJson);
113072
113596
  if (declaresNativeDependency(manifest, "expo") || declaresNativeDependency(manifest, "one"))
113073
113597
  appDir = (await prepareExpoNativeProject(appDir)).app;
113074
113598
  }
113075
113599
  }
113076
- const iosDir = import_node_path150.default.join(appDir, "ios");
113600
+ const iosDir = import_node_path153.default.join(appDir, "ios");
113077
113601
  const target = listDir2(iosDir).find(
113078
- (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(import_node_path150.default.join(iosDir, entry.name)).some(
113602
+ (entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(import_node_path153.default.join(iosDir, entry.name)).some(
113079
113603
  (file) => /^AppDelegate\.(swift|mm|m)$/.test(file.name)
113080
113604
  )
113081
113605
  );
113082
113606
  if (!target) return null;
113083
- const targetDir = import_node_path150.default.join(iosDir, target.name);
113607
+ const targetDir = import_node_path153.default.join(iosDir, target.name);
113084
113608
  const files2 = [];
113085
113609
  for (const entry of listDir2(targetDir)) {
113086
113610
  if (entry.isDirectory() && entry.name.endsWith(".xcassets"))
113087
- catalogFiles(import_node_path150.default.join(targetDir, entry.name), files2);
113611
+ catalogFiles(import_node_path153.default.join(targetDir, entry.name), files2);
113088
113612
  }
113089
113613
  const relative4 = files2.map(
113090
- (file) => import_node_path150.default.relative(targetDir, file).split(import_node_path150.default.sep).join(import_node_path150.default.posix.sep)
113614
+ (file) => import_node_path153.default.relative(targetDir, file).split(import_node_path153.default.sep).join(import_node_path153.default.posix.sep)
113091
113615
  );
113092
- const readContents2 = (candidate) => readText(import_node_path150.default.join(targetDir, candidate));
113616
+ const readContents2 = (candidate) => readText(import_node_path153.default.join(targetDir, candidate));
113093
113617
  const pbxproj = listDir2(iosDir).find((entry) => entry.name.endsWith(".xcodeproj"));
113094
- const accentName = readText(import_node_path150.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path150.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
113618
+ const accentName = readText(import_node_path153.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path153.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
113095
113619
  ACCENT_BUILD_SETTING
113096
113620
  )?.[1] : void 0) ?? null;
113097
113621
  return readAssetCatalog(
@@ -113104,7 +113628,7 @@ async function discoverAppCatalog(appDir, assetOrigin) {
113104
113628
  );
113105
113629
  return null;
113106
113630
  }
113107
- return stageCatalogImage(import_node_path150.default.join(targetDir, file), scale, assetOrigin);
113631
+ return stageCatalogImage(import_node_path153.default.join(targetDir, file), scale, assetOrigin);
113108
113632
  },
113109
113633
  accentName
113110
113634
  );
@@ -113129,7 +113653,7 @@ async function discoverProjectOneNativeAppCatalog(projectRoot, assetOrigin) {
113129
113653
  }
113130
113654
 
113131
113655
  // src/bundle-channel.mjs
113132
- var digest2 = (bytes) => (0, import_node_crypto89.createHash)("sha256").update(bytes).digest("hex");
113656
+ var digest2 = (bytes) => (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex");
113133
113657
  var segment2 = /^[a-zA-Z0-9._-]+$/;
113134
113658
  function packagedAssetDirectory(location) {
113135
113659
  const parsed2 = new URL(location, "https://packaged.invalid");
@@ -113235,11 +113759,11 @@ async function prepareChannel({
113235
113759
  files2.set(asset.path, asset.bytes);
113236
113760
  }
113237
113761
  }
113238
- const identity2 = (0, import_node_crypto89.createHash)("sha256").update(bundle).update(icon);
113239
- for (const [path140, bytes] of [...files2].sort(
113762
+ const identity2 = (0, import_node_crypto91.createHash)("sha256").update(bundle).update(icon);
113763
+ for (const [path143, bytes] of [...files2].sort(
113240
113764
  ([a], [b]) => a < b ? -1 : a > b ? 1 : 0
113241
113765
  )) {
113242
- identity2.update(JSON.stringify([path140, digest2(bytes)]));
113766
+ identity2.update(JSON.stringify([path143, digest2(bytes)]));
113243
113767
  }
113244
113768
  if (native) identity2.update(JSON.stringify(native.metadata));
113245
113769
  if (oneSDK) identity2.update(JSON.stringify(oneSDK.metadata));
@@ -113249,7 +113773,7 @@ async function prepareChannel({
113249
113773
  const releaseKey = `${prefix}/peach/releases/${identity2.digest("hex")}`;
113250
113774
  const assetBaseUrl = `${origin.origin}/${releaseKey}/`;
113251
113775
  const directories = new Set(
113252
- [...files2.keys()].map((path140) => path140.slice(0, path140.lastIndexOf("/")))
113776
+ [...files2.keys()].map((path143) => path143.slice(0, path143.lastIndexOf("/")))
113253
113777
  );
113254
113778
  let locations = 0;
113255
113779
  const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } = (await loadCliRuntime()).rolldown_bundle_inventory;
@@ -113263,12 +113787,12 @@ async function prepareChannel({
113263
113787
  /("?httpServerLocation"?\s*:\s*)(?:"((?:[^"\\]|\\.)*)"|`([^`\\$]*)`)/g,
113264
113788
  (match, property, quoted2, template) => {
113265
113789
  const location = quoted2 === void 0 ? template : JSON.parse(`"${quoted2}"`);
113266
- const path140 = packagedAssetDirectory(location);
113267
- if (!directories.has(path140)) {
113790
+ const path143 = packagedAssetDirectory(location);
113791
+ if (!directories.has(path143)) {
113268
113792
  throw new Error(`bundle asset location has no packaged files: ${location}`);
113269
113793
  }
113270
113794
  locations++;
113271
- return `${property}${JSON.stringify(new URL(path140, assetBaseUrl).href)}`;
113795
+ return `${property}${JSON.stringify(new URL(path143, assetBaseUrl).href)}`;
113272
113796
  }
113273
113797
  );
113274
113798
  if (assets2.some((asset) => !asset.path.startsWith("assets/native-catalog/")) && !locations)
@@ -113276,7 +113800,7 @@ async function prepareChannel({
113276
113800
  const attached = insertNativeBundleFooters(
113277
113801
  source,
113278
113802
  { oneSDK, expoSwift, expoKotlin, nitro, turbo },
113279
- (path140) => new URL(path140, assetBaseUrl).href
113803
+ (path143) => new URL(path143, assetBaseUrl).href
113280
113804
  );
113281
113805
  source = attached.source;
113282
113806
  if (appCatalog) {
@@ -113314,10 +113838,10 @@ async function prepareChannel({
113314
113838
  contentType: "application/javascript"
113315
113839
  },
113316
113840
  { key: `${releaseKey}/icon.png`, bytes: icon, contentType: "image/png" },
113317
- ...[...files2].map(([path140, bytes]) => ({
113318
- key: `${releaseKey}/${path140}`,
113841
+ ...[...files2].map(([path143, bytes]) => ({
113842
+ key: `${releaseKey}/${path143}`,
113319
113843
  bytes,
113320
- contentType: nativeAssets.get(path140)?.contentType ?? {
113844
+ contentType: nativeAssets.get(path143)?.contentType ?? {
113321
113845
  png: "image/png",
113322
113846
  jpg: "image/jpeg",
113323
113847
  jpeg: "image/jpeg",
@@ -113326,23 +113850,23 @@ async function prepareChannel({
113326
113850
  ttf: "font/ttf",
113327
113851
  otf: "font/otf",
113328
113852
  wav: "audio/wav"
113329
- }[path140.split(".").pop()] ?? "application/octet-stream"
113853
+ }[path143.split(".").pop()] ?? "application/octet-stream"
113330
113854
  }))
113331
113855
  ];
113332
113856
  return { platform: platform2, key: `${prefix}/${channelKey(platform2)}`, metadata, objects };
113333
113857
  }
113334
113858
  function brotliCompressCached(bytes) {
113335
- const file = (0, import_node_path153.join)(cacheDir(), "bundle-channel-brotli", `${digest2(bytes)}-q11-w24.br`);
113336
- if ((0, import_node_fs149.existsSync)(file)) return (0, import_node_fs149.readFileSync)(file);
113337
- const compressed = (0, import_node_zlib10.brotliCompressSync)(bytes, {
113859
+ const file = (0, import_node_path156.join)(cacheDir(), "bundle-channel-brotli", `${digest2(bytes)}-q11-w24.br`);
113860
+ if ((0, import_node_fs152.existsSync)(file)) return (0, import_node_fs152.readFileSync)(file);
113861
+ const compressed = (0, import_node_zlib11.brotliCompressSync)(bytes, {
113338
113862
  params: {
113339
- [import_node_zlib10.constants.BROTLI_PARAM_QUALITY]: 11,
113340
- [import_node_zlib10.constants.BROTLI_PARAM_LGWIN]: 24
113863
+ [import_node_zlib11.constants.BROTLI_PARAM_QUALITY]: 11,
113864
+ [import_node_zlib11.constants.BROTLI_PARAM_LGWIN]: 24
113341
113865
  }
113342
113866
  });
113343
- (0, import_node_fs149.mkdirSync)((0, import_node_path153.dirname)(file), { recursive: true });
113344
- (0, import_node_fs149.writeFileSync)(`${file}.${process.pid}`, compressed);
113345
- (0, import_node_fs149.renameSync)(`${file}.${process.pid}`, file);
113867
+ (0, import_node_fs152.mkdirSync)((0, import_node_path156.dirname)(file), { recursive: true });
113868
+ (0, import_node_fs152.writeFileSync)(`${file}.${process.pid}`, compressed);
113869
+ (0, import_node_fs152.renameSync)(`${file}.${process.pid}`, file);
113346
113870
  return compressed;
113347
113871
  }
113348
113872
  async function publishBundleChannel(release, { put, fetchObject = fetch }) {
@@ -113393,15 +113917,15 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
113393
113917
  const directory2 = packagedAssetDirectory(asset.httpServerLocation);
113394
113918
  if (asset.files) {
113395
113919
  for (const file of asset.files) {
113396
- const path140 = `${directory2}/${(0, import_node_path153.basename)(file)}`;
113397
- if (!assets2.has(path140)) assets2.set(path140, (0, import_node_fs149.readFileSync)(file));
113920
+ const path143 = `${directory2}/${(0, import_node_path156.basename)(file)}`;
113921
+ if (!assets2.has(path143)) assets2.set(path143, (0, import_node_fs152.readFileSync)(file));
113398
113922
  }
113399
113923
  continue;
113400
113924
  }
113401
113925
  for (const scale of asset.scales) {
113402
113926
  const file = `${asset.name}${scale === 1 ? "" : `@${scale}x`}.${asset.type}`;
113403
- const path140 = `${directory2}/${file}`;
113404
- if (!assets2.has(path140)) assets2.set(path140, await readAssetFile(asset, file));
113927
+ const path143 = `${directory2}/${file}`;
113928
+ if (!assets2.has(path143)) assets2.set(path143, await readAssetFile(asset, file));
113405
113929
  }
113406
113930
  }
113407
113931
  let appCatalog = null;
@@ -113415,11 +113939,11 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
113415
113939
  images: Object.fromEntries(Object.entries(captured.value.images).map(([name3, variants]) => [
113416
113940
  name3,
113417
113941
  variants.map((image) => {
113418
- const file = (0, import_node_path153.basename)(new URL(image.uri).pathname);
113942
+ const file = (0, import_node_path156.basename)(new URL(image.uri).pathname);
113419
113943
  const staged = captured.files.get(file);
113420
113944
  if (!staged) throw new Error("app catalog image was not staged");
113421
113945
  const resource = `assets/native-catalog/${file}`;
113422
- assets2.set(resource, (0, import_node_fs149.readFileSync)(staged));
113946
+ assets2.set(resource, (0, import_node_fs152.readFileSync)(staged));
113423
113947
  return { ...image, uri: resource };
113424
113948
  })
113425
113949
  ]))
@@ -113440,7 +113964,7 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
113440
113964
  versions
113441
113965
  )
113442
113966
  ),
113443
- assets: [...assets2].map(([path140, bytes]) => ({ path: path140, bytes })),
113967
+ assets: [...assets2].map(([path143, bytes]) => ({ path: path143, bytes })),
113444
113968
  ...await buildNativeBundles(projectRoot, platform2, configuration)
113445
113969
  };
113446
113970
  }
@@ -113520,12 +114044,12 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
113520
114044
  const inputs2 = await readPackagingInputs(projectRoot);
113521
114045
  const snapshots = [];
113522
114046
  for (const platform2 of platforms2) {
113523
- const out = await mkdtemp((0, import_node_path153.join)(tmpdir3(), "peach-production-bundle-"));
114047
+ const out = await mkdtemp((0, import_node_path156.join)(tmpdir3(), "peach-production-bundle-"));
113524
114048
  try {
113525
114049
  await promisify21(execFile22)(
113526
114050
  runtimeExecutable,
113527
114051
  [
113528
- (0, import_node_path153.join)(projectRoot, "node_modules/.bin/react-native"),
114052
+ (0, import_node_path156.join)(projectRoot, "node_modules/.bin/react-native"),
113529
114053
  "bundle",
113530
114054
  "--platform",
113531
114055
  platform2,
@@ -113536,19 +114060,19 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
113536
114060
  "--entry-file",
113537
114061
  entryFile,
113538
114062
  "--bundle-output",
113539
- (0, import_node_path153.join)(out, "bundle.js"),
114063
+ (0, import_node_path156.join)(out, "bundle.js"),
113540
114064
  "--assets-dest",
113541
- (0, import_node_path153.join)(out, "assets"),
114065
+ (0, import_node_path156.join)(out, "assets"),
113542
114066
  "--sourcemap-output",
113543
- (0, import_node_path153.join)(out, "bundle.js.map")
114067
+ (0, import_node_path156.join)(out, "bundle.js.map")
113544
114068
  ],
113545
114069
  { cwd: projectRoot, env: { ...process.env, ...env, NODE_ENV: "production" } }
113546
114070
  );
113547
114071
  snapshots.push(
113548
- await packagePlatformBundle(projectRoot, platform2, await readFile4((0, import_node_path153.join)(out, "bundle.js")), {
114072
+ await packagePlatformBundle(projectRoot, platform2, await readFile4((0, import_node_path156.join)(out, "bundle.js")), {
113549
114073
  ...inputs2,
113550
114074
  configuration: "Release",
113551
- readAssetFile: (asset, file) => readFile4((0, import_node_path153.join)(out, asset.httpServerLocation, file))
114075
+ readAssetFile: (asset, file) => readFile4((0, import_node_path156.join)(out, asset.httpServerLocation, file))
113552
114076
  })
113553
114077
  );
113554
114078
  } finally {
@@ -113558,15 +114082,15 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
113558
114082
  return { platforms: snapshots };
113559
114083
  }
113560
114084
  async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
113561
- const { spawn: spawn13 } = await import("node:child_process");
114085
+ const { spawn: spawn14 } = await import("node:child_process");
113562
114086
  const { createServer: createServer2 } = await import("node:net");
113563
114087
  const { createRequire: createRequire24 } = await import("node:module");
113564
- const onePackage = createRequire24((0, import_node_path153.join)(projectRoot, "package.json")).resolve(
114088
+ const onePackage = createRequire24((0, import_node_path156.join)(projectRoot, "package.json")).resolve(
113565
114089
  "one/package.json"
113566
114090
  );
113567
- const oneBin = (0, import_node_path153.join)(
113568
- (0, import_node_path153.dirname)(onePackage),
113569
- JSON.parse((0, import_node_fs149.readFileSync)(onePackage, "utf8")).bin.one
114091
+ const oneBin = (0, import_node_path156.join)(
114092
+ (0, import_node_path156.dirname)(onePackage),
114093
+ JSON.parse((0, import_node_fs152.readFileSync)(onePackage, "utf8")).bin.one
113570
114094
  );
113571
114095
  const port = await new Promise((resolve4, reject) => {
113572
114096
  const server = createServer2().listen(0, "127.0.0.1", () => {
@@ -113574,7 +114098,7 @@ async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable =
113574
114098
  server.close(() => resolve4(port2));
113575
114099
  }).on("error", reject);
113576
114100
  });
113577
- const child = spawn13(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
114101
+ const child = spawn14(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
113578
114102
  cwd: projectRoot,
113579
114103
  env: { ...process.env, ...env, CI: "1", PEACH_NO_OPEN: "1" },
113580
114104
  stdio: ["ignore", "inherit", "inherit"],