peachsim 0.1.1667 → 0.1.1673

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 (178) hide show
  1. package/README.md +1 -1
  2. package/cli/bridge-flow-runner.ts +4 -1
  3. package/cli/commands/coverage-swift.ts +291 -0
  4. package/cli/commands/coverage.ts +168 -24
  5. package/cli/commands/diagnose.ts +1 -19
  6. package/cli/commands/react.ts +3 -18
  7. package/cli/commands/screenshot.ts +1 -1
  8. package/cli/commands/screenshots-capture.ts +1 -1
  9. package/cli/drivers/playwright-provisioning.ts +1 -4
  10. package/cli/drivers/playwright.ts +15 -1
  11. package/cli/scene-video.ts +1 -1
  12. package/cli/ui.ts +20 -0
  13. package/cli/ws-bridge.ts +7 -36
  14. package/detox/frame-identity.cjs +21 -0
  15. package/detox/frame-identity.d.cts +6 -0
  16. package/detox/index.ts +39 -33
  17. package/detox/jest-environment.cjs +4 -1
  18. package/detox/jest-setup-after-env.cjs +0 -4
  19. package/detox/navigation-lifecycle.ts +2 -2
  20. package/detox/proof-observer.ts +126 -0
  21. package/dist-lib/agent-daemon-client.cjs +29 -1
  22. package/dist-lib/agent-events.cjs +1 -1
  23. package/dist-lib/attached-projects.cjs +10 -1
  24. package/dist-lib/auth/shared-session.cjs +1 -1
  25. package/dist-lib/backend-origin.cjs +1 -1
  26. package/dist-lib/beta.cjs +1 -1
  27. package/dist-lib/beta.mjs +1 -1
  28. package/dist-lib/bridge-constants.cjs +1 -1
  29. package/dist-lib/bridge-contract-input.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.mjs +1 -1
  31. package/dist-lib/bridge-contract.cjs +1 -1
  32. package/dist-lib/bridge-contract.mjs +1 -1
  33. package/dist-lib/bundle-channel.cjs +530 -154
  34. package/dist-lib/capture-contract.cjs +1 -1
  35. package/dist-lib/capture-contract.mjs +1 -1
  36. package/dist-lib/cloud-contract.cjs +1 -1
  37. package/dist-lib/cloud-contract.mjs +1 -1
  38. package/dist-lib/cloud-test-args.cjs +1 -1
  39. package/dist-lib/cloud-test-args.mjs +1 -1
  40. package/dist-lib/cloud.cjs +1 -1
  41. package/dist-lib/cloud.mjs +1 -1
  42. package/dist-lib/config.cjs +1 -1
  43. package/dist-lib/config.mjs +1 -1
  44. package/dist-lib/detox/index.cjs +5074 -7353
  45. package/dist-lib/detox/jest-environment.cjs +4 -1
  46. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  47. package/dist-lib/expo-swift-bundle.cjs +578 -151
  48. package/dist-lib/expo-swift-metadata.cjs +1 -1
  49. package/dist-lib/expo-swift-metadata.mjs +1 -1
  50. package/dist-lib/home-paths.cjs +1 -1
  51. package/dist-lib/host/bridge-host.cjs +660 -192
  52. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  53. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  54. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  55. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  56. package/dist-lib/host/websocket-proxy.cjs +1 -1
  57. package/dist-lib/index.cjs +206 -6
  58. package/dist-lib/jump-to-source-babel.cjs +1 -1
  59. package/dist-lib/jump-to-source-native.cjs +1 -1
  60. package/dist-lib/kotlin-host.cjs +1 -1
  61. package/dist-lib/menu.cjs +1 -1
  62. package/dist-lib/menu.mjs +1 -1
  63. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  64. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  65. package/dist-lib/metro-production-bundle.cjs +10 -1
  66. package/dist-lib/metro-production-bundle.mjs +12 -1
  67. package/dist-lib/metro.cjs +155 -5
  68. package/dist-lib/native-app-identity-project.cjs +43 -5
  69. package/dist-lib/native-app-identity-project.mjs +43 -5
  70. package/dist-lib/native-app-identity.cjs +1 -1
  71. package/dist-lib/native-app-identity.mjs +1 -1
  72. package/dist-lib/native-firebase-metadata.cjs +1 -1
  73. package/dist-lib/native-firebase-metadata.mjs +1 -1
  74. package/dist-lib/plist.cjs +1 -1
  75. package/dist-lib/plist.mjs +1 -1
  76. package/dist-lib/profiles.cjs +21 -1
  77. package/dist-lib/public-brand.cjs +1 -1
  78. package/dist-lib/public-origins-lib-esm.json +73 -27
  79. package/dist-lib/public-origins-lib-static.json +1 -1
  80. package/dist-lib/public-origins-lib.json +563 -183
  81. package/dist-lib/react-native-host-modules.cjs +1 -1
  82. package/dist-lib/react-native-host-modules.mjs +1 -1
  83. package/dist-lib/reap-browser.cjs +964 -0
  84. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  85. package/dist-lib/sdk.cjs +1 -1
  86. package/dist-lib/sdk.mjs +1 -1
  87. package/dist-lib/skills.cjs +963 -521
  88. package/dist-lib/swift-compile.cjs +276 -86
  89. package/dist-lib/swift-compile.mjs +276 -86
  90. package/dist-lib/swift-package.cjs +34 -4
  91. package/dist-lib/swift-package.mjs +33 -4
  92. package/dist-lib/swift-submit.cjs +2 -2
  93. package/dist-lib/swift-submit.mjs +2 -2
  94. package/dist-lib/swift-toolchain.cjs +25 -44
  95. package/dist-lib/swift.cjs +1 -1
  96. package/dist-lib/vite-swift.cjs +579 -113
  97. package/dist-lib/vite.cjs +61 -2
  98. package/dist-lib/worklet-executable.cjs +1 -1
  99. package/dist-lib/worklet-executable.mjs +1 -1
  100. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +7 -0
  101. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
  102. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  103. package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +2 -1
  104. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  105. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +3 -1
  106. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +7 -0
  107. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +24 -0
  108. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +4 -2
  109. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -0
  110. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +18 -0
  111. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  112. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  113. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  114. package/package.json +1 -1
  115. package/runtime-companion.json +1 -1
  116. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +2 -0
  117. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +36 -0
  118. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStore.h +439 -0
  119. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreCopySpecific.h +216 -0
  120. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreKey.h +267 -0
  121. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetwork.h +204 -0
  122. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConfiguration.h +1393 -0
  123. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConnection.h +568 -0
  124. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkReachability.h +369 -0
  125. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h +473 -0
  126. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesPath.h +179 -0
  127. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesSetSpecific.h +95 -0
  128. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h +2395 -0
  129. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h +184 -0
  130. package/sdk/ios/usr/include/libkern/OSByteOrder.h +315 -0
  131. package/sdk/ios/usr/include/libkern/machine/OSByteOrder.h +147 -0
  132. package/src/bridge-contract.ts +42 -0
  133. package/src/chromium-admission.ts +196 -0
  134. package/src/host/bridge-host.ts +6 -43
  135. package/src/launch-deadline.ts +74 -0
  136. package/src/nitro-adapter.lock.json +3 -3
  137. package/src/profiles.ts +21 -0
  138. package/src/react-native-coverage/capability-reference-resolution.ts +402 -0
  139. package/src/react-native-coverage/capability-source-references.ts +1296 -0
  140. package/src/react-native-coverage/native-typescript-parser.ts +74 -0
  141. package/src/react-native-coverage/project-aliases.ts +207 -0
  142. package/src/react-native-coverage/verified-reach.ts +47 -0
  143. package/src/reap-browser.ts +1019 -0
  144. package/src/skills/builtin/a11y-review.ts +1 -1
  145. package/src/skills/builtin/perf-profile.ts +1 -1
  146. package/src/skills/builtin/screenshot-all.ts +1 -1
  147. package/src/skills/builtin/visual-diff.ts +1 -1
  148. package/src/swift-compile.ts +107 -56
  149. package/src/swift-coverage/indexdump.ts +80 -0
  150. package/src/swift-coverage/indexing.ts +147 -0
  151. package/src/swift-coverage/package.ts +230 -0
  152. package/src/swift-coverage/provenance.ts +47 -0
  153. package/src/swift-coverage/reader.ts +81 -0
  154. package/src/swift-coverage/source.ts +252 -0
  155. package/src/swift-coverage/types.ts +58 -0
  156. package/src/swift-coverage/xcode-assets.ts +175 -0
  157. package/src/swift-coverage/xcode-bridging.ts +160 -0
  158. package/src/swift-coverage/xcode-packages.ts +251 -0
  159. package/src/swift-coverage/xcode-strings.ts +78 -0
  160. package/src/swift-coverage/xcode.ts +656 -0
  161. package/src/swift-distribution.lock.json +8 -8
  162. package/src/swift-host.ts +21 -1
  163. package/src/swift-objc-import.ts +191 -27
  164. package/src/swift-objc-standin.ts +4 -2
  165. package/src/swift-package-manifest.ts +134 -13
  166. package/src/swift-package.ts +46 -4
  167. package/src/swift-submit.ts +2 -1
  168. package/src/swift-toolchain.ts +36 -61
  169. package/src/worker-system-chunks.ts +3 -10
  170. package/src/xcode-project.ts +5 -5
  171. package/detox/attempt-events.cjs +0 -914
  172. package/detox/attempt-events.d.cts +0 -113
  173. package/detox/motion-change.cjs +0 -524
  174. package/detox/motion-change.d.cts +0 -140
  175. package/detox/motion-leg-starts.cjs +0 -20
  176. package/detox/motion-leg-starts.d.cts +0 -8
  177. package/detox/proof-frame.cjs +0 -190
  178. package/detox/record-block-execution.cjs +0 -78
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1667 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1673 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -35,6 +35,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  ));
36
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
 
38
+ // <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
39
+ var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
40
+ "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
41
+ }
42
+ });
43
+
38
44
  // src/backend-origin.ts
