peachsim 0.1.2480 → 0.1.2481

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 (135) hide show
  1. package/cli/agent-note.ts +50 -21
  2. package/cli/commands/stream.ts +33 -12
  3. package/detox/index.ts +5 -4
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +2 -2
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +5 -5
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +3 -3
  16. package/dist-lib/bundle-channel.cjs +3147 -3025
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +3 -3
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +3 -3
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +2 -2
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +7 -7
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +5 -5
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/esm-chunks/{acorn-RHJLDFQ6.mjs → acorn-FYDDLFH7.mjs} +3 -3
  30. package/dist-lib/esm-chunks/{chunk-LIULVSRG.mjs → chunk-3AHKFCTP.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-LNLVUOIL.mjs → chunk-55FEZERB.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-IMJ6FVRR.mjs → chunk-56VSEMVW.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-5VNECNVL.mjs → chunk-6ALMBFOB.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-QWPRWZCR.mjs → chunk-CIRF7MUH.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-QNFDJM4V.mjs → chunk-DILJLCVN.mjs} +12 -12
  36. package/dist-lib/esm-chunks/{chunk-KPDAPPKX.mjs → chunk-DOTVMR2R.mjs} +5 -5
  37. package/dist-lib/esm-chunks/{chunk-JW6P2F6T.mjs → chunk-DR66BWZR.mjs} +4 -4
  38. package/dist-lib/esm-chunks/{chunk-NZYUWM5K.mjs → chunk-HK2YIUS3.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-K633NA6X.mjs → chunk-I2KV5OCI.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-IGQJDRVL.mjs → chunk-IKMY4F25.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-43UZGHLJ.mjs → chunk-MTWECGVY.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-HHXID6CS.mjs → chunk-MYAC4QOH.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-OW2NZLWH.mjs → chunk-OMWELJZM.mjs} +5 -5
  44. package/dist-lib/esm-chunks/{chunk-PB53B3G3.mjs → chunk-RRHGYD5I.mjs} +2 -2
  45. package/dist-lib/esm-chunks/{chunk-PPI4PXUE.mjs → chunk-V27M6XEI.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-AN4RNKME.mjs → chunk-VGOJCWU3.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-IAQ6RFFI.mjs → chunk-XVGPPYRC.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-X7K3JLJ3.mjs → chunk-YBJYSS46.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-U5UJRFVB.mjs → chunk-YY4T7YSR.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{chunk-VYP6I44Y.mjs → chunk-ZNG6GMUS.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{metro-layout-parser-K64IERC5.mjs → metro-layout-parser-EEI7OVUC.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-4B2KGEQL.mjs → swift-package-prebuilt-V5QMDVKG.mjs} +10 -10
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-SUCFPPKO.mjs → swift-sdk-app-module-QEWCSQWL.mjs} +13 -13
  54. package/dist-lib/esm-chunks/{swift-sdk-image-YX5FMNXN.mjs → swift-sdk-image-XH4JSUEA.mjs} +13 -13
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-WFJBSXZG.mjs → swift-sdk-image-producer-HQJ5Z6TE.mjs} +4 -4
  56. package/dist-lib/expo-swift-bundle.cjs +2078 -1952
  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 +2977 -2852
  61. package/dist-lib/host/fetch-proxy-handler.cjs +630 -330
  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 +1 -1
  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 +79 -79
  87. package/dist-lib/public-origins-lib.json +70 -70
  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 +7 -7
  94. package/dist-lib/skills.cjs +3587 -3441
  95. package/dist-lib/swift-compile.cjs +1 -1
  96. package/dist-lib/swift-compile.mjs +10 -10
  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 +5 -5
  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/@xmldom/xmldom.cjs +1 -1
  109. package/dist-lib/vendor/acorn.cjs +1 -1
  110. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  111. package/dist-lib/vendor/ignore.cjs +1 -1
  112. package/dist-lib/vendor/magic-string.cjs +1 -1
  113. package/dist-lib/vendor/plist.cjs +1 -1
  114. package/dist-lib/vendor/smol-toml.cjs +1 -1
  115. package/dist-lib/vendor/stream-json.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  119. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  120. package/dist-lib/vendor/sucrase.cjs +1 -1
  121. package/dist-lib/vendor/terser.cjs +1 -1
  122. package/dist-lib/vendor/valibot.cjs +1 -1
  123. package/dist-lib/vendor/ws.cjs +1 -1
  124. package/dist-lib/vendor/zod.cjs +1 -1
  125. package/dist-lib/worklet-executable.cjs +1 -1
  126. package/dist-lib/worklet-executable.mjs +3 -3
  127. package/package.json +1 -1
  128. package/src/canvas-agent-note-delivery.ts +36 -6
  129. package/src/expo-swift-host.ts +27 -20
  130. package/src/expo-widgets-bundle.ts +5 -0
  131. package/src/host/staged-host-files.ts +7 -0
  132. package/src/native-preparation.ts +139 -3
  133. package/src/nitro-bundle.ts +17 -20
  134. package/src/swift-host.ts +13 -0
  135. package/src/turbo-bundle.ts +2 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2480 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2481 | (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;
@@ -995,7 +995,7 @@ var init_swift_standin_digest = __esm({
995
995
 
996
996
  // src/expo-native-compiler-digest.ts
997
997
  function expoNativeCompilerDigestValue() {
998
- return true ? "85d88685566b45d93d27c514cee145e968e1c9493a6eebf83c6cc35d92e97bb6" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
998
+ return true ? "223ced9b6685e60e7829b5429b2554c3eab40425ce2218bec328db8814c5df1b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
999
999
  }
1000
1000
  var import_node_crypto6;
1001
1001
  var init_expo_native_compiler_digest = __esm({
@@ -2856,12 +2856,36 @@ end
2856
2856
  });
2857
2857
 
2858
2858
  // src/workspace-root.ts
2859
- var import_node_fs25, import_node_path26;
2859
+ function declaresMember(root, app) {
2860
+ const manifest = import_node_path26.default.join(root, "package.json");
2861
+ if (!import_node_fs25.default.existsSync(manifest)) return false;
2862
+ const { workspaces } = JSON.parse(import_node_fs25.default.readFileSync(manifest, "utf8"));
2863
+ const patterns = Array.isArray(workspaces) ? workspaces : workspaces?.packages ?? [];
2864
+ const relative3 = import_node_path26.default.relative(root, app).split(import_node_path26.default.sep).join("/");
2865
+ return patterns.some(
2866
+ (pattern) => new RegExp(
2867
+ `^${import_node_path26.default.posix.normalize(pattern).replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "\0").replace(/\*/g, "[^/]*").replace(/\0/g, ".*")}$`
2868
+ ).test(relative3)
2869
+ );
2870
+ }
2871
+ function findWorkspaceRoot(app) {
2872
+ let nearest = null;
2873
+ let declared = null;
2874
+ for (let dir = app; ; dir = import_node_path26.default.dirname(dir)) {
2875
+ if (LOCKFILES.some((name2) => import_node_fs25.default.existsSync(import_node_path26.default.join(dir, name2)))) {
2876
+ nearest ??= dir;
2877
+ if (dir !== app && declaresMember(dir, app)) declared = dir;
2878
+ }
2879
+ if (import_node_path26.default.dirname(dir) === dir) return declared ?? nearest ?? app;
2880
+ }
2881
+ }
2882
+ var import_node_fs25, import_node_path26, LOCKFILES;
2860
2883
  var init_workspace_root = __esm({
2861
2884
  "src/workspace-root.ts"() {
2862
2885
  "use strict";
2863
2886
  import_node_fs25 = __toESM(require("node:fs"), 1);
2864
2887
  import_node_path26 = __toESM(require("node:path"), 1);
2888
+ LOCKFILES = ["pnpm-workspace.yaml", "package-lock.json", "yarn.lock", "bun.lock"];
2865
2889
  }
2866
2890
  });
2867
2891
 
@@ -4120,17 +4144,17 @@ function visit(node, visitor) {
4120
4144
  } else
4121
4145
  visit_(null, node, visitor_, Object.freeze([]));
4122
4146
  }
4123
- function visit_(key, node, visitor, path111) {
4124
- const ctrl = callVisitor(key, node, visitor, path111);
4147
+ function visit_(key, node, visitor, path112) {
4148
+ const ctrl = callVisitor(key, node, visitor, path112);
4125
4149
  if (isNode(ctrl) || isPair(ctrl)) {
4126
- replaceNode(key, path111, ctrl);
4127
- return visit_(key, ctrl, visitor, path111);
4150
+ replaceNode(key, path112, ctrl);
4151
+ return visit_(key, ctrl, visitor, path112);
4128
4152
  }
4129
4153
  if (typeof ctrl !== "symbol") {
4130
4154
  if (isCollection(node)) {
4131
- path111 = Object.freeze(path111.concat(node));
4155
+ path112 = Object.freeze(path112.concat(node));
4132
4156
  for (let i = 0; i < node.items.length; ++i) {
4133
- const ci = visit_(i, node.items[i], visitor, path111);
4157
+ const ci = visit_(i, node.items[i], visitor, path112);
4134
4158
  if (typeof ci === "number")
4135
4159
  i = ci - 1;
4136
4160
  else if (ci === BREAK)
@@ -4141,13 +4165,13 @@ function visit_(key, node, visitor, path111) {
4141
4165
  }
4142
4166
  }
4143
4167
  } else if (isPair(node)) {
4144
- path111 = Object.freeze(path111.concat(node));
4145
- const ck = visit_("key", node.key, visitor, path111);
4168
+ path112 = Object.freeze(path112.concat(node));
4169
+ const ck = visit_("key", node.key, visitor, path112);
4146
4170
  if (ck === BREAK)
4147
4171
  return BREAK;
4148
4172
  else if (ck === REMOVE)
4149
4173
  node.key = null;
4150
- const cv = visit_("value", node.value, visitor, path111);
4174
+ const cv = visit_("value", node.value, visitor, path112);
4151
4175
  if (cv === BREAK)
4152
4176
  return BREAK;
4153
4177
  else if (cv === REMOVE)
@@ -4165,17 +4189,17 @@ async function visitAsync(node, visitor) {
4165
4189
  } else
4166
4190
  await visitAsync_(null, node, visitor_, Object.freeze([]));
4167
4191
  }
4168
- async function visitAsync_(key, node, visitor, path111) {
4169
- const ctrl = await callVisitor(key, node, visitor, path111);
4192
+ async function visitAsync_(key, node, visitor, path112) {
4193
+ const ctrl = await callVisitor(key, node, visitor, path112);
4170
4194
  if (isNode(ctrl) || isPair(ctrl)) {
4171
- replaceNode(key, path111, ctrl);
4172
- return visitAsync_(key, ctrl, visitor, path111);
4195
+ replaceNode(key, path112, ctrl);
4196
+ return visitAsync_(key, ctrl, visitor, path112);
4173
4197
  }
4174
4198
  if (typeof ctrl !== "symbol") {
4175
4199
  if (isCollection(node)) {
4176
- path111 = Object.freeze(path111.concat(node));
4200
+ path112 = Object.freeze(path112.concat(node));
4177
4201
  for (let i = 0; i < node.items.length; ++i) {
4178
- const ci = await visitAsync_(i, node.items[i], visitor, path111);
4202
+ const ci = await visitAsync_(i, node.items[i], visitor, path112);
4179
4203
  if (typeof ci === "number")
4180
4204
  i = ci - 1;
4181
4205
  else if (ci === BREAK)
@@ -4186,13 +4210,13 @@ async function visitAsync_(key, node, visitor, path111) {
4186
4210
  }
4187
4211
  }
4188
4212
  } else if (isPair(node)) {
4189
- path111 = Object.freeze(path111.concat(node));
4190
- const ck = await visitAsync_("key", node.key, visitor, path111);
4213
+ path112 = Object.freeze(path112.concat(node));
4214
+ const ck = await visitAsync_("key", node.key, visitor, path112);
4191
4215
  if (ck === BREAK)
4192
4216
  return BREAK;
4193
4217
  else if (ck === REMOVE)
4194
4218
  node.key = null;
4195
- const cv = await visitAsync_("value", node.value, visitor, path111);
4219
+ const cv = await visitAsync_("value", node.value, visitor, path112);
4196
4220
  if (cv === BREAK)
4197
4221
  return BREAK;
4198
4222
  else if (cv === REMOVE)
@@ -4219,23 +4243,23 @@ function initVisitor(visitor) {
4219
4243
  }
4220
4244
  return visitor;
4221
4245
  }
4222
- function callVisitor(key, node, visitor, path111) {
4246
+ function callVisitor(key, node, visitor, path112) {
4223
4247
  if (typeof visitor === "function")
4224
- return visitor(key, node, path111);
4248
+ return visitor(key, node, path112);
4225
4249
  if (isMap(node))
4226
- return visitor.Map?.(key, node, path111);
4250
+ return visitor.Map?.(key, node, path112);
4227
4251
  if (isSeq(node))
4228
- return visitor.Seq?.(key, node, path111);
4252
+ return visitor.Seq?.(key, node, path112);
4229
4253
  if (isPair(node))
4230
- return visitor.Pair?.(key, node, path111);
4254
+ return visitor.Pair?.(key, node, path112);
4231
4255
  if (isScalar(node))
4232
- return visitor.Scalar?.(key, node, path111);
4256
+ return visitor.Scalar?.(key, node, path112);
4233
4257
  if (isAlias(node))
4234
- return visitor.Alias?.(key, node, path111);
4258
+ return visitor.Alias?.(key, node, path112);
4235
4259
  return void 0;
4236
4260
  }
4237
- function replaceNode(key, path111, node) {
4238
- const parent = path111[path111.length - 1];
4261
+ function replaceNode(key, path112, node) {
4262
+ const parent = path112[path112.length - 1];
4239
4263
  if (isCollection(parent)) {
4240
4264
  parent.items[key] = node;
4241
4265
  } else if (isPair(parent)) {
@@ -4786,10 +4810,10 @@ var init_createNode = __esm({
4786
4810
  });
4787
4811
 
4788
4812
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
4789
- function collectionFromPath(schema4, path111, value) {
4813
+ function collectionFromPath(schema4, path112, value) {
4790
4814
  let v10 = value;
4791
- for (let i = path111.length - 1; i >= 0; --i) {
4792
- const k = path111[i];
4815
+ for (let i = path112.length - 1; i >= 0; --i) {
4816
+ const k = path112[i];
4793
4817
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4794
4818
  const a = [];
4795
4819
  a[k] = v10;
@@ -4814,7 +4838,7 @@ var init_Collection = __esm({
4814
4838
  init_createNode();
4815
4839
  init_identity();
4816
4840
  init_Node();
4817
- isEmptyPath = (path111) => path111 == null || typeof path111 === "object" && !!path111[Symbol.iterator]().next().done;
4841
+ isEmptyPath = (path112) => path112 == null || typeof path112 === "object" && !!path112[Symbol.iterator]().next().done;
4818
4842
  Collection = class extends NodeBase {
4819
4843
  constructor(type, schema4) {
4820
4844
  super(type);
@@ -4844,11 +4868,11 @@ var init_Collection = __esm({
4844
4868
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4845
4869
  * that already exists in the map.
4846
4870
  */
4847
- addIn(path111, value) {
4848
- if (isEmptyPath(path111))
4871
+ addIn(path112, value) {
4872
+ if (isEmptyPath(path112))
4849
4873
  this.add(value);
4850
4874
  else {
4851
- const [key, ...rest] = path111;
4875
+ const [key, ...rest] = path112;
4852
4876
  const node = this.get(key, true);
4853
4877
  if (isCollection(node))
4854
4878
  node.addIn(rest, value);
@@ -4862,8 +4886,8 @@ var init_Collection = __esm({
4862
4886
  * Removes a value from the collection.
4863
4887
  * @returns `true` if the item was found and removed.
4864
4888
  */
4865
- deleteIn(path111) {
4866
- const [key, ...rest] = path111;
4889
+ deleteIn(path112) {
4890
+ const [key, ...rest] = path112;
4867
4891
  if (rest.length === 0)
4868
4892
  return this.delete(key);
4869
4893
  const node = this.get(key, true);
@@ -4877,8 +4901,8 @@ var init_Collection = __esm({
4877
4901
  * scalar values from their surrounding node; to disable set `keepScalar` to
4878
4902
  * `true` (collections are always returned intact).
4879
4903
  */
4880
- getIn(path111, keepScalar) {
4881
- const [key, ...rest] = path111;
4904
+ getIn(path112, keepScalar) {
4905
+ const [key, ...rest] = path112;
4882
4906
  const node = this.get(key, true);
4883
4907
  if (rest.length === 0)
4884
4908
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -4896,8 +4920,8 @@ var init_Collection = __esm({
4896
4920
  /**
4897
4921
  * Checks if the collection includes a value with the key `key`.
4898
4922
  */
4899
- hasIn(path111) {
4900
- const [key, ...rest] = path111;
4923
+ hasIn(path112) {
4924
+ const [key, ...rest] = path112;
4901
4925
  if (rest.length === 0)
4902
4926
  return this.has(key);
4903
4927
  const node = this.get(key, true);
@@ -4907,8 +4931,8 @@ var init_Collection = __esm({
4907
4931
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4908
4932
  * boolean to add/remove the item from the set.
4909
4933
  */
4910
- setIn(path111, value) {
4911
- const [key, ...rest] = path111;
4934
+ setIn(path112, value) {
4935
+ const [key, ...rest] = path112;
4912
4936
  if (rest.length === 0) {
4913
4937
  this.set(key, value);
4914
4938
  } else {
@@ -6827,15 +6851,15 @@ function visit2(cst, visitor) {
6827
6851
  cst = { start: cst.start, value: cst.value };
6828
6852
  _visit(Object.freeze([]), cst, visitor);
6829
6853
  }
6830
- function _visit(path111, item, visitor) {
6831
- let ctrl = visitor(item, path111);
6854
+ function _visit(path112, item, visitor) {
6855
+ let ctrl = visitor(item, path112);
6832
6856
  if (typeof ctrl === "symbol")
6833
6857
  return ctrl;
6834
6858
  for (const field of ["key", "value"]) {
6835
6859
  const token = item[field];
6836
6860
  if (token && "items" in token) {
6837
6861
  for (let i = 0; i < token.items.length; ++i) {
6838
- const ci = _visit(Object.freeze(path111.concat([[field, i]])), token.items[i], visitor);
6862
+ const ci = _visit(Object.freeze(path112.concat([[field, i]])), token.items[i], visitor);
6839
6863
  if (typeof ci === "number")
6840
6864
  i = ci - 1;
6841
6865
  else if (ci === BREAK2)
@@ -6846,10 +6870,10 @@ function _visit(path111, item, visitor) {
6846
6870
  }
6847
6871
  }
6848
6872
  if (typeof ctrl === "function" && field === "key")
6849
- ctrl = ctrl(item, path111);
6873
+ ctrl = ctrl(item, path112);
6850
6874
  }
6851
6875
  }
6852
- return typeof ctrl === "function" ? ctrl(item, path111) : ctrl;
6876
+ return typeof ctrl === "function" ? ctrl(item, path112) : ctrl;
6853
6877
  }
6854
6878
  var BREAK2, SKIP2, REMOVE2;
6855
6879
  var init_cst_visit = __esm({
@@ -6860,9 +6884,9 @@ var init_cst_visit = __esm({
6860
6884
  visit2.BREAK = BREAK2;
6861
6885
  visit2.SKIP = SKIP2;
6862
6886
  visit2.REMOVE = REMOVE2;
6863
- visit2.itemAtPath = (cst, path111) => {
6887
+ visit2.itemAtPath = (cst, path112) => {
6864
6888
  let item = cst;
6865
- for (const [field, index] of path111) {
6889
+ for (const [field, index] of path112) {
6866
6890
  const tok = item?.[field];
6867
6891
  if (tok && "items" in tok) {
6868
6892
  item = tok.items[index];
@@ -6871,9 +6895,9 @@ var init_cst_visit = __esm({
6871
6895
  }
6872
6896
  return item;
6873
6897
  };
6874
- visit2.parentCollection = (cst, path111) => {
6875
- const parent = visit2.itemAtPath(cst, path111.slice(0, -1));
6876
- const field = path111[path111.length - 1][0];
6898
+ visit2.parentCollection = (cst, path112) => {
6899
+ const parent = visit2.itemAtPath(cst, path112.slice(0, -1));
6900
+ const field = path112[path112.length - 1][0];
6877
6901
  const coll = parent?.[field];
6878
6902
  if (coll && "items" in coll)
6879
6903
  return coll;
@@ -8482,7 +8506,76 @@ var init_admitted_mac_build = __esm({
8482
8506
  });
8483
8507
 
8484
8508
  // src/expo-workspace-exclusion.ts
8485
- var import_node_child_process15, import_node_fs33, import_node_path34, import_node_util4, import_ignore;
8509
+ async function workspaceExclusion(root, portable = false, linkedPackages = []) {
8510
+ const listed = await (0, import_node_util4.promisify)(import_node_child_process15.execFile)(
8511
+ "git",
8512
+ ["ls-files", "-z", "--others", "--ignored", "--exclude-standard", "--directory"],
8513
+ {
8514
+ cwd: root,
8515
+ encoding: "utf8",
8516
+ maxBuffer: 256 * 1024 * 1024,
8517
+ env: gitEnvironment()
8518
+ }
8519
+ ).catch(() => ({ stdout: "" }));
8520
+ const ignored = new Set(
8521
+ listed.stdout.split("\0").filter(Boolean).map((entry) => entry.replace(/\/$/, ""))
8522
+ );
8523
+ const tracked = /* @__PURE__ */ new Set();
8524
+ if (portable) {
8525
+ const cached = await (0, import_node_util4.promisify)(import_node_child_process15.execFile)("git", ["ls-files", "-z", "--cached"], {
8526
+ cwd: root,
8527
+ encoding: "utf8",
8528
+ maxBuffer: 256 * 1024 * 1024,
8529
+ env: gitEnvironment()
8530
+ }).catch(() => ({ stdout: "" }));
8531
+ for (const entry of cached.stdout.split("\0").filter(Boolean)) {
8532
+ const parts = entry.split("/");
8533
+ for (let index = 1; index <= parts.length; index++)
8534
+ tracked.add(parts.slice(0, index).join(import_node_path34.default.sep));
8535
+ }
8536
+ }
8537
+ const ignoredByRules = gitignoreRules(root);
8538
+ return (relative3, knownDirectory) => {
8539
+ const parts = relative3.split(import_node_path34.default.sep);
8540
+ const linked = linkedPackages.some(
8541
+ (directory) => relative3.startsWith(directory + import_node_path34.default.sep)
8542
+ );
8543
+ if (linked) {
8544
+ return ["node_modules", ".git", ".expo", ".one"].some(
8545
+ (name2) => parts.includes(name2)
8546
+ );
8547
+ }
8548
+ if (portable && relative3 && !tracked.has(relative3) && ignoredByRules(
8549
+ relative3,
8550
+ knownDirectory ?? import_node_fs33.default.lstatSync(import_node_path34.default.join(root, relative3)).isDirectory()
8551
+ ))
8552
+ return true;
8553
+ return ignored.has(parts.join("/")) && !tracked.has(relative3) || parts.includes("node_modules") || parts.includes(".git") || parts.includes(".expo") || parts.includes(".one") || parts.includes("ios") && (parts.includes("Pods") || parts.includes("build"));
8554
+ };
8555
+ }
8556
+ function gitignoreRules(root) {
8557
+ const ignoreFiles = /* @__PURE__ */ new Map();
8558
+ return (relative3, isDirectory) => {
8559
+ const parts = relative3.split(import_node_path34.default.sep);
8560
+ let excluded = false;
8561
+ for (let index = 0; index < parts.length; index++) {
8562
+ const directory = parts.slice(0, index).join(import_node_path34.default.sep);
8563
+ let rules2 = ignoreFiles.get(directory);
8564
+ if (rules2 === void 0) {
8565
+ const file = import_node_path34.default.join(root, directory, ".gitignore");
8566
+ rules2 = import_node_fs33.default.existsSync(file) ? (0, import_ignore.default)().add(import_node_fs33.default.readFileSync(file, "utf8")) : null;
8567
+ ignoreFiles.set(directory, rules2);
8568
+ }
8569
+ if (!rules2) continue;
8570
+ const item = parts.slice(index).join("/");
8571
+ const result = rules2.test(isDirectory ? `${item}/` : item);
8572
+ if (result.ignored) excluded = true;
8573
+ else if (result.unignored) excluded = false;
8574
+ }
8575
+ return excluded;
8576
+ };
8577
+ }
8578
+ var import_node_child_process15, import_node_fs33, import_node_path34, import_node_util4, import_ignore, gitEnvironment;
8486
8579
  var init_expo_workspace_exclusion = __esm({
8487
8580
  "src/expo-workspace-exclusion.ts"() {
8488
8581
  "use strict";
@@ -8491,6 +8584,11 @@ var init_expo_workspace_exclusion = __esm({
8491
8584
  import_node_path34 = __toESM(require("node:path"), 1);
8492
8585
  import_node_util4 = require("node:util");
8493
8586
  import_ignore = __toESM(require("peachsim/vendor/ignore"), 1);
8587
+ gitEnvironment = () => ({
8588
+ ...process.env,
8589
+ GIT_CONFIG_GLOBAL: "/dev/null",
8590
+ GIT_CONFIG_SYSTEM: "/dev/null"
8591
+ });
8494
8592
  }
8495
8593
  });
8496
8594
 
@@ -14774,7 +14872,74 @@ var init_native_app_identity_project = __esm({
14774
14872
  });
14775
14873
 
14776
14874
  // src/native-firebase-config.ts
14777
- var import_node_child_process42, import_node_fs87, import_node_module11, import_node_os19, import_node_path90;
14875
+ function hasExpoConfig(projectRoot) {
14876
+ const packagePath = import_node_path90.default.join(projectRoot, "package.json");
14877
+ const manifest = import_node_fs87.default.existsSync(packagePath) ? JSON.parse(import_node_fs87.default.readFileSync(packagePath, "utf8")) : null;
14878
+ if (isRecord(manifest)) {
14879
+ const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
14880
+ isRecord
14881
+ );
14882
+ if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
14883
+ return false;
14884
+ }
14885
+ const appJsonPath = import_node_path90.default.join(projectRoot, "app.json");
14886
+ const appJson = import_node_fs87.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs87.default.readFileSync(appJsonPath, "utf8")) : null;
14887
+ const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
14888
+ (value) => isRecord(value) && typeof value.googleServicesFile === "string"
14889
+ ));
14890
+ return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
14891
+ (name2) => import_node_fs87.default.existsSync(import_node_path90.default.join(projectRoot, name2))
14892
+ );
14893
+ }
14894
+ function expoConfigArgs(projectRoot, resultPath) {
14895
+ return [
14896
+ "--input-type=commonjs",
14897
+ "-e",
14898
+ EXPO_CONFIG_SCRIPT,
14899
+ import_node_path90.default.resolve(projectRoot),
14900
+ resultPath
14901
+ ];
14902
+ }
14903
+ function readExpoConfigResult(resultPath, status, signal, stderr) {
14904
+ if (signal === "SIGTERM")
14905
+ throw new Error(
14906
+ `Expo native configuration evaluation did not finish within ${EXPO_CONFIG_TIMEOUT_MS / 1e3}s.`
14907
+ );
14908
+ if (status !== 0)
14909
+ throw new Error(
14910
+ stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
14911
+ );
14912
+ const resolved = JSON.parse(import_node_fs87.default.readFileSync(resultPath, "utf8"));
14913
+ if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
14914
+ return resolved;
14915
+ }
14916
+ async function readExpoConfigAsync(projectRoot) {
14917
+ if (!hasExpoConfig(projectRoot)) return {};
14918
+ const directory = resultDirectory();
14919
+ const resultPath = import_node_path90.default.join(directory, "config.json");
14920
+ try {
14921
+ const child = (0, import_node_child_process42.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
14922
+ cwd: projectRoot,
14923
+ stdio: ["ignore", "ignore", "pipe"],
14924
+ timeout: EXPO_CONFIG_TIMEOUT_MS
14925
+ });
14926
+ let stderr = "";
14927
+ child.stderr.setEncoding("utf8");
14928
+ child.stderr.on("data", (chunk) => {
14929
+ stderr += chunk;
14930
+ });
14931
+ const [status, signal] = await new Promise(
14932
+ (resolve3, reject) => {
14933
+ child.once("error", reject);
14934
+ child.once("close", (code, closeSignal) => resolve3([code, closeSignal]));
14935
+ }
14936
+ );
14937
+ return readExpoConfigResult(resultPath, status, signal, stderr);
14938
+ } finally {
14939
+ import_node_fs87.default.rmSync(directory, { recursive: true, force: true });
14940
+ }
14941
+ }
14942
+ var import_node_child_process42, import_node_fs87, import_node_module11, import_node_os19, import_node_path90, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
14778
14943
  var init_native_firebase_config = __esm({
14779
14944
  "src/native-firebase-config.ts"() {
14780
14945
  "use strict";
@@ -14786,6 +14951,24 @@ var init_native_firebase_config = __esm({
14786
14951
  init_is_record();
14787
14952
  init_plist();
14788
14953
  init_xcode_project();
14954
+ EXPO_CONFIG_SCRIPT = `const { createRequire } = require('node:module');
14955
+ const { writeFileSync } = require('node:fs');
14956
+ const { join } = require('node:path');
14957
+ const root = process.argv[1];
14958
+ const projectRequire = createRequire(join(root, 'package.json'));
14959
+ const expoRequire = createRequire(projectRequire.resolve('expo/package.json'));
14960
+ const { getConfig } = expoRequire('@expo/config');
14961
+ let expoEnv = null;
14962
+ try { expoEnv = createRequire(expoRequire.resolve('@expo/cli/package.json'))('@expo/env'); } catch {}
14963
+ if (expoEnv) {
14964
+ process.env.NODE_ENV ||= 'development';
14965
+ expoEnv.load(root, { silent: true });
14966
+ }
14967
+ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true }).exp);
14968
+ if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
14969
+ writeFileSync(process.argv[2], result, { mode: 0o600 });`;
14970
+ EXPO_CONFIG_TIMEOUT_MS = 3e4;
14971
+ resultDirectory = () => import_node_fs87.default.mkdtempSync(import_node_path90.default.join(import_node_os19.default.tmpdir(), "peach-expo-config-"));
14789
14972
  }
14790
14973
  });
14791
14974
 
@@ -14807,9 +14990,9 @@ function hashPackageTree(root, options) {
14807
14990
  (a, b) => options.compareNames(a.name, b.name)
14808
14991
  )) {
14809
14992
  if (entry.name === "node_modules") continue;
14810
- const path111 = `${relative3}${entry.name}`;
14811
- if (entry.isDirectory()) walk2((0, import_node_path91.join)(directory, entry.name), `${path111}/`);
14812
- else if (entry.isFile() && !options.skipFile?.(entry.name)) files.push(path111);
14993
+ const path112 = `${relative3}${entry.name}`;
14994
+ if (entry.isDirectory()) walk2((0, import_node_path91.join)(directory, entry.name), `${path112}/`);
14995
+ else if (entry.isFile() && !options.skipFile?.(entry.name)) files.push(path112);
14813
14996
  }
14814
14997
  };
14815
14998
  walk2(root, "");
@@ -14870,19 +15053,136 @@ var init_expo_native_prebuilt = __esm({
14870
15053
  });
14871
15054
 
14872
15055
  // src/native-preparation.ts
14873
- var import_node_timers, setTimeoutNode, NativePreparationReceipts;
15056
+ function openRevision(app, token) {
15057
+ const key = `${app}\0${token}`;
15058
+ let revision = openRevisions.get(key);
15059
+ if (!revision) {
15060
+ revision = nativeInputRevision(app).catch(() => null);
15061
+ openRevisions.set(key, revision);
15062
+ setTimeoutNode(() => openRevisions.delete(key), OPEN_RECEIPT_MS).unref();
15063
+ }
15064
+ return revision;
15065
+ }
15066
+ async function nativeInputRevision(app) {
15067
+ const root = findWorkspaceRoot(app);
15068
+ const [excluded, config] = await Promise.all([
15069
+ workspaceExclusion(root),
15070
+ readExpoConfigAsync(app)
15071
+ ]);
15072
+ const require2 = (0, import_node_module13.createRequire)(import_node_path93.default.join(app, "package.json"));
15073
+ let widgetsOutput;
15074
+ try {
15075
+ widgetsOutput = import_node_path93.default.join(
15076
+ import_node_path93.default.dirname(require2.resolve("expo-widgets/package.json")),
15077
+ "bundle",
15078
+ "build"
15079
+ );
15080
+ } catch (error) {
15081
+ if (!(error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND"))
15082
+ throw error;
15083
+ }
15084
+ const hash = (0, import_node_crypto54.createHash)("sha256");
15085
+ hash.update(
15086
+ JSON.stringify([
15087
+ config,
15088
+ resolveActiveRuntimeRoot(),
15089
+ resolveDevCheckoutRuntimeAssetRoot()
15090
+ ])
15091
+ );
15092
+ const visited = /* @__PURE__ */ new Set();
15093
+ const directories = [
15094
+ { file: root, installed: false }
15095
+ ];
15096
+ for (const { file: directory, installed } of directories) {
15097
+ if (visited.has(directory)) continue;
15098
+ visited.add(directory);
15099
+ const entries = import_node_fs90.default.readdirSync(directory, { withFileTypes: true });
15100
+ entries.sort((a, b) => a.name < b.name ? -1 : Number(a.name !== b.name));
15101
+ for (const entry of entries) {
15102
+ const file = import_node_path93.default.join(directory, entry.name);
15103
+ const dependency = installed || entry.name === "node_modules";
15104
+ if (file === widgetsOutput || entry.name === ".git") continue;
15105
+ if (!dependency && excluded(import_node_path93.default.relative(root, file), entry.isDirectory()))
15106
+ continue;
15107
+ hash.update(file).update("\0");
15108
+ if (entry.isDirectory()) {
15109
+ directories.push({ file, installed: dependency });
15110
+ continue;
15111
+ }
15112
+ const stat2 = import_node_fs90.default.lstatSync(file);
15113
+ hash.update(
15114
+ `${stat2.dev}:${stat2.ino}:${stat2.size}:${stat2.ctimeMs}:${stat2.mtimeMs}\0`
15115
+ );
15116
+ if (!entry.isSymbolicLink()) continue;
15117
+ const target = import_node_fs90.default.statSync(file, { throwIfNoEntry: false });
15118
+ if (target?.isDirectory()) {
15119
+ directories.push({ file: import_node_fs90.default.realpathSync(file), installed: dependency });
15120
+ } else if (target) {
15121
+ hash.update(
15122
+ `${target.dev}:${target.ino}:${target.size}:${target.ctimeMs}:${target.mtimeMs}\0`
15123
+ );
15124
+ }
15125
+ }
15126
+ if (visited.size % 256 === 0) await (0, import_promises10.setImmediate)();
15127
+ }
15128
+ return hash.digest("hex");
15129
+ }
15130
+ var import_node_crypto54, import_node_fs90, import_node_module13, import_node_path93, import_node_timers, import_promises10, setTimeoutNode, OPEN_RECEIPT_MS, openRevisions, NativePreparationReceipts;
14874
15131
  var init_native_preparation = __esm({
14875
15132
  "src/native-preparation.ts"() {
14876
15133
  "use strict";
15134
+ import_node_crypto54 = require("node:crypto");
15135
+ import_node_fs90 = __toESM(require("node:fs"), 1);
15136
+ import_node_module13 = require("node:module");
15137
+ import_node_path93 = __toESM(require("node:path"), 1);
14877
15138
  import_node_timers = require("node:timers");
15139
+ import_promises10 = require("node:timers/promises");
15140
+ init_expo_workspace_exclusion();
15141
+ init_native_firebase_config();
15142
+ init_runtime_assets();
15143
+ init_workspace_root();
14878
15144
  setTimeoutNode = import_node_timers.setTimeout;
15145
+ OPEN_RECEIPT_MS = 30 * 60 * 1e3;
15146
+ openRevisions = /* @__PURE__ */ new Map();
14879
15147
  NativePreparationReceipts = class {
15148
+ compiling = /* @__PURE__ */ new Map();
15149
+ prepared = /* @__PURE__ */ new Map();
14880
15150
  receipts = /* @__PURE__ */ new Map();
15151
+ async prepare(owner, root, token, compile, isAvailable) {
15152
+ const revision = token && isAvailable ? await openRevision(root, token) : null;
15153
+ let pending = this.compiling.get(owner);
15154
+ while (pending) {
15155
+ if (pending.revision === revision) return pending.result;
15156
+ await pending.result.catch(() => void 0);
15157
+ pending = this.compiling.get(owner);
15158
+ }
15159
+ const prepared = this.prepared.get(owner);
15160
+ if (prepared && prepared.revision === revision && isAvailable?.(prepared.value)) {
15161
+ prepared.expiry.refresh();
15162
+ return prepared.value;
15163
+ }
15164
+ if (prepared) (0, import_node_timers.clearTimeout)(prepared.expiry);
15165
+ this.prepared.delete(owner);
15166
+ const result = compile().then((value) => {
15167
+ if (revision) {
15168
+ const expiry = setTimeoutNode(
15169
+ () => this.prepared.delete(owner),
15170
+ OPEN_RECEIPT_MS
15171
+ );
15172
+ expiry.unref();
15173
+ this.prepared.set(owner, { revision, value, expiry });
15174
+ }
15175
+ return value;
15176
+ }).finally(() => this.compiling.delete(owner));
15177
+ this.compiling.set(owner, { revision, result });
15178
+ return result;
15179
+ }
15180
+ // each open hands its own response to the first tenant request, including null.
14881
15181
  store(owner, token, value) {
14882
15182
  if (!token) return;
14883
15183
  const previous = this.receipts.get(token);
14884
15184
  if (previous) (0, import_node_timers.clearTimeout)(previous.expiry);
14885
- const expiry = setTimeoutNode(() => this.receipts.delete(token), 30 * 60 * 1e3);
15185
+ const expiry = setTimeoutNode(() => this.receipts.delete(token), OPEN_RECEIPT_MS);
14886
15186
  expiry.unref();
14887
15187
  this.receipts.set(token, { owner, value, expiry });
14888
15188
  }
@@ -14899,12 +15199,12 @@ var init_native_preparation = __esm({
14899
15199
  });
14900
15200
 
14901
15201
  // src/swift-xcframework.ts
14902
- var import_node_fs90, import_node_path93;
15202
+ var import_node_fs91, import_node_path94;
14903
15203
  var init_swift_xcframework = __esm({
14904
15204
  "src/swift-xcframework.ts"() {
14905
15205
  "use strict";
14906
- import_node_fs90 = __toESM(require("node:fs"), 1);
14907
- import_node_path93 = __toESM(require("node:path"), 1);
15206
+ import_node_fs91 = __toESM(require("node:fs"), 1);
15207
+ import_node_path94 = __toESM(require("node:path"), 1);
14908
15208
  init_is_record();
14909
15209
  init_plist_bytes();
14910
15210
  init_swift_source_file();
@@ -14912,14 +15212,14 @@ var init_swift_xcframework = __esm({
14912
15212
  });
14913
15213
 
14914
15214
  // src/native-static-libraries.ts
14915
- var import_node_child_process43, import_node_crypto54, import_node_fs91, import_node_path94, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
15215
+ var import_node_child_process43, import_node_crypto55, import_node_fs92, import_node_path95, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
14916
15216
  var init_native_static_libraries = __esm({
14917
15217
  "src/native-static-libraries.ts"() {
14918
15218
  "use strict";
14919
15219
  import_node_child_process43 = require("node:child_process");
14920
- import_node_crypto54 = require("node:crypto");
14921
- import_node_fs91 = __toESM(require("node:fs"), 1);
14922
- import_node_path94 = __toESM(require("node:path"), 1);
15220
+ import_node_crypto55 = require("node:crypto");
15221
+ import_node_fs92 = __toESM(require("node:fs"), 1);
15222
+ import_node_path95 = __toESM(require("node:path"), 1);
14923
15223
  init_home_paths();
14924
15224
  init_native_prebuilt();
14925
15225
  init_swift_compile();
@@ -15230,27 +15530,27 @@ var init_mapLimit = __esm({
15230
15530
  });
15231
15531
 
15232
15532
  // src/numbered-lock.ts
15233
- var import_node_crypto55, import_node_fs92, import_node_path95;
15533
+ var import_node_crypto56, import_node_fs93, import_node_path96;
15234
15534
  var init_numbered_lock = __esm({
15235
15535
  "src/numbered-lock.ts"() {
15236
15536
  "use strict";
15237
- import_node_crypto55 = require("node:crypto");
15238
- import_node_fs92 = require("node:fs");
15239
- import_node_path95 = require("node:path");
15537
+ import_node_crypto56 = require("node:crypto");
15538
+ import_node_fs93 = require("node:fs");
15539
+ import_node_path96 = require("node:path");
15240
15540
  }
15241
15541
  });
15242
15542
 
15243
15543
  // src/rive-runtime-dependencies.ts
15244
- var import_node_child_process44, import_node_crypto56, import_node_fs93, import_node_os20, import_node_path96, import_promises10;
15544
+ var import_node_child_process44, import_node_crypto57, import_node_fs94, import_node_os20, import_node_path97, import_promises11;
15245
15545
  var init_rive_runtime_dependencies = __esm({
15246
15546
  "src/rive-runtime-dependencies.ts"() {
15247
15547
  "use strict";
15248
15548
  import_node_child_process44 = require("node:child_process");
15249
- import_node_crypto56 = require("node:crypto");
15250
- import_node_fs93 = __toESM(require("node:fs"), 1);
15549
+ import_node_crypto57 = require("node:crypto");
15550
+ import_node_fs94 = __toESM(require("node:fs"), 1);
15251
15551
  import_node_os20 = __toESM(require("node:os"), 1);
15252
- import_node_path96 = __toESM(require("node:path"), 1);
15253
- import_promises10 = require("node:timers/promises");
15552
+ import_node_path97 = __toESM(require("node:path"), 1);
15553
+ import_promises11 = require("node:timers/promises");
15254
15554
  init_home_paths();
15255
15555
  init_numbered_lock();
15256
15556
  init_swift_compile();
@@ -15326,15 +15626,15 @@ var init_swift_shipped_binaries = __esm({
15326
15626
  });
15327
15627
 
15328
15628
  // src/swift-packages.ts
15329
- var import_node_child_process45, import_node_crypto57, import_node_fs94, import_node_path97, import_promises11, import_node_util10, execFileAsync2;
15629
+ var import_node_child_process45, import_node_crypto58, import_node_fs95, import_node_path98, import_promises12, import_node_util10, execFileAsync2;
15330
15630
  var init_swift_packages = __esm({
15331
15631
  "src/swift-packages.ts"() {
15332
15632
  "use strict";
15333
15633
  import_node_child_process45 = require("node:child_process");
15334
- import_node_crypto57 = require("node:crypto");
15335
- import_node_fs94 = __toESM(require("node:fs"), 1);
15336
- import_node_path97 = __toESM(require("node:path"), 1);
15337
- import_promises11 = require("node:timers/promises");
15634
+ import_node_crypto58 = require("node:crypto");
15635
+ import_node_fs95 = __toESM(require("node:fs"), 1);
15636
+ import_node_path98 = __toESM(require("node:path"), 1);
15637
+ import_promises12 = require("node:timers/promises");
15338
15638
  import_node_util10 = require("node:util");
15339
15639
  init_git_repo_env();
15340
15640
  init_home_paths();
@@ -15352,20 +15652,20 @@ var init_swift_packages = __esm({
15352
15652
  // src/ffmpeg-source-build.ts
15353
15653
  function inputs(declaration) {
15354
15654
  const source = declaration.sources.find(
15355
- ({ file }) => import_node_path98.default.basename(file) === "configure" && import_node_fs95.default.existsSync(import_node_path98.default.join(import_node_path98.default.dirname(file), "ffbuild/common.mak"))
15655
+ ({ file }) => import_node_path99.default.basename(file) === "configure" && import_node_fs96.default.existsSync(import_node_path99.default.join(import_node_path99.default.dirname(file), "ffbuild/common.mak"))
15356
15656
  )?.file;
15357
15657
  const script = declaration.sources.find(
15358
- ({ file }) => file.endsWith(".sh") && import_node_fs95.default.readFileSync(file, "utf8").includes("CONFIGURE_FLAGS=") && import_node_fs95.default.readFileSync(file, "utf8").includes("$SOURCE/configure")
15658
+ ({ file }) => file.endsWith(".sh") && import_node_fs96.default.readFileSync(file, "utf8").includes("CONFIGURE_FLAGS=") && import_node_fs96.default.readFileSync(file, "utf8").includes("$SOURCE/configure")
15359
15659
  )?.file;
15360
- return source && script ? { source: import_node_path98.default.dirname(source), script } : null;
15660
+ return source && script ? { source: import_node_path99.default.dirname(source), script } : null;
15361
15661
  }
15362
- var import_node_child_process46, import_node_fs95, import_node_path98, ffmpegBuilder;
15662
+ var import_node_child_process46, import_node_fs96, import_node_path99, ffmpegBuilder;
15363
15663
  var init_ffmpeg_source_build = __esm({
15364
15664
  "src/ffmpeg-source-build.ts"() {
15365
15665
  "use strict";
15366
15666
  import_node_child_process46 = require("node:child_process");
15367
- import_node_fs95 = __toESM(require("node:fs"), 1);
15368
- import_node_path98 = __toESM(require("node:path"), 1);
15667
+ import_node_fs96 = __toESM(require("node:fs"), 1);
15668
+ import_node_path99 = __toESM(require("node:path"), 1);
15369
15669
  ffmpegBuilder = {
15370
15670
  name: "ffmpeg-configure-v2",
15371
15671
  probesFrameworks: true,
@@ -15373,7 +15673,7 @@ var init_ffmpeg_source_build = __esm({
15373
15673
  build(declaration, toolchain, dependencyOutputs, outDir) {
15374
15674
  const input = inputs(declaration);
15375
15675
  if (!input) throw new Error(`${declaration.label} has no FFmpeg configure source`);
15376
- const script = import_node_fs95.default.readFileSync(input.script, "utf8");
15676
+ const script = import_node_fs96.default.readFileSync(input.script, "utf8");
15377
15677
  const common = /\bCONFIGURE_FLAGS="([^"$]*)"/.exec(script)?.[1];
15378
15678
  const portable = /--target-os=linux\s+([\s\S]*?)\|\| exit 1/.exec(script)?.[1];
15379
15679
  const extra = /\bEXTRA_CFLAGS="([^"$]*)"/.exec(script)?.[1];
@@ -15387,9 +15687,9 @@ var init_ffmpeg_source_build = __esm({
15387
15687
  "--enable-decoder=aac_at,alac_at,gsm_ms_at",
15388
15688
  "--enable-hwaccel=h264_videotoolbox,hevc_videotoolbox"
15389
15689
  );
15390
- const work = import_node_path98.default.join(outDir, ".work");
15391
- const prefix = import_node_path98.default.join(work, "install");
15392
- import_node_fs95.default.mkdirSync(work, { recursive: true });
15690
+ const work = import_node_path99.default.join(outDir, ".work");
15691
+ const prefix = import_node_path99.default.join(work, "install");
15692
+ import_node_fs96.default.mkdirSync(work, { recursive: true });
15393
15693
  const libraries = [
15394
15694
  {
15395
15695
  option: "libopus",
@@ -15413,7 +15713,7 @@ var init_ffmpeg_source_build = __esm({
15413
15713
  for (const library of libraries) {
15414
15714
  if (!flags.includes(`--enable-${library.option}`)) continue;
15415
15715
  const dependency = declaration.dependencies.find(
15416
- (candidate) => candidate.outputs.some((output) => import_node_path98.default.basename(output.path) === library.header)
15716
+ (candidate) => candidate.outputs.some((output) => import_node_path99.default.basename(output.path) === library.header)
15417
15717
  );
15418
15718
  const built = dependency && dependencyOutputs.get(dependency.label);
15419
15719
  if (!dependency || !built)
@@ -15424,31 +15724,31 @@ var init_ffmpeg_source_build = __esm({
15424
15724
  (output) => /\.(?:h|inc)$/.test(output.path)
15425
15725
  );
15426
15726
  const main = headers.find(
15427
- (output) => import_node_path98.default.basename(output.path) === library.header
15727
+ (output) => import_node_path99.default.basename(output.path) === library.header
15428
15728
  );
15429
- const includeRoot = library.option === "libdav1d" ? import_node_path98.default.dirname(import_node_path98.default.dirname(main.path)) : import_node_path98.default.dirname(main.path);
15430
- const destination = import_node_path98.default.join(work, library.option);
15729
+ const includeRoot = library.option === "libdav1d" ? import_node_path99.default.dirname(import_node_path99.default.dirname(main.path)) : import_node_path99.default.dirname(main.path);
15730
+ const destination = import_node_path99.default.join(work, library.option);
15431
15731
  for (const header of headers) {
15432
- const relative3 = import_node_path98.default.relative(includeRoot, header.path);
15732
+ const relative3 = import_node_path99.default.relative(includeRoot, header.path);
15433
15733
  if (relative3.startsWith("..")) continue;
15434
- const target = import_node_path98.default.join(
15734
+ const target = import_node_path99.default.join(
15435
15735
  destination,
15436
15736
  library.option === "libdav1d" ? "include" : library.include,
15437
15737
  relative3
15438
15738
  );
15439
- import_node_fs95.default.mkdirSync(import_node_path98.default.dirname(target), { recursive: true });
15440
- import_node_fs95.default.copyFileSync(import_node_path98.default.join(built, header.path), target);
15739
+ import_node_fs96.default.mkdirSync(import_node_path99.default.dirname(target), { recursive: true });
15740
+ import_node_fs96.default.copyFileSync(import_node_path99.default.join(built, header.path), target);
15441
15741
  }
15442
15742
  const archive = dependency.outputs.find((output) => output.path.endsWith(".a"));
15443
15743
  if (!archive) throw new Error(`${dependency.label} declares no library`);
15444
- import_node_fs95.default.mkdirSync(import_node_path98.default.join(destination, "lib"), { recursive: true });
15445
- import_node_fs95.default.copyFileSync(
15446
- import_node_path98.default.join(built, archive.path),
15447
- import_node_path98.default.join(destination, "lib", library.archive)
15744
+ import_node_fs96.default.mkdirSync(import_node_path99.default.join(destination, "lib"), { recursive: true });
15745
+ import_node_fs96.default.copyFileSync(
15746
+ import_node_path99.default.join(built, archive.path),
15747
+ import_node_path99.default.join(destination, "lib", library.archive)
15448
15748
  );
15449
15749
  }
15450
15750
  const compiler = [toolchain.cc, ...toolchain.cFlags].join(" ");
15451
- const pkgConfig = import_node_path98.default.join(import_node_path98.default.dirname(input.script), "pkg-config");
15751
+ const pkgConfig = import_node_path99.default.join(import_node_path99.default.dirname(input.script), "pkg-config");
15452
15752
  const options = {
15453
15753
  cwd: work,
15454
15754
  env: { ...process.env, CPPFLAGS: "", CFLAGS: "", CXXFLAGS: "", LDFLAGS: "" },
@@ -15469,34 +15769,34 @@ var init_ffmpeg_source_build = __esm({
15469
15769
  `--cc=${compiler}`,
15470
15770
  `--ar=${toolchain.ar}`,
15471
15771
  `--ranlib=${toolchain.ranlib}`,
15472
- `--nm=${import_node_path98.default.join(toolchain.toolchainBin, "llvm-nm")}`,
15772
+ `--nm=${import_node_path99.default.join(toolchain.toolchainBin, "llvm-nm")}`,
15473
15773
  `--extra-cflags=${extra} -Oz -fPIC -fwasm-exceptions -ffunction-sections -fdata-sections`,
15474
15774
  "--extra-ldflags=-fwasm-exceptions",
15475
15775
  `--prefix=${prefix}`,
15476
15776
  `--pkg-config=${pkgConfig}`,
15477
- `--pkg-config-flags=${libraries.map(({ option }) => `--${option}_path ${import_node_path98.default.join(work, option)}`).join(" ")}`
15777
+ `--pkg-config-flags=${libraries.map(({ option }) => `--${option}_path ${import_node_path99.default.join(work, option)}`).join(" ")}`
15478
15778
  ];
15479
- (0, import_node_child_process46.execFileSync)(import_node_path98.default.join(input.source, "configure"), configure, options);
15480
- const config = import_node_path98.default.join(work, "config.h");
15779
+ (0, import_node_child_process46.execFileSync)(import_node_path99.default.join(input.source, "configure"), configure, options);
15780
+ const config = import_node_path99.default.join(work, "config.h");
15481
15781
  const portableConfig = configure.filter((arg) => !/^--(?:cc|ar|nm|ranlib|prefix|pkg-config(?:-flags)?)=/.test(arg)).join(" ");
15482
- import_node_fs95.default.writeFileSync(
15782
+ import_node_fs96.default.writeFileSync(
15483
15783
  config,
15484
- import_node_fs95.default.readFileSync(config, "utf8").replace(
15784
+ import_node_fs96.default.readFileSync(config, "utf8").replace(
15485
15785
  /^#define FFMPEG_CONFIGURATION .*$/m,
15486
15786
  () => `#define FFMPEG_CONFIGURATION ${JSON.stringify(portableConfig)}`
15487
15787
  )
15488
15788
  );
15489
15789
  (0, import_node_child_process46.execFileSync)("make", [`-j${toolchain.jobs}`, "install"], options);
15490
15790
  for (const output of declaration.outputs) {
15491
- const target = import_node_path98.default.join(outDir, output.path);
15791
+ const target = import_node_path99.default.join(outDir, output.path);
15492
15792
  const component = /(?:^|\/)((?:libavutil|libavcodec|libavformat|libswresample)\/.*)$/.exec(
15493
15793
  output.path
15494
15794
  )?.[1];
15495
- const source = output.path.endsWith(".a") ? import_node_path98.default.join(prefix, "lib", import_node_path98.default.basename(output.path)) : component ? import_node_path98.default.join(prefix, "include", component) : null;
15496
- if (!source || !import_node_fs95.default.existsSync(source))
15795
+ const source = output.path.endsWith(".a") ? import_node_path99.default.join(prefix, "lib", import_node_path99.default.basename(output.path)) : component ? import_node_path99.default.join(prefix, "include", component) : null;
15796
+ if (!source || !import_node_fs96.default.existsSync(source))
15497
15797
  throw new Error(`${declaration.label}: FFmpeg did not produce ${output.path}`);
15498
- import_node_fs95.default.mkdirSync(import_node_path98.default.dirname(target), { recursive: true });
15499
- import_node_fs95.default.copyFileSync(source, target);
15798
+ import_node_fs96.default.mkdirSync(import_node_path99.default.dirname(target), { recursive: true });
15799
+ import_node_fs96.default.copyFileSync(source, target);
15500
15800
  }
15501
15801
  }
15502
15802
  };
@@ -15509,7 +15809,7 @@ function sourceNamed(declaration, pattern) {
15509
15809
  }
15510
15810
  function sourceTree(declaration, marker) {
15511
15811
  const file = declaration.sources.find(
15512
- (source) => source.file.endsWith(`${import_node_path99.default.sep}${marker}`)
15812
+ (source) => source.file.endsWith(`${import_node_path100.default.sep}${marker}`)
15513
15813
  )?.file;
15514
15814
  if (!file) throw new Error(`${declaration.label} names no ${marker}`);
15515
15815
  return file.slice(0, -marker.length - 1);
@@ -15523,20 +15823,20 @@ function run4(command, args, cwd, env) {
15523
15823
  });
15524
15824
  }
15525
15825
  function walk(dir) {
15526
- if (!import_node_fs96.default.existsSync(dir)) return [];
15527
- return import_node_fs96.default.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
15528
- const full = import_node_path99.default.join(dir, entry.name);
15826
+ if (!import_node_fs97.default.existsSync(dir)) return [];
15827
+ return import_node_fs97.default.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
15828
+ const full = import_node_path100.default.join(dir, entry.name);
15529
15829
  return entry.isDirectory() ? walk(full) : [full];
15530
15830
  });
15531
15831
  }
15532
15832
  function placeOutputs(declaration, roots, outDir) {
15533
15833
  const built = roots.flatMap(walk);
15534
15834
  for (const output of declaration.outputs) {
15535
- const parts = output.path.split(import_node_path99.default.sep);
15835
+ const parts = output.path.split(import_node_path100.default.sep);
15536
15836
  const name2 = parts.at(-1).toLowerCase();
15537
- const candidates = built.filter((file) => import_node_path99.default.basename(file).toLowerCase() === name2);
15837
+ const candidates = built.filter((file) => import_node_path100.default.basename(file).toLowerCase() === name2);
15538
15838
  const score = (file) => {
15539
- const theirs = file.split(import_node_path99.default.sep);
15839
+ const theirs = file.split(import_node_path100.default.sep);
15540
15840
  let shared = 1;
15541
15841
  while (shared < parts.length && theirs.at(-1 - shared) === parts.at(-1 - shared))
15542
15842
  shared++;
@@ -15544,16 +15844,16 @@ function placeOutputs(declaration, roots, outDir) {
15544
15844
  };
15545
15845
  const best = candidates.sort((a, b) => score(b) - score(a))[0];
15546
15846
  if (!best) continue;
15547
- const target = import_node_path99.default.join(outDir, output.path);
15548
- import_node_fs96.default.mkdirSync(import_node_path99.default.dirname(target), { recursive: true });
15549
- import_node_fs96.default.copyFileSync(best, target);
15847
+ const target = import_node_path100.default.join(outDir, output.path);
15848
+ import_node_fs97.default.mkdirSync(import_node_path100.default.dirname(target), { recursive: true });
15849
+ import_node_fs97.default.copyFileSync(best, target);
15550
15850
  }
15551
15851
  }
15552
15852
  function copyTree(source, target) {
15553
- import_node_fs96.default.cpSync(source, target, {
15853
+ import_node_fs97.default.cpSync(source, target, {
15554
15854
  recursive: true,
15555
15855
  dereference: true,
15556
- filter: (file) => import_node_path99.default.basename(file) !== ".git"
15856
+ filter: (file) => import_node_path100.default.basename(file) !== ".git"
15557
15857
  });
15558
15858
  }
15559
15859
  function toolEnv(toolchain, extra = []) {
@@ -15569,8 +15869,8 @@ function toolEnv(toolchain, extra = []) {
15569
15869
  CXX: toolchain.cxx,
15570
15870
  AR: toolchain.ar,
15571
15871
  RANLIB: toolchain.ranlib,
15572
- NM: import_node_path99.default.join(toolchain.toolchainBin, "llvm-nm"),
15573
- STRIP: import_node_path99.default.join(toolchain.toolchainBin, "llvm-strip"),
15872
+ NM: import_node_path100.default.join(toolchain.toolchainBin, "llvm-nm"),
15873
+ STRIP: import_node_path100.default.join(toolchain.toolchainBin, "llvm-strip"),
15574
15874
  CFLAGS: flags.join(" "),
15575
15875
  CXXFLAGS: flags.join(" "),
15576
15876
  CPPFLAGS: "",
@@ -15586,8 +15886,8 @@ function toolEnv(toolchain, extra = []) {
15586
15886
  };
15587
15887
  }
15588
15888
  function cmakeToolchainFile(toolchain, dir) {
15589
- const file = import_node_path99.default.join(dir, "wasm64.cmake");
15590
- import_node_fs96.default.writeFileSync(
15889
+ const file = import_node_path100.default.join(dir, "wasm64.cmake");
15890
+ import_node_fs97.default.writeFileSync(
15591
15891
  file,
15592
15892
  [
15593
15893
  "set(CMAKE_SYSTEM_NAME WASI)",
@@ -15611,8 +15911,8 @@ function cmakeToolchainFile(toolchain, dir) {
15611
15911
  return file;
15612
15912
  }
15613
15913
  function cmakeBuild(toolchain, source, work, options, targets = []) {
15614
- const build = import_node_path99.default.join(work, "build");
15615
- import_node_fs96.default.mkdirSync(build, { recursive: true });
15914
+ const build = import_node_path100.default.join(work, "build");
15915
+ import_node_fs97.default.mkdirSync(build, { recursive: true });
15616
15916
  const env = toolEnv(toolchain);
15617
15917
  run4(
15618
15918
  "cmake",
@@ -15643,24 +15943,24 @@ function cmakeBuild(toolchain, source, work, options, targets = []) {
15643
15943
  );
15644
15944
  return build;
15645
15945
  }
15646
- var import_node_child_process47, import_node_fs96, import_node_path99, opusBuilder, libvpxBuilder, libwebpBuilder, mozjpegBuilder, dav1dBuilder, tdBuilder, GENRULE_LIBRARY_BUILDERS;
15946
+ var import_node_child_process47, import_node_fs97, import_node_path100, opusBuilder, libvpxBuilder, libwebpBuilder, mozjpegBuilder, dav1dBuilder, tdBuilder, GENRULE_LIBRARY_BUILDERS;
15647
15947
  var init_genrule_library_builds = __esm({
15648
15948
  "src/genrule-library-builds.ts"() {
15649
15949
  "use strict";
15650
15950
  import_node_child_process47 = require("node:child_process");
15651
- import_node_fs96 = __toESM(require("node:fs"), 1);
15652
- import_node_path99 = __toESM(require("node:path"), 1);
15951
+ import_node_fs97 = __toESM(require("node:fs"), 1);
15952
+ import_node_path100 = __toESM(require("node:path"), 1);
15653
15953
  init_swiftTargetContract();
15654
15954
  opusBuilder = {
15655
15955
  name: "opus",
15656
15956
  recognizes: (declaration) => !!sourceNamed(declaration, /\/opus-[\d.]+\.tar\.gz$/),
15657
15957
  build(declaration, toolchain, _dependencies, outDir) {
15658
15958
  const tarball = sourceNamed(declaration, /\/opus-[\d.]+\.tar\.gz$/);
15659
- const work = import_node_path99.default.join(outDir, ".work");
15660
- import_node_fs96.default.mkdirSync(work, { recursive: true });
15959
+ const work = import_node_path100.default.join(outDir, ".work");
15960
+ import_node_fs97.default.mkdirSync(work, { recursive: true });
15661
15961
  run4("tar", ["-xzf", tarball, "--no-same-owner", "-C", work], work, {});
15662
- const source = import_node_path99.default.join(work, import_node_path99.default.basename(tarball, ".tar.gz"));
15663
- const prefix = import_node_path99.default.join(work, "install");
15962
+ const source = import_node_path100.default.join(work, import_node_path100.default.basename(tarball, ".tar.gz"));
15963
+ const prefix = import_node_path100.default.join(work, "install");
15664
15964
  run4(
15665
15965
  "./configure",
15666
15966
  [
@@ -15684,15 +15984,15 @@ var init_genrule_library_builds = __esm({
15684
15984
  libvpxBuilder = {
15685
15985
  name: "libvpx",
15686
15986
  recognizes: (declaration) => declaration.sources.some(
15687
- (source) => source.file.endsWith(`${import_node_path99.default.sep}vpx${import_node_path99.default.sep}vpx_codec.h`)
15688
- ) && declaration.sources.some((source) => source.file.endsWith(`${import_node_path99.default.sep}vpxenc.c`)),
15987
+ (source) => source.file.endsWith(`${import_node_path100.default.sep}vpx${import_node_path100.default.sep}vpx_codec.h`)
15988
+ ) && declaration.sources.some((source) => source.file.endsWith(`${import_node_path100.default.sep}vpxenc.c`)),
15689
15989
  build(declaration, toolchain, _dependencies, outDir) {
15690
15990
  const original = sourceTree(declaration, "vpxenc.c");
15691
- const work = import_node_path99.default.join(outDir, ".work");
15692
- const source = import_node_path99.default.join(work, "source");
15991
+ const work = import_node_path100.default.join(outDir, ".work");
15992
+ const source = import_node_path100.default.join(work, "source");
15693
15993
  copyTree(original, source);
15694
- const build = import_node_path99.default.join(work, "build");
15695
- import_node_fs96.default.mkdirSync(build, { recursive: true });
15994
+ const build = import_node_path100.default.join(work, "build");
15995
+ import_node_fs97.default.mkdirSync(build, { recursive: true });
15696
15996
  const env = toolEnv(toolchain);
15697
15997
  const configure = [
15698
15998
  "--target=generic-gnu",
@@ -15711,15 +16011,15 @@ var init_genrule_library_builds = __esm({
15711
16011
  "--size-limit=8192x8192"
15712
16012
  ];
15713
16013
  run4(
15714
- import_node_path99.default.join(source, "configure"),
16014
+ import_node_path100.default.join(source, "configure"),
15715
16015
  [...configure, `--extra-cflags=${env.CFLAGS}`, `--extra-cxxflags=${env.CXXFLAGS}`],
15716
16016
  build,
15717
16017
  { ...env, CROSS: "", LD: env.CC, AS: "" }
15718
16018
  );
15719
- const config = import_node_path99.default.join(build, "vpx_config.c");
15720
- import_node_fs96.default.writeFileSync(
16019
+ const config = import_node_path100.default.join(build, "vpx_config.c");
16020
+ import_node_fs97.default.writeFileSync(
15721
16021
  config,
15722
- import_node_fs96.default.readFileSync(config, "utf8").replace(
16022
+ import_node_fs97.default.readFileSync(config, "utf8").replace(
15723
16023
  /^static const char\* const cfg = .*;$/m,
15724
16024
  () => `static const char* const cfg = ${JSON.stringify(configure.join(" "))};`
15725
16025
  )
@@ -15727,17 +16027,17 @@ var init_genrule_library_builds = __esm({
15727
16027
  run4("make", [`-j${toolchain.jobs}`, "dist", "DIST_DIR=dist"], build, {
15728
16028
  CROSS: ""
15729
16029
  });
15730
- placeOutputs(declaration, [import_node_path99.default.join(build, "dist"), build], outDir);
16030
+ placeOutputs(declaration, [import_node_path100.default.join(build, "dist"), build], outDir);
15731
16031
  }
15732
16032
  };
15733
16033
  libwebpBuilder = {
15734
16034
  name: "libwebp",
15735
16035
  recognizes: (declaration) => declaration.sources.some(
15736
- (source) => source.file.endsWith(`${import_node_path99.default.sep}src${import_node_path99.default.sep}webp${import_node_path99.default.sep}decode.h`)
16036
+ (source) => source.file.endsWith(`${import_node_path100.default.sep}src${import_node_path100.default.sep}webp${import_node_path100.default.sep}decode.h`)
15737
16037
  ),
15738
16038
  build(declaration, toolchain, _dependencies, outDir) {
15739
- const source = sourceTree(declaration, import_node_path99.default.join("src", "webp", "decode.h"));
15740
- const work = import_node_path99.default.join(outDir, ".work");
16039
+ const source = sourceTree(declaration, import_node_path100.default.join("src", "webp", "decode.h"));
16040
+ const work = import_node_path100.default.join(outDir, ".work");
15741
16041
  const build = cmakeBuild(toolchain, source, work, [
15742
16042
  "-DWEBP_LINK_STATIC=1",
15743
16043
  "-DWEBP_BUILD_CWEBP=0",
@@ -15753,15 +16053,15 @@ var init_genrule_library_builds = __esm({
15753
16053
  "-DWEBP_ENABLE_SIMD=0",
15754
16054
  "-DWEBP_USE_THREAD=0"
15755
16055
  ]);
15756
- placeOutputs(declaration, [build, import_node_path99.default.join(source, "src")], outDir);
16056
+ placeOutputs(declaration, [build, import_node_path100.default.join(source, "src")], outDir);
15757
16057
  }
15758
16058
  };
15759
16059
  mozjpegBuilder = {
15760
16060
  name: "mozjpeg",
15761
- recognizes: (declaration) => declaration.sources.some((source) => source.file.endsWith(`${import_node_path99.default.sep}jcmaster.c`)) && declaration.sources.some((source) => source.file.endsWith(`${import_node_path99.default.sep}turbojpeg.c`)),
16061
+ recognizes: (declaration) => declaration.sources.some((source) => source.file.endsWith(`${import_node_path100.default.sep}jcmaster.c`)) && declaration.sources.some((source) => source.file.endsWith(`${import_node_path100.default.sep}turbojpeg.c`)),
15762
16062
  build(declaration, toolchain, _dependencies, outDir) {
15763
16063
  const source = sourceTree(declaration, "turbojpeg.c");
15764
- const work = import_node_path99.default.join(outDir, ".work");
16064
+ const work = import_node_path100.default.join(outDir, ".work");
15765
16065
  const build = cmakeBuild(
15766
16066
  toolchain,
15767
16067
  source,
@@ -15783,22 +16083,22 @@ var init_genrule_library_builds = __esm({
15783
16083
  dav1dBuilder = {
15784
16084
  name: "dav1d",
15785
16085
  recognizes: (declaration) => declaration.sources.some(
15786
- (source) => source.file.endsWith(`${import_node_path99.default.sep}include${import_node_path99.default.sep}dav1d${import_node_path99.default.sep}dav1d.h`)
16086
+ (source) => source.file.endsWith(`${import_node_path100.default.sep}include${import_node_path100.default.sep}dav1d${import_node_path100.default.sep}dav1d.h`)
15787
16087
  ),
15788
16088
  build(declaration, toolchain, _dependencies, outDir) {
15789
- const source = sourceTree(declaration, import_node_path99.default.join("include", "dav1d", "dav1d.h"));
15790
- const work = import_node_path99.default.join(outDir, ".work");
15791
- import_node_fs96.default.mkdirSync(work, { recursive: true });
16089
+ const source = sourceTree(declaration, import_node_path100.default.join("include", "dav1d", "dav1d.h"));
16090
+ const work = import_node_path100.default.join(outDir, ".work");
16091
+ import_node_fs97.default.mkdirSync(work, { recursive: true });
15792
16092
  const quote = (item) => `'${item.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`;
15793
16093
  const list2 = (items) => `[${items.map(quote).join(", ")}]`;
15794
- const cross = import_node_path99.default.join(work, "wasm64.meson");
15795
- import_node_fs96.default.writeFileSync(
16094
+ const cross = import_node_path100.default.join(work, "wasm64.meson");
16095
+ import_node_fs97.default.writeFileSync(
15796
16096
  cross,
15797
16097
  [
15798
16098
  "[binaries]",
15799
16099
  `c = ${list2([toolchain.cc, ...toolchain.cFlags])}`,
15800
16100
  `ar = ${quote(toolchain.ar)}`,
15801
- `strip = ${quote(import_node_path99.default.join(toolchain.toolchainBin, "llvm-strip"))}`,
16101
+ `strip = ${quote(import_node_path100.default.join(toolchain.toolchainBin, "llvm-strip"))}`,
15802
16102
  "[built-in options]",
15803
16103
  `c_link_args = ${list2(toolEnv(toolchain).LDFLAGS.split(" "))}`,
15804
16104
  "[properties]",
@@ -15815,7 +16115,7 @@ var init_genrule_library_builds = __esm({
15815
16115
  ""
15816
16116
  ].join("\n")
15817
16117
  );
15818
- const build = import_node_path99.default.join(work, "build");
16118
+ const build = import_node_path100.default.join(work, "build");
15819
16119
  run4(
15820
16120
  "meson",
15821
16121
  [
@@ -15833,22 +16133,22 @@ var init_genrule_library_builds = __esm({
15833
16133
  {}
15834
16134
  );
15835
16135
  run4("ninja", ["-C", build, `-j${toolchain.jobs}`], work, {});
15836
- placeOutputs(declaration, [build, import_node_path99.default.join(source, "include")], outDir);
16136
+ placeOutputs(declaration, [build, import_node_path100.default.join(source, "include")], outDir);
15837
16137
  }
15838
16138
  };
15839
16139
  tdBuilder = {
15840
16140
  name: "td",
15841
16141
  recognizes: (declaration) => declaration.sources.some(
15842
- (source) => source.file.endsWith(`${import_node_path99.default.sep}tde2e${import_node_path99.default.sep}CMakeLists.txt`)
16142
+ (source) => source.file.endsWith(`${import_node_path100.default.sep}tde2e${import_node_path100.default.sep}CMakeLists.txt`)
15843
16143
  ),
15844
16144
  build(declaration, toolchain, _dependencies, outDir) {
15845
- const original = sourceTree(declaration, import_node_path99.default.join("tde2e", "CMakeLists.txt"));
15846
- const openssl = sourceTree(declaration, import_node_path99.default.join("openssl", "crypto.h"));
15847
- const work = import_node_path99.default.join(outDir, ".work");
15848
- const source = import_node_path99.default.join(work, "source");
16145
+ const original = sourceTree(declaration, import_node_path100.default.join("tde2e", "CMakeLists.txt"));
16146
+ const openssl = sourceTree(declaration, import_node_path100.default.join("openssl", "crypto.h"));
16147
+ const work = import_node_path100.default.join(outDir, ".work");
16148
+ const source = import_node_path100.default.join(work, "source");
15849
16149
  copyTree(original, source);
15850
- const native = import_node_path99.default.join(work, "native");
15851
- import_node_fs96.default.mkdirSync(native, { recursive: true });
16150
+ const native = import_node_path100.default.join(work, "native");
16151
+ import_node_fs97.default.mkdirSync(native, { recursive: true });
15852
16152
  run4(
15853
16153
  "cmake",
15854
16154
  ["-G", "Unix Makefiles", "-DTD_GENERATE_SOURCE_FILES=ON", source],
@@ -15882,13 +16182,13 @@ var init_genrule_library_builds = __esm({
15882
16182
  });
15883
16183
 
15884
16184
  // src/native-framework-compiler.ts
15885
- var import_node_crypto58, import_node_fs97, import_node_path100, v7;
16185
+ var import_node_crypto59, import_node_fs98, import_node_path101, v7;
15886
16186
  var init_native_framework_compiler = __esm({
15887
16187
  "src/native-framework-compiler.ts"() {
15888
16188
  "use strict";
15889
- import_node_crypto58 = require("node:crypto");
15890
- import_node_fs97 = __toESM(require("node:fs"), 1);
15891
- import_node_path100 = __toESM(require("node:path"), 1);
16189
+ import_node_crypto59 = require("node:crypto");
16190
+ import_node_fs98 = __toESM(require("node:fs"), 1);
16191
+ import_node_path101 = __toESM(require("node:path"), 1);
15892
16192
  v7 = __toESM(require("peachsim/vendor/valibot"), 1);
15893
16193
  init_swift_compile();
15894
16194
  init_swiftRuntimeProductContract();
@@ -15897,15 +16197,15 @@ var init_native_framework_compiler = __esm({
15897
16197
  });
15898
16198
 
15899
16199
  // src/genrule-archives.ts
15900
- var import_node_child_process48, import_node_crypto59, import_node_fs98, import_node_os21, import_node_path101, v8, BUILDERS, cacheDir4;
16200
+ var import_node_child_process48, import_node_crypto60, import_node_fs99, import_node_os21, import_node_path102, v8, BUILDERS, cacheDir4;
15901
16201
  var init_genrule_archives = __esm({
15902
16202
  "src/genrule-archives.ts"() {
15903
16203
  "use strict";
15904
16204
  import_node_child_process48 = require("node:child_process");
15905
- import_node_crypto59 = require("node:crypto");
15906
- import_node_fs98 = __toESM(require("node:fs"), 1);
16205
+ import_node_crypto60 = require("node:crypto");
16206
+ import_node_fs99 = __toESM(require("node:fs"), 1);
15907
16207
  import_node_os21 = __toESM(require("node:os"), 1);
15908
- import_node_path101 = __toESM(require("node:path"), 1);
16208
+ import_node_path102 = __toESM(require("node:path"), 1);
15909
16209
  v8 = __toESM(require("peachsim/vendor/valibot"), 1);
15910
16210
  init_ffmpeg_source_build();
15911
16211
  init_genrule_library_builds();
@@ -15920,7 +16220,7 @@ var init_genrule_archives = __esm({
15920
16220
  init_swiftRuntimeProductContract();
15921
16221
  init_swiftTargetContract();
15922
16222
  BUILDERS = [ffmpegBuilder, ...GENRULE_LIBRARY_BUILDERS];
15923
- cacheDir4 = import_node_path101.default.join(cacheDir(), "genrule-archives");
16223
+ cacheDir4 = import_node_path102.default.join(cacheDir(), "genrule-archives");
15924
16224
  }
15925
16225
  });
15926
16226
 
@@ -15933,15 +16233,15 @@ var init_native_slices = __esm({
15933
16233
  });
15934
16234
 
15935
16235
  // src/native-swift-slices.ts
15936
- var import_node_child_process49, import_node_crypto60, import_node_fs99, import_node_os22, import_node_path102;
16236
+ var import_node_child_process49, import_node_crypto61, import_node_fs100, import_node_os22, import_node_path103;
15937
16237
  var init_native_swift_slices = __esm({
15938
16238
  "src/native-swift-slices.ts"() {
15939
16239
  "use strict";
15940
16240
  import_node_child_process49 = require("node:child_process");
15941
- import_node_crypto60 = require("node:crypto");
15942
- import_node_fs99 = __toESM(require("node:fs"), 1);
16241
+ import_node_crypto61 = require("node:crypto");
16242
+ import_node_fs100 = __toESM(require("node:fs"), 1);
15943
16243
  import_node_os22 = __toESM(require("node:os"), 1);
15944
- import_node_path102 = __toESM(require("node:path"), 1);
16244
+ import_node_path103 = __toESM(require("node:path"), 1);
15945
16245
  init_native_prebuilt();
15946
16246
  init_swift_compile();
15947
16247
  init_swift_toolchain();
@@ -15950,22 +16250,22 @@ var init_native_swift_slices = __esm({
15950
16250
  });
15951
16251
 
15952
16252
  // src/output-lock-stdio.ts
15953
- var import_node_fs100;
16253
+ var import_node_fs101;
15954
16254
  var init_output_lock_stdio = __esm({
15955
16255
  "src/output-lock-stdio.ts"() {
15956
16256
  "use strict";
15957
- import_node_fs100 = require("node:fs");
16257
+ import_node_fs101 = require("node:fs");
15958
16258
  }
15959
16259
  });
15960
16260
 
15961
16261
  // src/swift-cxx-declarations.ts
15962
- var import_node_fs101, import_node_path103, import_promises12, import_stream_json;
16262
+ var import_node_fs102, import_node_path104, import_promises13, import_stream_json;
15963
16263
  var init_swift_cxx_declarations = __esm({
15964
16264
  "src/swift-cxx-declarations.ts"() {
15965
16265
  "use strict";
15966
- import_node_fs101 = __toESM(require("node:fs"), 1);
15967
- import_node_path103 = __toESM(require("node:path"), 1);
15968
- import_promises12 = require("node:stream/promises");
16266
+ import_node_fs102 = __toESM(require("node:fs"), 1);
16267
+ import_node_path104 = __toESM(require("node:path"), 1);
16268
+ import_promises13 = require("node:stream/promises");
15969
16269
  import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
15970
16270
  }
15971
16271
  });
@@ -15978,13 +16278,13 @@ var init_swift_cxx_deps = __esm({
15978
16278
  });
15979
16279
 
15980
16280
  // src/swift-cxx-standin.ts
15981
- var import_node_child_process50, import_node_fs102, import_node_path104;
16281
+ var import_node_child_process50, import_node_fs103, import_node_path105;
15982
16282
  var init_swift_cxx_standin = __esm({
15983
16283
  "src/swift-cxx-standin.ts"() {
15984
16284
  "use strict";
15985
16285
  import_node_child_process50 = require("node:child_process");
15986
- import_node_fs102 = __toESM(require("node:fs"), 1);
15987
- import_node_path104 = __toESM(require("node:path"), 1);
16286
+ import_node_fs103 = __toESM(require("node:fs"), 1);
16287
+ import_node_path105 = __toESM(require("node:path"), 1);
15988
16288
  init_swift_cxx_declarations();
15989
16289
  init_swift_cxx_deps();
15990
16290
  init_swift_objc_standin();
@@ -16002,14 +16302,14 @@ var init_swift_standin_builtin_behavior = __esm({
16002
16302
  });
16003
16303
 
16004
16304
  // src/swift-standins.ts
16005
- var import_node_child_process51, import_node_crypto61, import_node_fs103, import_node_path105, cacheDir5;
16305
+ var import_node_child_process51, import_node_crypto62, import_node_fs104, import_node_path106, cacheDir5;
16006
16306
  var init_swift_standins = __esm({
16007
16307
  "src/swift-standins.ts"() {
16008
16308
  "use strict";
16009
16309
  import_node_child_process51 = require("node:child_process");
16010
- import_node_crypto61 = require("node:crypto");
16011
- import_node_fs103 = __toESM(require("node:fs"), 1);
16012
- import_node_path105 = __toESM(require("node:path"), 1);
16310
+ import_node_crypto62 = require("node:crypto");
16311
+ import_node_fs104 = __toESM(require("node:fs"), 1);
16312
+ import_node_path106 = __toESM(require("node:path"), 1);
16013
16313
  init_forked_script_contract();
16014
16314
  init_genrule_archives();
16015
16315
  init_home_paths();
@@ -16037,19 +16337,19 @@ var init_swift_standins = __esm({
16037
16337
  init_swift_xcframework();
16038
16338
  init_swiftContract();
16039
16339
  init_swiftTargetContract();
16040
- cacheDir5 = import_node_path105.default.join(cacheDir(), "swift-standins");
16340
+ cacheDir5 = import_node_path106.default.join(cacheDir(), "swift-standins");
16041
16341
  }
16042
16342
  });
16043
16343
 
16044
16344
  // src/swift-objc-compile.ts
16045
- var import_node_child_process52, import_node_crypto62, import_node_fs104, import_node_path106;
16345
+ var import_node_child_process52, import_node_crypto63, import_node_fs105, import_node_path107;
16046
16346
  var init_swift_objc_compile = __esm({
16047
16347
  "src/swift-objc-compile.ts"() {
16048
16348
  "use strict";
16049
16349
  import_node_child_process52 = require("node:child_process");
16050
- import_node_crypto62 = require("node:crypto");
16051
- import_node_fs104 = __toESM(require("node:fs"), 1);
16052
- import_node_path106 = __toESM(require("node:path"), 1);
16350
+ import_node_crypto63 = require("node:crypto");
16351
+ import_node_fs105 = __toESM(require("node:fs"), 1);
16352
+ import_node_path107 = __toESM(require("node:path"), 1);
16053
16353
  init_mapLimit();
16054
16354
  init_home_paths();
16055
16355
  init_is_record();
@@ -16072,13 +16372,13 @@ var init_swift_objc_compile = __esm({
16072
16372
  });
16073
16373
 
16074
16374
  // src/react-native-bridge-modules.ts
16075
- var import_node_fs105, import_node_module13, import_node_path107;
16375
+ var import_node_fs106, import_node_module14, import_node_path108;
16076
16376
  var init_react_native_bridge_modules = __esm({
16077
16377
  "src/react-native-bridge-modules.ts"() {
16078
16378
  "use strict";
16079
- import_node_fs105 = __toESM(require("node:fs"), 1);
16080
- import_node_module13 = require("node:module");
16081
- import_node_path107 = __toESM(require("node:path"), 1);
16379
+ import_node_fs106 = __toESM(require("node:fs"), 1);
16380
+ import_node_module14 = require("node:module");
16381
+ import_node_path108 = __toESM(require("node:path"), 1);
16082
16382
  init_answeredNativePackages();
16083
16383
  init_swift_compile();
16084
16384
  init_swift_objc_compile();
@@ -16088,14 +16388,14 @@ var init_react_native_bridge_modules = __esm({
16088
16388
  });
16089
16389
 
16090
16390
  // src/react-native-core.ts
16091
- var import_node_crypto63, import_node_fs106, import_node_module14, import_node_path108, import_node_util11, recipe;
16391
+ var import_node_crypto64, import_node_fs107, import_node_module15, import_node_path109, import_node_util11, recipe;
16092
16392
  var init_react_native_core = __esm({
16093
16393
  "src/react-native-core.ts"() {
16094
16394
  "use strict";
16095
- import_node_crypto63 = require("node:crypto");
16096
- import_node_fs106 = __toESM(require("node:fs"), 1);
16097
- import_node_module14 = require("node:module");
16098
- import_node_path108 = __toESM(require("node:path"), 1);
16395
+ import_node_crypto64 = require("node:crypto");
16396
+ import_node_fs107 = __toESM(require("node:fs"), 1);
16397
+ import_node_module15 = require("node:module");
16398
+ import_node_path109 = __toESM(require("node:path"), 1);
16099
16399
  import_node_util11 = require("node:util");
16100
16400
  init_home_paths();
16101
16401
  init_is_record();
@@ -16111,14 +16411,14 @@ var init_react_native_core = __esm({
16111
16411
  });
16112
16412
 
16113
16413
  // src/swift-clang-type-ownership.ts
16114
- var import_node_child_process53, import_node_crypto64, import_node_fs107, import_node_path109;
16414
+ var import_node_child_process53, import_node_crypto65, import_node_fs108, import_node_path110;
16115
16415
  var init_swift_clang_type_ownership = __esm({
16116
16416
  "src/swift-clang-type-ownership.ts"() {
16117
16417
  "use strict";
16118
16418
  import_node_child_process53 = require("node:child_process");
16119
- import_node_crypto64 = require("node:crypto");
16120
- import_node_fs107 = __toESM(require("node:fs"), 1);
16121
- import_node_path109 = __toESM(require("node:path"), 1);
16419
+ import_node_crypto65 = require("node:crypto");
16420
+ import_node_fs108 = __toESM(require("node:fs"), 1);
16421
+ import_node_path110 = __toESM(require("node:path"), 1);
16122
16422
  init_is_record();
16123
16423
  init_swift_compile();
16124
16424
  init_swift_distribution();
@@ -16191,10 +16491,10 @@ var require_path_parse = __commonJS({
16191
16491
  code === 45 || /* - */
16192
16492
  code === 46;
16193
16493
  }
16194
- function State(path111) {
16494
+ function State(path112) {
16195
16495
  this.index = 0;
16196
- this.path = path111;
16197
- this.max = path111.length;
16496
+ this.path = path112;
16497
+ this.max = path112.length;
16198
16498
  this.result = [];
16199
16499
  this.param = 0;
16200
16500
  this.err = "";
@@ -16568,7 +16868,7 @@ var require_a2c = __commonJS({
16568
16868
  }
16569
16869
  return sign * Math.acos(dot);
16570
16870
  }
16571
- function get_arc_center(x1, y1, x2, y2, fa, fs82, rx, ry, sin_phi, cos_phi) {
16871
+ function get_arc_center(x1, y1, x2, y2, fa, fs83, rx, ry, sin_phi, cos_phi) {
16572
16872
  var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
16573
16873
  var y1p = -sin_phi * (x1 - x2) / 2 + cos_phi * (y1 - y2) / 2;
16574
16874
  var rx_sq = rx * rx;
@@ -16580,7 +16880,7 @@ var require_a2c = __commonJS({
16580
16880
  radicant = 0;
16581
16881
  }
16582
16882
  radicant /= rx_sq * y1p_sq + ry_sq * x1p_sq;
16583
- radicant = Math.sqrt(radicant) * (fa === fs82 ? -1 : 1);
16883
+ radicant = Math.sqrt(radicant) * (fa === fs83 ? -1 : 1);
16584
16884
  var cxp = radicant * rx / ry * y1p;
16585
16885
  var cyp = radicant * -ry / rx * x1p;
16586
16886
  var cx = cos_phi * cxp - sin_phi * cyp + (x1 + x2) / 2;
@@ -16591,10 +16891,10 @@ var require_a2c = __commonJS({
16591
16891
  var v2y = (-y1p - cyp) / ry;
16592
16892
  var theta1 = unit_vector_angle(1, 0, v1x, v1y);
16593
16893
  var delta_theta = unit_vector_angle(v1x, v1y, v2x, v2y);
16594
- if (fs82 === 0 && delta_theta > 0) {
16894
+ if (fs83 === 0 && delta_theta > 0) {
16595
16895
  delta_theta -= TAU;
16596
16896
  }
16597
- if (fs82 === 1 && delta_theta < 0) {
16897
+ if (fs83 === 1 && delta_theta < 0) {
16598
16898
  delta_theta += TAU;
16599
16899
  }
16600
16900
  return [cx, cy, theta1, delta_theta];
@@ -16607,7 +16907,7 @@ var require_a2c = __commonJS({
16607
16907
  var y2 = Math.sin(theta1 + delta_theta);
16608
16908
  return [x1, y1, x1 - y1 * alpha, y1 + x1 * alpha, x2 + y2 * alpha, y2 - x2 * alpha, x2, y2];
16609
16909
  }
16610
- module2.exports = function a2c(x1, y1, x2, y2, fa, fs82, rx, ry, phi) {
16910
+ module2.exports = function a2c(x1, y1, x2, y2, fa, fs83, rx, ry, phi) {
16611
16911
  var sin_phi = Math.sin(phi * TAU / 360);
16612
16912
  var cos_phi = Math.cos(phi * TAU / 360);
16613
16913
  var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
@@ -16625,7 +16925,7 @@ var require_a2c = __commonJS({
16625
16925
  rx *= Math.sqrt(lambda);
16626
16926
  ry *= Math.sqrt(lambda);
16627
16927
  }
16628
- var cc = get_arc_center(x1, y1, x2, y2, fa, fs82, rx, ry, sin_phi, cos_phi);
16928
+ var cc = get_arc_center(x1, y1, x2, y2, fa, fs83, rx, ry, sin_phi, cos_phi);
16629
16929
  var result = [];
16630
16930
  var theta1 = cc[2];
16631
16931
  var delta_theta = cc[3];
@@ -16714,11 +17014,11 @@ var require_svgpath = __commonJS({
16714
17014
  var matrix = require_matrix();
16715
17015
  var a2c = require_a2c();
16716
17016
  var ellipse = require_ellipse();
16717
- function SvgPath(path111) {
17017
+ function SvgPath(path112) {
16718
17018
  if (!(this instanceof SvgPath)) {
16719
- return new SvgPath(path111);
17019
+ return new SvgPath(path112);
16720
17020
  }
16721
- var pstate = pathParse(path111);
17021
+ var pstate = pathParse(path112);
16722
17022
  this.segments = pstate.segments;
16723
17023
  this.err = pstate.err;
16724
17024
  this.__stack = [];
@@ -17174,24 +17474,24 @@ var init_stringCatalog = __esm({
17174
17474
  });
17175
17475
 
17176
17476
  // src/core-data-entity-classes.ts
17177
- var import_node_fs108, import_node_path110;
17477
+ var import_node_fs109, import_node_path111;
17178
17478
  var init_core_data_entity_classes = __esm({
17179
17479
  "src/core-data-entity-classes.ts"() {
17180
17480
  "use strict";
17181
- import_node_fs108 = require("node:fs");
17182
- import_node_path110 = __toESM(require("node:path"), 1);
17481
+ import_node_fs109 = require("node:fs");
17482
+ import_node_path111 = __toESM(require("node:path"), 1);
17183
17483
  init_plist();
17184
17484
  }
17185
17485
  });
17186
17486
 
17187
17487
  // src/core-data-model.ts
17188
- var import_node_crypto65, import_node_fs109, import_node_path111, uid, NULL;
17488
+ var import_node_crypto66, import_node_fs110, import_node_path112, uid, NULL;
17189
17489
  var init_core_data_model = __esm({
17190
17490
  "src/core-data-model.ts"() {
17191
17491
  "use strict";
17192
- import_node_crypto65 = require("node:crypto");
17193
- import_node_fs109 = require("node:fs");
17194
- import_node_path111 = __toESM(require("node:path"), 1);
17492
+ import_node_crypto66 = require("node:crypto");
17493
+ import_node_fs110 = require("node:fs");
17494
+ import_node_path112 = __toESM(require("node:path"), 1);
17195
17495
  init_core_data_entity_classes();
17196
17496
  init_plist_bytes();
17197
17497
  uid = (index) => ({ CF$UID: index });
@@ -19299,14 +19599,14 @@ var init_swift_catalog_png = __esm({
19299
19599
  });
19300
19600
 
19301
19601
  // src/swift-cxx-reachable.ts
19302
- var import_node_child_process54, import_node_crypto66, import_node_fs110, import_node_path112;
19602
+ var import_node_child_process54, import_node_crypto67, import_node_fs111, import_node_path113;
19303
19603
  var init_swift_cxx_reachable = __esm({
19304
19604
  "src/swift-cxx-reachable.ts"() {
19305
19605
  "use strict";
19306
19606
  import_node_child_process54 = require("node:child_process");
19307
- import_node_crypto66 = require("node:crypto");
19308
- import_node_fs110 = __toESM(require("node:fs"), 1);
19309
- import_node_path112 = __toESM(require("node:path"), 1);
19607
+ import_node_crypto67 = require("node:crypto");
19608
+ import_node_fs111 = __toESM(require("node:fs"), 1);
19609
+ import_node_path113 = __toESM(require("node:path"), 1);
19310
19610
  init_is_record();
19311
19611
  init_swift_cxx_deps();
19312
19612
  init_swift_objc_compile();
@@ -19319,14 +19619,14 @@ var init_swift_cxx_reachable = __esm({
19319
19619
  });
19320
19620
 
19321
19621
  // src/swift-pdf-raster.ts
19322
- var import_node_child_process55, import_node_fs111, import_node_os23, import_node_path113;
19622
+ var import_node_child_process55, import_node_fs112, import_node_os23, import_node_path114;
19323
19623
  var init_swift_pdf_raster = __esm({
19324
19624
  "src/swift-pdf-raster.ts"() {
19325
19625
  "use strict";
19326
19626
  import_node_child_process55 = require("node:child_process");
19327
- import_node_fs111 = __toESM(require("node:fs"), 1);
19627
+ import_node_fs112 = __toESM(require("node:fs"), 1);
19328
19628
  import_node_os23 = __toESM(require("node:os"), 1);
19329
- import_node_path113 = __toESM(require("node:path"), 1);
19629
+ import_node_path114 = __toESM(require("node:path"), 1);
19330
19630
  init_internal_child_contract();
19331
19631
  init_self_invocation();
19332
19632
  init_home_paths();
@@ -19345,16 +19645,16 @@ var init_swift_standin_config = __esm({
19345
19645
  });
19346
19646
 
19347
19647
  // src/swift-host.ts
19348
- var import_node_async_hooks2, import_node_child_process56, import_node_crypto67, import_node_fs112, import_node_os24, import_node_path114, projectScope, layoutScope, IOS_SDK_FRAMEWORKS;
19648
+ var import_node_async_hooks2, import_node_child_process56, import_node_crypto68, import_node_fs113, import_node_os24, import_node_path115, projectScope, layoutScope, IOS_SDK_FRAMEWORKS;
19349
19649
  var init_swift_host = __esm({
19350
19650
  "src/swift-host.ts"() {
19351
19651
  "use strict";
19352
19652
  import_node_async_hooks2 = require("node:async_hooks");
19353
19653
  import_node_child_process56 = require("node:child_process");
19354
- import_node_crypto67 = require("node:crypto");
19355
- import_node_fs112 = __toESM(require("node:fs"), 1);
19654
+ import_node_crypto68 = require("node:crypto");
19655
+ import_node_fs113 = __toESM(require("node:fs"), 1);
19356
19656
  import_node_os24 = __toESM(require("node:os"), 1);
19357
- import_node_path114 = __toESM(require("node:path"), 1);
19657
+ import_node_path115 = __toESM(require("node:path"), 1);
19358
19658
  init_nativeDyldTableContract();
19359
19659
  init_nativeSdkBindingContract();
19360
19660
  init_bundleAssets();
@@ -19401,13 +19701,13 @@ var init_swift_host = __esm({
19401
19701
  });
19402
19702
 
19403
19703
  // src/installed-native-libraries.ts
19404
- var import_node_fs113, import_node_module15, import_node_path115;
19704
+ var import_node_fs114, import_node_module16, import_node_path116;
19405
19705
  var init_installed_native_libraries = __esm({
19406
19706
  "src/installed-native-libraries.ts"() {
19407
19707
  "use strict";
19408
- import_node_fs113 = __toESM(require("node:fs"), 1);
19409
- import_node_module15 = require("node:module");
19410
- import_node_path115 = __toESM(require("node:path"), 1);
19708
+ import_node_fs114 = __toESM(require("node:fs"), 1);
19709
+ import_node_module16 = require("node:module");
19710
+ import_node_path116 = __toESM(require("node:path"), 1);
19411
19711
  init_is_record();
19412
19712
  init_native_static_libraries();
19413
19713
  init_swift_source_file();
@@ -19417,15 +19717,15 @@ var init_installed_native_libraries = __esm({
19417
19717
  });
19418
19718
 
19419
19719
  // src/turbo-codegen-intake.ts
19420
- var import_node_child_process57, import_node_crypto68, import_node_fs114, import_node_module16, import_node_path116, import_node_util12, run5;
19720
+ var import_node_child_process57, import_node_crypto69, import_node_fs115, import_node_module17, import_node_path117, import_node_util12, run5;
19421
19721
  var init_turbo_codegen_intake = __esm({
19422
19722
  "src/turbo-codegen-intake.ts"() {
19423
19723
  "use strict";
19424
19724
  import_node_child_process57 = require("node:child_process");
19425
- import_node_crypto68 = require("node:crypto");
19426
- import_node_fs114 = __toESM(require("node:fs"), 1);
19427
- import_node_module16 = require("node:module");
19428
- import_node_path116 = __toESM(require("node:path"), 1);
19725
+ import_node_crypto69 = require("node:crypto");
19726
+ import_node_fs115 = __toESM(require("node:fs"), 1);
19727
+ import_node_module17 = require("node:module");
19728
+ import_node_path117 = __toESM(require("node:path"), 1);
19429
19729
  import_node_util12 = require("node:util");
19430
19730
  init_forked_script_contract();
19431
19731
  init_is_record();
@@ -19436,13 +19736,13 @@ var init_turbo_codegen_intake = __esm({
19436
19736
  });
19437
19737
 
19438
19738
  // src/turbo-source.ts
19439
- var import_node_crypto69, import_node_fs115, import_node_path117;
19739
+ var import_node_crypto70, import_node_fs116, import_node_path118;
19440
19740
  var init_turbo_source = __esm({
19441
19741
  "src/turbo-source.ts"() {
19442
19742
  "use strict";
19443
- import_node_crypto69 = require("node:crypto");
19444
- import_node_fs115 = __toESM(require("node:fs"), 1);
19445
- import_node_path117 = __toESM(require("node:path"), 1);
19743
+ import_node_crypto70 = require("node:crypto");
19744
+ import_node_fs116 = __toESM(require("node:fs"), 1);
19745
+ import_node_path118 = __toESM(require("node:path"), 1);
19446
19746
  init_cocoapods_trunk();
19447
19747
  init_installed_native_libraries();
19448
19748
  init_pod_sources();
@@ -19460,17 +19760,17 @@ var init_turbo_source = __esm({
19460
19760
  });
19461
19761
 
19462
19762
  // src/expo-swift-host.ts
19463
- var import_node_async_hooks3, import_node_child_process58, import_node_crypto70, import_node_fs116, import_node_module17, import_node_os25, import_node_path118, import_node_url5, import_node_util13, run6, scriptEnv, traceStore, openPreparations;
19763
+ var import_node_async_hooks3, import_node_child_process58, import_node_crypto71, import_node_fs117, import_node_module18, import_node_os25, import_node_path119, import_node_url5, import_node_util13, run6, scriptEnv, traceStore, openPreparations;
19464
19764
  var init_expo_swift_host = __esm({
19465
19765
  "src/expo-swift-host.ts"() {
19466
19766
  "use strict";
19467
19767
  import_node_async_hooks3 = require("node:async_hooks");
19468
19768
  import_node_child_process58 = require("node:child_process");
19469
- import_node_crypto70 = require("node:crypto");
19470
- import_node_fs116 = __toESM(require("node:fs"), 1);
19471
- import_node_module17 = require("node:module");
19769
+ import_node_crypto71 = require("node:crypto");
19770
+ import_node_fs117 = __toESM(require("node:fs"), 1);
19771
+ import_node_module18 = require("node:module");
19472
19772
  import_node_os25 = __toESM(require("node:os"), 1);
19473
- import_node_path118 = __toESM(require("node:path"), 1);
19773
+ import_node_path119 = __toESM(require("node:path"), 1);
19474
19774
  import_node_url5 = require("node:url");
19475
19775
  import_node_util13 = require("node:util");
19476
19776
  init_expo_eager_seam_contract();
@@ -19535,14 +19835,14 @@ function expoPodsBundleInputs(podKeys, oneSDK = false) {
19535
19835
  )
19536
19836
  };
19537
19837
  }
19538
- var import_node_child_process59, import_node_fs117, import_node_os26, import_node_path119, v9, sliceTargetSchema, resourceBundleSchema, sliceManifestSchema, expoAppBundleEntryUrl;
19838
+ var import_node_child_process59, import_node_fs118, import_node_os26, import_node_path120, v9, sliceTargetSchema, resourceBundleSchema, sliceManifestSchema, expoAppBundleEntryUrl;
19539
19839
  var init_native_package_slice = __esm({
19540
19840
  "src/native-package-slice.ts"() {
19541
19841
  "use strict";
19542
19842
  import_node_child_process59 = require("node:child_process");
19543
- import_node_fs117 = __toESM(require("node:fs"), 1);
19843
+ import_node_fs118 = __toESM(require("node:fs"), 1);
19544
19844
  import_node_os26 = __toESM(require("node:os"), 1);
19545
- import_node_path119 = __toESM(require("node:path"), 1);
19845
+ import_node_path120 = __toESM(require("node:path"), 1);
19546
19846
  v9 = __toESM(require("peachsim/vendor/valibot"), 1);
19547
19847
  init_expo_swift_host();
19548
19848
  init_expoSwiftContract();
@@ -19619,10 +19919,10 @@ async function expoPodPackages(appRoot) {
19619
19919
  const answered = peachAnsweredNativePackages();
19620
19920
  return (await expoAutolinkedPackages(appRoot)).flatMap((pod) => {
19621
19921
  const [swiftModule] = pod.swiftModuleNames;
19622
- if (swiftModule === void 0 || pod.swiftModuleNames.length !== 1 || !pod.hasRegistrations || answered.has(pod.name) || !pod.root.split(import_node_path120.default.sep).includes("node_modules"))
19922
+ if (swiftModule === void 0 || pod.swiftModuleNames.length !== 1 || !pod.hasRegistrations || answered.has(pod.name) || !pod.root.split(import_node_path121.default.sep).includes("node_modules"))
19623
19923
  return [];
19624
19924
  const manifest = JSON.parse(
19625
- import_node_fs118.default.readFileSync(import_node_path120.default.join(pod.root, "package.json"), "utf8")
19925
+ import_node_fs119.default.readFileSync(import_node_path121.default.join(pod.root, "package.json"), "utf8")
19626
19926
  );
19627
19927
  const version = isRecord(manifest) ? manifest.version : null;
19628
19928
  if (typeof version !== "string")
@@ -19665,7 +19965,7 @@ function lookup2(url) {
19665
19965
  return pending;
19666
19966
  }
19667
19967
  async function prebuiltExpoPods(appRoot) {
19668
- const pods = await expoPodPackages(import_node_fs118.default.realpathSync(appRoot));
19968
+ const pods = await expoPodPackages(import_node_fs119.default.realpathSync(appRoot));
19669
19969
  if (pods.length === 0) {
19670
19970
  console.error(`expo pod miss: no packages at ${appRoot}`);
19671
19971
  return null;
@@ -19729,12 +20029,12 @@ async function prebuiltExpoPods(appRoot) {
19729
20029
  failures: []
19730
20030
  };
19731
20031
  }
19732
- var import_node_fs118, import_node_path120, expoPodEntryName, expoPodEntryUrl, published;
20032
+ var import_node_fs119, import_node_path121, expoPodEntryName, expoPodEntryUrl, published;
19733
20033
  var init_expo_pod_prebuilt = __esm({
19734
20034
  "src/expo-pod-prebuilt.ts"() {
19735
20035
  "use strict";
19736
- import_node_fs118 = __toESM(require("node:fs"), 1);
19737
- import_node_path120 = __toESM(require("node:path"), 1);
20036
+ import_node_fs119 = __toESM(require("node:fs"), 1);
20037
+ import_node_path121 = __toESM(require("node:path"), 1);
19738
20038
  init_answeredNativePackages();
19739
20039
  init_expo_autolinking();
19740
20040
  init_expo_native_compiler_digest();
@@ -22332,11 +22632,11 @@ function missing(error) {
22332
22632
  }
22333
22633
  async function answerAsync(step) {
22334
22634
  try {
22335
- if (step.type === "realpath") return await import_node_fs119.default.promises.realpath(step.path);
22336
- if (step.type === "read") return await import_node_fs119.default.promises.readFile(step.path, "utf8");
22635
+ if (step.type === "realpath") return await import_node_fs120.default.promises.realpath(step.path);
22636
+ if (step.type === "read") return await import_node_fs120.default.promises.readFile(step.path, "utf8");
22337
22637
  if (step.type === "isDirectory")
22338
- return (await import_node_fs119.default.promises.stat(step.path)).isDirectory();
22339
- return (await import_node_fs119.default.promises.readdir(step.path, { withFileTypes: true })).map(
22638
+ return (await import_node_fs120.default.promises.stat(step.path)).isDirectory();
22639
+ return (await import_node_fs120.default.promises.readdir(step.path, { withFileTypes: true })).map(
22340
22640
  (entry) => ({
22341
22641
  name: entry.name,
22342
22642
  directory: entry.isDirectory(),
@@ -22369,7 +22669,7 @@ function* rubyFiles(directory, seen, iosRoot = false) {
22369
22669
  const files = [];
22370
22670
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
22371
22671
  if (iosRoot && (entry.name === "Pods" || entry.name === "build")) continue;
22372
- const target = import_node_path121.default.join(directory, entry.name);
22672
+ const target = import_node_path122.default.join(directory, entry.name);
22373
22673
  let isDirectory = entry.directory;
22374
22674
  if (entry.symbolicLink)
22375
22675
  isDirectory = (yield { type: "isDirectory", path: target }) === true;
@@ -22382,7 +22682,7 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
22382
22682
  let sensorOptions = {};
22383
22683
  const sensors = versions["expo-sensors"];
22384
22684
  if (sensors && resolveCompatVersionRange([">=58.0.4 <59.0.0"], sensors).status === "matched") {
22385
- const file = import_node_path121.default.join(projectRoot, "ios", "Podfile.properties.json");
22685
+ const file = import_node_path122.default.join(projectRoot, "ios", "Podfile.properties.json");
22386
22686
  const source = yield { type: "read", path: file };
22387
22687
  if (source !== null && typeof source !== "string")
22388
22688
  throw new Error(`cannot inspect ${file}`);
@@ -22398,8 +22698,8 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
22398
22698
  if (!needsRiveOptions(versions)) return sensorOptions;
22399
22699
  if (environment.USE_RIVE_LEGACY === "1" || environment.USE_RIVE_LEGACY === "true")
22400
22700
  return { ...sensorOptions, [RIVE_PACKAGE]: { USE_RIVE_LEGACY: true } };
22401
- const ios = import_node_path121.default.join(projectRoot, "ios");
22402
- const podfile = import_node_path121.default.join(ios, "Podfile");
22701
+ const ios = import_node_path122.default.join(projectRoot, "ios");
22702
+ const podfile = import_node_path122.default.join(ios, "Podfile");
22403
22703
  const files = [podfile, ...yield* rubyFiles(ios, /* @__PURE__ */ new Set(), true)];
22404
22704
  let value = false;
22405
22705
  let assigned = false;
@@ -22427,12 +22727,12 @@ async function readInstalledNativeBuildOptionsAsync(projectRoot, versions, envir
22427
22727
  step = walk2.next(await answerAsync(step.value));
22428
22728
  }
22429
22729
  }
22430
- var import_node_fs119, import_node_path121, RIVE_PACKAGE, RIVE_05;
22730
+ var import_node_fs120, import_node_path122, RIVE_PACKAGE, RIVE_05;
22431
22731
  var init_installed_native_build_options = __esm({
22432
22732
  "src/installed-native-build-options.ts"() {
22433
22733
  "use strict";
22434
- import_node_fs119 = __toESM(require("node:fs"), 1);
22435
- import_node_path121 = __toESM(require("node:path"), 1);
22734
+ import_node_fs120 = __toESM(require("node:fs"), 1);
22735
+ import_node_path122 = __toESM(require("node:path"), 1);
22436
22736
  init_version_range();
22437
22737
  RIVE_PACKAGE = "@rive-app/react-native";
22438
22738
  RIVE_05 = [">=0.5.0 <0.6.0"];
@@ -22898,24 +23198,24 @@ var init_dev_bundle_resolution = __esm({
22898
23198
  });
22899
23199
 
22900
23200
  // src/settings-bundle.ts
22901
- var import_promises13, import_node_path122;
23201
+ var import_promises14, import_node_path123;
22902
23202
  var init_settings_bundle = __esm({
22903
23203
  "src/settings-bundle.ts"() {
22904
23204
  "use strict";
22905
- import_promises13 = require("node:fs/promises");
22906
- import_node_path122 = require("node:path");
23205
+ import_promises14 = require("node:fs/promises");
23206
+ import_node_path123 = require("node:path");
22907
23207
  init_is_record();
22908
23208
  init_plist();
22909
23209
  }
22910
23210
  });
22911
23211
 
22912
23212
  // scripts/optional-demo-registry.ts
22913
- var import_node_fs120, import_node_path123, import_node_url6;
23213
+ var import_node_fs121, import_node_path124, import_node_url6;
22914
23214
  var init_optional_demo_registry = __esm({
22915
23215
  "scripts/optional-demo-registry.ts"() {
22916
23216
  "use strict";
22917
- import_node_fs120 = require("node:fs");
22918
- import_node_path123 = require("node:path");
23217
+ import_node_fs121 = require("node:fs");
23218
+ import_node_path124 = require("node:path");
22919
23219
  import_node_url6 = require("node:url");
22920
23220
  }
22921
23221
  });
@@ -22936,8 +23236,8 @@ function pidIsAlive(pid) {
22936
23236
  }
22937
23237
  function readLockOwner() {
22938
23238
  try {
22939
- const raw = (0, import_node_fs121.readFileSync)(LISTENER_LOCK_PATH, "utf8");
22940
- const mtimeMs = (0, import_node_fs121.statSync)(LISTENER_LOCK_PATH).mtimeMs;
23239
+ const raw = (0, import_node_fs122.readFileSync)(LISTENER_LOCK_PATH, "utf8");
23240
+ const mtimeMs = (0, import_node_fs122.statSync)(LISTENER_LOCK_PATH).mtimeMs;
22941
23241
  const pid = Number(raw.split("-")[0]);
22942
23242
  return { raw, pid: Number.isInteger(pid) ? pid : -1, mtimeMs };
22943
23243
  } catch {
@@ -22950,15 +23250,15 @@ function lockIsAbandoned(owner) {
22950
23250
  }
22951
23251
  function clearLock(raw) {
22952
23252
  try {
22953
- if ((0, import_node_fs121.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
22954
- (0, import_node_fs121.unlinkSync)(LISTENER_LOCK_PATH);
23253
+ if ((0, import_node_fs122.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
23254
+ (0, import_node_fs122.unlinkSync)(LISTENER_LOCK_PATH);
22955
23255
  } catch {
22956
23256
  }
22957
23257
  }
22958
23258
  function readResult() {
22959
23259
  try {
22960
23260
  const parsed = JSON.parse(
22961
- (0, import_node_fs121.readFileSync)(LISTENER_RESULT_PATH, "utf8")
23261
+ (0, import_node_fs122.readFileSync)(LISTENER_RESULT_PATH, "utf8")
22962
23262
  );
22963
23263
  if (!parsed || typeof parsed.token !== "string" || typeof parsed.key !== "string")
22964
23264
  return null;
@@ -22969,8 +23269,8 @@ function readResult() {
22969
23269
  }
22970
23270
  function publishResult(payload) {
22971
23271
  const tmp = `${LISTENER_RESULT_PATH}.${process.pid}.tmp`;
22972
- (0, import_node_fs121.writeFileSync)(tmp, JSON.stringify(payload));
22973
- (0, import_node_fs121.renameSync)(tmp, LISTENER_RESULT_PATH);
23272
+ (0, import_node_fs122.writeFileSync)(tmp, JSON.stringify(payload));
23273
+ (0, import_node_fs122.renameSync)(tmp, LISTENER_RESULT_PATH);
22974
23274
  }
22975
23275
  function throwPublished(payload) {
22976
23276
  throw Object.assign(new Error(payload.message || "listener scan failed"), {
@@ -23013,7 +23313,7 @@ async function withListenerLock(key, body) {
23013
23313
  for (; ; ) {
23014
23314
  let fd = null;
23015
23315
  try {
23016
- fd = (0, import_node_fs121.openSync)(LISTENER_LOCK_PATH, "wx");
23316
+ fd = (0, import_node_fs122.openSync)(LISTENER_LOCK_PATH, "wx");
23017
23317
  } catch (error) {
23018
23318
  const code = error instanceof Error && "code" in error ? error.code : "";
23019
23319
  if (code !== "EEXIST") throw error;
@@ -23022,7 +23322,7 @@ async function withListenerLock(key, body) {
23022
23322
  if (owner) clearLock(owner.raw);
23023
23323
  else {
23024
23324
  try {
23025
- (0, import_node_fs121.unlinkSync)(LISTENER_LOCK_PATH);
23325
+ (0, import_node_fs122.unlinkSync)(LISTENER_LOCK_PATH);
23026
23326
  } catch {
23027
23327
  }
23028
23328
  }
@@ -23038,7 +23338,7 @@ async function withListenerLock(key, body) {
23038
23338
  }
23039
23339
  if (fd === null) continue;
23040
23340
  try {
23041
- (0, import_node_fs121.writeSync)(fd, token);
23341
+ (0, import_node_fs122.writeSync)(fd, token);
23042
23342
  try {
23043
23343
  const value = await body();
23044
23344
  publishResult({ token, key, ok: true, value });
@@ -23055,7 +23355,7 @@ async function withListenerLock(key, body) {
23055
23355
  }
23056
23356
  } finally {
23057
23357
  try {
23058
- (0, import_node_fs121.closeSync)(fd);
23358
+ (0, import_node_fs122.closeSync)(fd);
23059
23359
  } catch {
23060
23360
  }
23061
23361
  clearLock(token);
@@ -23285,7 +23585,7 @@ async function flushCwdQueue() {
23285
23585
  const needLsof = [];
23286
23586
  for (const pid of pending) {
23287
23587
  try {
23288
- const cwd = await (0, import_promises14.readlink)(`/proc/${pid}/cwd`);
23588
+ const cwd = await (0, import_promises15.readlink)(`/proc/${pid}/cwd`);
23289
23589
  if (cwd) {
23290
23590
  cwdByPid.set(pid, cwd);
23291
23591
  continue;
@@ -23337,17 +23637,17 @@ function resolveProcessCwd(pid) {
23337
23637
  kickCwdFlush();
23338
23638
  });
23339
23639
  }
23340
- var import_child_process, import_promises14, import_http, import_net, import_node_fs121, import_node_os27, import_node_path124, LISTENER_LOCK_PATH, LISTENER_RESULT_PATH, LISTENER_LOCK_STALE_MS, LISTENER_LOCK_WAIT_MS, FALLBACK_PORTS, LISTING_TIMEOUT_MS, LISTENER_CACHE_MS, listenerCache, inflightListing, listenerHolds, cwdByPid, cwdQueue, cwdFlushing;
23640
+ var import_child_process, import_promises15, import_http, import_net, import_node_fs122, import_node_os27, import_node_path125, LISTENER_LOCK_PATH, LISTENER_RESULT_PATH, LISTENER_LOCK_STALE_MS, LISTENER_LOCK_WAIT_MS, FALLBACK_PORTS, LISTING_TIMEOUT_MS, LISTENER_CACHE_MS, listenerCache, inflightListing, listenerHolds, cwdByPid, cwdQueue, cwdFlushing;
23341
23641
  var init_dev_server_scanner = __esm({
23342
23642
  "scripts/dev-server-scanner.ts"() {
23343
23643
  "use strict";
23344
23644
  import_child_process = require("child_process");
23345
- import_promises14 = require("fs/promises");
23645
+ import_promises15 = require("fs/promises");
23346
23646
  import_http = __toESM(require("http"), 1);
23347
23647
  import_net = __toESM(require("net"), 1);
23348
- import_node_fs121 = require("node:fs");
23648
+ import_node_fs122 = require("node:fs");
23349
23649
  import_node_os27 = require("node:os");
23350
- import_node_path124 = require("node:path");
23650
+ import_node_path125 = require("node:path");
23351
23651
  init_kotlinDiscoveryContract();
23352
23652
  init_swiftDiscoveryContract();
23353
23653
  init_backend_origin();
@@ -23357,8 +23657,8 @@ var init_dev_server_scanner = __esm({
23357
23657
  init_native_dev_bundle_url();
23358
23658
  init_settings_bundle();
23359
23659
  init_optional_demo_registry();
23360
- LISTENER_LOCK_PATH = (0, import_node_path124.join)((0, import_node_os27.tmpdir)(), "peach-listener-scan.lock");
23361
- LISTENER_RESULT_PATH = (0, import_node_path124.join)((0, import_node_os27.tmpdir)(), "peach-listener-scan.result");
23660
+ LISTENER_LOCK_PATH = (0, import_node_path125.join)((0, import_node_os27.tmpdir)(), "peach-listener-scan.lock");
23661
+ LISTENER_RESULT_PATH = (0, import_node_path125.join)((0, import_node_os27.tmpdir)(), "peach-listener-scan.result");
23362
23662
  LISTENER_LOCK_STALE_MS = 25e3;
23363
23663
  LISTENER_LOCK_WAIT_MS = 8e3;
23364
23664
  FALLBACK_PORTS = [
@@ -23487,12 +23787,12 @@ function cliCompanionPath() {
23487
23787
  return `node/cli-${runtime_companion_default.sha256}.cjs`;
23488
23788
  }
23489
23789
  function verifyCliCompanion(root) {
23490
- verifyCompanionFile((0, import_node_path125.join)(root, cliCompanionPath()));
23790
+ verifyCompanionFile((0, import_node_path126.join)(root, cliCompanionPath()));
23491
23791
  }
23492
23792
  function verifyCompanionFile(file) {
23493
23793
  let bytes;
23494
23794
  try {
23495
- bytes = (0, import_node_fs122.readFileSync)(file);
23795
+ bytes = (0, import_node_fs123.readFileSync)(file);
23496
23796
  } catch (error) {
23497
23797
  if (error instanceof Error) {
23498
23798
  const missing2 = "code" in error && error.code === "ENOENT" ? `; run \`peach runtime install\`, which fetches the companion this CLI published${process.platform === "win32" ? ", and check Windows Security protection history if it repeats" : ""}` : "";
@@ -23500,7 +23800,7 @@ function verifyCompanionFile(file) {
23500
23800
  }
23501
23801
  throw error;
23502
23802
  }
23503
- const hash = (0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex");
23803
+ const hash = (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
23504
23804
  if (hash !== runtime_companion_default.sha256) {
23505
23805
  throw new Error(
23506
23806
  "Peach runtime companion does not match this CLI; run `peach runtime install`"
@@ -23511,8 +23811,8 @@ function getCliRuntime() {
23511
23811
  if (loaded) return loaded.runtime;
23512
23812
  const root = peachRuntimeRoot();
23513
23813
  verifyCliCompanion(root);
23514
- const require2 = (0, import_node_module18.createRequire)(__sootsim_import_meta_url);
23515
- const runtime = require2((0, import_node_path125.join)(root, cliCompanionPath()));
23814
+ const require2 = (0, import_node_module19.createRequire)(__sootsim_import_meta_url);
23815
+ const runtime = require2((0, import_node_path126.join)(root, cliCompanionPath()));
23516
23816
  if (runtime.cliCompanionAbi !== CLI_COMPANION_ABI) {
23517
23817
  throw new Error(
23518
23818
  "Incompatible Peach runtime companion ABI; run `peach runtime install`"
@@ -23522,14 +23822,14 @@ function getCliRuntime() {
23522
23822
  loaded = { root, runtime };
23523
23823
  return runtime;
23524
23824
  }
23525
- var import_node_crypto71, import_node_fs122, import_node_module18, import_node_path125, CLI_COMPANION_ABI, loaded;
23825
+ var import_node_crypto72, import_node_fs123, import_node_module19, import_node_path126, CLI_COMPANION_ABI, loaded;
23526
23826
  var init_cli_runtime = __esm({
23527
23827
  "src/cli-runtime.ts"() {
23528
23828
  "use strict";
23529
- import_node_crypto71 = require("node:crypto");
23530
- import_node_fs122 = require("node:fs");
23531
- import_node_module18 = require("node:module");
23532
- import_node_path125 = require("node:path");
23829
+ import_node_crypto72 = require("node:crypto");
23830
+ import_node_fs123 = require("node:fs");
23831
+ import_node_module19 = require("node:module");
23832
+ import_node_path126 = require("node:path");
23533
23833
  init_src();
23534
23834
  init_runtime_companion();
23535
23835
  init_answeredNativePackages();
@@ -23547,7 +23847,7 @@ __export(rolldown_bundle_forward_exports, {
23547
23847
  async function forwardRolldownBundleResponse(upstream, res) {
23548
23848
  res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
23549
23849
  if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
23550
- await (0, import_promises15.pipeline)(upstream, res);
23850
+ await (0, import_promises16.pipeline)(upstream, res);
23551
23851
  return;
23552
23852
  }
23553
23853
  const contentType = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
@@ -23589,14 +23889,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
23589
23889
  }
23590
23890
  yield Buffer.from(annotated.slice(sent), "utf8");
23591
23891
  };
23592
- await (0, import_promises15.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
23892
+ await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
23593
23893
  }
23594
- var import_stream, import_promises15, ROLLDOWN_INVENTORY_HEADER;
23894
+ var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
23595
23895
  var init_rolldown_bundle_forward = __esm({
23596
23896
  "src/host/rolldown-bundle-forward.ts"() {
23597
23897
  "use strict";
23598
23898
  import_stream = require("stream");
23599
- import_promises15 = require("stream/promises");
23899
+ import_promises16 = require("stream/promises");
23600
23900
  init_cli_runtime();
23601
23901
  ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
23602
23902
  }
@@ -23924,7 +24224,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
23924
24224
  await route.respond(proxyRes, hopCookies);
23925
24225
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
23926
24226
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
23927
- await (0, import_promises16.pipeline)(proxyRes, res);
24227
+ await (0, import_promises17.pipeline)(proxyRes, res);
23928
24228
  return;
23929
24229
  }
23930
24230
  if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
@@ -23935,7 +24235,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
23935
24235
  const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
23936
24236
  const redirectUrl = resolveRedirectUrl(location, targetUrl);
23937
24237
  proxyRes.resume();
23938
- await (0, import_promises16.finished)(proxyRes);
24238
+ await (0, import_promises17.finished)(proxyRes);
23939
24239
  await proxy(
23940
24240
  redirectUrl,
23941
24241
  switchToGet ? "GET" : method,
@@ -23953,7 +24253,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
23953
24253
  await forwardRolldownBundleResponse2(proxyRes, res);
23954
24254
  return;
23955
24255
  }
23956
- await (0, import_promises16.pipeline)(proxyRes, res);
24256
+ await (0, import_promises17.pipeline)(proxyRes, res);
23957
24257
  };
23958
24258
  let upstreamAnswered = false;
23959
24259
  let body;
@@ -24008,13 +24308,13 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
24008
24308
  else req.socket.destroy();
24009
24309
  }
24010
24310
  }
24011
- var import_http2, import_https, import_node_http22, import_promises16, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
24311
+ var import_http2, import_https, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
24012
24312
  var init_fetch_proxy_handler = __esm({
24013
24313
  "src/host/fetch-proxy-handler.ts"() {
24014
24314
  import_http2 = __toESM(require("http"), 1);
24015
24315
  import_https = __toESM(require("https"), 1);
24016
24316
  import_node_http22 = require("node:http2");
24017
- import_promises16 = require("stream/promises");
24317
+ import_promises17 = require("stream/promises");
24018
24318
  init_package_versions();
24019
24319
  init_backend_origin();
24020
24320
  init_fetch_proxy_overrides();