@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (755) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +714 -2
  3. package/dist/cache/index.d.ts +191 -0
  4. package/dist/cache/index.d.ts.map +1 -0
  5. package/dist/cache/index.js +361 -0
  6. package/dist/cache/index.js.map +1 -0
  7. package/dist/canonical/jcs.d.ts +78 -0
  8. package/dist/canonical/jcs.d.ts.map +1 -0
  9. package/dist/canonical/jcs.js +500 -0
  10. package/dist/canonical/jcs.js.map +1 -0
  11. package/dist/canonical/restricted-json.d.ts +7 -0
  12. package/dist/canonical/restricted-json.d.ts.map +1 -0
  13. package/dist/canonical/restricted-json.js +318 -0
  14. package/dist/canonical/restricted-json.js.map +1 -0
  15. package/dist/canonical/restricted-value.d.ts +59 -0
  16. package/dist/canonical/restricted-value.d.ts.map +1 -0
  17. package/dist/canonical/restricted-value.js +156 -0
  18. package/dist/canonical/restricted-value.js.map +1 -0
  19. package/dist/canonical/restricted.d.ts +85 -0
  20. package/dist/canonical/restricted.d.ts.map +1 -0
  21. package/dist/canonical/restricted.js +163 -0
  22. package/dist/canonical/restricted.js.map +1 -0
  23. package/dist/canonical/signature.d.ts +38 -0
  24. package/dist/canonical/signature.d.ts.map +1 -0
  25. package/dist/canonical/signature.js +47 -0
  26. package/dist/canonical/signature.js.map +1 -0
  27. package/dist/eval/access/delivery.d.ts +63 -0
  28. package/dist/eval/access/delivery.d.ts.map +1 -0
  29. package/dist/eval/access/delivery.js +98 -0
  30. package/dist/eval/access/delivery.js.map +1 -0
  31. package/dist/eval/access/overlay.d.ts +72 -0
  32. package/dist/eval/access/overlay.d.ts.map +1 -0
  33. package/dist/eval/access/overlay.js +402 -0
  34. package/dist/eval/access/overlay.js.map +1 -0
  35. package/dist/eval/access/projection.d.ts +159 -0
  36. package/dist/eval/access/projection.d.ts.map +1 -0
  37. package/dist/eval/access/projection.js +211 -0
  38. package/dist/eval/access/projection.js.map +1 -0
  39. package/dist/eval/access/window.d.ts +128 -0
  40. package/dist/eval/access/window.d.ts.map +1 -0
  41. package/dist/eval/access/window.js +254 -0
  42. package/dist/eval/access/window.js.map +1 -0
  43. package/dist/eval/access/write.d.ts +113 -0
  44. package/dist/eval/access/write.d.ts.map +1 -0
  45. package/dist/eval/access/write.js +119 -0
  46. package/dist/eval/access/write.js.map +1 -0
  47. package/dist/eval/addressing.d.ts +131 -0
  48. package/dist/eval/addressing.d.ts.map +1 -0
  49. package/dist/eval/addressing.js +270 -0
  50. package/dist/eval/addressing.js.map +1 -0
  51. package/dist/eval/budget.d.ts +143 -0
  52. package/dist/eval/budget.d.ts.map +1 -0
  53. package/dist/eval/budget.js +387 -0
  54. package/dist/eval/budget.js.map +1 -0
  55. package/dist/eval/computed.d.ts +46 -0
  56. package/dist/eval/computed.d.ts.map +1 -0
  57. package/dist/eval/computed.js +89 -0
  58. package/dist/eval/computed.js.map +1 -0
  59. package/dist/eval/denials.d.ts +64 -0
  60. package/dist/eval/denials.d.ts.map +1 -0
  61. package/dist/eval/denials.js +87 -0
  62. package/dist/eval/denials.js.map +1 -0
  63. package/dist/eval/engine/cancellation.d.ts +12 -0
  64. package/dist/eval/engine/cancellation.d.ts.map +1 -0
  65. package/dist/eval/engine/cancellation.js +56 -0
  66. package/dist/eval/engine/cancellation.js.map +1 -0
  67. package/dist/eval/engine/delta.d.ts +104 -0
  68. package/dist/eval/engine/delta.d.ts.map +1 -0
  69. package/dist/eval/engine/delta.js +466 -0
  70. package/dist/eval/engine/delta.js.map +1 -0
  71. package/dist/eval/engine/deps.d.ts +136 -0
  72. package/dist/eval/engine/deps.d.ts.map +1 -0
  73. package/dist/eval/engine/deps.js +345 -0
  74. package/dist/eval/engine/deps.js.map +1 -0
  75. package/dist/eval/engine/identity.d.ts +128 -0
  76. package/dist/eval/engine/identity.d.ts.map +1 -0
  77. package/dist/eval/engine/identity.js +398 -0
  78. package/dist/eval/engine/identity.js.map +1 -0
  79. package/dist/eval/engine/index.d.ts +200 -0
  80. package/dist/eval/engine/index.d.ts.map +1 -0
  81. package/dist/eval/engine/index.js +1242 -0
  82. package/dist/eval/engine/index.js.map +1 -0
  83. package/dist/eval/engine/measurement.d.ts +23 -0
  84. package/dist/eval/engine/measurement.d.ts.map +1 -0
  85. package/dist/eval/engine/measurement.js +42 -0
  86. package/dist/eval/engine/measurement.js.map +1 -0
  87. package/dist/eval/engine/naive.d.ts +19 -0
  88. package/dist/eval/engine/naive.d.ts.map +1 -0
  89. package/dist/eval/engine/naive.js +59 -0
  90. package/dist/eval/engine/naive.js.map +1 -0
  91. package/dist/eval/engine/ops.d.ts +214 -0
  92. package/dist/eval/engine/ops.d.ts.map +1 -0
  93. package/dist/eval/engine/ops.js +1422 -0
  94. package/dist/eval/engine/ops.js.map +1 -0
  95. package/dist/eval/engine/patches.d.ts +40 -0
  96. package/dist/eval/engine/patches.d.ts.map +1 -0
  97. package/dist/eval/engine/patches.js +125 -0
  98. package/dist/eval/engine/patches.js.map +1 -0
  99. package/dist/eval/engine/ports.d.ts +71 -0
  100. package/dist/eval/engine/ports.d.ts.map +1 -0
  101. package/dist/eval/engine/ports.js +2 -0
  102. package/dist/eval/engine/ports.js.map +1 -0
  103. package/dist/eval/engine/session.d.ts +116 -0
  104. package/dist/eval/engine/session.d.ts.map +1 -0
  105. package/dist/eval/engine/session.js +653 -0
  106. package/dist/eval/engine/session.js.map +1 -0
  107. package/dist/eval/engine/snapshot.d.ts +97 -0
  108. package/dist/eval/engine/snapshot.d.ts.map +1 -0
  109. package/dist/eval/engine/snapshot.js +221 -0
  110. package/dist/eval/engine/snapshot.js.map +1 -0
  111. package/dist/eval/engine/subscriptions.d.ts +47 -0
  112. package/dist/eval/engine/subscriptions.d.ts.map +1 -0
  113. package/dist/eval/engine/subscriptions.js +103 -0
  114. package/dist/eval/engine/subscriptions.js.map +1 -0
  115. package/dist/eval/engine/trace.d.ts +77 -0
  116. package/dist/eval/engine/trace.d.ts.map +1 -0
  117. package/dist/eval/engine/trace.js +140 -0
  118. package/dist/eval/engine/trace.js.map +1 -0
  119. package/dist/eval/error-diagnostic.d.ts +26 -0
  120. package/dist/eval/error-diagnostic.d.ts.map +1 -0
  121. package/dist/eval/error-diagnostic.js +63 -0
  122. package/dist/eval/error-diagnostic.js.map +1 -0
  123. package/dist/eval/evaluate-expr.d.ts +44 -0
  124. package/dist/eval/evaluate-expr.d.ts.map +1 -0
  125. package/dist/eval/evaluate-expr.js +149 -0
  126. package/dist/eval/evaluate-expr.js.map +1 -0
  127. package/dist/eval/evaluate.d.ts +282 -0
  128. package/dist/eval/evaluate.d.ts.map +1 -0
  129. package/dist/eval/evaluate.js +391 -0
  130. package/dist/eval/evaluate.js.map +1 -0
  131. package/dist/eval/evolution/relocate.d.ts +72 -0
  132. package/dist/eval/evolution/relocate.d.ts.map +1 -0
  133. package/dist/eval/evolution/relocate.js +427 -0
  134. package/dist/eval/evolution/relocate.js.map +1 -0
  135. package/dist/eval/evolution/select.d.ts +11 -0
  136. package/dist/eval/evolution/select.d.ts.map +1 -0
  137. package/dist/eval/evolution/select.js +53 -0
  138. package/dist/eval/evolution/select.js.map +1 -0
  139. package/dist/eval/evolution/upcast.d.ts +13 -0
  140. package/dist/eval/evolution/upcast.d.ts.map +1 -0
  141. package/dist/eval/evolution/upcast.js +88 -0
  142. package/dist/eval/evolution/upcast.js.map +1 -0
  143. package/dist/eval/expr/aggregates.d.ts +75 -0
  144. package/dist/eval/expr/aggregates.d.ts.map +1 -0
  145. package/dist/eval/expr/aggregates.js +991 -0
  146. package/dist/eval/expr/aggregates.js.map +1 -0
  147. package/dist/eval/expr/arithmetic.d.ts +26 -0
  148. package/dist/eval/expr/arithmetic.d.ts.map +1 -0
  149. package/dist/eval/expr/arithmetic.js +387 -0
  150. package/dist/eval/expr/arithmetic.js.map +1 -0
  151. package/dist/eval/expr/between.d.ts +17 -0
  152. package/dist/eval/expr/between.d.ts.map +1 -0
  153. package/dist/eval/expr/between.js +46 -0
  154. package/dist/eval/expr/between.js.map +1 -0
  155. package/dist/eval/expr/binder.d.ts +96 -0
  156. package/dist/eval/expr/binder.d.ts.map +1 -0
  157. package/dist/eval/expr/binder.js +253 -0
  158. package/dist/eval/expr/binder.js.map +1 -0
  159. package/dist/eval/expr/call-dispatch.d.ts +28 -0
  160. package/dist/eval/expr/call-dispatch.d.ts.map +1 -0
  161. package/dist/eval/expr/call-dispatch.js +114 -0
  162. package/dist/eval/expr/call-dispatch.js.map +1 -0
  163. package/dist/eval/expr/collections.d.ts +20 -0
  164. package/dist/eval/expr/collections.d.ts.map +1 -0
  165. package/dist/eval/expr/collections.js +66 -0
  166. package/dist/eval/expr/collections.js.map +1 -0
  167. package/dist/eval/expr/compare.d.ts +36 -0
  168. package/dist/eval/expr/compare.d.ts.map +1 -0
  169. package/dist/eval/expr/compare.js +115 -0
  170. package/dist/eval/expr/compare.js.map +1 -0
  171. package/dist/eval/expr/datasets.d.ts +28 -0
  172. package/dist/eval/expr/datasets.d.ts.map +1 -0
  173. package/dist/eval/expr/datasets.js +304 -0
  174. package/dist/eval/expr/datasets.js.map +1 -0
  175. package/dist/eval/expr/digest.d.ts +23 -0
  176. package/dist/eval/expr/digest.d.ts.map +1 -0
  177. package/dist/eval/expr/digest.js +89 -0
  178. package/dist/eval/expr/digest.js.map +1 -0
  179. package/dist/eval/expr/domains.d.ts +19 -0
  180. package/dist/eval/expr/domains.d.ts.map +1 -0
  181. package/dist/eval/expr/domains.js +18 -0
  182. package/dist/eval/expr/domains.js.map +1 -0
  183. package/dist/eval/expr/host.d.ts +152 -0
  184. package/dist/eval/expr/host.d.ts.map +1 -0
  185. package/dist/eval/expr/host.js +36 -0
  186. package/dist/eval/expr/host.js.map +1 -0
  187. package/dist/eval/expr/lists.d.ts +24 -0
  188. package/dist/eval/expr/lists.d.ts.map +1 -0
  189. package/dist/eval/expr/lists.js +155 -0
  190. package/dist/eval/expr/lists.js.map +1 -0
  191. package/dist/eval/expr/member.d.ts +15 -0
  192. package/dist/eval/expr/member.d.ts.map +1 -0
  193. package/dist/eval/expr/member.js +32 -0
  194. package/dist/eval/expr/member.js.map +1 -0
  195. package/dist/eval/expr/money-ops.d.ts +10 -0
  196. package/dist/eval/expr/money-ops.d.ts.map +1 -0
  197. package/dist/eval/expr/money-ops.js +17 -0
  198. package/dist/eval/expr/money-ops.js.map +1 -0
  199. package/dist/eval/expr/operands.d.ts +27 -0
  200. package/dist/eval/expr/operands.d.ts.map +1 -0
  201. package/dist/eval/expr/operands.js +167 -0
  202. package/dist/eval/expr/operands.js.map +1 -0
  203. package/dist/eval/expr/presence.d.ts +27 -0
  204. package/dist/eval/expr/presence.d.ts.map +1 -0
  205. package/dist/eval/expr/presence.js +140 -0
  206. package/dist/eval/expr/presence.js.map +1 -0
  207. package/dist/eval/expr/records.d.ts +22 -0
  208. package/dist/eval/expr/records.d.ts.map +1 -0
  209. package/dist/eval/expr/records.js +101 -0
  210. package/dist/eval/expr/records.js.map +1 -0
  211. package/dist/eval/expr/rule-refs.d.ts +25 -0
  212. package/dist/eval/expr/rule-refs.d.ts.map +1 -0
  213. package/dist/eval/expr/rule-refs.js +60 -0
  214. package/dist/eval/expr/rule-refs.js.map +1 -0
  215. package/dist/eval/expr/sequences.d.ts +26 -0
  216. package/dist/eval/expr/sequences.d.ts.map +1 -0
  217. package/dist/eval/expr/sequences.js +151 -0
  218. package/dist/eval/expr/sequences.js.map +1 -0
  219. package/dist/eval/expr/value.d.ts +99 -0
  220. package/dist/eval/expr/value.d.ts.map +1 -0
  221. package/dist/eval/expr/value.js +14 -0
  222. package/dist/eval/expr/value.js.map +1 -0
  223. package/dist/eval/expression.d.ts +142 -0
  224. package/dist/eval/expression.d.ts.map +1 -0
  225. package/dist/eval/expression.js +446 -0
  226. package/dist/eval/expression.js.map +1 -0
  227. package/dist/eval/firing.d.ts +68 -0
  228. package/dist/eval/firing.d.ts.map +1 -0
  229. package/dist/eval/firing.js +222 -0
  230. package/dist/eval/firing.js.map +1 -0
  231. package/dist/eval/gate.d.ts +110 -0
  232. package/dist/eval/gate.d.ts.map +1 -0
  233. package/dist/eval/gate.js +278 -0
  234. package/dist/eval/gate.js.map +1 -0
  235. package/dist/eval/layout-visibility.d.ts +18 -0
  236. package/dist/eval/layout-visibility.d.ts.map +1 -0
  237. package/dist/eval/layout-visibility.js +61 -0
  238. package/dist/eval/layout-visibility.js.map +1 -0
  239. package/dist/eval/option-availability.d.ts +26 -0
  240. package/dist/eval/option-availability.d.ts.map +1 -0
  241. package/dist/eval/option-availability.js +580 -0
  242. package/dist/eval/option-availability.js.map +1 -0
  243. package/dist/eval/options-boundary.d.ts +15 -0
  244. package/dist/eval/options-boundary.d.ts.map +1 -0
  245. package/dist/eval/options-boundary.js +40 -0
  246. package/dist/eval/options-boundary.js.map +1 -0
  247. package/dist/eval/options.d.ts +99 -0
  248. package/dist/eval/options.d.ts.map +1 -0
  249. package/dist/eval/options.js +96 -0
  250. package/dist/eval/options.js.map +1 -0
  251. package/dist/eval/overrides.d.ts +116 -0
  252. package/dist/eval/overrides.d.ts.map +1 -0
  253. package/dist/eval/overrides.js +176 -0
  254. package/dist/eval/overrides.js.map +1 -0
  255. package/dist/eval/paths.d.ts +25 -0
  256. package/dist/eval/paths.d.ts.map +1 -0
  257. package/dist/eval/paths.js +47 -0
  258. package/dist/eval/paths.js.map +1 -0
  259. package/dist/eval/presentation-reads.d.ts +20 -0
  260. package/dist/eval/presentation-reads.d.ts.map +1 -0
  261. package/dist/eval/presentation-reads.js +2 -0
  262. package/dist/eval/presentation-reads.js.map +1 -0
  263. package/dist/eval/presentation.d.ts +122 -0
  264. package/dist/eval/presentation.d.ts.map +1 -0
  265. package/dist/eval/presentation.js +255 -0
  266. package/dist/eval/presentation.js.map +1 -0
  267. package/dist/eval/reader/context-value.d.ts +41 -0
  268. package/dist/eval/reader/context-value.d.ts.map +1 -0
  269. package/dist/eval/reader/context-value.js +129 -0
  270. package/dist/eval/reader/context-value.js.map +1 -0
  271. package/dist/eval/reader/covered.d.ts +53 -0
  272. package/dist/eval/reader/covered.d.ts.map +1 -0
  273. package/dist/eval/reader/covered.js +139 -0
  274. package/dist/eval/reader/covered.js.map +1 -0
  275. package/dist/eval/reader/declarations.d.ts +182 -0
  276. package/dist/eval/reader/declarations.d.ts.map +1 -0
  277. package/dist/eval/reader/declarations.js +153 -0
  278. package/dist/eval/reader/declarations.js.map +1 -0
  279. package/dist/eval/reader/member-access.d.ts +87 -0
  280. package/dist/eval/reader/member-access.d.ts.map +1 -0
  281. package/dist/eval/reader/member-access.js +212 -0
  282. package/dist/eval/reader/member-access.js.map +1 -0
  283. package/dist/eval/reader/memo.d.ts +34 -0
  284. package/dist/eval/reader/memo.d.ts.map +1 -0
  285. package/dist/eval/reader/memo.js +67 -0
  286. package/dist/eval/reader/memo.js.map +1 -0
  287. package/dist/eval/reader/overlay.d.ts +74 -0
  288. package/dist/eval/reader/overlay.d.ts.map +1 -0
  289. package/dist/eval/reader/overlay.js +365 -0
  290. package/dist/eval/reader/overlay.js.map +1 -0
  291. package/dist/eval/reader/questions.d.ts +37 -0
  292. package/dist/eval/reader/questions.d.ts.map +1 -0
  293. package/dist/eval/reader/questions.js +78 -0
  294. package/dist/eval/reader/questions.js.map +1 -0
  295. package/dist/eval/reader/resolve.d.ts +84 -0
  296. package/dist/eval/reader/resolve.d.ts.map +1 -0
  297. package/dist/eval/reader/resolve.js +310 -0
  298. package/dist/eval/reader/resolve.js.map +1 -0
  299. package/dist/eval/reader/value-read.d.ts +50 -0
  300. package/dist/eval/reader/value-read.d.ts.map +1 -0
  301. package/dist/eval/reader/value-read.js +133 -0
  302. package/dist/eval/reader/value-read.js.map +1 -0
  303. package/dist/eval/reader/withheld.d.ts +48 -0
  304. package/dist/eval/reader/withheld.d.ts.map +1 -0
  305. package/dist/eval/reader/withheld.js +108 -0
  306. package/dist/eval/reader/withheld.js.map +1 -0
  307. package/dist/eval/reader-paths.d.ts +24 -0
  308. package/dist/eval/reader-paths.d.ts.map +1 -0
  309. package/dist/eval/reader-paths.js +23 -0
  310. package/dist/eval/reader-paths.js.map +1 -0
  311. package/dist/eval/reader.d.ts +281 -0
  312. package/dist/eval/reader.d.ts.map +1 -0
  313. package/dist/eval/reader.js +560 -0
  314. package/dist/eval/reader.js.map +1 -0
  315. package/dist/eval/receipt.d.ts +37 -0
  316. package/dist/eval/receipt.d.ts.map +1 -0
  317. package/dist/eval/receipt.js +222 -0
  318. package/dist/eval/receipt.js.map +1 -0
  319. package/dist/eval/report/assemble.d.ts +84 -0
  320. package/dist/eval/report/assemble.d.ts.map +1 -0
  321. package/dist/eval/report/assemble.js +277 -0
  322. package/dist/eval/report/assemble.js.map +1 -0
  323. package/dist/eval/report/fold.d.ts +18 -0
  324. package/dist/eval/report/fold.d.ts.map +1 -0
  325. package/dist/eval/report/fold.js +58 -0
  326. package/dist/eval/report/fold.js.map +1 -0
  327. package/dist/eval/rule/alternatives.d.ts +23 -0
  328. package/dist/eval/rule/alternatives.d.ts.map +1 -0
  329. package/dist/eval/rule/alternatives.js +46 -0
  330. package/dist/eval/rule/alternatives.js.map +1 -0
  331. package/dist/eval/rule/behaviour.d.ts +47 -0
  332. package/dist/eval/rule/behaviour.d.ts.map +1 -0
  333. package/dist/eval/rule/behaviour.js +249 -0
  334. package/dist/eval/rule/behaviour.js.map +1 -0
  335. package/dist/eval/rule/compute.d.ts +46 -0
  336. package/dist/eval/rule/compute.d.ts.map +1 -0
  337. package/dist/eval/rule/compute.js +158 -0
  338. package/dist/eval/rule/compute.js.map +1 -0
  339. package/dist/eval/rule/create-state.d.ts +42 -0
  340. package/dist/eval/rule/create-state.d.ts.map +1 -0
  341. package/dist/eval/rule/create-state.js +134 -0
  342. package/dist/eval/rule/create-state.js.map +1 -0
  343. package/dist/eval/rule/diagnostics.d.ts +24 -0
  344. package/dist/eval/rule/diagnostics.d.ts.map +1 -0
  345. package/dist/eval/rule/diagnostics.js +45 -0
  346. package/dist/eval/rule/diagnostics.js.map +1 -0
  347. package/dist/eval/rule/execution.d.ts +24 -0
  348. package/dist/eval/rule/execution.d.ts.map +1 -0
  349. package/dist/eval/rule/execution.js +495 -0
  350. package/dist/eval/rule/execution.js.map +1 -0
  351. package/dist/eval/rule/gate.d.ts +12 -0
  352. package/dist/eval/rule/gate.d.ts.map +1 -0
  353. package/dist/eval/rule/gate.js +34 -0
  354. package/dist/eval/rule/gate.js.map +1 -0
  355. package/dist/eval/rule/item.d.ts +11 -0
  356. package/dist/eval/rule/item.d.ts.map +1 -0
  357. package/dist/eval/rule/item.js +265 -0
  358. package/dist/eval/rule/item.js.map +1 -0
  359. package/dist/eval/rule/prepare.d.ts +64 -0
  360. package/dist/eval/rule/prepare.d.ts.map +1 -0
  361. package/dist/eval/rule/prepare.js +131 -0
  362. package/dist/eval/rule/prepare.js.map +1 -0
  363. package/dist/eval/rule/result.d.ts +97 -0
  364. package/dist/eval/rule/result.d.ts.map +1 -0
  365. package/dist/eval/rule/result.js +347 -0
  366. package/dist/eval/rule/result.js.map +1 -0
  367. package/dist/eval/rule/runner.d.ts +128 -0
  368. package/dist/eval/rule/runner.d.ts.map +1 -0
  369. package/dist/eval/rule/runner.js +296 -0
  370. package/dist/eval/rule/runner.js.map +1 -0
  371. package/dist/eval/rule/screen.d.ts +32 -0
  372. package/dist/eval/rule/screen.d.ts.map +1 -0
  373. package/dist/eval/rule/screen.js +73 -0
  374. package/dist/eval/rule/screen.js.map +1 -0
  375. package/dist/eval/rule/state.d.ts +137 -0
  376. package/dist/eval/rule/state.d.ts.map +1 -0
  377. package/dist/eval/rule/state.js +2 -0
  378. package/dist/eval/rule/state.js.map +1 -0
  379. package/dist/eval/rule/steps.d.ts +44 -0
  380. package/dist/eval/rule/steps.d.ts.map +1 -0
  381. package/dist/eval/rule/steps.js +367 -0
  382. package/dist/eval/rule/steps.js.map +1 -0
  383. package/dist/eval/rule/visibility.d.ts +18 -0
  384. package/dist/eval/rule/visibility.d.ts.map +1 -0
  385. package/dist/eval/rule/visibility.js +79 -0
  386. package/dist/eval/rule/visibility.js.map +1 -0
  387. package/dist/eval/seal.d.ts +74 -0
  388. package/dist/eval/seal.d.ts.map +1 -0
  389. package/dist/eval/seal.js +154 -0
  390. package/dist/eval/seal.js.map +1 -0
  391. package/dist/eval/signature-coverage.d.ts +19 -0
  392. package/dist/eval/signature-coverage.d.ts.map +1 -0
  393. package/dist/eval/signature-coverage.js +160 -0
  394. package/dist/eval/signature-coverage.js.map +1 -0
  395. package/dist/eval/state/derive.d.ts +72 -0
  396. package/dist/eval/state/derive.d.ts.map +1 -0
  397. package/dist/eval/state/derive.js +61 -0
  398. package/dist/eval/state/derive.js.map +1 -0
  399. package/dist/eval/state/describe.d.ts +18 -0
  400. package/dist/eval/state/describe.d.ts.map +1 -0
  401. package/dist/eval/state/describe.js +19 -0
  402. package/dist/eval/state/describe.js.map +1 -0
  403. package/dist/eval/state/field-state.d.ts +471 -0
  404. package/dist/eval/state/field-state.d.ts.map +1 -0
  405. package/dist/eval/state/field-state.js +1604 -0
  406. package/dist/eval/state/field-state.js.map +1 -0
  407. package/dist/eval/state/measurement.d.ts +136 -0
  408. package/dist/eval/state/measurement.d.ts.map +1 -0
  409. package/dist/eval/state/measurement.js +209 -0
  410. package/dist/eval/state/measurement.js.map +1 -0
  411. package/dist/eval/state/options.d.ts +21 -0
  412. package/dist/eval/state/options.d.ts.map +1 -0
  413. package/dist/eval/state/options.js +3 -0
  414. package/dist/eval/state/options.js.map +1 -0
  415. package/dist/eval/state/readiness.d.ts +400 -0
  416. package/dist/eval/state/readiness.d.ts.map +1 -0
  417. package/dist/eval/state/readiness.js +1067 -0
  418. package/dist/eval/state/readiness.js.map +1 -0
  419. package/dist/eval/state/snapshot.d.ts +130 -0
  420. package/dist/eval/state/snapshot.d.ts.map +1 -0
  421. package/dist/eval/state/snapshot.js +35 -0
  422. package/dist/eval/state/snapshot.js.map +1 -0
  423. package/dist/eval/state/unavailable-options.d.ts +54 -0
  424. package/dist/eval/state/unavailable-options.d.ts.map +1 -0
  425. package/dist/eval/state/unavailable-options.js +82 -0
  426. package/dist/eval/state/unavailable-options.js.map +1 -0
  427. package/dist/eval/state/value-state.d.ts +38 -0
  428. package/dist/eval/state/value-state.d.ts.map +1 -0
  429. package/dist/eval/state/value-state.js +52 -0
  430. package/dist/eval/state/value-state.js.map +1 -0
  431. package/dist/eval/submission/admission.d.ts +50 -0
  432. package/dist/eval/submission/admission.d.ts.map +1 -0
  433. package/dist/eval/submission/admission.js +174 -0
  434. package/dist/eval/submission/admission.js.map +1 -0
  435. package/dist/eval/submission/authority.d.ts +71 -0
  436. package/dist/eval/submission/authority.d.ts.map +1 -0
  437. package/dist/eval/submission/authority.js +118 -0
  438. package/dist/eval/submission/authority.js.map +1 -0
  439. package/dist/eval/submission/datasets.d.ts +28 -0
  440. package/dist/eval/submission/datasets.d.ts.map +1 -0
  441. package/dist/eval/submission/datasets.js +109 -0
  442. package/dist/eval/submission/datasets.js.map +1 -0
  443. package/dist/eval/submission/index.d.ts +15 -0
  444. package/dist/eval/submission/index.d.ts.map +1 -0
  445. package/dist/eval/submission/index.js +13 -0
  446. package/dist/eval/submission/index.js.map +1 -0
  447. package/dist/eval/submission/refusals.d.ts +103 -0
  448. package/dist/eval/submission/refusals.d.ts.map +1 -0
  449. package/dist/eval/submission/refusals.js +15 -0
  450. package/dist/eval/submission/refusals.js.map +1 -0
  451. package/dist/eval/submission/signatures.d.ts +7 -0
  452. package/dist/eval/submission/signatures.d.ts.map +1 -0
  453. package/dist/eval/submission/signatures.js +215 -0
  454. package/dist/eval/submission/signatures.js.map +1 -0
  455. package/dist/eval/submission/writes.d.ts +51 -0
  456. package/dist/eval/submission/writes.d.ts.map +1 -0
  457. package/dist/eval/submission/writes.js +203 -0
  458. package/dist/eval/submission/writes.js.map +1 -0
  459. package/dist/eval/submission.d.ts +53 -0
  460. package/dist/eval/submission.d.ts.map +1 -0
  461. package/dist/eval/submission.js +521 -0
  462. package/dist/eval/submission.js.map +1 -0
  463. package/dist/eval/suggestions-to-engine.d.ts +18 -0
  464. package/dist/eval/suggestions-to-engine.d.ts.map +1 -0
  465. package/dist/eval/suggestions-to-engine.js +40 -0
  466. package/dist/eval/suggestions-to-engine.js.map +1 -0
  467. package/dist/eval/suggestions.d.ts +17 -0
  468. package/dist/eval/suggestions.d.ts.map +1 -0
  469. package/dist/eval/suggestions.js +314 -0
  470. package/dist/eval/suggestions.js.map +1 -0
  471. package/dist/eval/undecided.d.ts +64 -0
  472. package/dist/eval/undecided.d.ts.map +1 -0
  473. package/dist/eval/undecided.js +101 -0
  474. package/dist/eval/undecided.js.map +1 -0
  475. package/dist/eval/verdict.d.ts +66 -0
  476. package/dist/eval/verdict.d.ts.map +1 -0
  477. package/dist/eval/verdict.js +106 -0
  478. package/dist/eval/verdict.js.map +1 -0
  479. package/dist/eval/verify-signature.d.ts +78 -0
  480. package/dist/eval/verify-signature.d.ts.map +1 -0
  481. package/dist/eval/verify-signature.js +185 -0
  482. package/dist/eval/verify-signature.js.map +1 -0
  483. package/dist/eval/version-dispatch.d.ts +38 -0
  484. package/dist/eval/version-dispatch.d.ts.map +1 -0
  485. package/dist/eval/version-dispatch.js +61 -0
  486. package/dist/eval/version-dispatch.js.map +1 -0
  487. package/dist/eval/visibility.d.ts +33 -0
  488. package/dist/eval/visibility.d.ts.map +1 -0
  489. package/dist/eval/visibility.js +83 -0
  490. package/dist/eval/visibility.js.map +1 -0
  491. package/dist/evaluate.d.ts +24 -0
  492. package/dist/evaluate.d.ts.map +1 -0
  493. package/dist/evaluate.js +18 -0
  494. package/dist/evaluate.js.map +1 -0
  495. package/dist/expr/builtin-docs.d.ts +51 -0
  496. package/dist/expr/builtin-docs.d.ts.map +1 -0
  497. package/dist/expr/builtin-docs.js +874 -0
  498. package/dist/expr/builtin-docs.js.map +1 -0
  499. package/dist/expr/builtins.d.ts +50 -0
  500. package/dist/expr/builtins.d.ts.map +1 -0
  501. package/dist/expr/builtins.js +966 -0
  502. package/dist/expr/builtins.js.map +1 -0
  503. package/dist/expr/decimal-precision.d.ts +39 -0
  504. package/dist/expr/decimal-precision.d.ts.map +1 -0
  505. package/dist/expr/decimal-precision.js +62 -0
  506. package/dist/expr/decimal-precision.js.map +1 -0
  507. package/dist/expr/decimal.d.ts +172 -0
  508. package/dist/expr/decimal.d.ts.map +1 -0
  509. package/dist/expr/decimal.js +782 -0
  510. package/dist/expr/decimal.js.map +1 -0
  511. package/dist/expr/deprecations.d.ts +34 -0
  512. package/dist/expr/deprecations.d.ts.map +1 -0
  513. package/dist/expr/deprecations.js +17 -0
  514. package/dist/expr/deprecations.js.map +1 -0
  515. package/dist/expr/diagnostics.d.ts +21 -0
  516. package/dist/expr/diagnostics.d.ts.map +1 -0
  517. package/dist/expr/diagnostics.js +231 -0
  518. package/dist/expr/diagnostics.js.map +1 -0
  519. package/dist/expr/direction.d.ts +30 -0
  520. package/dist/expr/direction.d.ts.map +1 -0
  521. package/dist/expr/direction.js +77 -0
  522. package/dist/expr/direction.js.map +1 -0
  523. package/dist/expr/example-expression.d.ts +62 -0
  524. package/dist/expr/example-expression.d.ts.map +1 -0
  525. package/dist/expr/example-expression.js +670 -0
  526. package/dist/expr/example-expression.js.map +1 -0
  527. package/dist/expr/instant.d.ts +49 -0
  528. package/dist/expr/instant.d.ts.map +1 -0
  529. package/dist/expr/instant.js +111 -0
  530. package/dist/expr/instant.js.map +1 -0
  531. package/dist/expr/logic.d.ts +17 -0
  532. package/dist/expr/logic.d.ts.map +1 -0
  533. package/dist/expr/logic.js +65 -0
  534. package/dist/expr/logic.js.map +1 -0
  535. package/dist/expr/messages.d.ts +45 -0
  536. package/dist/expr/messages.d.ts.map +1 -0
  537. package/dist/expr/messages.js +280 -0
  538. package/dist/expr/messages.js.map +1 -0
  539. package/dist/expr/money.d.ts +38 -0
  540. package/dist/expr/money.d.ts.map +1 -0
  541. package/dist/expr/money.js +127 -0
  542. package/dist/expr/money.js.map +1 -0
  543. package/dist/expr/ordering.d.ts +56 -0
  544. package/dist/expr/ordering.d.ts.map +1 -0
  545. package/dist/expr/ordering.js +167 -0
  546. package/dist/expr/ordering.js.map +1 -0
  547. package/dist/expr/pattern.d.ts +44 -0
  548. package/dist/expr/pattern.d.ts.map +1 -0
  549. package/dist/expr/pattern.js +458 -0
  550. package/dist/expr/pattern.js.map +1 -0
  551. package/dist/expr/plain-date.d.ts +90 -0
  552. package/dist/expr/plain-date.d.ts.map +1 -0
  553. package/dist/expr/plain-date.js +230 -0
  554. package/dist/expr/plain-date.js.map +1 -0
  555. package/dist/expr/plural-categories.d.ts +8 -0
  556. package/dist/expr/plural-categories.d.ts.map +1 -0
  557. package/dist/expr/plural-categories.js +15 -0
  558. package/dist/expr/plural-categories.js.map +1 -0
  559. package/dist/expr/plural-keys.d.ts +39 -0
  560. package/dist/expr/plural-keys.d.ts.map +1 -0
  561. package/dist/expr/plural-keys.js +46 -0
  562. package/dist/expr/plural-keys.js.map +1 -0
  563. package/dist/expr/plural.d.ts +33 -0
  564. package/dist/expr/plural.d.ts.map +1 -0
  565. package/dist/expr/plural.js +50 -0
  566. package/dist/expr/plural.js.map +1 -0
  567. package/dist/expr/quantity.d.ts +31 -0
  568. package/dist/expr/quantity.d.ts.map +1 -0
  569. package/dist/expr/quantity.js +83 -0
  570. package/dist/expr/quantity.js.map +1 -0
  571. package/dist/expr/reduce.d.ts +50 -0
  572. package/dist/expr/reduce.d.ts.map +1 -0
  573. package/dist/expr/reduce.js +236 -0
  574. package/dist/expr/reduce.js.map +1 -0
  575. package/dist/expr/regex.d.ts +108 -0
  576. package/dist/expr/regex.d.ts.map +1 -0
  577. package/dist/expr/regex.js +1210 -0
  578. package/dist/expr/regex.js.map +1 -0
  579. package/dist/expr/select-locale.d.ts +67 -0
  580. package/dist/expr/select-locale.d.ts.map +1 -0
  581. package/dist/expr/select-locale.js +219 -0
  582. package/dist/expr/select-locale.js.map +1 -0
  583. package/dist/expr/sequences.d.ts +123 -0
  584. package/dist/expr/sequences.d.ts.map +1 -0
  585. package/dist/expr/sequences.js +234 -0
  586. package/dist/expr/sequences.js.map +1 -0
  587. package/dist/expr/strings.d.ts +50 -0
  588. package/dist/expr/strings.d.ts.map +1 -0
  589. package/dist/expr/strings.js +184 -0
  590. package/dist/expr/strings.js.map +1 -0
  591. package/dist/expr/validation.d.ts +32 -0
  592. package/dist/expr/validation.d.ts.map +1 -0
  593. package/dist/expr/validation.js +182 -0
  594. package/dist/expr/validation.js.map +1 -0
  595. package/dist/graph/freeze.d.ts +4 -0
  596. package/dist/graph/freeze.d.ts.map +1 -0
  597. package/dist/graph/freeze.js +52 -0
  598. package/dist/graph/freeze.js.map +1 -0
  599. package/dist/graph/index.d.ts +15 -0
  600. package/dist/graph/index.d.ts.map +1 -0
  601. package/dist/graph/index.js +13 -0
  602. package/dist/graph/index.js.map +1 -0
  603. package/dist/graph/inspect.d.ts +76 -0
  604. package/dist/graph/inspect.d.ts.map +1 -0
  605. package/dist/graph/inspect.js +263 -0
  606. package/dist/graph/inspect.js.map +1 -0
  607. package/dist/graph/read-walk.d.ts +101 -0
  608. package/dist/graph/read-walk.d.ts.map +1 -0
  609. package/dist/graph/read-walk.js +358 -0
  610. package/dist/graph/read-walk.js.map +1 -0
  611. package/dist/graph/record-index.d.ts +24 -0
  612. package/dist/graph/record-index.d.ts.map +1 -0
  613. package/dist/graph/record-index.js +35 -0
  614. package/dist/graph/record-index.js.map +1 -0
  615. package/dist/index.d.ts +104 -0
  616. package/dist/index.d.ts.map +1 -0
  617. package/dist/index.js +139 -0
  618. package/dist/index.js.map +1 -0
  619. package/dist/lookup/digest.d.ts +51 -0
  620. package/dist/lookup/digest.d.ts.map +1 -0
  621. package/dist/lookup/digest.js +46 -0
  622. package/dist/lookup/digest.js.map +1 -0
  623. package/dist/lookup/index.d.ts +28 -0
  624. package/dist/lookup/index.d.ts.map +1 -0
  625. package/dist/lookup/index.js +27 -0
  626. package/dist/lookup/index.js.map +1 -0
  627. package/dist/lookup/install.d.ts +48 -0
  628. package/dist/lookup/install.d.ts.map +1 -0
  629. package/dist/lookup/install.js +315 -0
  630. package/dist/lookup/install.js.map +1 -0
  631. package/dist/lookup/pass.d.ts +55 -0
  632. package/dist/lookup/pass.d.ts.map +1 -0
  633. package/dist/lookup/pass.js +212 -0
  634. package/dist/lookup/pass.js.map +1 -0
  635. package/dist/lookup/pins.d.ts +34 -0
  636. package/dist/lookup/pins.d.ts.map +1 -0
  637. package/dist/lookup/pins.js +39 -0
  638. package/dist/lookup/pins.js.map +1 -0
  639. package/dist/lookup/provenance.d.ts +23 -0
  640. package/dist/lookup/provenance.d.ts.map +1 -0
  641. package/dist/lookup/provenance.js +78 -0
  642. package/dist/lookup/provenance.js.map +1 -0
  643. package/dist/lookup/readiness.d.ts +13 -0
  644. package/dist/lookup/readiness.d.ts.map +1 -0
  645. package/dist/lookup/readiness.js +57 -0
  646. package/dist/lookup/readiness.js.map +1 -0
  647. package/dist/lookup/resolve.d.ts +24 -0
  648. package/dist/lookup/resolve.d.ts.map +1 -0
  649. package/dist/lookup/resolve.js +201 -0
  650. package/dist/lookup/resolve.js.map +1 -0
  651. package/dist/lookup/store.d.ts +41 -0
  652. package/dist/lookup/store.d.ts.map +1 -0
  653. package/dist/lookup/store.js +74 -0
  654. package/dist/lookup/store.js.map +1 -0
  655. package/dist/model/access.d.ts +200 -0
  656. package/dist/model/access.d.ts.map +1 -0
  657. package/dist/model/access.js +125 -0
  658. package/dist/model/access.js.map +1 -0
  659. package/dist/model/artifact-members.d.ts +3 -0
  660. package/dist/model/artifact-members.d.ts.map +1 -0
  661. package/dist/model/artifact-members.js +38 -0
  662. package/dist/model/artifact-members.js.map +1 -0
  663. package/dist/model/composition.d.ts +47 -0
  664. package/dist/model/composition.d.ts.map +1 -0
  665. package/dist/model/composition.js +66 -0
  666. package/dist/model/composition.js.map +1 -0
  667. package/dist/model/domain.d.ts +51 -0
  668. package/dist/model/domain.d.ts.map +1 -0
  669. package/dist/model/domain.js +75 -0
  670. package/dist/model/domain.js.map +1 -0
  671. package/dist/model/duration.d.ts +31 -0
  672. package/dist/model/duration.d.ts.map +1 -0
  673. package/dist/model/duration.js +136 -0
  674. package/dist/model/duration.js.map +1 -0
  675. package/dist/model/errors.d.ts +58 -0
  676. package/dist/model/errors.d.ts.map +1 -0
  677. package/dist/model/errors.js +81 -0
  678. package/dist/model/errors.js.map +1 -0
  679. package/dist/model/evolution.d.ts +177 -0
  680. package/dist/model/evolution.d.ts.map +1 -0
  681. package/dist/model/evolution.js +5 -0
  682. package/dist/model/evolution.js.map +1 -0
  683. package/dist/model/expr-children.d.ts +15 -0
  684. package/dist/model/expr-children.d.ts.map +1 -0
  685. package/dist/model/expr-children.js +45 -0
  686. package/dist/model/expr-children.js.map +1 -0
  687. package/dist/model/guards.d.ts +9 -0
  688. package/dist/model/guards.d.ts.map +1 -0
  689. package/dist/model/guards.js +11 -0
  690. package/dist/model/guards.js.map +1 -0
  691. package/dist/model/input.d.ts +42 -0
  692. package/dist/model/input.d.ts.map +1 -0
  693. package/dist/model/input.js +26 -0
  694. package/dist/model/input.js.map +1 -0
  695. package/dist/model/integer.d.ts +14 -0
  696. package/dist/model/integer.d.ts.map +1 -0
  697. package/dist/model/integer.js +16 -0
  698. package/dist/model/integer.js.map +1 -0
  699. package/dist/model/intrinsic.d.ts +18 -0
  700. package/dist/model/intrinsic.d.ts.map +1 -0
  701. package/dist/model/intrinsic.js +21 -0
  702. package/dist/model/intrinsic.js.map +1 -0
  703. package/dist/model/layout.d.ts +129 -0
  704. package/dist/model/layout.d.ts.map +1 -0
  705. package/dist/model/layout.js +2 -0
  706. package/dist/model/layout.js.map +1 -0
  707. package/dist/model/media.d.ts +33 -0
  708. package/dist/model/media.d.ts.map +1 -0
  709. package/dist/model/media.js +86 -0
  710. package/dist/model/media.js.map +1 -0
  711. package/dist/model/members.generated.d.ts +11 -0
  712. package/dist/model/members.generated.d.ts.map +1 -0
  713. package/dist/model/members.generated.js +71 -0
  714. package/dist/model/members.generated.js.map +1 -0
  715. package/dist/model/row-address.d.ts +27 -0
  716. package/dist/model/row-address.d.ts.map +1 -0
  717. package/dist/model/row-address.js +146 -0
  718. package/dist/model/row-address.js.map +1 -0
  719. package/dist/model/schema.d.ts +108 -0
  720. package/dist/model/schema.d.ts.map +1 -0
  721. package/dist/model/schema.js +2 -0
  722. package/dist/model/schema.js.map +1 -0
  723. package/dist/model/shape.d.ts +193 -0
  724. package/dist/model/shape.d.ts.map +1 -0
  725. package/dist/model/shape.js +2 -0
  726. package/dist/model/shape.js.map +1 -0
  727. package/dist/model/time.d.ts +61 -0
  728. package/dist/model/time.d.ts.map +1 -0
  729. package/dist/model/time.js +110 -0
  730. package/dist/model/time.js.map +1 -0
  731. package/dist/model/types.d.ts +1329 -0
  732. package/dist/model/types.d.ts.map +1 -0
  733. package/dist/model/types.js +424 -0
  734. package/dist/model/types.js.map +1 -0
  735. package/dist/model/values.d.ts +91 -0
  736. package/dist/model/values.d.ts.map +1 -0
  737. package/dist/model/values.js +195 -0
  738. package/dist/model/values.js.map +1 -0
  739. package/dist/model/wire.d.ts +356 -0
  740. package/dist/model/wire.d.ts.map +1 -0
  741. package/dist/model/wire.js +1504 -0
  742. package/dist/model/wire.js.map +1 -0
  743. package/dist/offline/index.d.ts +374 -0
  744. package/dist/offline/index.d.ts.map +1 -0
  745. package/dist/offline/index.js +422 -0
  746. package/dist/offline/index.js.map +1 -0
  747. package/dist/testing.d.ts +30 -0
  748. package/dist/testing.d.ts.map +1 -0
  749. package/dist/testing.js +42 -0
  750. package/dist/testing.js.map +1 -0
  751. package/dist/version.d.ts +30 -0
  752. package/dist/version.d.ts.map +1 -0
  753. package/dist/version.js +116 -0
  754. package/dist/version.js.map +1 -0
  755. package/package.json +98 -3