39
45
  function normalizeHostname(hostname) {
40
46
  return hostname.replace(/^\[|\]$/g, "").toLowerCase();
@@ -61,6 +67,7 @@ var DEFAULT_CONTRAST_BACKEND_ORIGIN, PEACHSIM_NATIVE_HOST;
61
67
  var init_backend_origin = __esm({
62
68
  "src/backend-origin.ts"() {
63
69
  "use strict";
70
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
64
71
  DEFAULT_CONTRAST_BACKEND_ORIGIN = "https://peachsim.com";
65
72
  PEACHSIM_NATIVE_HOST = "native.peachsim.com";
66
73
  }
@@ -118,6 +125,7 @@ ${prefix}${json}${suffix}`;
118
125
  var init_bundleGlobalFooter = __esm({
119
126
  "src/bundleGlobalFooter.ts"() {
120
127
  "use strict";
128
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
121
129
  }
122
130
  });
123
131
 
@@ -128,6 +136,7 @@ function isRecord(value) {
128
136
  var init_is_record = __esm({
129
137
  "src/is-record.ts"() {
130
138
  "use strict";
139
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
131
140
  }
132
141
  });
133
142
 
@@ -160,6 +169,7 @@ var NITRO_GUEST_PLATFORM;
160
169
  var init_nitroContract = __esm({
161
170
  "src/nitroContract.ts"() {
162
171
  "use strict";
172
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
163
173
  init_bundleGlobalFooter();
164
174
  NITRO_GUEST_PLATFORM = "ios";
165
175
  }
@@ -480,6 +490,7 @@ var import_node_child_process, import_node_fs, import_node_os, import_node_path,
480
490
  var init_process_group = __esm({
481
491
  "src/process-group.ts"() {
482
492
  "use strict";
493
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
483
494
  import_node_child_process = require("node:child_process");
484
495
  import_node_fs = require("node:fs");
485
496
  import_node_os = require("node:os");
@@ -497,6 +508,7 @@ var RNX_FORKED_SCRIPT_ENV;
497
508
  var init_internal_child = __esm({
498
509
  "cli/internal-child.ts"() {
499
510
  "use strict";
511
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
500
512
  RNX_FORKED_SCRIPT_ENV = "PEACH_RUNS_FORKED_SCRIPTS";
501
513
  }
502
514
  });
@@ -525,6 +537,7 @@ function isNode(node) {
525
537
  var ALIAS, DOC, MAP, PAIR, SCALAR, SEQ, NODE_TYPE, isAlias, isDocument, isMap, isPair, isScalar, isSeq, hasAnchor;
526
538
  var init_identity = __esm({
527
539
  "../../node_modules/yaml/browser/dist/nodes/identity.js"() {
540
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
528
541
  ALIAS = Symbol.for("yaml.alias");
529
542
  DOC = Symbol.for("yaml.document");
530
543
  MAP = Symbol.for("yaml.map");
@@ -685,6 +698,7 @@ function replaceNode(key2, path35, node) {
685
698
  var BREAK, SKIP, REMOVE;
686
699
  var init_visit = __esm({
687
700
  "../../node_modules/yaml/browser/dist/visit.js"() {
701
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
688
702
  init_identity();
689
703
  BREAK = Symbol("break visit");
690
704
  SKIP = Symbol("skip children");
@@ -702,6 +716,7 @@ var init_visit = __esm({
702
716
  var escapeChars, escapeTagName, Directives;
703
717
  var init_directives = __esm({
704
718
  "../../node_modules/yaml/browser/dist/doc/directives.js"() {
719
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
705
720
  init_identity();
706
721
  init_visit();
707
722
  escapeChars = {
@@ -928,6 +943,7 @@ function createNodeAnchors(doc, prefix) {
928
943
  }
929
944
  var init_anchors = __esm({
930
945
  "../../node_modules/yaml/browser/dist/doc/anchors.js"() {
946
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
931
947
  init_identity();
932
948
  init_visit();
933
949
  }
@@ -978,6 +994,7 @@ function applyReviver(reviver, obj, key2, val) {
978
994
  }
979
995
  var init_applyReviver = __esm({
980
996
  "../../node_modules/yaml/browser/dist/doc/applyReviver.js"() {
997
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
981
998
  }
982
999
  });
983
1000
 
@@ -1005,6 +1022,7 @@ function toJS(value, arg, ctx) {
1005
1022
  }
1006
1023
  var init_toJS = __esm({
1007
1024
  "../../node_modules/yaml/browser/dist/nodes/toJS.js"() {
1025
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1008
1026
  init_identity();
1009
1027
  }
1010
1028
  });
@@ -1013,6 +1031,7 @@ var init_toJS = __esm({
1013
1031
  var NodeBase;
1014
1032
  var init_Node = __esm({
1015
1033
  "../../node_modules/yaml/browser/dist/nodes/Node.js"() {
1034
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1016
1035
  init_applyReviver();
1017
1036
  init_identity();
1018
1037
  init_toJS();
@@ -1073,6 +1092,7 @@ function getAliasCount(doc, node, anchors) {
1073
1092
  var Alias;
1074
1093
  var init_Alias = __esm({
1075
1094
  "../../node_modules/yaml/browser/dist/nodes/Alias.js"() {
1095
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1076
1096
  init_anchors();
1077
1097
  init_visit();
1078
1098
  init_identity();
@@ -1168,6 +1188,7 @@ var init_Alias = __esm({
1168
1188
  var isScalarValue, Scalar;
1169
1189
  var init_Scalar = __esm({
1170
1190
  "../../node_modules/yaml/browser/dist/nodes/Scalar.js"() {
1191
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1171
1192
  init_identity();
1172
1193
  init_Node();
1173
1194
  init_toJS();
@@ -1259,6 +1280,7 @@ function createNode(value, tagName, ctx) {
1259
1280
  var defaultTagPrefix;
1260
1281
  var init_createNode = __esm({
1261
1282
  "../../node_modules/yaml/browser/dist/doc/createNode.js"() {
1283
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1262
1284
  init_Alias();
1263
1285
  init_identity();
1264
1286
  init_Scalar();
@@ -1292,6 +1314,7 @@ function collectionFromPath(schema4, path35, value) {
1292
1314
  var isEmptyPath, Collection;
1293
1315
  var init_Collection = __esm({
1294
1316
  "../../node_modules/yaml/browser/dist/nodes/Collection.js"() {
1317
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1295
1318
  init_createNode();
1296
1319
  init_identity();
1297
1320
  init_Node();
@@ -1415,6 +1438,7 @@ function indentComment(comment, indent) {
1415
1438
  var stringifyComment, lineComment;
1416
1439
  var init_stringifyComment = __esm({
1417
1440
  "../../node_modules/yaml/browser/dist/stringify/stringifyComment.js"() {
1441
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1418
1442
  stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
1419
1443
  lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
1420
1444
  }
@@ -1546,6 +1570,7 @@ function consumeMoreIndentedLines(text6, i, indent) {
1546
1570
  var FOLD_FLOW, FOLD_BLOCK, FOLD_QUOTED;
1547
1571
  var init_foldFlowLines = __esm({
1548
1572
  "../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js"() {
1573
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1549
1574
  FOLD_FLOW = "flow";
1550
1575
  FOLD_BLOCK = "block";
1551
1576
  FOLD_QUOTED = "quoted";
@@ -1817,6 +1842,7 @@ function stringifyString(item, ctx, onComment, onChompKeep) {
1817
1842
  var getFoldOptions, containsDocumentMarker, blockEndNewlines;
1818
1843
  var init_stringifyString = __esm({
1819
1844
  "../../node_modules/yaml/browser/dist/stringify/stringifyString.js"() {
1845
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1820
1846
  init_Scalar();
1821
1847
  init_foldFlowLines();
1822
1848
  getFoldOptions = (ctx, isBlock2) => ({
@@ -1947,6 +1973,7 @@ ${ctx.indent}${str2}`;
1947
1973
  }
1948
1974
  var init_stringify = __esm({
1949
1975
  "../../node_modules/yaml/browser/dist/stringify/stringify.js"() {
1976
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1950
1977
  init_anchors();
1951
1978
  init_identity();
1952
1979
  init_stringifyComment();
@@ -2078,6 +2105,7 @@ ${ctx.indent}`;
2078
2105
  }
2079
2106
  var init_stringifyPair = __esm({
2080
2107
  "../../node_modules/yaml/browser/dist/stringify/stringifyPair.js"() {
2108
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2081
2109
  init_identity();
2082
2110
  init_Scalar();
2083
2111
  init_stringify();
@@ -2093,6 +2121,7 @@ function warn(logLevel, warning) {
2093
2121
  }
2094
2122
  var init_log = __esm({
2095
2123
  "../../node_modules/yaml/browser/dist/log.js"() {
2124
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2096
2125
  }
2097
2126
  });
2098
2127
 
@@ -2136,6 +2165,7 @@ function resolveAliasValue(ctx, value) {
2136
2165
  var MERGE_KEY, merge, isMergeKey;
2137
2166
  var init_merge = __esm({
2138
2167
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js"() {
2168
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2139
2169
  init_identity();
2140
2170
  init_Scalar();
2141
2171
  MERGE_KEY = "<<";
@@ -2207,6 +2237,7 @@ function stringifyKey(key2, jsKey, ctx) {
2207
2237
  }
2208
2238
  var init_addPairToJSMap = __esm({
2209
2239
  "../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js"() {
2240
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2210
2241
  init_log();
2211
2242
  init_merge();
2212
2243
  init_stringify();
@@ -2224,6 +2255,7 @@ function createPair(key2, value, ctx) {
2224
2255
  var Pair;
2225
2256
  var init_Pair = __esm({
2226
2257
  "../../node_modules/yaml/browser/dist/nodes/Pair.js"() {
2258
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2227
2259
  init_createNode();
2228
2260
  init_stringifyPair();
2229
2261
  init_addPairToJSMap();
@@ -2396,6 +2428,7 @@ function addCommentBefore({ indent, options: { commentString } }, lines, comment
2396
2428
  }
2397
2429
  var init_stringifyCollection = __esm({
2398
2430
  "../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js"() {
2431
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2399
2432
  init_identity();
2400
2433
  init_stringify();
2401
2434
  init_stringifyComment();
@@ -2418,6 +2451,7 @@ function findPair(items2, key2) {
2418
2451
  var YAMLMap;
2419
2452
  var init_YAMLMap = __esm({
2420
2453
  "../../node_modules/yaml/browser/dist/nodes/YAMLMap.js"() {
2454
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2421
2455
  init_stringifyCollection();
2422
2456
  init_addPairToJSMap();
2423
2457
  init_Collection();
@@ -2548,6 +2582,7 @@ var init_YAMLMap = __esm({
2548
2582
  var map;
2549
2583
  var init_map = __esm({
2550
2584
  "../../node_modules/yaml/browser/dist/schema/common/map.js"() {
2585
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2551
2586
  init_identity();
2552
2587
  init_YAMLMap();
2553
2588
  map = {
@@ -2575,6 +2610,7 @@ function asItemIndex(key2) {
2575
2610
  var YAMLSeq;
2576
2611
  var init_YAMLSeq = __esm({
2577
2612
  "../../node_modules/yaml/browser/dist/nodes/YAMLSeq.js"() {
2613
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2578
2614
  init_createNode();
2579
2615
  init_stringifyCollection();
2580
2616
  init_Collection();
@@ -2684,6 +2720,7 @@ var init_YAMLSeq = __esm({
2684
2720
  var seq;
2685
2721
  var init_seq = __esm({
2686
2722
  "../../node_modules/yaml/browser/dist/schema/common/seq.js"() {
2723
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2687
2724
  init_identity();
2688
2725
  init_YAMLSeq();
2689
2726
  seq = {
@@ -2705,6 +2742,7 @@ var init_seq = __esm({
2705
2742
  var string;
2706
2743
  var init_string = __esm({
2707
2744
  "../../node_modules/yaml/browser/dist/schema/common/string.js"() {
2745
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2708
2746
  init_stringifyString();
2709
2747
  string = {
2710
2748
  identify: (value) => typeof value === "string",
@@ -2723,6 +2761,7 @@ var init_string = __esm({
2723
2761
  var nullTag;
2724
2762
  var init_null = __esm({
2725
2763
  "../../node_modules/yaml/browser/dist/schema/common/null.js"() {
2764
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2726
2765
  init_Scalar();
2727
2766
  nullTag = {
2728
2767
  identify: (value) => value == null,
@@ -2740,6 +2779,7 @@ var init_null = __esm({
2740
2779
  var boolTag;
2741
2780
  var init_bool = __esm({
2742
2781
  "../../node_modules/yaml/browser/dist/schema/core/bool.js"() {
2782
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2743
2783
  init_Scalar();
2744
2784
  boolTag = {
2745
2785
  identify: (value) => typeof value === "boolean",
@@ -2781,6 +2821,7 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
2781
2821
  }
2782
2822
  var init_stringifyNumber = __esm({
2783
2823
  "../../node_modules/yaml/browser/dist/stringify/stringifyNumber.js"() {
2824
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2784
2825
  }
2785
2826
  });
2786
2827
 
@@ -2788,6 +2829,7 @@ var init_stringifyNumber = __esm({
2788
2829
  var floatNaN, floatExp, float;
2789
2830
  var init_float = __esm({
2790
2831
  "../../node_modules/yaml/browser/dist/schema/core/float.js"() {
2832
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2791
2833
  init_Scalar();
2792
2834
  init_stringifyNumber();
2793
2835
  floatNaN = {
@@ -2837,6 +2879,7 @@ function intStringify(node, radix, prefix) {
2837
2879
  var intIdentify, intResolve, intOct, int, intHex;
2838
2880
  var init_int = __esm({
2839
2881
  "../../node_modules/yaml/browser/dist/schema/core/int.js"() {
2882
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2840
2883
  init_stringifyNumber();
2841
2884
  intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
2842
2885
  intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
@@ -2873,6 +2916,7 @@ var init_int = __esm({
2873
2916
  var schema;
2874
2917
  var init_schema = __esm({
2875
2918
  "../../node_modules/yaml/browser/dist/schema/core/schema.js"() {
2919
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2876
2920
  init_map();
2877
2921
  init_null();
2878
2922
  init_seq();
@@ -2903,6 +2947,7 @@ function intIdentify2(value) {
2903
2947
  var stringifyJSON, jsonScalars, jsonError, schema2;
2904
2948
  var init_schema2 = __esm({
2905
2949
  "../../node_modules/yaml/browser/dist/schema/json/schema.js"() {
2950
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2906
2951
  init_Scalar();
2907
2952
  init_map();
2908
2953
  init_seq();
@@ -2966,6 +3011,7 @@ var init_schema2 = __esm({
2966
3011
  var binary;
2967
3012
  var init_binary = __esm({
2968
3013
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js"() {
3014
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2969
3015
  init_Scalar();
2970
3016
  init_stringifyString();
2971
3017
  binary = {
@@ -3083,6 +3129,7 @@ function createPairs(schema4, iterable, ctx) {
3083
3129
  var pairs;
3084
3130
  var init_pairs = __esm({
3085
3131
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js"() {
3132
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3086
3133
  init_identity();
3087
3134
  init_Pair();
3088
3135
  init_Scalar();
@@ -3101,6 +3148,7 @@ var init_pairs = __esm({
3101
3148
  var YAMLOMap, omap;
3102
3149
  var init_omap = __esm({
3103
3150
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js"() {
3151
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3104
3152
  init_identity();
3105
3153
  init_toJS();
3106
3154
  init_YAMLMap();
@@ -3183,6 +3231,7 @@ function boolStringify({ value, source }, ctx) {
3183
3231
  var trueTag, falseTag;
3184
3232
  var init_bool2 = __esm({
3185
3233
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js"() {
3234
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3186
3235
  init_Scalar();
3187
3236
  trueTag = {
3188
3237
  identify: (value) => value === true,
@@ -3207,6 +3256,7 @@ var init_bool2 = __esm({
3207
3256
  var floatNaN2, floatExp2, float2;
3208
3257
  var init_float2 = __esm({
3209
3258
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/float.js"() {
3259
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3210
3260
  init_Scalar();
3211
3261
  init_stringifyNumber();
3212
3262
  floatNaN2 = {
@@ -3284,6 +3334,7 @@ function intStringify2(node, radix, prefix) {
3284
3334
  var intIdentify3, intBin, intOct2, int2, intHex2;
3285
3335
  var init_int2 = __esm({
3286
3336
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/int.js"() {
3337
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3287
3338
  init_stringifyNumber();
3288
3339
  intIdentify3 = (value) => typeof value === "bigint" || Number.isInteger(value);
3289
3340
  intBin = {
@@ -3328,6 +3379,7 @@ var init_int2 = __esm({
3328
3379
  var YAMLSet, set;
3329
3380
  var init_set = __esm({
3330
3381
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/set.js"() {
3382
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3331
3383
  init_identity();
3332
3384
  init_Pair();
3333
3385
  init_YAMLMap();
@@ -3448,6 +3500,7 @@ function stringifySexagesimal(node) {
3448
3500
  var intTime, floatTime, timestamp;
3449
3501
  var init_timestamp = __esm({
3450
3502
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js"() {
3503
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3451
3504
  init_stringifyNumber();
3452
3505
  intTime = {
3453
3506
  identify: (value) => typeof value === "bigint" || Number.isInteger(value),
@@ -3500,6 +3553,7 @@ var init_timestamp = __esm({
3500
3553
  var schema3;
3501
3554
  var init_schema3 = __esm({
3502
3555
  "../../node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js"() {
3556
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3503
3557
  init_map();
3504
3558
  init_null();
3505
3559
  init_seq();
@@ -3577,6 +3631,7 @@ function getTags(customTags, schemaName, addMergeTag) {
3577
3631
  var schemas, tagsByName, coreKnownTags;
3578
3632
  var init_tags = __esm({
3579
3633
  "../../node_modules/yaml/browser/dist/schema/tags.js"() {
3634
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3580
3635
  init_map();
3581
3636
  init_null();
3582
3637
  init_seq();
@@ -3635,6 +3690,7 @@ var init_tags = __esm({
3635
3690
  var sortMapEntriesByKey, Schema;
3636
3691
  var init_Schema = __esm({
3637
3692
  "../../node_modules/yaml/browser/dist/schema/Schema.js"() {
3693
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3638
3694
  init_identity();
3639
3695
  init_map();
3640
3696
  init_seq();
@@ -3734,6 +3790,7 @@ function stringifyDocument(doc, options) {
3734
3790
  }
3735
3791
  var init_stringifyDocument = __esm({
3736
3792
  "../../node_modules/yaml/browser/dist/stringify/stringifyDocument.js"() {
3793
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3737
3794
  init_identity();
3738
3795
  init_stringify();
3739
3796
  init_stringifyComment();
@@ -3749,6 +3806,7 @@ function assertCollection(contents) {
3749
3806
  var Document;
3750
3807
  var init_Document = __esm({
3751
3808
  "../../node_modules/yaml/browser/dist/doc/Document.js"() {
3809
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3752
3810
  init_Alias();
3753
3811
  init_Collection();
3754
3812
  init_identity();
@@ -4052,6 +4110,7 @@ var init_Document = __esm({
4052
4110
  var YAMLError, YAMLParseError, YAMLWarning, prettifyError;
4053
4111
  var init_errors = __esm({
4054
4112
  "../../node_modules/yaml/browser/dist/errors.js"() {
4113
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4055
4114
  YAMLError = class extends Error {
4056
4115
  constructor(name3, pos, code, message) {
4057
4116
  super();
@@ -4238,6 +4297,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
4238
4297
  }
4239
4298
  var init_resolve_props = __esm({
4240
4299
  "../../node_modules/yaml/browser/dist/compose/resolve-props.js"() {
4300
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4241
4301
  }
4242
4302
  });
4243
4303
 
@@ -4278,6 +4338,7 @@ function containsNewline(key2) {
4278
4338
  }
4279
4339
  var init_util_contains_newline = __esm({
4280
4340
  "../../node_modules/yaml/browser/dist/compose/util-contains-newline.js"() {
4341
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4281
4342
  }
4282
4343
  });
4283
4344
 
@@ -4293,6 +4354,7 @@ function flowIndentCheck(indent, fc, onError) {
4293
4354
  }
4294
4355
  var init_util_flow_indent_check = __esm({
4295
4356
  "../../node_modules/yaml/browser/dist/compose/util-flow-indent-check.js"() {
4357
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4296
4358
  init_util_contains_newline();
4297
4359
  }
4298
4360
  });
@@ -4307,6 +4369,7 @@ function mapIncludes(ctx, items2, search) {
4307
4369
  }
4308
4370
  var init_util_map_includes = __esm({
4309
4371
  "../../node_modules/yaml/browser/dist/compose/util-map-includes.js"() {
4372
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4310
4373
  init_identity();
4311
4374
  }
4312
4375
  });
@@ -4408,6 +4471,7 @@ function resolveBlockMap({ composeNode: composeNode2, composeEmptyNode: composeE
4408
4471
  var startColMsg;
4409
4472
  var init_resolve_block_map = __esm({
4410
4473
  "../../node_modules/yaml/browser/dist/compose/resolve-block-map.js"() {
4474
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4411
4475
  init_Pair();
4412
4476
  init_YAMLMap();
4413
4477
  init_resolve_props();
@@ -4461,6 +4525,7 @@ function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode: composeE
4461
4525
  }
4462
4526
  var init_resolve_block_seq = __esm({
4463
4527
  "../../node_modules/yaml/browser/dist/compose/resolve-block-seq.js"() {
4528
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4464
4529
  init_YAMLSeq();
4465
4530
  init_resolve_props();
4466
4531
  init_util_flow_indent_check();
@@ -4505,6 +4570,7 @@ function resolveEnd(end, offset, reqSpace, onError) {
4505
4570
  }
4506
4571
  var init_resolve_end = __esm({
4507
4572
  "../../node_modules/yaml/browser/dist/compose/resolve-end.js"() {
4573
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4508
4574
  }
4509
4575
  });
4510
4576
 
@@ -4688,6 +4754,7 @@ function resolveFlowCollection({ composeNode: composeNode2, composeEmptyNode: co
4688
4754
  var blockMsg, isBlock;
4689
4755
  var init_resolve_flow_collection = __esm({
4690
4756
  "../../node_modules/yaml/browser/dist/compose/resolve-flow-collection.js"() {
4757
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4691
4758
  init_identity();
4692
4759
  init_Pair();
4693
4760
  init_YAMLMap();
@@ -4754,6 +4821,7 @@ function composeCollection(CN2, ctx, token, props, onError) {
4754
4821
  }
4755
4822
  var init_compose_collection = __esm({
4756
4823
  "../../node_modules/yaml/browser/dist/compose/compose-collection.js"() {
4824
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4757
4825
  init_identity();
4758
4826
  init_Scalar();
4759
4827
  init_YAMLMap();
@@ -4941,6 +5009,7 @@ function splitLines(source) {
4941
5009
  }
4942
5010
  var init_resolve_block_scalar = __esm({
4943
5011
  "../../node_modules/yaml/browser/dist/compose/resolve-block-scalar.js"() {
5012
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4944
5013
  init_Scalar();
4945
5014
  }
4946
5015
  });
@@ -5126,6 +5195,7 @@ function parseCharCode(source, offset, length, onError) {
5126
5195
  var escapeCodes;
5127
5196
  var init_resolve_flow_scalar = __esm({
5128
5197
  "../../node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js"() {
5198
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5129
5199
  init_Scalar();
5130
5200
  init_resolve_end();
5131
5201
  escapeCodes = {
@@ -5236,6 +5306,7 @@ function findScalarTagByTest({ atKey, directives, schema: schema4 }, value, toke
5236
5306
  }
5237
5307
  var init_compose_scalar = __esm({
5238
5308
  "../../node_modules/yaml/browser/dist/compose/compose-scalar.js"() {
5309
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5239
5310
  init_identity();
5240
5311
  init_Scalar();
5241
5312
  init_resolve_block_scalar();
@@ -5268,6 +5339,7 @@ function emptyScalarPosition(offset, before, pos) {
5268
5339
  }
5269
5340
  var init_util_empty_scalar_position = __esm({
5270
5341
  "../../node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js"() {
5342
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5271
5343
  }
5272
5344
  });
5273
5345
 
@@ -5365,6 +5437,7 @@ function composeAlias({ options }, { offset, source, end }, onError) {
5365
5437
  var CN;
5366
5438
  var init_compose_node = __esm({
5367
5439
  "../../node_modules/yaml/browser/dist/compose/compose-node.js"() {
5440
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5368
5441
  init_Alias();
5369
5442
  init_identity();
5370
5443
  init_compose_collection();
@@ -5409,6 +5482,7 @@ function composeDoc(options, directives, { offset, start, value, end }, onError)
5409
5482
  }
5410
5483
  var init_compose_doc = __esm({
5411
5484
  "../../node_modules/yaml/browser/dist/compose/compose-doc.js"() {
5485
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5412
5486
  init_Document();
5413
5487
  init_compose_node();
5414
5488
  init_resolve_end();
@@ -5453,6 +5527,7 @@ function parsePrelude(prelude) {
5453
5527
  var Composer;
5454
5528
  var init_composer = __esm({
5455
5529
  "../../node_modules/yaml/browser/dist/compose/composer.js"() {
5530
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5456
5531
  init_directives();
5457
5532
  init_Document();
5458
5533
  init_errors();
@@ -5794,6 +5869,7 @@ function setFlowScalarValue(token, source, type) {
5794
5869
  }
5795
5870
  var init_cst_scalar = __esm({
5796
5871
  "../../node_modules/yaml/browser/dist/parse/cst-scalar.js"() {
5872
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5797
5873
  init_resolve_block_scalar();
5798
5874
  init_resolve_flow_scalar();
5799
5875
  init_errors();
@@ -5857,6 +5933,7 @@ function stringifyItem({ start, key: key2, sep, value }) {
5857
5933
  var stringify2;
5858
5934
  var init_cst_stringify = __esm({
5859
5935
  "../../node_modules/yaml/browser/dist/parse/cst-stringify.js"() {
5936
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5860
5937
  stringify2 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
5861
5938
  }
5862
5939
  });
@@ -5894,6 +5971,7 @@ function _visit(path35, item, visitor) {
5894
5971
  var BREAK2, SKIP2, REMOVE2;
5895
5972
  var init_cst_visit = __esm({
5896
5973
  "../../node_modules/yaml/browser/dist/parse/cst-visit.js"() {
5974
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5897
5975
  BREAK2 = Symbol("break visit");
5898
5976
  SKIP2 = Symbol("skip children");
5899
5977
  REMOVE2 = Symbol("remove item");
@@ -6015,6 +6093,7 @@ function tokenType(source) {
6015
6093
  var BOM, DOCUMENT, FLOW_END, SCALAR2, isCollection2, isScalar2;
6016
6094
  var init_cst = __esm({
6017
6095
  "../../node_modules/yaml/browser/dist/parse/cst.js"() {
6096
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6018
6097
  init_cst_scalar();
6019
6098
  init_cst_stringify();
6020
6099
  init_cst_visit();
@@ -6043,6 +6122,7 @@ function isEmpty(ch) {
6043
6122
  var hexDigits, tagChars, flowIndicatorChars, invalidAnchorChars, isNotAnchorChar, Lexer;
6044
6123
  var init_lexer = __esm({
6045
6124
  "../../node_modules/yaml/browser/dist/parse/lexer.js"() {
6125
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6046
6126
  init_cst();
6047
6127
  hexDigits = new Set("0123456789ABCDEFabcdef");
6048
6128
  tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
@@ -6619,6 +6699,7 @@ var init_lexer = __esm({
6619
6699
  var LineCounter;
6620
6700
  var init_line_counter = __esm({
6621
6701
  "../../node_modules/yaml/browser/dist/parse/line-counter.js"() {
6702
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6622
6703
  LineCounter = class {
6623
6704
  constructor() {
6624
6705
  this.lineStarts = [];
@@ -6739,6 +6820,7 @@ function fixFlowSeqItems(fc) {
6739
6820
  var Parser;
6740
6821
  var init_parser = __esm({
6741
6822
  "../../node_modules/yaml/browser/dist/parse/parser.js"() {
6823
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6742
6824
  init_cst();
6743
6825
  init_lexer();
6744
6826
  Parser = class {
@@ -7597,6 +7679,7 @@ function stringify3(value, replacer, options) {
7597
7679
  }
7598
7680
  var init_public_api = __esm({
7599
7681
  "../../node_modules/yaml/browser/dist/public-api.js"() {
7682
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7600
7683
  init_composer();
7601
7684
  init_Document();
7602
7685
  init_errors();
@@ -7642,6 +7725,7 @@ __export(dist_exports, {
7642
7725
  });
7643
7726
  var init_dist = __esm({
7644
7727
  "../../node_modules/yaml/browser/dist/index.js"() {
7728
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7645
7729
  init_composer();
7646
7730
  init_Document();
7647
7731
  init_Schema();
@@ -7665,6 +7749,7 @@ var init_dist = __esm({
7665
7749
  var browser_default;
7666
7750
  var init_browser = __esm({
7667
7751
  "../../node_modules/yaml/browser/index.js"() {
7752
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7668
7753
  init_dist();
7669
7754
  init_dist();
7670
7755
  browser_default = dist_exports;
@@ -7699,6 +7784,7 @@ var import_node_child_process2;
7699
7784
  var init_admitted_mac_build = __esm({
7700
7785
  "src/admitted-mac-build.ts"() {
7701
7786
  "use strict";
7787
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7702
7788
  import_node_child_process2 = require("node:child_process");
7703
7789
  }
7704
7790
  });
@@ -7729,6 +7815,7 @@ var import_node_os2, import_node_path2, PEACH_HOME_ENV, DAEMON_LOCKFILE_MAX_BYTE
7729
7815
  var init_home_paths = __esm({
7730
7816
  "src/home-paths.ts"() {
7731
7817
  "use strict";
7818
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7732
7819
  import_node_os2 = require("node:os");
7733
7820
  import_node_path2 = __toESM(require("node:path"), 1);
7734
7821
  PEACH_HOME_ENV = "PEACH_HOME";
@@ -7750,6 +7837,7 @@ var import_node_fs2, import_node_path3;
7750
7837
  var init_swift_objc_sdk_tree = __esm({
7751
7838
  "src/swift-objc-sdk-tree.ts"() {
7752
7839
  "use strict";
7840
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7753
7841
  import_node_fs2 = require("node:fs");
7754
7842
  import_node_path3 = __toESM(require("node:path"), 1);
7755
7843
  }
@@ -7759,6 +7847,7 @@ var init_swift_objc_sdk_tree = __esm({
7759
7847
  var init_swift_compiler_digest = __esm({
7760
7848
  "src/swift-compiler-digest.ts"() {
7761
7849
  "use strict";
7850
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7762
7851
  init_swift_objc_sdk_tree();
7763
7852
  }
7764
7853
  });
@@ -8166,6 +8255,7 @@ var IDENT, ESCAPES, OPENERS, CALLS, HEADER, EXCERPT, MARKER;
8166
8255
  var init_swift_design_time = __esm({
8167
8256
  "src/swift-design-time.ts"() {
8168
8257
  "use strict";
8258
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8169
8259
  IDENT = /[A-Za-z_À-￿$0-9]/;
8170
8260
  ESCAPES = {
8171
8261
  "0": "\0",
@@ -8257,6 +8347,7 @@ var SWIFT_DISTRIBUTION_MANIFEST, SWIFT_DISTRIBUTION_HOSTS, isStrings;
8257
8347
  var init_swift_distribution_contract = __esm({
8258
8348
  "src/swift-distribution-contract.ts"() {
8259
8349
  "use strict";
8350
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8260
8351
  init_is_record();
8261
8352
  SWIFT_DISTRIBUTION_MANIFEST = "distribution.json";
8262
8353
  SWIFT_DISTRIBUTION_HOSTS = [
@@ -8280,7 +8371,17 @@ function sourceSwiftCheckout() {
8280
8371
  }
8281
8372
  function swiftSdkOptions() {
8282
8373
  const directory = process.env.PEACH_SWIFT_SDKS_PATH;
8283
- return directory ? ["--swift-sdks-path", import_node_path4.default.resolve(directory)] : [];
8374
+ if (directory) return ["--swift-sdks-path", import_node_path4.default.resolve(directory)];
8375
+ if (scratch && process.platform === "linux") {
8376
+ const config = process.env.XDG_CONFIG_HOME;
8377
+ if (config !== void 0 && !import_node_path4.default.isAbsolute(config))
8378
+ throw new Error("XDG_CONFIG_HOME must be an absolute path");
8379
+ return [
8380
+ "--swift-sdks-path",
8381
+ config === void 0 ? import_node_path4.default.join(import_node_os3.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path4.default.join(config, "swiftpm", "swift-sdks")
8382
+ ];
8383
+ }
8384
+ return [];
8284
8385
  }
8285
8386
  function swiftHostCompilerArchive(release, host2 = `${process.platform}-${process.arch}`) {
8286
8387
  if (release !== SWIFT_HOST_COMPILER_RELEASE)
@@ -8332,47 +8433,13 @@ function confineSwiftScratch(root) {
8332
8433
  }
8333
8434
  const dir = import_node_path4.default.join(root, String(process.pid));
8334
8435
  import_node_fs3.default.mkdirSync(dir, { recursive: true });
8335
- scratch = dir;
8336
- if (process.platform === "linux") {
8337
- swiftHome = import_node_path4.default.join(root, "home");
8338
- import_node_fs3.default.mkdirSync(swiftHome, { recursive: true });
8339
- }
8340
- const seeded = import_node_path4.default.join(import_node_os3.default.homedir(), ".swiftpm");
8341
- const dirAbsentBefore = lstatIfKnown(seeded) === null;
8342
- const absentBefore = swiftpmSeeds.filter(
8343
- (name3) => lstatIfKnown(import_node_path4.default.join(seeded, name3)) === null
8344
- );
8436
+ const home = import_node_path4.default.join(root, "home");
8437
+ import_node_fs3.default.mkdirSync(home, { recursive: true });
8438
+ scratch = { directory: dir, home };
8345
8439
  process.once("exit", () => {
8346
8440
  import_node_fs3.default.rmSync(dir, { recursive: true, force: true });
8347
- for (const name3 of absentBefore) removeSwiftpmSeed(import_node_path4.default.join(seeded, name3), name3);
8348
- if (dirAbsentBefore && lstatIfKnown(seeded)?.isDirectory())
8349
- try {
8350
- import_node_fs3.default.rmdirSync(seeded);
8351
- } catch {
8352
- }
8353
8441
  });
8354
8442
  }
8355
- function lstatIfKnown(entry) {
8356
- try {
8357
- return import_node_fs3.default.lstatSync(entry);
8358
- } catch (error) {
8359
- if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
8360
- return void 0;
8361
- }
8362
- }
8363
- function removeSwiftpmSeed(entry, name3) {
8364
- const stat = lstatIfKnown(entry);
8365
- if (!stat) return;
8366
- try {
8367
- if (name3 === "cache") {
8368
- if (stat.isSymbolicLink() && import_node_fs3.default.readlinkSync(entry).endsWith("/.cache/org.swift.swiftpm"))
8369
- import_node_fs3.default.unlinkSync(entry);
8370
- } else if (stat.isDirectory()) {
8371
- import_node_fs3.default.rmdirSync(entry);
8372
- }
8373
- } catch {
8374
- }
8375
- }
8376
8443
  function processRuns(pid) {
8377
8444
  try {
8378
8445
  process.kill(pid, 0);
@@ -8383,7 +8450,14 @@ function processRuns(pid) {
8383
8450
  }
8384
8451
  function swiftEnvironment(base = process.env) {
8385
8452
  if (!scratch) return base;
8386
- return swiftHome ? { ...base, TMPDIR: scratch, HOME: swiftHome } : { ...base, TMPDIR: scratch };
8453
+ return {
8454
+ ...base,
8455
+ TMPDIR: scratch.directory,
8456
+ XDG_CONFIG_HOME: import_node_path4.default.join(scratch.home, ".config"),
8457
+ XDG_CACHE_HOME: import_node_path4.default.join(scratch.home, ".cache"),
8458
+ XDG_DATA_HOME: import_node_path4.default.join(scratch.home, ".local", "share"),
8459
+ ...process.platform === "linux" ? { HOME: scratch.home } : {}
8460
+ };
8387
8461
  }
8388
8462
  function swiftSourceSdk(root) {
8389
8463
  const pin = JSON.parse(
@@ -8503,7 +8577,7 @@ function verifySwiftSdk(swift, sdk) {
8503
8577
  function installSwiftSdkArchive(swift, sdk, archive) {
8504
8578
  validateSwiftSdkIdentity(sdk);
8505
8579
  const staging = import_node_fs3.default.realpathSync(
8506
- import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
8580
+ import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
8507
8581
  );
8508
8582
  try {
8509
8583
  if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
@@ -8579,7 +8653,7 @@ function installSwiftWasmSdk(release, sdk) {
8579
8653
  } catch {
8580
8654
  }
8581
8655
  const swift = import_node_path4.default.join(swiftCompiler(release), "swift");
8582
- const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
8656
+ const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
8583
8657
  const archive = import_node_path4.default.join(staging, "sdk.artifactbundle.tar.gz");
8584
8658
  try {
8585
8659
  if (sdk.wasmSdkUrl.startsWith("file:"))
@@ -8700,10 +8774,11 @@ function swiftCompilerInstall(release) {
8700
8774
  ]
8701
8775
  };
8702
8776
  }
8703
- var import_node_child_process3, import_node_crypto, import_node_fs3, import_node_os3, import_node_path4, import_node_url, SWIFT_HOST_COMPILER_RELEASE, SWIFT_HOST_COMPILER_ID, compilerArchives, scratch, swiftHome, swiftpmSeeds, sdkFileHashes, verifiedCompilers;
8777
+ var import_node_child_process3, import_node_crypto, import_node_fs3, import_node_os3, import_node_path4, import_node_url, SWIFT_HOST_COMPILER_RELEASE, SWIFT_HOST_COMPILER_ID, compilerArchives, scratch, sdkFileHashes, verifiedCompilers;
8704
8778
  var init_swift_toolchain = __esm({
8705
8779
  "src/swift-toolchain.ts"() {
8706
8780
  "use strict";
8781
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8707
8782
  import_node_child_process3 = require("node:child_process");
8708
8783
  import_node_crypto = require("node:crypto");
8709
8784
  import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -8726,7 +8801,6 @@ var init_swift_toolchain = __esm({
8726
8801
  manifest: "fe07a29d4f4374cad47b29de70e90aa2e3b7664e08c8b53d304585e65637da24"
8727
8802
  }
8728
8803
  };
8729
- swiftpmSeeds = ["cache", "configuration", "security"];
8730
8804
  sdkFileHashes = /* @__PURE__ */ new Map();
8731
8805
  verifiedCompilers = /* @__PURE__ */ new Map();
8732
8806
  }
@@ -8841,6 +8915,7 @@ var import_node_child_process4, import_node_crypto2, import_node_fs4, import_nod
8841
8915
  var init_swift_icu = __esm({
8842
8916
  "src/swift-icu.ts"() {
8843
8917
  "use strict";
8918
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8844
8919
  import_node_child_process4 = require("node:child_process");
8845
8920
  import_node_crypto2 = require("node:crypto");
8846
8921
  import_node_fs4 = require("node:fs");
@@ -9299,6 +9374,7 @@ var import_node_crypto3;
9299
9374
  var init_swift_objc_export = __esm({
9300
9375
  "src/swift-objc-export.ts"() {
9301
9376
  "use strict";
9377
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9302
9378
  import_node_crypto3 = require("node:crypto");
9303
9379
  }
9304
9380
  });
@@ -9419,6 +9495,7 @@ function swiftObjCImports(graphs, options) {
9419
9495
  const categories = /* @__PURE__ */ new Map();
9420
9496
  const functions = /* @__PURE__ */ new Map();
9421
9497
  const typedefs = /* @__PURE__ */ new Map();
9498
+ const wrappedTypedefs = /* @__PURE__ */ new Map();
9422
9499
  const visit3 = (node) => {
9423
9500
  if (!record(node)) return;
9424
9501
  if (node.kind === "ObjCInterfaceDecl" && typeof node.name === "string" && selected.has(node.name)) {
@@ -9440,6 +9517,9 @@ function swiftObjCImports(graphs, options) {
9440
9517
  if (node.kind === "TypedefDecl" && typeof node.name === "string" && record(node.type)) {
9441
9518
  const canonical2 = node.type.desugaredQualType ?? node.type.qualType;
9442
9519
  if (typeof canonical2 === "string") typedefs.set(node.name, canonical2);
9520
+ if (nodes(node.inner).some((attribute) => attribute.kind === "SwiftNewTypeAttr")) {
9521
+ wrappedTypedefs.set(node.name, [...wrappedTypedefs.get(node.name) ?? [], node]);
9522
+ }
9443
9523
  }
9444
9524
  for (const child of nodes(node.inner)) visit3(child);
9445
9525
  };
@@ -9447,14 +9527,29 @@ function swiftObjCImports(graphs, options) {
9447
9527
  fail("declarations", "expected a complete Clang translation unit AST");
9448
9528
  visit3(options.clangAST);
9449
9529
  const symbols = /* @__PURE__ */ new Map();
9530
+ const seenSymbols = /* @__PURE__ */ new Set();
9450
9531
  for (const graph of graphs) {
9451
9532
  if (graph.module.name !== options.module)
9452
9533
  fail("declarations", `symbol graph belongs to ${graph.module.name}`);
9453
9534
  for (const symbol of graph.symbols) {
9454
- const previous = symbols.get(symbol.identifier.precise);
9455
- if (previous && JSON.stringify(previous) !== JSON.stringify(symbol))
9456
- fail(symbol.identifier.precise, "ambiguous imported declaration");
9457
- symbols.set(symbol.identifier.precise, symbol);
9535
+ if (symbol.availability?.some(
9536
+ (entry) => entry.isUnconditionallyUnavailable && (!entry.domain || entry.domain === "Swift" || entry.domain === "iOS")
9537
+ ))
9538
+ continue;
9539
+ const key2 = JSON.stringify([
9540
+ symbol.identifier.precise,
9541
+ symbol.kind.identifier,
9542
+ symbol.pathComponents,
9543
+ symbol.declarationFragments,
9544
+ symbol.functionSignature,
9545
+ symbol.accessLevel,
9546
+ symbol.availability
9547
+ ]);
9548
+ if (seenSymbols.has(key2)) continue;
9549
+ seenSymbols.add(key2);
9550
+ const overloads = symbols.get(symbol.identifier.precise) ?? [];
9551
+ overloads.push(symbol);
9552
+ symbols.set(symbol.identifier.precise, overloads);
9458
9553
  }
9459
9554
  }
9460
9555
  const classes = [];
@@ -9469,7 +9564,10 @@ function swiftObjCImports(graphs, options) {
9469
9564
  types.set(name3, nativeName);
9470
9565
  }
9471
9566
  for (const nativeName of [...selected].sort()) {
9472
- const symbol = symbols.get(`c:objc(cs)${nativeName}`);
9567
+ const candidates = symbols.get(`c:objc(cs)${nativeName}`);
9568
+ if (candidates && candidates.length !== 1)
9569
+ fail(nativeName, "ambiguous imported class declaration");
9570
+ const symbol = candidates?.[0];
9473
9571
  const name3 = symbol?.pathComponents[0];
9474
9572
  if (!symbol || symbol.kind.identifier !== "swift.class" || !name3 || !identifier(name3))
9475
9573
  fail(nativeName, "missing Swift-imported class declaration");
@@ -9484,6 +9582,70 @@ function swiftObjCImports(graphs, options) {
9484
9582
  types.set(name3, nativeName);
9485
9583
  classes.push({ name: name3, nativeName });
9486
9584
  }
9585
+ const wrapperMembers = /* @__PURE__ */ new Map();
9586
+ const wrapperConformances = /* @__PURE__ */ new Map();
9587
+ for (const graph of graphs)
9588
+ for (const edge of graph.relationships)
9589
+ if (edge.kind === "conformsTo" && edge.source.includes("@T@")) {
9590
+ const protocols = wrapperConformances.get(edge.source) ?? /* @__PURE__ */ new Set();
9591
+ protocols.add(edge.target);
9592
+ wrapperConformances.set(edge.source, protocols);
9593
+ }
9594
+ for (const candidates of symbols.values())
9595
+ for (const member of candidates)
9596
+ if (member.pathComponents.length === 2 && ["init(rawValue:)", "init(_:)"].includes(member.pathComponents[1])) {
9597
+ const owner = member.pathComponents[0];
9598
+ wrapperMembers.set(owner, [...wrapperMembers.get(owner) ?? [], member]);
9599
+ }
9600
+ const stringWrappers = /* @__PURE__ */ new Map();
9601
+ const wrapperSymbols = [...symbols].filter(
9602
+ ([usr, candidates]) => usr.includes("@T@") && candidates[0]?.kind.identifier === "swift.struct"
9603
+ ).sort(([left], [right]) => left.localeCompare(right));
9604
+ for (const [usr, candidates] of wrapperSymbols) {
9605
+ const nativeName = /^c:.*@T@([A-Za-z_]\w*)$/.exec(usr)?.[1];
9606
+ if (!nativeName) continue;
9607
+ const originals = wrappedTypedefs.get(nativeName);
9608
+ const declaration = originals?.[0];
9609
+ if (!declaration || !record(declaration.type)) continue;
9610
+ const original = declaration.type.desugaredQualType ?? declaration.type.qualType;
9611
+ if (typeof original !== "string" || original.replace(/\s/g, "") !== "NSString*")
9612
+ continue;
9613
+ const symbol = candidates[0];
9614
+ const name3 = symbol.pathComponents[0];
9615
+ if (candidates.length !== 1 || originals?.length !== 1 || symbol.pathComponents.length !== 1 || !name3 || !identifier(name3) || types.has(name3) || stringWrappers.has(name3) || symbol.accessLevel !== "public" || text2(symbol.declarationFragments ?? []).trim() !== `struct ${name3}` || symbol.availability?.length)
9616
+ fail(usr, "typed string wrapper identity is unqualified");
9617
+ if (!["s:SY", "s:SH", "s:SQ", "s:s8SendableP"].every(
9618
+ (protocol) => wrapperConformances.get(usr)?.has(protocol)
9619
+ ))
9620
+ fail(usr, "typed string wrapper conformances are unqualified");
9621
+ const members = wrapperMembers.get(name3) ?? [];
9622
+ const initializers = members.filter(
9623
+ (member) => member.pathComponents[1] === "init(rawValue:)"
9624
+ );
9625
+ if (initializers.length !== 1 || initializers[0].kind.identifier !== "swift.init" || initializers[0].accessLevel !== "public" || text2(initializers[0].declarationFragments ?? []).trim() !== "init(rawValue: String)" || !initializers[0].declarationFragments?.some(
9626
+ (part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
9627
+ ))
9628
+ fail(usr, "typed string wrapper raw initializer is unqualified");
9629
+ const unlabelled = members.filter((member) => member.pathComponents[1] === "init(_:)");
9630
+ if (unlabelled.length > 1 || unlabelled.length === 1 && (unlabelled[0].kind.identifier !== "swift.init" || unlabelled[0].accessLevel !== "public" || text2(unlabelled[0].declarationFragments ?? []).trim() !== "init(_ rawValue: String)" || !unlabelled[0].declarationFragments?.some(
9631
+ (part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
9632
+ )))
9633
+ fail(usr, "typed string wrapper unlabeled initializer is unqualified");
9634
+ stringWrappers.set(
9635
+ name3,
9636
+ [
9637
+ `public struct ${swiftName(name3)}: Swift.RawRepresentable, Swift.Hashable, Swift.Equatable, Swift._SwiftNewtypeWrapper, Swift._ObjectiveCBridgeable, Swift.Sendable {`,
9638
+ " public typealias RawValue = Swift.String",
9639
+ " public typealias _ObjectiveCType = Foundation.NSString",
9640
+ " private let _rawValue: Swift.String",
9641
+ " public var rawValue: Swift.String { _rawValue }",
9642
+ " public init(rawValue: Swift.String) { _rawValue = rawValue }",
9643
+ ...unlabelled.length ? [" public init(_ rawValue: Swift.String) { _rawValue = rawValue }"] : [],
9644
+ "}",
9645
+ ""
9646
+ ].join("\n")
9647
+ );
9648
+ }
9487
9649
  const type = (parts, where) => {
9488
9650
  const written = text2(parts).trim();
9489
9651
  const optional = /[?!]$/.test(written);
@@ -9506,7 +9668,7 @@ function swiftObjCImports(graphs, options) {
9506
9668
  Double: "double"
9507
9669
  };
9508
9670
  if (!optional && primitive[written] && !parts.some(
9509
- (part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.kind.identifier === "swift.class"
9671
+ (part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.[0]?.kind.identifier === "swift.class"
9510
9672
  ))
9511
9673
  return {
9512
9674
  swift: `Swift.${written === "()" ? "Void" : written}`,
@@ -9518,7 +9680,7 @@ function swiftObjCImports(graphs, options) {
9518
9680
  const identifiers = parts.filter((part) => part.kind === "typeIdentifier");
9519
9681
  const id = identifiers.length === 1 ? identifiers[0]?.preciseIdentifier : void 0;
9520
9682
  const native = id && nativeClass(id);
9521
- const swiftClass = id ? symbols.get(id) : void 0;
9683
+ const swiftClass = id ? symbols.get(id)?.[0] : void 0;
9522
9684
  const resolved = native ? names.get(native) : swiftClass?.kind.identifier === "swift.class" && swiftClass.pathComponents.length === 1 && swiftClass.pathComponents[0] === spelling && types.has(spelling) ? spelling : void 0;
9523
9685
  if (!resolved || identifiers[0]?.spelling !== spelling || spelling !== resolved && spelling !== native)
9524
9686
  return fail(
@@ -9579,7 +9741,8 @@ function swiftObjCImports(graphs, options) {
9579
9741
  );
9580
9742
  };
9581
9743
  const membersByClass = /* @__PURE__ */ new Map();
9582
- for (const symbol of symbols.values()) {
9744
+ const importedSymbols = [...symbols.values()].flat();
9745
+ for (const symbol of importedSymbols) {
9583
9746
  const owner = /^c:objc\(cs\)([A-Za-z_]\w*)\(/.exec(symbol.identifier.precise)?.[1];
9584
9747
  if (owner && selected.has(owner)) {
9585
9748
  const members = membersByClass.get(owner);
@@ -9706,27 +9869,40 @@ function swiftObjCImports(graphs, options) {
9706
9869
  (n) => nodes(n.inner)
9707
9870
  );
9708
9871
  for (const member of members) {
9709
- if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
9872
+ if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && member.name !== "init" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
9710
9873
  (attribute) => attribute.kind === "NSConsumesSelfAttr" || attribute.kind === "ObjCDesignatedInitializerAttr"
9711
- )))
9874
+ )) && !nodes(member.inner).some((attribute) => attribute.kind === "UnavailableAttr"))
9712
9875
  fail(
9713
9876
  `${nativeName}.${member.name}`,
9714
9877
  "explicit or designated initialization is unqualified"
9715
9878
  );
9716
- if (member.variadic === true)
9717
- fail(`${nativeName}.${member.name}`, "variadic methods are unqualified");
9718
- }
9719
- const constructor = thunk(
9720
- `${nativeName}:new`,
9721
- raw2,
9722
- [],
9723
- null,
9724
- `[[${nativeName} alloc] init]`
9725
- );
9879
+ }
9726
9880
  const body = [
9727
- `public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }`,
9728
- `public init() { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: ${constructor}()!) }`
9881
+ `public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }`
9729
9882
  ];
9883
+ const defaultInitializer = members.find(
9884
+ (member) => member.kind === "ObjCMethodDecl" && member.instance === true && member.name === "init"
9885
+ );
9886
+ const importedInitializer = symbols.get(`c:objc(cs)${nativeName}(im)init`);
9887
+ const initializerSpelling = importedInitializer?.[0] ? text2(importedInitializer[0].declarationFragments ?? []).trim() : "init()";
9888
+ if (!/^init[?!]?\(\)$/.test(initializerSpelling))
9889
+ fail(`${nativeName}.init`, "default initializer signature is unqualified");
9890
+ if (!defaultInitializer || !nodes(defaultInitializer.inner).some(
9891
+ (attribute) => attribute.kind === "UnavailableAttr"
9892
+ )) {
9893
+ if (defaultInitializer && (importedInitializer?.length !== 1 || importedInitializer[0]?.kind.identifier !== "swift.init"))
9894
+ fail(`${nativeName}.init`, "missing Swift-imported default initializer");
9895
+ const constructor = thunk(
9896
+ `${nativeName}:new`,
9897
+ raw2,
9898
+ [],
9899
+ null,
9900
+ `[[${nativeName} alloc] init]`
9901
+ );
9902
+ body.push(
9903
+ `public ${initializerSpelling} { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); ${/^init[?!]/.test(initializerSpelling) ? `guard let _peer = ${constructor}() else { return nil }; super.init(_objcRetained: _peer)` : `super.init(_objcRetained: ${constructor}()!)`} }`
9904
+ );
9905
+ }
9730
9906
  bodies.set(name3, body);
9731
9907
  const prefix = `c:objc(cs)${nativeName}`;
9732
9908
  for (const symbol of membersByClass.get(nativeName) ?? []) {
@@ -9744,16 +9920,19 @@ function swiftObjCImports(graphs, options) {
9744
9920
  (m) => m.kind === (property ? "ObjCPropertyDecl" : "ObjCMethodDecl") && m.name === selector && (property ? m.class !== true === instance : m.instance === instance)
9745
9921
  );
9746
9922
  if (!decl) fail(usr, "member absent from original Clang interface");
9923
+ if (decl.variadic === true)
9924
+ fail(`${nativeName}.${selector}`, "variadic methods are unqualified");
9747
9925
  const parts = symbol.declarationFragments ?? [];
9748
9926
  const written = text2(parts);
9749
9927
  if (symbol.availability?.length || /@|\b(?:optional|nonisolated|isolated|async|throws|rethrows)\b/.test(written))
9750
9928
  fail(usr, "availability and asynchronous or throwing imports are unqualified");
9751
9929
  if (nodes(decl.inner).some(
9752
- (a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper|NSConsumesSelf)Attr$/.test(
9930
+ (a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper)Attr$/.test(
9753
9931
  String(a.kind)
9754
- )
9932
+ ) || a.kind === "NSConsumesSelfAttr" && selector !== "init"
9755
9933
  ))
9756
9934
  fail(usr, "member attributes require a qualified importer path");
9935
+ if (selector === "init" && symbol.kind.identifier === "swift.init") continue;
9757
9936
  const receiver = instance ? "_object" : nativeName;
9758
9937
  const access = symbol.accessLevel === "open" ? "open" : "public";
9759
9938
  const memberName = parts.find((part) => part.kind === "identifier")?.spelling;
@@ -9832,7 +10011,7 @@ function swiftObjCImports(graphs, options) {
9832
10011
  }
9833
10012
  }
9834
10013
  const importedFunctions = [];
9835
- for (const symbol of symbols.values()) {
10014
+ for (const symbol of importedSymbols) {
9836
10015
  if (symbol.kind.identifier !== "swift.func") continue;
9837
10016
  const usr = symbol.identifier.precise;
9838
10017
  const native = /^c:@F@([A-Za-z_]\w*)$/.exec(usr)?.[1];
@@ -9873,7 +10052,7 @@ function swiftObjCImports(graphs, options) {
9873
10052
  `public func ${swiftName(name3)}(${argumentsSwift}) -> ${result.swift} { ${result.c === "void" ? "" : "return "}${local}(${parameters.map((p) => swiftName(p.name)).join(", ")}) }`
9874
10053
  );
9875
10054
  }
9876
- if (!classes.length && !importedFunctions.length)
10055
+ if (!classes.length && !importedFunctions.length && !stringWrappers.size)
9877
10056
  fail("declarations", "no represented original Objective-C classes or C functions");
9878
10057
  const registerFunction = `_peachRegisterObjCImports_${hash(options.module)}`;
9879
10058
  const registration = [
@@ -9886,12 +10065,14 @@ function swiftObjCImports(graphs, options) {
9886
10065
  ""
9887
10066
  ].join("\n");
9888
10067
  const swift = [
9889
- ...classes.length ? ["import Foundation", "import PeachObjC"] : [],
10068
+ ...classes.length || stringWrappers.size ? ["import Foundation"] : [],
10069
+ ...classes.length ? ["import PeachObjC"] : [],
9890
10070
  "",
9891
10071
  ...external,
9892
10072
  "",
9893
10073
  ...importedFunctions,
9894
10074
  "",
10075
+ ...stringWrappers.values(),
9895
10076
  ...classes.flatMap((c) => [
9896
10077
  `open class ${swiftName(c.name)}: PeachObjC._ObjCForeignObject {`,
9897
10078
  ...bodies.get(c.name).map((line) => ` ${line}`),
@@ -9912,6 +10093,7 @@ var import_node_crypto4, SwiftObjCImportError, record, nodes, fragments, text2,
9912
10093
  var init_swift_objc_import = __esm({
9913
10094
  "src/swift-objc-import.ts"() {
9914
10095
  "use strict";
10096
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9915
10097
  import_node_crypto4 = require("node:crypto");
9916
10098
  SwiftObjCImportError = class extends Error {
9917
10099
  };
@@ -9941,6 +10123,7 @@ var import_node_path6, IOS_SDK_TARGET, OVERLAY_PATH, tree, IOS_SDK_HEADERS, IOS_
9941
10123
  var init_swift_objc_sdk = __esm({
9942
10124
  "src/swift-objc-sdk.ts"() {
9943
10125
  "use strict";
10126
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9944
10127
  import_node_path6 = __toESM(require("node:path"), 1);
9945
10128
  init_swift_objc_sdk_tree();
9946
10129
  init_swift_toolchain();
@@ -10232,7 +10415,9 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original) {
10232
10415
  "-module-cache-path",
10233
10416
  import_node_path7.default.join(cacheDir5, "ios-module-cache"),
10234
10417
  "-minimum-access-level",
10235
- "public",
10418
+ // symbol graphs hide public underscored names at the public threshold.
10419
+ // original clang headers remain the declaration boundary.
10420
+ original ? "internal" : "public",
10236
10421
  "-skip-synthesized-members",
10237
10422
  "-omit-extension-block-symbols",
10238
10423
  "-output-dir",
@@ -10504,13 +10689,14 @@ var import_node_child_process5, import_node_crypto5, import_node_fs5, import_nod
10504
10689
  var init_swift_objc_standin = __esm({
10505
10690
  "src/swift-objc-standin.ts"() {
10506
10691
  "use strict";
10692
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10507
10693
  import_node_child_process5 = require("node:child_process");
10508
10694
  import_node_crypto5 = require("node:crypto");
10509
10695
  import_node_fs5 = __toESM(require("node:fs"), 1);
10510
10696
  import_node_path7 = __toESM(require("node:path"), 1);
10511
10697
  init_swift_objc_sdk();
10512
10698
  init_swift_toolchain();
10513
- OBJC_IMPORT_VERSION = "3";
10699
+ OBJC_IMPORT_VERSION = "4";
10514
10700
  NATIVE_GRAPH_SDK_VERSION = "27.1";
10515
10701
  NATIVE_GRAPH_INPUTS = {
10516
10702
  sdk: NATIVE_GRAPH_SDK_VERSION,
@@ -10648,6 +10834,7 @@ function validateObjcPeerStartupLibraries(libraries) {
10648
10834
  var init_swift_objc_metadata = __esm({
10649
10835
  "src/swift-objc-metadata.ts"() {
10650
10836
  "use strict";
10837
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10651
10838
  init_swift_objc_sdk();
10652
10839
  init_swift_objc_sdk();
10653
10840
  init_swift_objc_standin();
@@ -10744,6 +10931,32 @@ function swiftTargetModuleName(name3) {
10744
10931
  function swiftPackageIdentity(url) {
10745
10932
  return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
10746
10933
  }
10934
+ function clangMacroSetting(macro) {
10935
+ const [name3, ...value] = macro.split("=");
10936
+ return value.length === 0 ? `.define(${JSON.stringify(name3)})` : `.define(${JSON.stringify(name3)}, to: ${JSON.stringify(value.join("="))})`;
10937
+ }
10938
+ function settingDefines(call, tool) {
10939
+ const defines = [];
10940
+ for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g"))) {
10941
+ let depth = 1;
10942
+ let index = open.index + open[0].length;
10943
+ const start = index;
10944
+ for (; index < call.length && depth > 0; index++) {
10945
+ const char = call[index];
10946
+ if (char === '"') {
10947
+ for (index++; index < call.length && call[index] !== '"'; index++)
10948
+ if (call[index] === "\\") index++;
10949
+ } else if (char === "[") depth++;
10950
+ else if (char === "]") depth--;
10951
+ }
10952
+ const body = call.slice(start, index - 1);
10953
+ for (const match of body.matchAll(
10954
+ /\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"([^"]*)"\s*)?\)/g
10955
+ ))
10956
+ defines.push(match[2] === void 0 ? match[1] : `${match[1]}=${match[2]}`);
10957
+ }
10958
+ return defines;
10959
+ }
10747
10960
  function swiftManifestTargets(manifest, resourcePaths = []) {
10748
10961
  const implicitResources = swiftImplicitResourcePaths(resourcePaths);
10749
10962
  const targets = [];
@@ -10771,9 +10984,9 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
10771
10984
  const cxxInterop = /\.interoperabilityMode\(\s*\.Cxx\s*\)/.test(
10772
10985
  call.replace(/"(?:\\.|[^"\\])*"/g, "")
10773
10986
  );
10774
- const defines = [
10775
- ...call.matchAll(/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*\)/g)
10776
- ].map((match) => match[1]);
10987
+ const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
10988
+ const cDefines = settingDefines(call, "c");
10989
+ const cxxDefines = settingDefines(call, "cxx");
10777
10990
  const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
10778
10991
  (match) => match[1]
10779
10992
  );
@@ -10816,6 +11029,8 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
10816
11029
  mainActorIsolation,
10817
11030
  ...cxxInterop ? { cxxInterop: true } : {},
10818
11031
  ...defines.length === 0 ? {} : { defines },
11032
+ ...cDefines.length === 0 ? {} : { cDefines },
11033
+ ...cxxDefines.length === 0 ? {} : { cxxDefines },
10819
11034
  ...linkedLibraries.length === 0 ? {} : { linkedLibraries },
10820
11035
  resources,
10821
11036
  ...dependencies.length === 0 ? {} : { dependencies },
@@ -10953,6 +11168,7 @@ var MANIFEST_DECLARATIONS, SWIFT_NATIVE_SOURCE_EXTENSIONS, OBJC_RESOURCE_ACCESSO
10953
11168
  var init_swift_package = __esm({
10954
11169
  "src/swift-package.ts"() {
10955
11170
  "use strict";
11171
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10956
11172
  MANIFEST_DECLARATIONS = [
10957
11173
  "executableTarget",
10958
11174
  "testTarget",
@@ -11173,6 +11389,7 @@ var import_node_child_process6, import_node_crypto6, import_node_fs6, import_nod
11173
11389
  var init_swift_root_lock = __esm({
11174
11390
  "src/swift-root-lock.ts"() {
11175
11391
  "use strict";
11392
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11176
11393
  import_node_child_process6 = require("node:child_process");
11177
11394
  import_node_crypto6 = require("node:crypto");
11178
11395
  import_node_fs6 = require("node:fs");
@@ -11189,6 +11406,7 @@ var init_swift_root_lock = __esm({
11189
11406
  var init_assetCatalogContract = __esm({
11190
11407
  "src/assetCatalogContract.ts"() {
11191
11408
  "use strict";
11409
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11192
11410
  }
11193
11411
  });
11194
11412
 
@@ -11253,6 +11471,7 @@ var SWIFT_NATIVE_INPUT_ROOT, SWIFT_NATIVE_SDK_INCLUDE;
11253
11471
  var init_swiftContract = __esm({
11254
11472
  "src/swiftContract.ts"() {
11255
11473
  "use strict";
11474
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11256
11475
  init_assetCatalogContract();
11257
11476
  SWIFT_NATIVE_INPUT_ROOT = "$(PEACH_INPUT_ROOT)";
11258
11477
  SWIFT_NATIVE_SDK_INCLUDE = "$(PEACH_SDK_INCLUDE)";
@@ -11349,6 +11568,7 @@ var import_node_fs7, import_node_path9;
11349
11568
  var init_xcode_header_search = __esm({
11350
11569
  "src/xcode-header-search.ts"() {
11351
11570
  "use strict";
11571
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11352
11572
  import_node_fs7 = __toESM(require("node:fs"), 1);
11353
11573
  import_node_path9 = __toESM(require("node:path"), 1);
11354
11574
  }
@@ -11871,6 +12091,7 @@ function emitSwiftPackageManifest(args) {
11871
12091
  const linkedNativeModules = [...args.native?.entries() ?? []].flatMap(
11872
12092
  ([name3, value]) => value.clang ? [name3] : []
11873
12093
  );
12094
+ const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
11874
12095
  const stanza = (target) => {
11875
12096
  if (target.systemLibrary)
11876
12097
  return ` .systemLibrary(name: ${JSON.stringify(target.name)}, path: ${JSON.stringify(target.path)}),`;
@@ -11947,10 +12168,15 @@ function emitSwiftPackageManifest(args) {
11947
12168
  .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
11948
12169
  ]` : librarySettings.length > 0 ? `,
11949
12170
  linkerSettings: [${librarySettings.join(", ")}]` : "";
12171
+ const cDefines = macroSettings(target.cDefines);
12172
+ const cxxDefines = macroSettings(target.cxxDefines);
11950
12173
  const nativeSettings = native?.clang ? [
11951
- `cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
11952
- `cxxSettings: [${defines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.cxxFlags])})]`
11953
- ].join(", ") : `${args.objcExports ? `cSettings: [.unsafeFlags(${JSON.stringify(args.objcExports.flags)})], ` : ""}cxxSettings: [${defines} .unsafeFlags(["-fno-cxx-modules"])]`;
12174
+ `cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
12175
+ `cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.cxxFlags])})]`
12176
+ ].join(", ") : [
12177
+ `cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.flags ?? []])})]`,
12178
+ `cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.cxxFlags ?? []])})]`
12179
+ ].join(", ");
11954
12180
  return [
11955
12181
  ` ${kind}(`,
11956
12182
  ` name: "${target.name}",`,
@@ -11960,7 +12186,7 @@ function emitSwiftPackageManifest(args) {
11960
12186
  ...native?.clang ? [
11961
12187
  ` sources: ${JSON.stringify(native.clang.sources.map((source) => import_node_path10.default.posix.join(native.path, source)))},`,
11962
12188
  ` publicHeadersPath: ${JSON.stringify(import_node_path10.default.posix.dirname(native.clang.modulemap))},`
11963
- ] : [],
12189
+ ] : native?.flags ? [` sources: ${JSON.stringify(native.sources)},`] : [],
11964
12190
  // the native backend supplies dependency module maps without their
11965
12191
  // compiled modules. textual c++ includes keep those dependencies usable.
11966
12192
  ` ${clang ? nativeSettings : swiftSettings}${link}`,
@@ -11986,24 +12212,26 @@ function emitSwiftPackageManifest(args) {
11986
12212
  ' publicHeadersPath: "include",',
11987
12213
  ` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports.flags.filter((flag) => flag !== "-fobjc-arc"), "-fno-objc-arc", "-Xclang", "-disable-objc-default-synthesize-properties"])})]),`
11988
12214
  ] : [],
11989
- ...[...args.native?.entries() ?? []].flatMap(
11990
- ([name3, native]) => native.late ? (native.groups ?? [
12215
+ ...[...args.native?.entries() ?? []].flatMap(([name3, native]) => {
12216
+ const late = native.late;
12217
+ const owner = targets.find((target) => target.name === name3);
12218
+ return late ? (native.groups ?? [
11991
12219
  {
11992
- name: native.late.name,
12220
+ name: late.name,
11993
12221
  sources: native.lateSources,
11994
12222
  flags: [],
11995
12223
  cxxFlags: []
11996
12224
  }
11997
12225
  ]).flatMap((group) => [
11998
12226
  ` .target(name: ${JSON.stringify(group.name)},`,
11999
- ` dependencies: ${JSON.stringify(args.native?.get(name3)?.mixed ? [] : [name3])},`,
12227
+ ` dependencies: ${JSON.stringify(native.mixed ? [] : [name3, ...late.producers])},`,
12000
12228
  ` path: ${JSON.stringify(native.clang ? "." : native.path)},`,
12001
12229
  ` sources: ${JSON.stringify(native.clang ? group.sources.map((source) => import_node_path10.default.posix.join(native.path, source)) : group.sources)},`,
12002
12230
  ` publicHeadersPath: ${JSON.stringify(native.clang ? import_node_path10.default.posix.dirname(native.clang.modulemap) : "include")},`,
12003
- ` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
12004
- ` cxxSettings: [.unsafeFlags(${JSON.stringify(["-fno-cxx-modules", "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
12005
- ]) : []
12006
- ),
12231
+ ` cSettings: [${macroSettings(owner?.cDefines)} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
12232
+ ` cxxSettings: [${macroSettings(owner?.cxxDefines)} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
12233
+ ]) : [];
12234
+ }),
12007
12235
  args.cxxLanguageStandard ? ` ],
12008
12236
  cxxLanguageStandard: .${args.cxxLanguageStandard}` : " ]",
12009
12237
  ")",
@@ -13808,7 +14036,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
13808
14036
  else files2.set(file, prior);
13809
14037
  }
13810
14038
  targetStagedFiles.delete(target.name);
13811
- if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name) && entries.some(([file]) => /\.mm?$/.test(file)))) {
14039
+ if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name))) {
13812
14040
  if (!swift) {
13813
14041
  const unprepared = import_node_path10.default.join(
13814
14042
  layout.root,
@@ -13881,8 +14109,42 @@ function writeSwiftProject(layout, input, moduleRoot) {
13881
14109
  const entries = targetEntries(target);
13882
14110
  const units = entries.filter(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file));
13883
14111
  if (units.length === 0) continue;
14112
+ const includes = `${prefix}include/`;
14113
+ const consumers = /* @__PURE__ */ new Map();
14114
+ const reverse = /* @__PURE__ */ new Map();
14115
+ for (const [file, contents] of entries) {
14116
+ const producers2 = /* @__PURE__ */ new Set();
14117
+ const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
14118
+ for (const match of source.matchAll(
14119
+ /^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
14120
+ )) {
14121
+ const include2 = match[1];
14122
+ const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
14123
+ if (producer && targets.some((value) => value.name === producer))
14124
+ producers2.add(producer);
14125
+ const local = [
14126
+ import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
14127
+ `${includes}${include2}`
14128
+ ].find((candidate) => input.files[candidate] !== void 0);
14129
+ if (local) {
14130
+ reverse.set(local, [...reverse.get(local) ?? [], file]);
14131
+ }
14132
+ }
14133
+ consumers.set(file, producers2);
14134
+ }
14135
+ const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
14136
+ for (let index = 0; index < queue.length; index++) {
14137
+ const file = queue[index];
14138
+ for (const parent of reverse.get(file) ?? []) {
14139
+ const inherited = consumers.get(parent);
14140
+ const before = inherited.size;
14141
+ for (const producer of consumers.get(file)) inherited.add(producer);
14142
+ if (before !== inherited.size) queue.push(parent);
14143
+ }
14144
+ }
14145
+ const late = units.filter(([file]) => consumers.get(file).size > 0);
13884
14146
  const settings = input.nativeTargets?.find((value) => value.name === target.name);
13885
- if (entries.some(([file]) => file.endsWith(".swift")) || settings && units.some(([file]) => /\.mm?$/.test(file))) {
14147
+ if (settings || entries.some(([file]) => file.endsWith(".swift"))) {
13886
14148
  try {
13887
14149
  if (!settings)
13888
14150
  throw new Error(
@@ -13950,7 +14212,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
13950
14212
  return relative2.split("/").some((part) => part.startsWith(".")) ? import_node_path10.default.posix.join(HIDDEN_UNITS, relative2.replaceAll(/(^|\/)\./g, "$1%2E")) : relative2;
13951
14213
  };
13952
14214
  const accessorFlags = accessor ? ["-include", accessorHeader] : [];
13953
- let nativeC = false;
14215
+ let nativeC = !roots2.length && !entries.some(([file]) => file.endsWith(".swift")) && !units.some(([file]) => /\.mm?$/.test(file));
13954
14216
  if (roots2.length) {
13955
14217
  const sourceHeaders = import_node_path10.default.join(
13956
14218
  layout.root,
@@ -14049,7 +14311,13 @@ export *
14049
14311
  )
14050
14312
  ];
14051
14313
  const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
14052
- const identity2 = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
14314
+ const identity2 = (0, import_node_crypto7.createHash)("sha256").update(
14315
+ JSON.stringify([
14316
+ cxx,
14317
+ perFile,
14318
+ ...nativeC && !roots2.length ? [(consumers.get(file)?.size ?? 0) > 0] : []
14319
+ ])
14320
+ ).digest("hex").slice(0, 12);
14053
14321
  const group = groups.get(identity2) ?? {
14054
14322
  name: `${target.name}${nativeC ? "Native" : "Swift"}Implementation_${identity2}`,
14055
14323
  sources: [],
@@ -14084,6 +14352,31 @@ export *
14084
14352
  accessor.body
14085
14353
  );
14086
14354
  }
14355
+ if (nativeC && !roots2.length) {
14356
+ const lateSources = new Set(late.map(([file]) => unitSource(file)));
14357
+ const owner = [...groups.values()].find(
14358
+ (group) => group.sources.every((source) => !lateSources.has(source))
14359
+ );
14360
+ const implementations = [...groups.values()].filter((group) => group !== owner);
14361
+ native.set(target.name, {
14362
+ path: target.path,
14363
+ includeDirectory: include2,
14364
+ sources: owner?.sources ?? [],
14365
+ lateSources: implementations.flatMap((group) => group.sources),
14366
+ flags: owner?.flags ?? flags,
14367
+ cxxFlags: owner?.cxxFlags ?? flags,
14368
+ ...implementations.length ? {
14369
+ groups: implementations,
14370
+ late: {
14371
+ name: `${target.name}NativeImplementation`,
14372
+ producers: [
14373
+ ...new Set(late.flatMap(([file]) => [...consumers.get(file)]))
14374
+ ].sort()
14375
+ }
14376
+ } : {}
14377
+ });
14378
+ continue;
14379
+ }
14087
14380
  if (nativeC) {
14088
14381
  const modulemaps = Object.entries(settings.productHeaders).filter(
14089
14382
  ([product2]) => product2.endsWith("/Modules/module.modulemap")
@@ -14154,40 +14447,6 @@ export *
14154
14447
  }
14155
14448
  continue;
14156
14449
  }
14157
- const includes = `${prefix}include/`;
14158
- const consumers = /* @__PURE__ */ new Map();
14159
- const reverse = /* @__PURE__ */ new Map();
14160
- for (const [file, contents] of entries) {
14161
- const producers2 = /* @__PURE__ */ new Set();
14162
- const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
14163
- for (const match of source.matchAll(
14164
- /^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
14165
- )) {
14166
- const include2 = match[1];
14167
- const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
14168
- if (producer && targets.some((value) => value.name === producer))
14169
- producers2.add(producer);
14170
- const local = [
14171
- import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
14172
- `${includes}${include2}`
14173
- ].find((candidate) => input.files[candidate] !== void 0);
14174
- if (local) {
14175
- reverse.set(local, [...reverse.get(local) ?? [], file]);
14176
- }
14177
- }
14178
- consumers.set(file, producers2);
14179
- }
14180
- const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
14181
- for (let index = 0; index < queue.length; index++) {
14182
- const file = queue[index];
14183
- for (const parent of reverse.get(file) ?? []) {
14184
- const inherited = consumers.get(parent);
14185
- const before = inherited.size;
14186
- for (const producer of consumers.get(file)) inherited.add(producer);
14187
- if (before !== inherited.size) queue.push(parent);
14188
- }
14189
- }
14190
- const late = units.filter(([file]) => consumers.get(file).size > 0);
14191
14450
  native.set(target.name, {
14192
14451
  path: target.path,
14193
14452
  includeDirectory: import_node_path10.default.join(layout.root, includes),
@@ -15098,6 +15357,7 @@ var import_node_child_process7, import_node_crypto7, import_node_fs8, import_nod
15098
15357
  var init_swift_compile = __esm({
15099
15358
  "src/swift-compile.ts"() {
15100
15359
  "use strict";
15360
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15101
15361
  import_node_child_process7 = require("node:child_process");
15102
15362
  import_node_crypto7 = require("node:crypto");
15103
15363
  import_node_fs8 = require("node:fs");
@@ -15206,7 +15466,7 @@ var init_swift_compile = __esm({
15206
15466
  `;
15207
15467
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
15208
15468
  MULTI_MANIFEST_VERSION = 40;
15209
- compilerSourceDigest = true ? "baf55512a114f4eec85d80685c9e0f04d08ac1ad34d8c18745c233b3d7827025" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
15469
+ compilerSourceDigest = true ? "6ea8d8a06ae707693b5fbb43a21e9d705ee8a19779051d47b05c4bbaeb39fb6c" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
15210
15470
  DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
15211
15471
  OS_IOS = /\b(?:os\(\s*iOS\s*\)|targetEnvironment\(\s*simulator\s*\))/g;
15212
15472
  OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/;
@@ -17437,6 +17697,7 @@ var init_swift_compile = __esm({
17437
17697
  // ../../node_modules/json5/lib/unicode.js
17438
17698
  var require_unicode = __commonJS({
17439
17699
  "../../node_modules/json5/lib/unicode.js"(exports2, module2) {
17700
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17440
17701
  module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
17441
17702
  module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
17442
17703
  module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
@@ -17446,6 +17707,7 @@ var require_unicode = __commonJS({
17446
17707
  // ../../node_modules/json5/lib/util.js
17447
17708
  var require_util = __commonJS({
17448
17709
  "../../node_modules/json5/lib/util.js"(exports2, module2) {
17710
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17449
17711
  var unicode = require_unicode();
17450
17712
  module2.exports = {
17451
17713
  isSpaceSeparator(c) {
@@ -17470,6 +17732,7 @@ var require_util = __commonJS({
17470
17732
  // ../../node_modules/json5/lib/parse.js
17471
17733
  var require_parse = __commonJS({
17472
17734
  "../../node_modules/json5/lib/parse.js"(exports2, module2) {
17735
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17473
17736
  var util = require_util();
17474
17737
  var source;
17475
17738
  var parseState;
@@ -18317,6 +18580,7 @@ var require_parse = __commonJS({
18317
18580
  // ../../node_modules/json5/lib/stringify.js
18318
18581
  var require_stringify = __commonJS({
18319
18582
  "../../node_modules/json5/lib/stringify.js"(exports2, module2) {
18583
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18320
18584
  var util = require_util();
18321
18585
  module2.exports = function stringify4(value, replacer, space) {
18322
18586
  const stack = [];
@@ -18536,6 +18800,7 @@ var require_stringify = __commonJS({
18536
18800
  // ../../node_modules/json5/lib/index.js
18537
18801
  var require_lib = __commonJS({
18538
18802
  "../../node_modules/json5/lib/index.js"(exports2, module2) {
18803
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18539
18804
  var parse4 = require_parse();
18540
18805
  var stringify4 = require_stringify();
18541
18806
  var JSON53 = {
@@ -18869,6 +19134,7 @@ var import_node_path11, import_json5, isObject, text3, items, PHASE_ISA;
18869
19134
  var init_xcode_json_project = __esm({
18870
19135
  "src/xcode-json-project.ts"() {
18871
19136
  "use strict";
19137
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18872
19138
  import_node_path11 = __toESM(require("node:path"), 1);
18873
19139
  import_json5 = __toESM(require_lib(), 1);
18874
19140
  isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -18980,6 +19246,7 @@ var isDict, str, list;
18980
19246
  var init_openstep_plist = __esm({
18981
19247
  "src/openstep-plist.ts"() {
18982
19248
  "use strict";
19249
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18983
19250
  isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
18984
19251
  str = (value) => typeof value === "string" ? value : void 0;
18985
19252
  list = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
@@ -19078,6 +19345,7 @@ var NEVER_MEMBER, BUNDLE_DIR;
19078
19345
  var init_xcode_target_members = __esm({
19079
19346
  "src/xcode-target-members.ts"() {
19080
19347
  "use strict";
19348
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19081
19349
  init_openstep_plist();
19082
19350
  NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
19083
19351
  BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
@@ -19228,10 +19496,10 @@ function loadProject(xcodeproj) {
19228
19496
  const projectFile = xcodeProjectFile(xcodeproj);
19229
19497
  if (!projectFile)
19230
19498
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
19231
- const mtimeMs = import_node_fs9.default.statSync(projectFile).mtimeMs;
19232
- const cached2 = loaded.get(projectFile);
19233
- if (cached2?.mtimeMs === mtimeMs) return cached2.project;
19234
19499
  const source = import_node_fs9.default.readFileSync(projectFile, "utf8");
19500
+ const digest3 = (0, import_node_crypto8.createHash)("sha256").update(source).digest("hex");
19501
+ const cached2 = loaded.get(projectFile);
19502
+ if (cached2?.digest === digest3) return cached2.project;
19235
19503
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
19236
19504
  if (!isDict(root) || !isDict(root.objects)) {
19237
19505
  throw new Error(`${projectFile} has no objects table`);
@@ -19258,7 +19526,7 @@ function loadProject(xcodeproj) {
19258
19526
  object: object3,
19259
19527
  resolvePath
19260
19528
  };
19261
- loaded.set(projectFile, { mtimeMs, project: result });
19529
+ loaded.set(projectFile, { digest: digest3, project: result });
19262
19530
  return result;
19263
19531
  }
19264
19532
  function defaultConfiguration(project) {
@@ -20208,6 +20476,7 @@ var import_node_child_process8, import_node_crypto8, import_node_fs9, import_nod
20208
20476
  var init_xcode_project = __esm({
20209
20477
  "src/xcode-project.ts"() {
20210
20478
  "use strict";
20479
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20211
20480
  import_node_child_process8 = require("node:child_process");
20212
20481
  import_node_crypto8 = require("node:crypto");
20213
20482
  import_node_fs9 = __toESM(require("node:fs"), 1);
@@ -20586,6 +20855,7 @@ var import_node_fs10, import_node_path13, DIRECTIVE2, swiftString, BRIDGE_MODULE
20586
20855
  var init_react_native_bridge_modules = __esm({
20587
20856
  "src/react-native-bridge-modules.ts"() {
20588
20857
  "use strict";
20858
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20589
20859
  import_node_fs10 = __toESM(require("node:fs"), 1);
20590
20860
  import_node_path13 = __toESM(require("node:path"), 1);
20591
20861
  init_swift_compile();
@@ -20676,6 +20946,7 @@ var import_node_crypto9, import_node_fs11, import_node_path14, cacheDir2;
20676
20946
  var init_swift_binary_modules = __esm({
20677
20947
  "src/swift-binary-modules.ts"() {
20678
20948
  "use strict";
20949
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20679
20950
  import_node_crypto9 = require("node:crypto");
20680
20951
  import_node_fs11 = __toESM(require("node:fs"), 1);
20681
20952
  import_node_path14 = __toESM(require("node:path"), 1);
@@ -20691,6 +20962,7 @@ function isValidRuntimeVersion(value) {
20691
20962
  var init_version = __esm({
20692
20963
  "../contrast-runtime-delivery/src/version.ts"() {
20693
20964
  "use strict";
20965
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20694
20966
  }
20695
20967
  });
20696
20968
 
@@ -20698,6 +20970,7 @@ var init_version = __esm({
20698
20970
  var init_product = __esm({
20699
20971
  "../contrast-runtime-delivery/src/product.ts"() {
20700
20972
  "use strict";
20973
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20701
20974
  init_version();
20702
20975
  }
20703
20976
  });
@@ -20845,6 +21118,7 @@ var import_node_child_process9, import_node_crypto10, import_node_fs12, import_n
20845
21118
  var init_src = __esm({
20846
21119
  "../contrast-runtime-delivery/src/index.ts"() {
20847
21120
  "use strict";
21121
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20848
21122
  import_node_child_process9 = require("node:child_process");
20849
21123
  import_node_crypto10 = __toESM(require("node:crypto"), 1);
20850
21124
  import_node_fs12 = __toESM(require("node:fs"), 1);
@@ -20863,12 +21137,12 @@ var swift_distribution_lock_default;
20863
21137
  var init_swift_distribution_lock = __esm({
20864
21138
  "src/swift-distribution.lock.json"() {
20865
21139
  swift_distribution_lock_default = {
20866
- id: "ca4dfda0ca14bc49",
21140
+ id: "433f607a19978269",
20867
21141
  release: "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae",
20868
21142
  wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-f02bd198",
20869
21143
  wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-f02bd198.artifactbundle.tar.gz",
20870
21144
  wasmSdkChecksum: "1e19ea768fd4e821aae34b8966c4ddcee45615c4b3cf018979b061aee2fb5504",
20871
- source: "33e8641403dd73a7ce0ca902007e3a36407e1f0b",
21145
+ source: "f52d21b43f5cba9bd52f1665697284e46d16c0d9",
20872
21146
  targets: [
20873
21147
  "ImagePlayground",
20874
21148
  "QuickLookThumbnailing",
@@ -21057,16 +21331,16 @@ var init_swift_distribution_lock = __esm({
21057
21331
  },
21058
21332
  hosts: {
21059
21333
  "darwin-arm64": {
21060
- sha256: "8679052c4c2b21ad748a8db40cdbc0c91ab14a29fc06bbed777efb57030c01fa",
21061
- size: 70963039
21334
+ sha256: "0b814aa2ced56e4452c82227c4251036346015ba6445e742070ee221c53fc575",
21335
+ size: 71080069
21062
21336
  },
21063
21337
  "linux-x64": {
21064
- sha256: "a1719d844e2f45e8c9a2ccb9dbe7857978918639a3933c225a328d84cae235cf",
21065
- size: 70968746
21338
+ sha256: "62e67740951c7972fde15bc074fe8838f308432a8521e93691035e7fc105b716",
21339
+ size: 71085950
21066
21340
  },
21067
21341
  "linux-arm64": {
21068
- sha256: "3da8f2c920e65c633b5310c778b4a5c54b0f5f8278d58fd109f3db4310794c04",
21069
- size: 70967077
21342
+ sha256: "f900ab5b6a4823966cebe291c91710e6323185df971c667c25ddcc1427935b52",
21343
+ size: 71084016
21070
21344
  }
21071
21345
  }
21072
21346
  };
@@ -21248,6 +21522,7 @@ var import_node_fs13, import_node_os6, import_node_path16, SWIFT_ENDPOINT_ENV, i
21248
21522
  var init_swift_distribution = __esm({
21249
21523
  "src/swift-distribution.ts"() {
21250
21524
  "use strict";
21525
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21251
21526
  import_node_fs13 = __toESM(require("node:fs"), 1);
21252
21527
  import_node_os6 = __toESM(require("node:os"), 1);
21253
21528
  import_node_path16 = __toESM(require("node:path"), 1);
@@ -21553,6 +21828,7 @@ var import_svgpath, RASTER_EXTENSIONS, SYMBOL_CAP_HEIGHT_EM, COMPILED_EXTENSIONS
21553
21828
  var init_bundleAssets = __esm({
21554
21829
  "../sootsim-swift/src/bundleAssets.ts"() {
21555
21830
  "use strict";
21831
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21556
21832
  import_svgpath = __toESM(require("svgpath"), 1);
21557
21833
  init_assetCatalogContract();
21558
21834
  init_swiftContract();
@@ -21745,6 +22021,7 @@ function compileStringCatalog(source, name3) {
21745
22021
  var init_stringCatalog = __esm({
21746
22022
  "../sootsim-swift/src/stringCatalog.ts"() {
21747
22023
  "use strict";
22024
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21748
22025
  init_swiftContract();
21749
22026
  }
21750
22027
  });
@@ -21754,6 +22031,7 @@ var name2, peachPublicBrand, rnxPublicBrand;
21754
22031
  var init_public_brand = __esm({
21755
22032
  "src/public-brand.ts"() {
21756
22033
  "use strict";
22034
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21757
22035
  name2 = "Peach";
21758
22036
  peachPublicBrand = Object.freeze({
21759
22037
  name: name2,
@@ -21852,6 +22130,7 @@ var import_node_fs14, import_node_path17, SESSION_VERSION, SESSION_FILE_ENV, DEF
21852
22130
  var init_shared_session = __esm({
21853
22131
  "src/auth/shared-session.ts"() {
21854
22132
  "use strict";
22133
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21855
22134
  import_node_fs14 = require("node:fs");
21856
22135
  import_node_path17 = require("node:path");
21857
22136
  init_home_paths();
@@ -21867,6 +22146,7 @@ var import_node_async_hooks, sinks;
21867
22146
  var init_run_rnx = __esm({
21868
22147
  "cli/run-rnx.ts"() {
21869
22148
  "use strict";
22149
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21870
22150
  import_node_async_hooks = require("node:async_hooks");
21871
22151
  sinks = new import_node_async_hooks.AsyncLocalStorage();
21872
22152
  }
@@ -21938,6 +22218,7 @@ var GITHUB_TOKEN_PREFIXES;
21938
22218
  var init_auth = __esm({
21939
22219
  "cli/auth.ts"() {
21940
22220
  "use strict";
22221
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21941
22222
  init_shared_session();
21942
22223
  init_run_rnx();
21943
22224
  GITHUB_TOKEN_PREFIXES = ["ghs_", "ghp_", "gho_", "ghu_", "github_pat_"];
@@ -22244,6 +22525,7 @@ var init_ios_sdk_frameworks = __esm({
22244
22525
  var init_android_string_value = __esm({
22245
22526
  "src/android-string-value.ts"() {
22246
22527
  "use strict";
22528
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22247
22529
  }
22248
22530
  });
22249
22531
 
@@ -22251,6 +22533,7 @@ var init_android_string_value = __esm({
22251
22533
  var init_android_xml = __esm({
22252
22534
  "src/android-xml.ts"() {
22253
22535
  "use strict";
22536
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22254
22537
  }
22255
22538
  });
22256
22539
 
@@ -22258,6 +22541,7 @@ var init_android_xml = __esm({
22258
22541
  var init_android_app_identity = __esm({
22259
22542
  "src/android-app-identity.ts"() {
22260
22543
  "use strict";
22544
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22261
22545
  init_android_string_value();
22262
22546
  init_android_xml();
22263
22547
  }
@@ -22267,6 +22551,7 @@ var init_android_app_identity = __esm({
22267
22551
  var init_nativeAppIconContract = __esm({
22268
22552
  "src/nativeAppIconContract.ts"() {
22269
22553
  "use strict";
22554
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22270
22555
  init_assetCatalogContract();
22271
22556
  init_is_record();
22272
22557
  }
@@ -22276,6 +22561,7 @@ var init_nativeAppIconContract = __esm({
22276
22561
  var init_native_app_identity = __esm({
22277
22562
  "src/native-app-identity.ts"() {
22278
22563
  "use strict";
22564
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22279
22565
  init_android_app_identity();
22280
22566
  init_bundleGlobalFooter();
22281
22567
  init_is_record();
@@ -22293,6 +22579,7 @@ var import_plist2;
22293
22579
  var init_plist = __esm({
22294
22580
  "src/plist.ts"() {
22295
22581
  "use strict";
22582
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22296
22583
  import_plist2 = __toESM(require("plist"), 1);
22297
22584
  }
22298
22585
  });
@@ -22301,6 +22588,7 @@ var init_plist = __esm({
22301
22588
  var init_native_app_identity_project = __esm({
22302
22589
  "src/native-app-identity-project.ts"() {
22303
22590
  "use strict";
22591
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22304
22592
  init_android_app_identity();
22305
22593
  init_is_record();
22306
22594
  init_native_app_identity();
@@ -22312,23 +22600,35 @@ var init_native_app_identity_project = __esm({
22312
22600
 
22313
22601
  // src/swift-package-manifest.ts
22314
22602
  function swiftCommand() {
22315
- return process.platform === "darwin" ? { file: "xcrun", args: ["swift"] } : { file: import_node_path18.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift"), args: [] };
22603
+ return process.platform === "darwin" ? (
22604
+ // runner-toolchain-platform: darwin
22605
+ (0, import_node_child_process10.execFileSync)("xcrun", ["--find", "swift"], { encoding: "utf8" }).trim()
22606
+ ) : import_node_path18.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
22316
22607
  }
22317
22608
  function dump(dir) {
22318
22609
  const manifests = import_node_fs15.default.readdirSync(dir).filter((name3) => /^Package(@swift-[\d.]+)?\.swift$/.test(name3)).sort();
22319
22610
  const command = swiftCommand();
22320
- const key2 = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify([command, import_node_path18.default.resolve(dir)])).update(
22611
+ const toolchain = {
22612
+ path: command,
22613
+ realpath: import_node_fs15.default.realpathSync(command),
22614
+ sha256: (0, import_node_crypto11.createHash)("sha256").update(import_node_fs15.default.readFileSync(command)).digest("hex"),
22615
+ version: (0, import_node_child_process10.execFileSync)(command, ["--version"], {
22616
+ encoding: "utf8",
22617
+ env: swiftEnvironment(),
22618
+ stdio: ["ignore", "pipe", "pipe"]
22619
+ }).trim()
22620
+ };
22621
+ const key2 = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify([toolchain, import_node_path18.default.resolve(dir)])).update(
22321
22622
  manifests.map((name3) => `${name3}\0${import_node_fs15.default.readFileSync(import_node_path18.default.join(dir, name3), "utf8")}`).join("\0")
22322
22623
  ).digest("hex").slice(0, 32);
22323
22624
  const cached2 = import_node_path18.default.join(cacheDir3, `${key2}.json`);
22324
22625
  if (import_node_fs15.default.existsSync(cached2))
22325
- return { key: key2, raw: record2(JSON.parse(import_node_fs15.default.readFileSync(cached2, "utf8"))) };
22626
+ return { key: key2, toolchain, raw: record2(JSON.parse(import_node_fs15.default.readFileSync(cached2, "utf8"))) };
22326
22627
  let output;
22327
22628
  try {
22328
22629
  output = (0, import_node_child_process10.execFileSync)(
22329
- command.file,
22630
+ command,
22330
22631
  [
22331
- ...command.args,
22332
22632
  "package",
22333
22633
  ...swiftPackageCacheOptions(),
22334
22634
  "--package-path",
@@ -22353,7 +22653,7 @@ function dump(dir) {
22353
22653
  }
22354
22654
  import_node_fs15.default.mkdirSync(cacheDir3, { recursive: true });
22355
22655
  import_node_fs15.default.writeFileSync(cached2, output);
22356
- return { key: key2, raw: record2(JSON.parse(output)) };
22656
+ return { key: key2, toolchain, raw: record2(JSON.parse(output)) };
22357
22657
  }
22358
22658
  function defaultTraits(manifest) {
22359
22659
  const traits = new Map(
@@ -22381,15 +22681,18 @@ function linksOnIOS(condition, traits) {
22381
22681
  }
22382
22682
  function swiftPackageManifest(dir) {
22383
22683
  dir = import_node_fs15.default.realpathSync(dir);
22384
- const { key: key2, raw: raw2 } = dump(dir);
22684
+ const { key: key2, raw: raw2, toolchain } = dump(dir);
22385
22685
  const known = evaluated.get(key2);
22386
22686
  if (known) return known;
22387
22687
  const traits = defaultTraits(raw2);
22388
22688
  const tools = Number(
22389
22689
  /^(\d+)/.exec(string2(record2(raw2.toolsVersion)._version) ?? "5")?.[1] ?? 5
22390
22690
  );
22391
- const declaredModes = array(raw2.swiftLanguageVersions).flatMap((mode) => {
22392
- const major = Number(/^(\d+)/.exec(string2(mode) ?? "")?.[1]);
22691
+ const declaredModeValues = array(raw2.swiftLanguageVersions).flatMap(
22692
+ (mode) => string2(mode) ?? []
22693
+ );
22694
+ const declaredModes = declaredModeValues.flatMap((mode) => {
22695
+ const major = Number(/^(\d+)/.exec(mode)?.[1]);
22393
22696
  return Number.isFinite(major) ? [major] : [];
22394
22697
  });
22395
22698
  const packageMode = Math.max(
@@ -22452,10 +22755,14 @@ function swiftPackageManifest(dir) {
22452
22755
  });
22453
22756
  }
22454
22757
  let languageMode = packageMode;
22758
+ let sourceLanguageMode = declaredModeValues.length ? declaredModeValues.reduce(
22759
+ (highest, mode) => Number(mode) > Number(highest) ? mode : highest
22760
+ ) : tools >= 6 ? "6" : tools >= 5 ? "5" : string2(record2(raw2.toolsVersion)._version) ?? "unknown";
22455
22761
  let mainActorIsolation = false;
22456
22762
  const defines = [];
22457
22763
  const libraries = [];
22458
22764
  const nativeSettings = [];
22765
+ const unsupportedSwiftSettings = [];
22459
22766
  for (const [tool, standard] of [
22460
22767
  ["c", string2(raw2.cLanguageStandard)],
22461
22768
  ["cxx", string2(raw2.cxxLanguageStandard)]
@@ -22466,6 +22773,16 @@ function swiftPackageManifest(dir) {
22466
22773
  for (const setting of array(target.settings)) {
22467
22774
  const { kind: rawKind, tool, condition } = record2(setting);
22468
22775
  const settingKind = record2(rawKind);
22776
+ if (tool === "swift") {
22777
+ const kinds = Object.keys(settingKind);
22778
+ const supported = kinds.length === 1 && (kinds[0] === "define" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(
22779
+ string2(record2(settingKind.define)._0) ?? ""
22780
+ ) || kinds[0] === "swiftLanguageMode" && Object.keys(record2(condition)).length === 0 || kinds[0] === "defaultIsolation" && Object.keys(record2(condition)).length === 0 && ["MainActor", "nonisolated"].includes(
22781
+ string2(record2(settingKind.defaultIsolation)._0) ?? ""
22782
+ ));
22783
+ if (!supported)
22784
+ unsupportedSwiftSettings.push(JSON.stringify({ kind: rawKind, condition }));
22785
+ }
22469
22786
  if ((tool === "c" || tool === "cxx") && linksOnIOS(condition, traits)) {
22470
22787
  const config = string2(record2(condition).config);
22471
22788
  const header = string2(record2(settingKind.headerSearchPath)._0);
@@ -22485,6 +22802,7 @@ function swiftPackageManifest(dir) {
22485
22802
  });
22486
22803
  }
22487
22804
  const mode = string2(record2(settingKind.swiftLanguageMode)._0);
22805
+ if (tool === "swift" && mode) sourceLanguageMode = mode;
22488
22806
  if (mode)
22489
22807
  languageMode = Math.max(5, Number(/^(\d+)/.exec(mode)?.[1] ?? languageMode));
22490
22808
  if (string2(record2(settingKind.defaultIsolation)._0) === "MainActor")
@@ -22506,6 +22824,10 @@ function swiftPackageManifest(dir) {
22506
22824
  });
22507
22825
  }
22508
22826
  }
22827
+ if (!["5", "6"].includes(sourceLanguageMode))
22828
+ unsupportedSwiftSettings.push(
22829
+ `unsupported Swift language mode: ${sourceLanguageMode}`
22830
+ );
22509
22831
  targets.set(name4, {
22510
22832
  name: name4,
22511
22833
  type: kind,
@@ -22519,6 +22841,8 @@ function swiftPackageManifest(dir) {
22519
22841
  libraries,
22520
22842
  nativeSettings,
22521
22843
  declaresResources: array(target.resources).length > 0,
22844
+ hasPluginUsages: array(target.pluginUsages).length > 0,
22845
+ unsupportedSwiftSettings,
22522
22846
  publicHeadersPath: string2(target.publicHeadersPath) ?? "include",
22523
22847
  url: string2(target.url) ?? null,
22524
22848
  checksum: string2(target.checksum) ?? null
@@ -22526,7 +22850,7 @@ function swiftPackageManifest(dir) {
22526
22850
  }
22527
22851
  const name3 = string2(raw2.name);
22528
22852
  if (!name3) throw new Error(`swiftpm returned no package name for ${dir}`);
22529
- const manifest = { name: name3, dir, products, targets, packages };
22853
+ const manifest = { name: name3, dir, products, targets, packages, toolchain };
22530
22854
  evaluated.set(key2, manifest);
22531
22855
  return manifest;
22532
22856
  }
@@ -22556,6 +22880,7 @@ var import_node_child_process10, import_node_crypto11, import_node_fs15, import_
22556
22880
  var init_swift_package_manifest = __esm({
22557
22881
  "src/swift-package-manifest.ts"() {
22558
22882
  "use strict";
22883
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22559
22884
  import_node_child_process10 = require("node:child_process");
22560
22885
  import_node_crypto11 = require("node:crypto");
22561
22886
  import_node_fs15 = __toESM(require("node:fs"), 1);
@@ -22857,6 +23182,7 @@ var import_node_child_process11, import_node_crypto12, import_node_fs16, import_
22857
23182
  var init_swift_packages = __esm({
22858
23183
  "src/swift-packages.ts"() {
22859
23184
  "use strict";
23185
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22860
23186
  import_node_child_process11 = require("node:child_process");
22861
23187
  import_node_crypto12 = require("node:crypto");
22862
23188
  import_node_fs16 = __toESM(require("node:fs"), 1);
@@ -22917,6 +23243,7 @@ var import_node_fs17, import_node_path20;
22917
23243
  var init_swift_source_file = __esm({
22918
23244
  "src/swift-source-file.ts"() {
22919
23245
  "use strict";
23246
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22920
23247
  import_node_fs17 = __toESM(require("node:fs"), 1);
22921
23248
  import_node_path20 = __toESM(require("node:path"), 1);
22922
23249
  }
@@ -23081,6 +23408,7 @@ var import_node_fs18, import_node_path21, isDirectory2, isSdkInclude;
23081
23408
  var init_swift_objc_compile = __esm({
23082
23409
  "src/swift-objc-compile.ts"() {
23083
23410
  "use strict";
23411
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23084
23412
  import_node_fs18 = __toESM(require("node:fs"), 1);
23085
23413
  import_node_path21 = __toESM(require("node:path"), 1);
23086
23414
  init_home_paths();
@@ -23105,6 +23433,7 @@ var import_acorn, import_sucrase;
23105
23433
  var init_swift_standin_config = __esm({
23106
23434
  "src/swift-standin-config.ts"() {
23107
23435
  "use strict";
23436
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23108
23437
  import_acorn = require("acorn");
23109
23438
  import_sucrase = require("sucrase");
23110
23439
  init_is_record();
@@ -23139,6 +23468,7 @@ var import_node_fs19, import_node_url2, import_meta, cached;
23139
23468
  var init_cli_version = __esm({
23140
23469
  "src/cli-version.ts"() {
23141
23470
  "use strict";
23471
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23142
23472
  import_node_fs19 = require("node:fs");
23143
23473
  import_node_url2 = require("node:url");
23144
23474
  init_public_brand();
@@ -23175,6 +23505,7 @@ var import_node_fs20;
23175
23505
  var init_output_lock_stdio = __esm({
23176
23506
  "src/output-lock-stdio.ts"() {
23177
23507
  "use strict";
23508
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23178
23509
  import_node_fs20 = require("node:fs");
23179
23510
  }
23180
23511
  });
@@ -23856,6 +24187,7 @@ var STANDIN_EMIT_VERSION, STANDIN_IMPORTS, TYPE_KINDS, MEMBER_KINDS, ACCESSOR_WO
23856
24187
  var init_swift_standin_emit = __esm({
23857
24188
  "src/swift-standin-emit.ts"() {
23858
24189
  "use strict";
24190
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23859
24191
  STANDIN_EMIT_VERSION = "12";
23860
24192
  STANDIN_IMPORTS = ["Foundation", "UIKit"];
23861
24193
  TYPE_KINDS = /* @__PURE__ */ new Set([
@@ -25183,6 +25515,7 @@ var import_node_child_process12, import_node_crypto13, import_node_fs21, import_
25183
25515
  var init_swift_standins = __esm({
25184
25516
  "src/swift-standins.ts"() {
25185
25517
  "use strict";
25518
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25186
25519
  import_node_child_process12 = require("node:child_process");
25187
25520
  import_node_crypto13 = require("node:crypto");
25188
25521
  import_node_fs21 = __toESM(require("node:fs"), 1);
@@ -25351,6 +25684,7 @@ var SWIFT_COMPILE_PATH, MAX_SWIFT_COMPILE_FILES, DEFAULT_SWIFT_COMPILE_BUILD_MS,
25351
25684
  var init_swift_submit = __esm({
25352
25685
  "src/swift-submit.ts"() {
25353
25686
  "use strict";
25687
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25354
25688
  init_is_record();
25355
25689
  init_swiftContract();
25356
25690
  SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -25367,7 +25701,7 @@ var init_swift_submit = __esm({
25367
25701
  MAX_SWIFT_COMPILE_IMAGES = 128;
25368
25702
  MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
25369
25703
  MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
25370
- SWIFT_HOST_ABI = 47;
25704
+ SWIFT_HOST_ABI = 48;
25371
25705
  POLL_INTERVAL_MS = 1500;
25372
25706
  }
25373
25707
  });
@@ -25577,8 +25911,14 @@ function xcodeLayout(root) {
25577
25911
  if (relative3 === ".." || relative3.startsWith(`..${import_node_path23.default.sep}`) || import_node_path23.default.isAbsolute(relative3))
25578
25912
  throw new Error(`swift input escapes the selected package: ${target.dir}`);
25579
25913
  const posix = relative3.split(import_node_path23.default.sep).join(import_node_path23.default.posix.sep);
25914
+ const packageMacros = [
25915
+ "SWIFT_PACKAGE=1",
25916
+ ...packageConfiguration === "debug" ? ["DEBUG=1"] : []
25917
+ ];
25580
25918
  targets.push({
25581
25919
  ...target,
25920
+ cDefines: packageMacros,
25921
+ cxxDefines: packageMacros,
25582
25922
  path: target.remote ? import_node_path23.default.posix.join(XCODE_PACKAGES_DIR, posix) : posix,
25583
25923
  exclude: [],
25584
25924
  defines: [
@@ -25735,6 +26075,12 @@ function xcodeManifest(layout) {
25735
26075
  ...target.mainActorIsolation ? [".defaultIsolation(MainActor.self)"] : [],
25736
26076
  ...(target.defines ?? []).map((name3) => `.define(${JSON.stringify(name3)})`)
25737
26077
  ].join(", ")}]`;
26078
+ const clangSettings = (target) => [
26079
+ ["cSettings", target.cDefines],
26080
+ ["cxxSettings", target.cxxDefines]
26081
+ ].map(
26082
+ ([label, macros]) => macros?.length ? `${label}: [${macros.map(clangMacroSetting).join(", ")}], ` : ""
26083
+ ).join("");
25738
26084
  const libraries = (target) => target.linkedLibraries?.length ? `, linkerSettings: [${target.linkedLibraries.map((name3) => `.linkedLibrary(${JSON.stringify(name3)})`).join(", ")}]` : "";
25739
26085
  return [
25740
26086
  "// swift-tools-version: 6.2",
@@ -25742,7 +26088,7 @@ function xcodeManifest(layout) {
25742
26088
  'let package = Package(name: "app", targets: [',
25743
26089
  ` .executableTarget(name: "${layout.app.moduleName}", path: "${XCODE_APP_DIR}", ${settings(layout.app)}),`,
25744
26090
  ...layout.targets.map(
25745
- (target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${settings(target)}${libraries(target)}),`
26091
+ (target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${clangSettings(target)}${settings(target)}${libraries(target)}),`
25746
26092
  ),
25747
26093
  "])",
25748
26094
  ""
@@ -26476,6 +26822,7 @@ var import_node_crypto14, import_node_fs22, import_node_path23, RESOURCE_PATH, I
26476
26822
  var init_swift_host = __esm({
26477
26823
  "src/swift-host.ts"() {
26478
26824
  "use strict";
26825
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
26479
26826
  import_node_crypto14 = require("node:crypto");
26480
26827
  import_node_fs22 = __toESM(require("node:fs"), 1);
26481
26828
  import_node_path23 = __toESM(require("node:path"), 1);
@@ -27204,6 +27551,7 @@ var import_node_child_process13, import_node_crypto15, import_node_fs23, import_
27204
27551
  var init_expo_swift_host = __esm({
27205
27552
  "src/expo-swift-host.ts"() {
27206
27553
  "use strict";
27554
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27207
27555
  import_node_child_process13 = require("node:child_process");
27208
27556
  import_node_crypto15 = require("node:crypto");
27209
27557
  import_node_fs23 = __toESM(require("node:fs"), 1);
@@ -27262,6 +27610,7 @@ async function buildExpoSwiftBundle(appRoot) {
27262
27610
  var init_expo_swift_bundle = __esm({
27263
27611
  "src/expo-swift-bundle.ts"() {
27264
27612
  "use strict";
27613
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27265
27614
  init_expo_swift_host();
27266
27615
  }
27267
27616
  });
@@ -27287,6 +27636,7 @@ function isNativeViewSource(value) {
27287
27636
  var init_nativeViewSourceContract = __esm({
27288
27637
  "src/nativeViewSourceContract.ts"() {
27289
27638
  "use strict";
27639
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27290
27640
  init_is_record();
27291
27641
  }
27292
27642
  });
@@ -27475,6 +27825,7 @@ var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
27475
27825
  var init_config = __esm({
27476
27826
  "src/config.ts"() {
27477
27827
  "use strict";
27828
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27478
27829
  init_version();
27479
27830
  init_bundleGlobalFooter();
27480
27831
  init_is_record();
@@ -27519,6 +27870,7 @@ var import_node_fs24, import_node_path25, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFI
27519
27870
  var init_app_project = __esm({
27520
27871
  "cli/app-project.ts"() {
27521
27872
  "use strict";
27873
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27522
27874
  import_node_fs24 = __toESM(require("node:fs"), 1);
27523
27875
  import_node_path25 = __toESM(require("node:path"), 1);
27524
27876
  EXPO_APP_CONFIG_NAMES = [
@@ -27966,6 +28318,7 @@ var import_node_crypto16, import_node_fs25, import_node_module2, import_node_pat
27966
28318
  var init_nitro_source = __esm({
27967
28319
  "src/nitro-source.ts"() {
27968
28320
  "use strict";
28321
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
27969
28322
  import_node_crypto16 = require("node:crypto");
27970
28323
  import_node_fs25 = __toESM(require("node:fs"), 1);
27971
28324
  import_node_module2 = require("node:module");
@@ -27997,6 +28350,7 @@ var import_oxc_parser;
27997
28350
  var init_visit_parsed_program = __esm({
27998
28351
  "src/visit-parsed-program.ts"() {
27999
28352
  "use strict";
28353
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28000
28354
  import_oxc_parser = require("oxc-parser");
28001
28355
  init_is_record();
28002
28356
  }
@@ -28007,6 +28361,7 @@ var import_node_fs26, nodeRepoFileReader;
28007
28361
  var init_nodeRepoFileReader = __esm({
28008
28362
  "cli/commands/nodeRepoFileReader.ts"() {
28009
28363
  "use strict";
28364
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28010
28365
  import_node_fs26 = require("node:fs");
28011
28366
  nodeRepoFileReader = {
28012
28367
  exists: import_node_fs26.existsSync,
@@ -28109,6 +28464,7 @@ var import_node_fs27, import_node_path27, import_json52, REPORT_SKIP_DIRS;
28109
28464
  var init_detect = __esm({
28110
28465
  "cli/commands/detect.ts"() {
28111
28466
  "use strict";
28467
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28112
28468
  import_node_fs27 = require("node:fs");
28113
28469
  import_node_path27 = require("node:path");
28114
28470
  import_json52 = __toESM(require_lib(), 1);
@@ -28670,6 +29026,7 @@ var import_node_fs28, import_node_path28, import_version_range, import_oxc_parse
28670
29026
  var init_app_stubs = __esm({
28671
29027
  "cli/app-stubs.ts"() {
28672
29028
  "use strict";
29029
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28673
29030
  import_node_fs28 = require("node:fs");
28674
29031
  import_node_path28 = require("node:path");
28675
29032
  import_version_range = require("@peach/compat/version-range");
@@ -28777,6 +29134,7 @@ var import_node_fs29, import_node_path29, import_jiti, WIRE_SLOTS;
28777
29134
  var init_app_config = __esm({
28778
29135
  "cli/app-config.ts"() {
28779
29136
  "use strict";
29137
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28780
29138
  import_node_fs29 = require("node:fs");
28781
29139
  import_node_path29 = __toESM(require("node:path"), 1);
28782
29140
  import_jiti = require("jiti");
@@ -28811,12 +29169,12 @@ var init_nitro_adapter_lock = __esm({
28811
29169
  checksum: "1e19ea768fd4e821aae34b8966c4ddcee45615c4b3cf018979b061aee2fb5504"
28812
29170
  },
28813
29171
  framework: {
28814
- distribution: "ca4dfda0ca14bc49",
29172
+ distribution: "433f607a19978269",
28815
29173
  wireAbi: "ed0b01fcc0a79236d88ef9ac7950ac30932dfc19c19112c69d1d6a039a489292"
28816
29174
  },
28817
29175
  archive: {
28818
- sha256: "e5c94039c146c3f35b1a9e32368c2a6c605140be79e386cac57ad2bae06a9a3d",
28819
- size: 31177
29176
+ sha256: "17c176f0bee02e9aa3417d12328986d80c489c8734337d2af7b53f2393a5119c",
29177
+ size: 31176
28820
29178
  }
28821
29179
  };
28822
29180
  }
@@ -28946,6 +29304,7 @@ var import_node_crypto17, import_node_fs30, import_node_path30, NITRO_ADAPTER_MA
28946
29304
  var init_nitroAdapterContract = __esm({
28947
29305
  "src/nitroAdapterContract.ts"() {
28948
29306
  "use strict";
29307
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
28949
29308
  import_node_crypto17 = require("node:crypto");
28950
29309
  import_node_fs30 = require("node:fs");
28951
29310
  import_node_path30 = __toESM(require("node:path"), 1);
@@ -29029,6 +29388,7 @@ var import_node_fs31, import_node_path31, committedNitroAdapterLock;
29029
29388
  var init_nitro_adapter = __esm({
29030
29389
  "src/nitro-adapter.ts"() {
29031
29390
  "use strict";
29391
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29032
29392
  import_node_fs31 = __toESM(require("node:fs"), 1);
29033
29393
  import_node_path31 = __toESM(require("node:path"), 1);
29034
29394
  init_src();
@@ -29100,6 +29460,7 @@ var import_node_crypto18, import_node_fs32, import_node_os8, import_node_path32;
29100
29460
  var init_nitro_compile = __esm({
29101
29461
  "src/nitro-compile.ts"() {
29102
29462
  "use strict";
29463
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29103
29464
  import_node_crypto18 = require("node:crypto");
29104
29465
  import_node_fs32 = __toESM(require("node:fs"), 1);
29105
29466
  import_node_os8 = __toESM(require("node:os"), 1);
@@ -29166,6 +29527,7 @@ async function buildNitroBundle(appRoot, moduleRoot) {
29166
29527
  var init_nitro_bundle = __esm({
29167
29528
  "src/nitro-bundle.ts"() {
29168
29529
  "use strict";
29530
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29169
29531
  init_app_config();
29170
29532
  init_app_project();
29171
29533
  init_nitro_compile();
@@ -29179,6 +29541,7 @@ var init_nitro_bundle = __esm({
29179
29541
  var init_androidAutolinkingContract = __esm({
29180
29542
  "src/androidAutolinkingContract.ts"() {
29181
29543
  "use strict";
29544
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29182
29545
  init_bundleGlobalFooter();
29183
29546
  }
29184
29547
  });
@@ -29234,6 +29597,7 @@ var import_node_child_process14, import_node_fs33, import_node_module3, import_n
29234
29597
  var init_android_autolinking = __esm({
29235
29598
  "src/android-autolinking.ts"() {
29236
29599
  "use strict";
29600
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29237
29601
  import_node_child_process14 = require("node:child_process");
29238
29602
  import_node_fs33 = __toESM(require("node:fs"), 1);
29239
29603
  import_node_module3 = require("node:module");
@@ -29252,6 +29616,7 @@ var IS_STANDALONE;
29252
29616
  var init_standalone = __esm({
29253
29617
  "cli/standalone.ts"() {
29254
29618
  "use strict";
29619
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29255
29620
  IS_STANDALONE = typeof __SOOTSIM_STANDALONE__ !== "undefined" && __SOOTSIM_STANDALONE__;
29256
29621
  }
29257
29622
  });
@@ -29295,6 +29660,7 @@ var import_node_crypto19, import_node_fs34, import_node_path34, import_node_url3
29295
29660
  var init_kotlin_module = __esm({
29296
29661
  "src/kotlin-module.ts"() {
29297
29662
  "use strict";
29663
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29298
29664
  import_node_crypto19 = require("node:crypto");
29299
29665
  import_node_fs34 = __toESM(require("node:fs"), 1);
29300
29666
  import_node_path34 = __toESM(require("node:path"), 1);
@@ -29412,6 +29778,7 @@ var import_node_child_process15, import_node_crypto20, import_node_fs35, import_
29412
29778
  var init_kotlin_toolchain = __esm({
29413
29779
  "src/kotlin-toolchain.ts"() {
29414
29780
  "use strict";
29781
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29415
29782
  import_node_child_process15 = require("node:child_process");
29416
29783
  import_node_crypto20 = require("node:crypto");
29417
29784
  import_node_fs35 = __toESM(require("node:fs"), 1);
@@ -29448,6 +29815,7 @@ var platform, KOTLIN_SDK_PROFILES, KOTLIN_SDK_FILES;
29448
29815
  var init_kotlinSdkContract = __esm({
29449
29816
  "src/kotlinSdkContract.ts"() {
29450
29817
  "use strict";
29818
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29451
29819
  init_is_record();
29452
29820
  platform = ["Sources", "JniPlatformSources", "JniSources"];
29453
29821
  KOTLIN_SDK_PROFILES = {
@@ -29548,6 +29916,7 @@ var import_node_child_process16, import_node_crypto21, import_node_fs36, import_
29548
29916
  var init_kotlin_sdk = __esm({
29549
29917
  "src/kotlin-sdk.ts"() {
29550
29918
  "use strict";
29919
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29551
29920
  import_node_child_process16 = require("node:child_process");
29552
29921
  import_node_crypto21 = require("node:crypto");
29553
29922
  import_node_fs36 = __toESM(require("node:fs"), 1);
@@ -29633,6 +30002,7 @@ var VIEW_MODEL, ANDROID_VIEW_MODEL, APPLICATION2, HANDLE;
29633
30002
  var init_kotlin_view_models = __esm({
29634
30003
  "src/kotlin-view-models.ts"() {
29635
30004
  "use strict";
30005
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
29636
30006
  init_is_record();
29637
30007
  VIEW_MODEL = "androidx.lifecycle.ViewModel";
29638
30008
  ANDROID_VIEW_MODEL = "androidx.lifecycle.AndroidViewModel";
@@ -30649,6 +31019,7 @@ var import_node_child_process17, import_node_crypto22, import_node_fs37, import_
30649
31019
  var init_kotlin_host = __esm({
30650
31020
  "src/kotlin-host.ts"() {
30651
31021
  "use strict";
31022
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30652
31023
  import_node_child_process17 = require("node:child_process");
30653
31024
  import_node_crypto22 = require("node:crypto");
30654
31025
  import_node_fs37 = __toESM(require("node:fs"), 1);
@@ -30770,6 +31141,7 @@ var import_node_fs38, import_node_path38;
30770
31141
  var init_expo_kotlin_host = __esm({
30771
31142
  "src/expo-kotlin-host.ts"() {
30772
31143
  "use strict";
31144
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30773
31145
  import_node_fs38 = __toESM(require("node:fs"), 1);
30774
31146
  import_node_path38 = __toESM(require("node:path"), 1);
30775
31147
  init_android_autolinking();
@@ -30803,6 +31175,7 @@ async function buildExpoKotlinBundle(appRoot) {
30803
31175
  var init_expo_kotlin_bundle = __esm({
30804
31176
  "src/expo-kotlin-bundle.ts"() {
30805
31177
  "use strict";
31178
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30806
31179
  init_expo_kotlin_host();
30807
31180
  }
30808
31181
  });
@@ -30816,11 +31189,13 @@ __export(bundle_channel_exports, {
30816
31189
  snapshotOneDevBundle: () => snapshotOneDevBundle
30817
31190
  });
30818
31191
  module.exports = __toCommonJS(bundle_channel_exports);
31192
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30819
31193
  var import_node_crypto23 = require("node:crypto");
30820
31194
  var import_node_vm = require("node:vm");
30821
31195
  init_backend_origin();
30822
31196
 
30823
31197
  // src/expoKotlinContract.ts
31198
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30824
31199
  init_bundleGlobalFooter();
30825
31200
  init_is_record();
30826
31201
  function readExpoKotlinMetadata(value) {
@@ -30857,6 +31232,7 @@ function insertExpoKotlinFooter(source, metadata) {
30857
31232
  }
30858
31233
 
30859
31234
  // src/expoSwiftContract.ts
31235
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
30860
31236
  init_bundleGlobalFooter();
30861
31237
  init_is_record();
30862
31238
  function strings(value) {