@@ -0,0 +1,255 @@
1
+ import { assertNever } from '../model/errors.js';
2
+ import { Evaluation, assertTierPairing } from './rule/runner.js';
3
+ import { assertArtifactReceipt } from './receipt.js';
4
+ /** Whether a field leaf is present for `hideWhenEmpty`: masked and write-only count. */
5
+ function fieldPresent(reads, fieldId) {
6
+ return !reads.fieldHidden(fieldId) && reads.fieldVisible(fieldId);
7
+ }
8
+ /**
9
+ * Every node's presence, bottom-up. Presence is a fact about the subtree alone, so a container
10
+ * that collapses for emptiness is still counted by its own parent exactly as its fields are.
11
+ */
12
+ function presenceOf(node, reads, memo) {
13
+ const cached = memo.get(node);
14
+ if (cached !== undefined)
15
+ return cached;
16
+ const present = (() => {
17
+ switch (node.kind) {
18
+ case 'field':
19
+ return fieldPresent(reads, node.fieldId);
20
+ case 'section':
21
+ // A section its own predicate hides is off-screen, so a parent that collapses for
22
+ // emptiness counts it exactly as a hidden field: not present. The condition is a
23
+ // decided `FAIL` only; an undecided predicate leaves the section visible.
24
+ return (ownVisible(node, reads) && node.children.some((child) => presenceOf(child, reads, memo)));
25
+ case 'group':
26
+ case 'step':
27
+ case 'wizard':
28
+ return node.children.some((child) => presenceOf(child, reads, memo));
29
+ case 'heading':
30
+ case 'callout':
31
+ case 'divider':
32
+ case 'sop_block':
33
+ case 'summary_card':
34
+ return false;
35
+ default:
36
+ return assertNever(node);
37
+ }
38
+ })();
39
+ memo.set(node, present);
40
+ return present;
41
+ }
42
+ /** The decided arguments of one chrome node's message, or `undefined` when none decided. */
43
+ function paramsOf(reads, params) {
44
+ if (params === undefined)
45
+ return undefined;
46
+ const decided = {};
47
+ for (const [name, node] of Object.entries(params)) {
48
+ const value = reads.valueOf(node);
49
+ if (value !== undefined)
50
+ decided[name] = value;
51
+ }
52
+ return Object.keys(decided).length === 0 ? undefined : decided;
53
+ }
54
+ /** One summary card's readouts, each with the value the channel could decide. */
55
+ function readoutsOf(reads, readouts) {
56
+ if (readouts === undefined)
57
+ return undefined;
58
+ return readouts.map((readout) => {
59
+ const value = reads.valueOf(readout.value);
60
+ return value === undefined
61
+ ? { labelKey: readout.labelKey }
62
+ : { labelKey: readout.labelKey, value };
63
+ });
64
+ }
65
+ /** The chrome predicate's answer: only a decided `FAIL` hides. */
66
+ function ownVisible(node, reads) {
67
+ if (node.kind !== 'section' &&
68
+ node.kind !== 'step' &&
69
+ node.kind !== 'callout' &&
70
+ node.kind !== 'sop_block' &&
71
+ node.kind !== 'summary_card') {
72
+ return true;
73
+ }
74
+ const visibleWhen = node.visibleWhen;
75
+ return visibleWhen === undefined || reads.outcomeOf(visibleWhen) !== 'FAIL';
76
+ }
77
+ /**
78
+ * One node's view. `ancestorVisible` is folded into `visible`, so a renderer skips a hidden
79
+ * subtree without re-deriving why it is hidden.
80
+ */
81
+ function buildNode(node, reads, nodeId, ancestorVisible, memo) {
82
+ const present = presenceOf(node, reads, memo);
83
+ const sectionId = 'sectionId' in node ? node.sectionId : undefined;
84
+ const withSectionId = sectionId === undefined ? {} : { sectionId };
85
+ const own = ownVisible(node, reads);
86
+ const containerVisible = ancestorVisible && own;
87
+ const childrenOf = (nodes, visible) => nodes.map((child, index) => buildNode(child, reads, `${nodeId}.children[${String(index)}]`, visible, memo).view);
88
+ switch (node.kind) {
89
+ case 'section': {
90
+ const collapsed = (node.hideWhenEmpty ?? false) && !present;
91
+ const visible = containerVisible && !collapsed;
92
+ return {
93
+ present,
94
+ view: {
95
+ kind: 'section',
96
+ nodeId,
97
+ visible,
98
+ ...withSectionId,
99
+ titleKey: node.titleKey,
100
+ ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),
101
+ columns: node.columns,
102
+ collapsible: node.collapsible ?? false,
103
+ ...(node.defaultExpanded === undefined ? {} : { defaultExpanded: node.defaultExpanded }),
104
+ hideWhenEmpty: node.hideWhenEmpty ?? false,
105
+ empty: !present,
106
+ children: childrenOf(node.children, visible),
107
+ },
108
+ };
109
+ }
110
+ case 'group': {
111
+ const collapsed = (node.hideWhenEmpty ?? false) && !present;
112
+ const visible = containerVisible && !collapsed;
113
+ return {
114
+ present,
115
+ view: {
116
+ kind: 'group',
117
+ nodeId,
118
+ visible,
119
+ ...(node.titleKey === undefined ? {} : { titleKey: node.titleKey }),
120
+ ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),
121
+ columns: node.columns,
122
+ collapsible: node.collapsible ?? false,
123
+ ...(node.defaultExpanded === undefined ? {} : { defaultExpanded: node.defaultExpanded }),
124
+ hideWhenEmpty: node.hideWhenEmpty ?? false,
125
+ empty: !present,
126
+ children: childrenOf(node.children, visible),
127
+ },
128
+ };
129
+ }
130
+ case 'wizard': {
131
+ const children = childrenOf(node.children, containerVisible).filter((child) => child.kind === 'step');
132
+ return {
133
+ present,
134
+ view: { kind: 'wizard', nodeId, visible: containerVisible, children },
135
+ };
136
+ }
137
+ case 'step': {
138
+ const collapsed = (node.hideWhenEmpty ?? false) && !present;
139
+ const visible = containerVisible && !collapsed;
140
+ return {
141
+ present,
142
+ view: {
143
+ kind: 'step',
144
+ nodeId,
145
+ visible,
146
+ ...withSectionId,
147
+ stepId: node.stepId,
148
+ titleKey: node.titleKey,
149
+ ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),
150
+ ...(node.gateId === undefined ? {} : { gateId: node.gateId }),
151
+ columns: node.columns,
152
+ hideWhenEmpty: node.hideWhenEmpty ?? false,
153
+ empty: !present,
154
+ children: childrenOf(node.children, visible),
155
+ },
156
+ };
157
+ }
158
+ case 'field':
159
+ return {
160
+ present,
161
+ view: {
162
+ kind: 'field',
163
+ nodeId,
164
+ visible: containerVisible && present,
165
+ ...withSectionId,
166
+ fieldId: node.fieldId,
167
+ colSpan: node.colSpan,
168
+ },
169
+ };
170
+ case 'heading':
171
+ return {
172
+ present,
173
+ view: {
174
+ kind: 'heading',
175
+ nodeId,
176
+ visible: containerVisible,
177
+ titleKey: node.titleKey,
178
+ ...(node.textKey === undefined ? {} : { textKey: node.textKey }),
179
+ },
180
+ };
181
+ case 'callout': {
182
+ const params = paramsOf(reads, node.params);
183
+ return {
184
+ present,
185
+ view: {
186
+ kind: 'callout',
187
+ nodeId,
188
+ visible: containerVisible,
189
+ tone: node.tone,
190
+ ...(node.titleKey === undefined ? {} : { titleKey: node.titleKey }),
191
+ textKey: node.textKey,
192
+ ...(params === undefined ? {} : { params }),
193
+ },
194
+ };
195
+ }
196
+ case 'divider':
197
+ return { present, view: { kind: 'divider', nodeId, visible: containerVisible } };
198
+ case 'sop_block': {
199
+ const params = paramsOf(reads, node.params);
200
+ return {
201
+ present,
202
+ view: {
203
+ kind: 'sop_block',
204
+ nodeId,
205
+ visible: containerVisible,
206
+ ...withSectionId,
207
+ titleKey: node.titleKey,
208
+ ...(node.textKey === undefined ? {} : { textKey: node.textKey }),
209
+ ...(params === undefined ? {} : { params }),
210
+ },
211
+ };
212
+ }
213
+ case 'summary_card': {
214
+ const params = paramsOf(reads, node.params);
215
+ const readouts = readoutsOf(reads, node.readouts);
216
+ return {
217
+ present,
218
+ view: {
219
+ kind: 'summary_card',
220
+ nodeId,
221
+ visible: containerVisible,
222
+ ...withSectionId,
223
+ titleKey: node.titleKey,
224
+ ...(node.textKey === undefined ? {} : { textKey: node.textKey }),
225
+ ...(params === undefined ? {} : { params }),
226
+ ...(readouts === undefined ? {} : { readouts }),
227
+ ...(node.fields === undefined ? {} : { fields: node.fields }),
228
+ },
229
+ };
230
+ }
231
+ default:
232
+ return assertNever(node);
233
+ }
234
+ }
235
+ /**
236
+ * The layout view for one record: presentation only, carrying no report.
237
+ *
238
+ * The evaluation this builds is the channel's own, so a chrome predicate that reads a stored
239
+ * `write_only` or a `masked` value resolves `UNKNOWN` without delivering it and no read appears
240
+ * in any caller's `report.access`, `report.lookups` or `report.diagnostics`.
241
+ */
242
+ export function evaluatePresentation(compiled, input, env = {}) {
243
+ assertArtifactReceipt(compiled);
244
+ // A form with no layout has no presentation to evaluate: building an `Evaluation` here would
245
+ // run every computed writer per keystroke to map an empty array. The tier pairing is still
246
+ // refused, because it is the artifact's contract rather than a fact of the layout.
247
+ assertTierPairing(compiled, env);
248
+ const nodes = compiled.layout ?? [];
249
+ if (nodes.length === 0)
250
+ return [];
251
+ const reads = new Evaluation(compiled, input, env).presentation();
252
+ const memo = new Map();
253
+ return nodes.map((node, index) => buildNode(node, reads, `layout[${String(index)}]`, true, memo).view);
254
+ }
255
+ //# sourceMappingURL=presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../src/eval/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAsIrD,wFAAwF;AACxF,SAAS,YAAY,CAAC,KAAwB,EAAE,OAAe;IAC7D,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CACjB,IAAgB,EAChB,KAAwB,EACxB,IAA8B;IAE9B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,OAAO,GAAG,CAAC,GAAY,EAAE;QAC7B,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,KAAK,SAAS;gBACZ,kFAAkF;gBAClF,iFAAiF;gBACjF,0EAA0E;gBAC1E,OAAO,CACL,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;YACJ,KAAK,OAAO,CAAC;YACb,KAAK,MAAM,CAAC;YACZ,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CA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CAAC,QAAQ,CAAC,CAAC;IAChC,6FAA6F;IAC7F,2FAA2F;IAC3F,mFAAmF;IACnF,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC;IACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;IAClE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC5C,OAAO,KAAK,CAAC,GAAG,CACd,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CACrF,CAAC;AACJ,CAAC","sourcesContent":["import { assertNever } from '../model/errors.js';\nimport type { LayoutNode, LayoutReadout, LayoutTone } from '../model/layout.js';\nimport type { ExprNode, WireValue } from '../model/types.js';\nimport type { EvaluationEnv, EvaluationInput } from '../model/access.js';\nimport type { CompiledSchema } from '../model/schema.js';\nimport type { PresentationReads } from './presentation-reads.js';\nimport { Evaluation, assertTierPairing } from './rule/runner.js';\nimport { assertArtifactReceipt } from './receipt.js';\n\n/**\n * The presentation-only channel, `spec/semantics/model-v1.md` `MODEL-3.1.11`.\n *\n * A layout is chrome: its `visibleWhen`, message `params` and summary-card `readouts` read the\n * record to decide what to show, and none of that may reach the evaluation report. So the\n * channel owns a dedicated evaluation and asks it for the presentation projection: the reads\n * are made through the same access-safe and visibility-safe reader a rule uses, and the\n * evaluation's diagnostics, provenance and considered refs are discarded with it.\n *\n * Visibility fails open. A `visibleWhen` hides only when it decides `FAIL`; `UNKNOWN`,\n * `DEFERRED` and an evaluation error leave the chrome visible, because hiding is never how an\n * undetermined presentation condition is allowed to answer. `hideWhenEmpty` counts a field's\n * presence, not its readability: a `write_only` or `masked` field is present, and only\n * `hidden` access or a `visible` rule that decided `FAIL` makes a container empty.\n *\n * One view is produced per layout node, carrying the message keys the caller resolves with\n * `resolveSchemaLocale` and `formatMessage`, the evaluated parameters and readouts, and the\n * derived `visible`/`empty` flags. The wizard cursor is the host's: step views carry their\n * visibility, never a selected step.\n */\n\n/** One readout's label and the value the channel could decide for it. */\nexport interface LayoutReadoutView {\n readonly labelKey: string;\n /** Absent when the expression was undetermined, absent or refused; never a plaintext leak. */\n readonly value?: WireValue;\n}\n\ninterface LayoutNodeViewBase {\n readonly nodeId: string;\n /** Ancestor visibility and this node's own chrome predicate, folded into one answer. */\n readonly visible: boolean;\n readonly sectionId?: string;\n}\n\nexport interface LayoutSectionView extends LayoutNodeViewBase {\n readonly kind: 'section';\n readonly titleKey: string;\n readonly descriptionKey?: string;\n readonly columns: number;\n readonly collapsible: boolean;\n /** The author's expanded state, absent when they stated none; the renderer chooses then. */\n readonly defaultExpanded?: boolean;\n readonly hideWhenEmpty: boolean;\n /** Whether this container places no visible field leaf. */\n readonly empty: boolean;\n readonly children: readonly LayoutNodeView[];\n}\n\nexport interface LayoutGroupView extends LayoutNodeViewBase {\n readonly kind: 'group';\n readonly titleKey?: string;\n readonly descriptionKey?: string;\n readonly columns: number;\n readonly collapsible: boolean;\n /** The author's expanded state, absent when they stated none; the renderer chooses then. */\n readonly defaultExpanded?: boolean;\n readonly hideWhenEmpty: boolean;\n readonly empty: boolean;\n readonly children: readonly LayoutNodeView[];\n}\n\nexport interface LayoutWizardView extends LayoutNodeViewBase {\n readonly kind: 'wizard';\n readonly children: readonly LayoutStepView[];\n}\n\nexport interface LayoutStepView extends LayoutNodeViewBase {\n readonly kind: 'step';\n readonly stepId: string;\n readonly titleKey: string;\n readonly descriptionKey?: string;\n readonly gateId?: string;\n readonly columns: number;\n readonly hideWhenEmpty: boolean;\n readonly empty: boolean;\n readonly children: readonly LayoutNodeView[];\n}\n\nexport interface LayoutFieldView extends LayoutNodeViewBase {\n readonly kind: 'field';\n readonly fieldId: string;\n readonly colSpan: number;\n}\n\nexport interface LayoutHeadingView extends LayoutNodeViewBase {\n readonly kind: 'heading';\n readonly titleKey: string;\n readonly textKey?: string;\n}\n\nexport interface LayoutCalloutView extends LayoutNodeViewBase {\n readonly kind: 'callout';\n readonly tone: LayoutTone;\n readonly titleKey?: string;\n readonly textKey: string;\n readonly params?: Readonly<Record<string, WireValue>>;\n}\n\nexport interface LayoutDividerView extends LayoutNodeViewBase {\n readonly kind: 'divider';\n}\n\nexport interface LayoutSopBlockView extends LayoutNodeViewBase {\n readonly kind: 'sop_block';\n readonly titleKey: string;\n readonly textKey?: string;\n readonly params?: Readonly<Record<string, WireValue>>;\n}\n\nexport interface LayoutSummaryCardView extends LayoutNodeViewBase {\n readonly kind: 'summary_card';\n readonly titleKey: string;\n readonly textKey?: string;\n readonly params?: Readonly<Record<string, WireValue>>;\n readonly readouts?: readonly LayoutReadoutView[];\n readonly fields?: readonly string[];\n}\n\n/** One node of the presentation view, tagged by the same closed kinds as the artifact. */\nexport type LayoutNodeView =\n | LayoutSectionView\n | LayoutGroupView\n | LayoutWizardView\n | LayoutStepView\n | LayoutFieldView\n | LayoutHeadingView\n | LayoutCalloutView\n | LayoutDividerView\n | LayoutSopBlockView\n | LayoutSummaryCardView;\n\n/** Whether a field leaf is present for `hideWhenEmpty`: masked and write-only count. */\nfunction fieldPresent(reads: PresentationReads, fieldId: string): boolean {\n return !reads.fieldHidden(fieldId) && reads.fieldVisible(fieldId);\n}\n\n/**\n * Every node's presence, bottom-up. Presence is a fact about the subtree alone, so a container\n * that collapses for emptiness is still counted by its own parent exactly as its fields are.\n */\nfunction presenceOf(\n node: LayoutNode,\n reads: PresentationReads,\n memo: Map<LayoutNode, boolean>,\n): boolean {\n const cached = memo.get(node);\n if (cached !== undefined) return cached;\n const present = ((): boolean => {\n switch (node.kind) {\n case 'field':\n return fieldPresent(reads, node.fieldId);\n case 'section':\n // A section its own predicate hides is off-screen, so a parent that collapses for\n // emptiness counts it exactly as a hidden field: not present. The condition is a\n // decided `FAIL` only; an undecided predicate leaves the section visible.\n return (\n ownVisible(node, reads) && node.children.some((child) => presenceOf(child, reads, memo))\n );\n case 'group':\n case 'step':\n case 'wizard':\n return node.children.some((child) => presenceOf(child, reads, memo));\n case 'heading':\n case 'callout':\n case 'divider':\n case 'sop_block':\n case 'summary_card':\n return false;\n default:\n return assertNever(node);\n }\n })();\n memo.set(node, present);\n return present;\n}\n\n/** The decided arguments of one chrome node's message, or `undefined` when none decided. */\nfunction paramsOf(\n reads: PresentationReads,\n params: Readonly<Record<string, ExprNode>> | undefined,\n): Readonly<Record<string, WireValue>> | undefined {\n if (params === undefined) return undefined;\n const decided: Record<string, WireValue> = {};\n for (const [name, node] of Object.entries(params)) {\n const value = reads.valueOf(node);\n if (value !== undefined) decided[name] = value;\n }\n return Object.keys(decided).length === 0 ? undefined : decided;\n}\n\n/** One summary card's readouts, each with the value the channel could decide. */\nfunction readoutsOf(\n reads: PresentationReads,\n readouts: readonly LayoutReadout[] | undefined,\n): readonly LayoutReadoutView[] | undefined {\n if (readouts === undefined) return undefined;\n return readouts.map((readout) => {\n const value = reads.valueOf(readout.value);\n return value === undefined\n ? { labelKey: readout.labelKey }\n : { labelKey: readout.labelKey, value };\n });\n}\n\n/** The chrome predicate's answer: only a decided `FAIL` hides. */\nfunction ownVisible(node: LayoutNode, reads: PresentationReads): boolean {\n if (\n node.kind !== 'section' &&\n node.kind !== 'step' &&\n node.kind !== 'callout' &&\n node.kind !== 'sop_block' &&\n node.kind !== 'summary_card'\n ) {\n return true;\n }\n const visibleWhen = node.visibleWhen;\n return visibleWhen === undefined || reads.outcomeOf(visibleWhen) !== 'FAIL';\n}\n\ninterface Built {\n readonly view: LayoutNodeView;\n readonly present: boolean;\n}\n\n/**\n * One node's view. `ancestorVisible` is folded into `visible`, so a renderer skips a hidden\n * subtree without re-deriving why it is hidden.\n */\nfunction buildNode(\n node: LayoutNode,\n reads: PresentationReads,\n nodeId: string,\n ancestorVisible: boolean,\n memo: Map<LayoutNode, boolean>,\n): Built {\n const present = presenceOf(node, reads, memo);\n const sectionId = 'sectionId' in node ? node.sectionId : undefined;\n const withSectionId = sectionId === undefined ? {} : { sectionId };\n const own = ownVisible(node, reads);\n const containerVisible = ancestorVisible && own;\n const childrenOf = (nodes: readonly LayoutNode[], visible: boolean): readonly LayoutNodeView[] =>\n nodes.map(\n (child, index) =>\n buildNode(child, reads, `${nodeId}.children[${String(index)}]`, visible, memo).view,\n );\n\n switch (node.kind) {\n case 'section': {\n const collapsed = (node.hideWhenEmpty ?? false) && !present;\n const visible = containerVisible && !collapsed;\n return {\n present,\n view: {\n kind: 'section',\n nodeId,\n visible,\n ...withSectionId,\n titleKey: node.titleKey,\n ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),\n columns: node.columns,\n collapsible: node.collapsible ?? false,\n ...(node.defaultExpanded === undefined ? {} : { defaultExpanded: node.defaultExpanded }),\n hideWhenEmpty: node.hideWhenEmpty ?? false,\n empty: !present,\n children: childrenOf(node.children, visible),\n },\n };\n }\n case 'group': {\n const collapsed = (node.hideWhenEmpty ?? false) && !present;\n const visible = containerVisible && !collapsed;\n return {\n present,\n view: {\n kind: 'group',\n nodeId,\n visible,\n ...(node.titleKey === undefined ? {} : { titleKey: node.titleKey }),\n ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),\n columns: node.columns,\n collapsible: node.collapsible ?? false,\n ...(node.defaultExpanded === undefined ? {} : { defaultExpanded: node.defaultExpanded }),\n hideWhenEmpty: node.hideWhenEmpty ?? false,\n empty: !present,\n children: childrenOf(node.children, visible),\n },\n };\n }\n case 'wizard': {\n const children = childrenOf(node.children, containerVisible).filter(\n (child): child is LayoutStepView => child.kind === 'step',\n );\n return {\n present,\n view: { kind: 'wizard', nodeId, visible: containerVisible, children },\n };\n }\n case 'step': {\n const collapsed = (node.hideWhenEmpty ?? false) && !present;\n const visible = containerVisible && !collapsed;\n return {\n present,\n view: {\n kind: 'step',\n nodeId,\n visible,\n ...withSectionId,\n stepId: node.stepId,\n titleKey: node.titleKey,\n ...(node.descriptionKey === undefined ? {} : { descriptionKey: node.descriptionKey }),\n ...(node.gateId === undefined ? {} : { gateId: node.gateId }),\n columns: node.columns,\n hideWhenEmpty: node.hideWhenEmpty ?? false,\n empty: !present,\n children: childrenOf(node.children, visible),\n },\n };\n }\n case 'field':\n return {\n present,\n view: {\n kind: 'field',\n nodeId,\n visible: containerVisible && present,\n ...withSectionId,\n fieldId: node.fieldId,\n colSpan: node.colSpan,\n },\n };\n case 'heading':\n return {\n present,\n view: {\n kind: 'heading',\n nodeId,\n visible: containerVisible,\n titleKey: node.titleKey,\n ...(node.textKey === undefined ? {} : { textKey: node.textKey }),\n },\n };\n case 'callout': {\n const params = paramsOf(reads, node.params);\n return {\n present,\n view: {\n kind: 'callout',\n nodeId,\n visible: containerVisible,\n tone: node.tone,\n ...(node.titleKey === undefined ? {} : { titleKey: node.titleKey }),\n textKey: node.textKey,\n ...(params === undefined ? {} : { params }),\n },\n };\n }\n case 'divider':\n return { present, view: { kind: 'divider', nodeId, visible: containerVisible } };\n case 'sop_block': {\n const params = paramsOf(reads, node.params);\n return {\n present,\n view: {\n kind: 'sop_block',\n nodeId,\n visible: containerVisible,\n ...withSectionId,\n titleKey: node.titleKey,\n ...(node.textKey === undefined ? {} : { textKey: node.textKey }),\n ...(params === undefined ? {} : { params }),\n },\n };\n }\n case 'summary_card': {\n const params = paramsOf(reads, node.params);\n const readouts = readoutsOf(reads, node.readouts);\n return {\n present,\n view: {\n kind: 'summary_card',\n nodeId,\n visible: containerVisible,\n ...withSectionId,\n titleKey: node.titleKey,\n ...(node.textKey === undefined ? {} : { textKey: node.textKey }),\n ...(params === undefined ? {} : { params }),\n ...(readouts === undefined ? {} : { readouts }),\n ...(node.fields === undefined ? {} : { fields: node.fields }),\n },\n };\n }\n default:\n return assertNever(node);\n }\n}\n\n/**\n * The layout view for one record: presentation only, carrying no report.\n *\n * The evaluation this builds is the channel's own, so a chrome predicate that reads a stored\n * `write_only` or a `masked` value resolves `UNKNOWN` without delivering it and no read appears\n * in any caller's `report.access`, `report.lookups` or `report.diagnostics`.\n */\nexport function evaluatePresentation(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n): readonly LayoutNodeView[] {\n assertArtifactReceipt(compiled);\n // A form with no layout has no presentation to evaluate: building an `Evaluation` here would\n // run every computed writer per keystroke to map an empty array. The tier pairing is still\n // refused, because it is the artifact's contract rather than a fact of the layout.\n assertTierPairing(compiled, env);\n const nodes = compiled.layout ?? [];\n if (nodes.length === 0) return [];\n const reads = new Evaluation(compiled, input, env).presentation();\n const memo = new Map<LayoutNode, boolean>();\n return nodes.map(\n (node, index) => buildNode(node, reads, `layout[${String(index)}]`, true, memo).view,\n );\n}\n"]}
@@ -0,0 +1,41 @@
1
+ import type { EvaluationInput } from '../../model/access.js';
2
+ import type { CompiledField, WireValue } from '../../model/types.js';
3
+ import type { DeclaredPath } from '../reader-paths.js';
4
+ import type { Presence } from '../expr/value.js';
5
+ import type { RecordIndex, Resolved } from './declarations.js';
6
+ /** The reader state a context-root or presence question needs. */
7
+ export interface ContextSources {
8
+ readonly index: RecordIndex;
9
+ readonly input: EvaluationInput;
10
+ isContextPath(path: string): boolean;
11
+ walked(path: string): DeclaredPath | undefined;
12
+ overlayAt(walked: DeclaredPath, segments: readonly string[]): Resolved | undefined;
13
+ /** A record with the members a writer owns merged over the submitted one. */
14
+ mergeRecord(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;
15
+ /** A list with every row's written members merged over the submitted ones. */
16
+ mergeRows(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;
17
+ }
18
+ /**
19
+ * The value one context root is supplied with: the environment's for a reserved root
20
+ * the caller's input for a declared one.
21
+ *
22
+ * A reserved root is only ever read from the environment. A record that supplies a context
23
+ * value under one of those names cannot override it, so `context.record_date` means the
24
+ * same thing to every expression in the evaluation.
25
+ */
26
+ export declare function contextValueFor(sources: ContextSources, rootPath: string): {
27
+ readonly present: boolean;
28
+ readonly value: unknown;
29
+ };
30
+ /**
31
+ * Whether the record holds a non-`null` value at `path`, answered without any access
32
+ * decision and without reading the value out.
33
+ *
34
+ * Presence is metadata, not the value (`EXPR-9.1.4`, `EXPR-9.1.5`), so an access refusal is not
35
+ * an absence: a masked or hidden value the record holds is still present. The overlay owns the
36
+ * members a writer produced, so a container the submission does not hold is present when a
37
+ * writer composes one of its members — otherwise `absent(p)` would confirm something the record
38
+ * does hold.
39
+ */
40
+ export declare function rawPresence(sources: ContextSources, path: string): Presence;
41
+ //# sourceMappingURL=context-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-value.d.ts","sourceRoot":"","sources":["../../../src/eval/reader/context-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE/D,kEAAkE;AAClE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;IAC/C,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnF,6EAA6E;IAC7E,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACpF,8EAA8E;IAC9E,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnF;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,MAAM,GACf;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAWxD;AAgED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CA6C3E"}
@@ -0,0 +1,129 @@
1
+ import { isReservedContextRoot, isUndetermined } from '../../model/types.js';
2
+ import { isRecord, isWireValue } from '../../model/values.js';
3
+ /**
4
+ * The value one context root is supplied with: the environment's for a reserved root
5
+ * the caller's input for a declared one.
6
+ *
7
+ * A reserved root is only ever read from the environment. A record that supplies a context
8
+ * value under one of those names cannot override it, so `context.record_date` means the
9
+ * same thing to every expression in the evaluation.
10
+ */
11
+ export function contextValueFor(sources, rootPath) {
12
+ if (isReservedContextRoot(rootPath)) {
13
+ const reserved = sources.index.reservedRoots?.get(rootPath);
14
+ return reserved === undefined
15
+ ? { present: false, value: undefined }
16
+ : { present: true, value: reserved };
17
+ }
18
+ const context = sources.input.context ?? {};
19
+ return Object.hasOwn(context, rootPath)
20
+ ? { present: true, value: context[rootPath] }
21
+ : { present: false, value: undefined };
22
+ }
23
+ function submittedLookup(values, segments) {
24
+ const [first, ...rest] = segments;
25
+ if (first === undefined || !Object.hasOwn(values, first))
26
+ return { kind: 'absent' };
27
+ let raw = values[first];
28
+ if (raw === undefined)
29
+ return { kind: 'notWire' };
30
+ for (const segment of rest) {
31
+ if (!isRecord(raw))
32
+ return { kind: 'missing' };
33
+ if (!Object.hasOwn(raw, segment))
34
+ return { kind: 'absent' };
35
+ raw = raw[segment];
36
+ if (raw === undefined)
37
+ return { kind: 'notWire' };
38
+ }
39
+ return { kind: 'value', value: raw };
40
+ }
41
+ /**
42
+ * The presence a container states once the writers that reach it are applied, `EXPR-9.1.4`.
43
+ *
44
+ * A refused container is answered from the record, and the record's answer includes the members
45
+ * a writer owns: `resolvePath` merges them into the container it resolves, and presence is
46
+ * metadata about that same value. A submission that omits the container — or holds `null`
47
+ * there — therefore still holds it when a writer owns one of its members, and a member the
48
+ * device could not produce leaves the composed container undetermined rather than absent.
49
+ * `undefined` means no writer reaches this container, so the submission alone answers.
50
+ *
51
+ * The subtree is narrowed to a wire value before it is merged. A container the read would have
52
+ * refused answers no presence fact from its content, and the merge is only asked for an absent
53
+ * or `null` submission, so this walk never copies a tree the submission already holds.
54
+ */
55
+ function composedPresence(sources, walked, submitted) {
56
+ if (walked === undefined)
57
+ return undefined;
58
+ const field = walked.field;
59
+ if (field.primitive !== 'record' && field.primitive !== 'array')
60
+ return undefined;
61
+ const raw = isWireValue(submitted) ? submitted : undefined;
62
+ const merged = field.primitive === 'record' ? sources.mergeRecord(field, raw) : sources.mergeRows(field, raw);
63
+ if (merged?.kind !== 'value')
64
+ return undefined;
65
+ if (isUndetermined(merged.value))
66
+ return 'undetermined';
67
+ return merged.value === null ? 'null' : 'present';
68
+ }
69
+ /**
70
+ * Whether the record holds a non-`null` value at `path`, answered without any access
71
+ * decision and without reading the value out.
72
+ *
73
+ * Presence is metadata, not the value (`EXPR-9.1.4`, `EXPR-9.1.5`), so an access refusal is not
74
+ * an absence: a masked or hidden value the record holds is still present. The overlay owns the
75
+ * members a writer produced, so a container the submission does not hold is present when a
76
+ * writer composes one of its members — otherwise `absent(p)` would confirm something the record
77
+ * does hold.
78
+ */
79
+ export function rawPresence(sources, path) {
80
+ if (sources.isContextPath(path)) {
81
+ const rootPath = path.split('.').slice(1).join('.');
82
+ const supplied = contextValueFor(sources, rootPath);
83
+ if (!supplied.present) {
84
+ // A required root that the host did not supply reads as undetermined, never as
85
+ // absent: `CTX-2.1.4` says a rule that depends on it is UNKNOWN, and answering
86
+ // "absent" would let `absent(p)` confirm something the evaluation never saw. Only a
87
+ // declared `optional` root is legitimately absent.
88
+ const declaration = sources.index.contextRoots.get(rootPath);
89
+ return declaration?.nullability === 'optional' ? 'absent' : 'undetermined';
90
+ }
91
+ if (supplied.value === undefined)
92
+ return 'undetermined';
93
+ return supplied.value === null ? 'null' : 'present';
94
+ }
95
+ const segments = path.split('.');
96
+ // A computed field's presence is answered by the writer's result without delivering the
97
+ // value: presence is metadata, and the access decision already refused the value itself.
98
+ // The overlay owns which declaration wins and how far below it the path descends, including
99
+ // a whole-record writer beside a submitted member it replaced.
100
+ const walked = sources.walked(path);
101
+ if (walked !== undefined) {
102
+ const overlaid = sources.overlayAt(walked, segments);
103
+ if (overlaid?.kind === 'absent')
104
+ return 'absent';
105
+ if (overlaid?.kind === 'value') {
106
+ if (isUndetermined(overlaid.value))
107
+ return 'undetermined';
108
+ return overlaid.value === null ? 'null' : 'present';
109
+ }
110
+ }
111
+ const submitted = submittedLookup(sources.input.values, segments);
112
+ switch (submitted.kind) {
113
+ case 'missing':
114
+ // A path below a parent that holds no record is absent however many writers name a
115
+ // member of it: the value read has no container to merge into.
116
+ return 'absent';
117
+ case 'notWire':
118
+ return 'undetermined';
119
+ case 'absent':
120
+ return composedPresence(sources, walked, undefined) ?? 'absent';
121
+ case 'value':
122
+ // A submitted value answers on the container's own presence; only the empty value can
123
+ // be replaced by a composed container, exactly as an omitted one can.
124
+ if (submitted.value !== null)
125
+ return 'present';
126
+ return composedPresence(sources, walked, submitted.value) ?? 'null';
127
+ }
128
+ }
129
+ //# sourceMappingURL=context-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-value.js","sourceRoot":"","sources":["../../../src/eval/reader/context-value.ts"],"names":[],"mappings":"A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D,IAAI,QAAQ,EAAE,IAAI,KAAK,QAAQ;YAAE,OAAO,QAAQ,CAAC;QACjD,IAAI,QAAQ,EAAE,IAAI,KAAK,OAAO,EAAE,CAAC;YAC/B,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,OAAO,cAAc,CAAC;YAC1D,OAAO,QAAQ,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,CAAC;IACH,CAAC;IACD,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClE,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,KAAK,SAAS;YACZ,mFAAmF;YACnF,+DAA+D;YAC/D,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC;QACxB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,QAAQ,CAAC;QAClE,KAAK,OAAO;YACV,sFAAsF;YACtF,sEAAsE;YACtE,IAAI,SAAS,CAAC,KAAK,KAAK,IAAI;gBAAE,OAAO,SAAS,CAAC;YAC/C,OAAO,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC;IACxE,CAAC;AACH,CAAC","sourcesContent":["import type { EvaluationInput } from '../../model/access.js';\nimport type { CompiledField, WireValue } from '../../model/types.js';\nimport { isReservedContextRoot, isUndetermined } from '../../model/types.js';\nimport { isRecord, isWireValue } from '../../model/values.js';\nimport type { DeclaredPath } from '../reader-paths.js';\nimport type { Presence } from '../expr/value.js';\nimport type { RecordIndex, Resolved } from './declarations.js';\n\n/** The reader state a context-root or presence question needs. */\nexport interface ContextSources {\n readonly index: RecordIndex;\n readonly input: EvaluationInput;\n isContextPath(path: string): boolean;\n walked(path: string): DeclaredPath | undefined;\n overlayAt(walked: DeclaredPath, segments: readonly string[]): Resolved | undefined;\n /** A record with the members a writer owns merged over the submitted one. */\n mergeRecord(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;\n /** A list with every row's written members merged over the submitted ones. */\n mergeRows(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;\n}\n\n/**\n * The value one context root is supplied with: the environment's for a reserved root\n * the caller's input for a declared one.\n *\n * A reserved root is only ever read from the environment. A record that supplies a context\n * value under one of those names cannot override it, so `context.record_date` means the\n * same thing to every expression in the evaluation.\n */\nexport function contextValueFor(\n sources: ContextSources,\n rootPath: string,\n): { readonly present: boolean; readonly value: unknown } {\n if (isReservedContextRoot(rootPath)) {\n const reserved = sources.index.reservedRoots?.get(rootPath);\n return reserved === undefined\n ? { present: false, value: undefined }\n : { present: true, value: reserved };\n }\n const context = sources.input.context ?? {};\n return Object.hasOwn(context, rootPath)\n ? { present: true, value: context[rootPath] }\n : { present: false, value: undefined };\n}\n\n/**\n * What the submitted tree states at one path, `EXPR-9.1.4`.\n *\n * `missing` is the fact `resolveSubmission` states as its own kind: the walk left the record,\n * so no writer can compose anything below it either. `absent` is a field or member the\n * submission does not hold, which a writer of a member may still compose into a container.\n * `notWire` is an own property holding `undefined`: not a wire value, so presence cannot be\n * confirmed either way rather than being read as absence.\n */\ntype SubmittedLookup =\n | { readonly kind: 'absent' }\n | { readonly kind: 'missing' }\n | { readonly kind: 'notWire' }\n | { readonly kind: 'value'; readonly value: unknown };\n\nfunction submittedLookup(\n values: EvaluationInput['values'],\n segments: readonly string[],\n): SubmittedLookup {\n const [first, ...rest] = segments;\n if (first === undefined || !Object.hasOwn(values, first)) return { kind: 'absent' };\n let raw: unknown = values[first];\n if (raw === undefined) return { kind: 'notWire' };\n for (const segment of rest) {\n if (!isRecord(raw)) return { kind: 'missing' };\n if (!Object.hasOwn(raw, segment)) return { kind: 'absent' };\n raw = raw[segment];\n if (raw === undefined) return { kind: 'notWire' };\n }\n return { kind: 'value', value: raw };\n}\n\n/**\n * The presence a container states once the writers that reach it are applied, `EXPR-9.1.4`.\n *\n * A refused container is answered from the record, and the record's answer includes the members\n * a writer owns: `resolvePath` merges them into the container it resolves, and presence is\n * metadata about that same value. A submission that omits the container — or holds `null`\n * there — therefore still holds it when a writer owns one of its members, and a member the\n * device could not produce leaves the composed container undetermined rather than absent.\n * `undefined` means no writer reaches this container, so the submission alone answers.\n *\n * The subtree is narrowed to a wire value before it is merged. A container the read would have\n * refused answers no presence fact from its content, and the merge is only asked for an absent\n * or `null` submission, so this walk never copies a tree the submission already holds.\n */\nfunction composedPresence(\n sources: ContextSources,\n walked: DeclaredPath | undefined,\n submitted: unknown,\n): Presence | undefined {\n if (walked === undefined) return undefined;\n const field = walked.field;\n if (field.primitive !== 'record' && field.primitive !== 'array') return undefined;\n const raw = isWireValue(submitted) ? submitted : undefined;\n const merged =\n field.primitive === 'record' ? sources.mergeRecord(field, raw) : sources.mergeRows(field, raw);\n if (merged?.kind !== 'value') return undefined;\n if (isUndetermined(merged.value)) return 'undetermined';\n return merged.value === null ? 'null' : 'present';\n}\n\n/**\n * Whether the record holds a non-`null` value at `path`, answered without any access\n * decision and without reading the value out.\n *\n * Presence is metadata, not the value (`EXPR-9.1.4`, `EXPR-9.1.5`), so an access refusal is not\n * an absence: a masked or hidden value the record holds is still present. The overlay owns the\n * members a writer produced, so a container the submission does not hold is present when a\n * writer composes one of its members — otherwise `absent(p)` would confirm something the record\n * does hold.\n */\nexport function rawPresence(sources: ContextSources, path: string): Presence {\n if (sources.isContextPath(path)) {\n const rootPath = path.split('.').slice(1).join('.');\n const supplied = contextValueFor(sources, rootPath);\n if (!supplied.present) {\n // A required root that the host did not supply reads as undetermined, never as\n // absent: `CTX-2.1.4` says a rule that depends on it is UNKNOWN, and answering\n // \"absent\" would let `absent(p)` confirm something the evaluation never saw. Only a\n // declared `optional` root is legitimately absent.\n const declaration = sources.index.contextRoots.get(rootPath);\n return declaration?.nullability === 'optional' ? 'absent' : 'undetermined';\n }\n if (supplied.value === undefined) return 'undetermined';\n return supplied.value === null ? 'null' : 'present';\n }\n const segments = path.split('.');\n // A computed field's presence is answered by the writer's result without delivering the\n // value: presence is metadata, and the access decision already refused the value itself.\n // The overlay owns which declaration wins and how far below it the path descends, including\n // a whole-record writer beside a submitted member it replaced.\n const walked = sources.walked(path);\n if (walked !== undefined) {\n const overlaid = sources.overlayAt(walked, segments);\n if (overlaid?.kind === 'absent') return 'absent';\n if (overlaid?.kind === 'value') {\n if (isUndetermined(overlaid.value)) return 'undetermined';\n return overlaid.value === null ? 'null' : 'present';\n }\n }\n const submitted = submittedLookup(sources.input.values, segments);\n switch (submitted.kind) {\n case 'missing':\n // A path below a parent that holds no record is absent however many writers name a\n // member of it: the value read has no container to merge into.\n return 'absent';\n case 'notWire':\n return 'undetermined';\n case 'absent':\n return composedPresence(sources, walked, undefined) ?? 'absent';\n case 'value':\n // A submitted value answers on the container's own presence; only the empty value can\n // be replaced by a composed container, exactly as an omitted one can.\n if (submitted.value !== null) return 'present';\n return composedPresence(sources, walked, submitted.value) ?? 'null';\n }\n}\n"]}
@@ -0,0 +1,53 @@
1
+ import type { FieldRef } from '../../model/types.js';
2
+ import type { Evaluated } from '../expr/value.js';
3
+ import type { RecordIndex } from './declarations.js';
4
+ /**
5
+ * Row identity for covered targets: the canonical keys of one array, and the read a
6
+ * `(fieldId, rowKey)` reference names. A reference inside an array item is matched on its
7
+ * identity, never on a position; a key no row carries, or one two rows share, is not a
8
+ * reference this reader can satisfy.
9
+ *
10
+ * The keys are the row-addressing authority's answer for the list this reader resolved —
11
+ * access and the computed overlay already applied — so the answer a covered target is matched
12
+ * against is the one a rule is allowed to see, and never a second derivation of its own.
13
+ */
14
+ export declare class CoveredTargets {
15
+ private readonly index;
16
+ private readonly read;
17
+ private readonly declarationPathOf;
18
+ /** Item member fieldId to the arrays declaring it, built when a row target is read. */
19
+ private itemContainers;
20
+ /**
21
+ * Derived keys of one declared array, kept per immutable element list. One reader resolves one
22
+ * identity answer, so a list a read returned is named by the same keys for its lifetime.
23
+ * `null` records a list the authority could not address, so the refusal is not re-derived.
24
+ */
25
+ private readonly derivedKeys;
26
+ /** Row positions by wire-typed key, built once per array rather than scanned per target. */
27
+ private readonly rowPositions;
28
+ constructor(index: RecordIndex, read: (path: string) => Evaluated, declarationPathOf: (fieldId: string) => string);
29
+ /**
30
+ * The canonical row keys of one declared array in array order. `undefined` means the rows
31
+ * cannot be identified here — no identity is declared, a row has no key member, or two rows
32
+ * share one — so a caller that needs identity fails closed instead of falling back to a
33
+ * position. An assigned array answers from the manifest its owner committed.
34
+ */
35
+ rowKeysOf(arrayPath: string): readonly (string | number)[] | undefined;
36
+ /**
37
+ * The canonical row key of one item of a declared array, or `undefined` when the row cannot
38
+ * be identified here.
39
+ */
40
+ rowKeyOf(arrayPath: string, index: number): string | number | undefined;
41
+ /** Reads the value a covered target names. */
42
+ readTarget(ref: FieldRef): Evaluated;
43
+ /** Indexes one array's keys once, refusing a duplicate rather than choosing a row. */
44
+ private positionsOf;
45
+ /** The declared array at `path`, when one is declared there. */
46
+ private arrayDeclaration;
47
+ /**
48
+ * The one array declaring `fieldId` as an item member. `undefined` when none does or when
49
+ * more than one does, because a reference an artifact answers two ways is not a reference.
50
+ */
51
+ private arrayDeclaringItemField;
52
+ }
53
+ //# sourceMappingURL=covered.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"covered.d.ts","sourceRoot":"","sources":["../../../src/eval/reader/covered.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAK/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD;;;;;;;;;GASG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8B;I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