reactive-md 0.9.3 → 0.10.0

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 (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -1,63 +1,64 @@
1
1
  import { r as e } from "./latex-1w7aQgD5.js";
2
2
  import "./limits-CFERRrlC.js";
3
- import { t } from "./compile-D50B5_Ww.js";
4
- import { a as n, i as r, r as i } from "./compiler-core-Niqhp9wV.js";
5
- import { n as a } from "./runtime-requirement-C4-vNcf5.js";
6
- import { n as o } from "./compiler-DLkKUK4t.js";
7
- import { n as s } from "./display-y4v9v0Qd.js";
8
- import { i as c, n as l, r as u } from "./parser-standard-BPIy4HOu.js";
9
- import { s as d } from "./default-config-DIrRpuQz.js";
10
- import { r as f, t as p } from "./default-options-DU5dxuU6.js";
11
- import { t as m } from "./parser-9yNJxGip.js";
12
- import { r as h } from "./default-schema-Ch-Vznpm.js";
13
- function g(e, t) {
3
+ import { t } from "./compile-B35rfzKr.js";
4
+ import { f as n, h as r, p as i, r as a } from "./compiler-core-kkDiQ1RK.js";
5
+ import { n as o } from "./runtime-requirement-DzPO8raU.js";
6
+ import { t as s } from "./conditional-branches-CIhJXasR.js";
7
+ import { i as c, n as l, r as u } from "./parser-standard-DDAKv_DZ.js";
8
+ import { n as d } from "./compiler-DBwLawMZ.js";
9
+ import { n as f } from "./display-Bb6hAG5T.js";
10
+ import { s as p } from "./default-config-CCa8rm2k.js";
11
+ import { r as m, t as h } from "./default-options-By16CVw1.js";
12
+ import { t as g } from "./parser-BHl9Lxbw.js";
13
+ import { r as _ } from "./default-schema-CeYiEW1K.js";
14
+ function v(e, t) {
14
15
  if (typeof t != "string" || t.length > 1e6) return !0;
15
16
  if (e.severity !== "error") return !1;
16
17
  let n = e.code, r = (e) => n === e || n.startsWith(`${e}.`);
17
- return r("local.options") || r("local.budget") || r("local.version") || r("local.html") || r("local.parse") || r("local.security") || r("local.config") || r("local.registry") || r("local.capability");
18
+ return r("local.options") || r("local.budget") || n === "local.macro.depth" || n === "local.macro.conflict" || n === "local.macro.recursion" || r("local.version") || r("local.html") || r("local.parse") || r("local.security") || r("local.config") || r("local.registry") || r("local.capability");
18
19
  }
19
- function _(e, t) {
20
- let n = e.filter((e) => !g(e, t)), r = [];
21
- for (let i of e) g(i, t) && (i.code === "local.html" && n.some((e) => e.range.start === i.range.start && e.range.end === i.range.end) ? n.push(i) : r.push(i));
20
+ function y(e, t) {
21
+ let n = e.filter((e) => !v(e, t)), r = [];
22
+ for (let i of e) v(i, t) && (i.code === "local.html" && n.some((e) => e.range.start === i.range.start && e.range.end === i.range.end) ? n.push(i) : r.push(i));
22
23
  return {
23
24
  definite: r,
24
25
  transient: n
25
26
  };
26
27
  }
27
- function v(e) {
28
+ function b(e) {
28
29
  return `${e.code}:${e.range.start}:${e.range.end}`;
29
30
  }
30
- function y(e, t) {
31
+ function x(e, t) {
31
32
  return e.range.start - t.range.start || e.range.end - t.range.end || e.line - t.line || e.column - t.column || (e.code < t.code ? -1 : +(e.code > t.code));
32
33
  }
33
- function b(e) {
34
+ function S(e) {
34
35
  let t = /* @__PURE__ */ new Map();
35
36
  for (let n of e) for (let e of n) {
36
- let n = v(e);
37
+ let n = b(e);
37
38
  t.has(n) || t.set(n, e);
38
39
  }
39
- return [...t.values()].sort(y);
40
+ return [...t.values()].sort(x);
40
41
  }
41
- function x(e, t) {
42
- let n = t.filter((e) => e.code !== "local.author.unclosed"), r = t.filter((e) => e.code === "local.author.unclosed"), i = new Set(n.map(v));
42
+ function C(e, t) {
43
+ let n = t.filter((e) => e.code !== "local.author.unclosed"), r = t.filter((e) => e.code === "local.author.unclosed"), i = new Set(n.map(b));
43
44
  return {
44
45
  diagnostics: n,
45
- transientDiagnostics: b([...e, r]).filter((e) => !i.has(v(e)))
46
+ transientDiagnostics: S([...e, r]).filter((e) => !i.has(b(e)))
46
47
  };
47
48
  }
48
- function S(e, t) {
49
+ function w(e, t) {
49
50
  if (e.length !== t.length) return !1;
50
51
  for (let n = 0; n < e.length; n += 1) if (e[n].start !== t[n].start || e[n].end !== t[n].end) return !1;
51
52
  return !0;
52
53
  }
53
- function C(e, t) {
54
+ function T(e, t) {
54
55
  return e.length === 1 && e[0].start === 0 && e[0].end === t;
55
56
  }
56
- function w(e, t, n) {
57
+ function E(e, t, n) {
57
58
  for (let r of e) if (r.range.start <= t && r.range.end >= n) return r;
58
59
  }
59
- function T(e, t, n) {
60
- let r = t.length, i = Math.max(0, Math.min(r, e.range.start)), a = w(n, i, Math.max(i, Math.min(r, e.range.end)));
60
+ function D(e, t, n) {
61
+ let r = t.length, i = Math.max(0, Math.min(r, e.range.start)), a = E(n, i, Math.max(i, Math.min(r, e.range.end)));
61
62
  if (a) return {
62
63
  start: a.range.start,
63
64
  end: a.range.end
@@ -74,27 +75,27 @@ function T(e, t, n) {
74
75
  end: r
75
76
  };
76
77
  }
77
- function E(e, t) {
78
+ function O(e, t) {
78
79
  let n = t;
79
80
  for (let t of e) t.range.start < n && (n = t.range.start);
80
81
  return n;
81
82
  }
82
- function D(e, t, r, i, a) {
83
+ function k(e, t, n, r, a) {
83
84
  let o = [...e];
84
- for (let e of t) o.push(T(e, i, r?.nodes ?? []));
85
- let s = n(o, i.length), c = E(t, i.length);
86
- return a && (s = n([...s, {
85
+ for (let e of t) o.push(D(e, r, n?.nodes ?? []));
86
+ let s = i(o, r.length), c = O(t, r.length);
87
+ return a && (s = i([...s, {
87
88
  start: c,
88
- end: i.length
89
- }], i.length)), S(s, e) && (s = n([...e, {
89
+ end: r.length
90
+ }], r.length)), w(s, e) && (s = i([...e, {
90
91
  start: c,
91
- end: i.length
92
- }], i.length)), s;
92
+ end: r.length
93
+ }], r.length)), s;
93
94
  }
94
- function O(e, t) {
95
+ function A(e, t) {
95
96
  for (let [n, r] of Object.entries(t)) typeof r == "number" && Number.isFinite(r) && (e[n] = (e[n] ?? 0) + r);
96
97
  }
97
- function k(e) {
98
+ function ee(e) {
98
99
  let t = e;
99
100
  if (typeof t != "object" || !t || Array.isArray(t)) return e;
100
101
  let n = t.sourcePhase;
@@ -103,91 +104,91 @@ function k(e) {
103
104
  sourcePhase: "streaming"
104
105
  };
105
106
  }
106
- function ee(e, t, n, r = !1) {
107
- let i = k(t), a = [], s = [], c = {}, l, u = 0;
107
+ function te(e, t, n, r = !1) {
108
+ let i = ee(t), a = [], o = [], s = {}, c, l = 0;
108
109
  for (let t = 1; t <= 6; t += 1) {
109
- u = t, l = o(e, i, n, a, r), O(c, l.timings);
110
- let d = l.result;
111
- if (d.ok) {
112
- let e = x(s, d.diagnostics);
110
+ l = t, c = d(e, i, n, a, r), A(s, c.timings);
111
+ let u = c.result;
112
+ if (u.ok) {
113
+ let e = C(o, u.diagnostics);
113
114
  return {
114
115
  result: {
115
- ...d,
116
+ ...u,
116
117
  status: "partial",
117
118
  ...e
118
119
  },
119
- ...l.parsed ? { parsed: l.parsed } : {},
120
+ ...c.parsed ? { parsed: c.parsed } : {},
120
121
  transientDiagnostics: e.transientDiagnostics,
121
122
  literalRanges: [...a],
122
- attempts: u,
123
- timings: c
123
+ attempts: l,
124
+ timings: s
124
125
  };
125
126
  }
126
- let { definite: f, transient: p } = _(d.diagnostics, e);
127
+ let { definite: f, transient: p } = y(u.diagnostics, e);
127
128
  if (f.length > 0) {
128
- let e = b([...s, p]);
129
+ let e = S([...o, p]);
129
130
  return {
130
131
  result: {
131
132
  ok: !1,
132
133
  diagnostics: f,
133
- ...d.recoveries ? { recoveries: [...d.recoveries] } : {},
134
+ ...u.recoveries ? { recoveries: [...u.recoveries] } : {},
134
135
  status: "failed",
135
136
  transientDiagnostics: e
136
137
  },
137
- ...l.parsed ? { parsed: l.parsed } : {},
138
+ ...c.parsed ? { parsed: c.parsed } : {},
138
139
  transientDiagnostics: e,
139
140
  literalRanges: [...a],
140
- attempts: u,
141
- timings: c
141
+ attempts: l,
142
+ timings: s
142
143
  };
143
144
  }
144
- if (s.push(p), t === 6) break;
145
- let m = D(a, p, l.parsed, e, t >= 5);
146
- if (S(m, a)) break;
147
- a = m, C(a, e.length);
145
+ if (o.push(p), t === 6) break;
146
+ let m = k(a, p, c.parsed, e, t >= 5);
147
+ if (w(m, a)) break;
148
+ a = m, T(a, e.length);
148
149
  }
149
- if (typeof e == "string" && e.length <= 1e6 && !C(a, e.length)) {
150
+ if (typeof e == "string" && e.length <= 1e6 && !T(a, e.length)) {
150
151
  let t = [{
151
152
  start: 0,
152
153
  end: e.length
153
- }], l = o(e, i, n, t, r);
154
- if (O(c, l.timings), u += 1, l.result.ok) {
155
- let e = x(s, l.result.diagnostics);
154
+ }], c = d(e, i, n, t, r);
155
+ if (A(s, c.timings), l += 1, c.result.ok) {
156
+ let e = C(o, c.result.diagnostics);
156
157
  return {
157
158
  result: {
158
- ...l.result,
159
+ ...c.result,
159
160
  status: "partial",
160
161
  ...e
161
162
  },
162
- ...l.parsed ? { parsed: l.parsed } : {},
163
+ ...c.parsed ? { parsed: c.parsed } : {},
163
164
  transientDiagnostics: e.transientDiagnostics,
164
165
  literalRanges: t,
165
- attempts: u,
166
- timings: c
166
+ attempts: l,
167
+ timings: s
167
168
  };
168
169
  }
169
- let { definite: d, transient: f } = _(l.result.diagnostics, e), p = b([...s, f]);
170
- if (d.length > 0) return {
170
+ let { definite: u, transient: f } = y(c.result.diagnostics, e), p = S([...o, f]);
171
+ if (u.length > 0) return {
171
172
  result: {
172
173
  ok: !1,
173
- diagnostics: d,
174
- ...l.result.recoveries ? { recoveries: [...l.result.recoveries] } : {},
174
+ diagnostics: u,
175
+ ...c.result.recoveries ? { recoveries: [...c.result.recoveries] } : {},
175
176
  status: "failed",
176
177
  transientDiagnostics: p
177
178
  },
178
- ...l.parsed ? { parsed: l.parsed } : {},
179
+ ...c.parsed ? { parsed: c.parsed } : {},
179
180
  transientDiagnostics: p,
180
181
  literalRanges: t,
181
- attempts: u,
182
- timings: c
182
+ attempts: l,
183
+ timings: s
183
184
  };
184
185
  a = t;
185
186
  }
186
- let d = l, f = b(s);
187
+ let u = c, f = S(o);
187
188
  return {
188
189
  result: {
189
190
  ok: !1,
190
- diagnostics: d !== void 0 && d.result.ok === !1 && d.result.diagnostics.length > 0 ? [...d.result.diagnostics] : f.length > 0 ? f : [{
191
+ diagnostics: u !== void 0 && u.result.ok === !1 && u.result.diagnostics.length > 0 ? [...u.result.diagnostics] : f.length > 0 ? f : [{
191
192
  code: "local.parse",
192
193
  message: "The streaming snapshot could not be compiled.",
193
194
  severity: "error",
@@ -198,19 +199,19 @@ function ee(e, t, n, r = !1) {
198
199
  line: 1,
199
200
  column: 1
200
201
  }],
201
- ...d?.result.recoveries ? { recoveries: [...d.result.recoveries] } : {},
202
+ ...u?.result.recoveries ? { recoveries: [...u.result.recoveries] } : {},
202
203
  status: "failed",
203
204
  transientDiagnostics: f
204
205
  },
205
- ...d?.parsed ? { parsed: d.parsed } : {},
206
+ ...u?.parsed ? { parsed: u.parsed } : {},
206
207
  transientDiagnostics: f,
207
208
  literalRanges: [...a],
208
- attempts: u,
209
- timings: c
209
+ attempts: l,
210
+ timings: s
210
211
  };
211
212
  }
212
213
  // src/local/compilation/session/semantic-cache.ts
213
- var A = () => ({
214
+ var j = () => ({
214
215
  expressionsCompiled: 0,
215
216
  expressionsReused: 0,
216
217
  typesInferred: 0,
@@ -223,18 +224,18 @@ var A = () => ({
223
224
  formulasReused: 0,
224
225
  displaysInspected: 0,
225
226
  displaysReused: 0
226
- }), te = class {
227
+ }), ne = class {
227
228
  capacity;
228
229
  maxWeight;
229
230
  key;
230
231
  values = /* @__PURE__ */ new Map();
231
232
  weight = 0;
232
- counts = A();
233
+ counts = j();
233
234
  constructor(e = 16384, t = 8e6) {
234
235
  this.capacity = e, this.maxWeight = t;
235
236
  }
236
237
  begin(e) {
237
- this.key !== e && (this.clear(), this.key = e), this.counts = A();
238
+ this.key !== e && (this.clear(), this.key = e), this.counts = j();
238
239
  }
239
240
  get stats() {
240
241
  return {
@@ -243,7 +244,7 @@ var A = () => ({
243
244
  };
244
245
  }
245
246
  clear() {
246
- this.values.clear(), this.weight = 0, this.key = void 0, this.counts = A();
247
+ this.values.clear(), this.weight = 0, this.key = void 0, this.counts = j();
247
248
  }
248
249
  get(e) {
249
250
  let t = this.values.get(e);
@@ -294,11 +295,11 @@ var A = () => ({
294
295
  display(e, t) {
295
296
  let n = "display:" + JSON.stringify([e, t]), r = this.get(n);
296
297
  if (r) return this.counts.displaysReused++, r;
297
- let i = s(e, t);
298
+ let i = f(e, t);
298
299
  return this.counts.displaysInspected++, this.put(n, i), i;
299
300
  }
300
- }, ne = 128, re = 512, ie = 32, ae = 131072, j = (e) => JSON.parse(JSON.stringify(e));
301
- function oe(e) {
301
+ }, re = 128, ie = 512, ae = 32, oe = 131072, se = (e) => JSON.parse(JSON.stringify(e));
302
+ function ce(e) {
302
303
  return typeof e == "object" && !!e && e.strict === !1;
303
304
  }
304
305
  var M = class {
@@ -329,13 +330,13 @@ var M = class {
329
330
  clear() {
330
331
  this.entries.clear(), this.bytes = 0;
331
332
  }
332
- }, se = class {
333
+ }, le = class {
333
334
  disposed = !1;
334
335
  optionKey;
335
336
  recoveryMode;
336
- plans = new M(ne, 524288);
337
- inline = new M(re, 262144);
338
- trees = new M(ie, 524288);
337
+ plans = new M(re, 524288);
338
+ inline = new M(ie, 262144);
339
+ trees = new M(ae, 524288);
339
340
  counts = {
340
341
  hits: 0,
341
342
  misses: 0,
@@ -348,8 +349,8 @@ var M = class {
348
349
  };
349
350
  parse(e, t, n, r, i) {
350
351
  if (this.disposed) throw Error("Local parse session is disposed");
351
- let a = p(t), o = oe(t);
352
- return (a !== this.optionKey || o !== this.recoveryMode) && (this.optionKey = a, this.recoveryMode = o, this.reset()), i && i.length > 0 ? m(e, t, n, void 0, void 0, i) : m(e, t, n, this, r);
352
+ let a = h(t), o = ce(t);
353
+ return (a !== this.optionKey || o !== this.recoveryMode) && (this.optionKey = a, this.recoveryMode = o, this.reset()), i && i.length > 0 ? g(e, t, n, void 0, void 0, i) : g(e, t, n, this, r);
353
354
  }
354
355
  clear() {
355
356
  this.optionKey = void 0, this.recoveryMode = void 0, this.reset();
@@ -394,9 +395,9 @@ var M = class {
394
395
  return this.lookup(this.inline, e);
395
396
  }
396
397
  writeInline(e, t) {
397
- e.length > ae || this.inline.write(j(e), t?.map((e) => ({
398
+ e.length > oe || this.inline.write(se(e), t?.map((e) => ({
398
399
  ...e,
399
- value: j(e.value)
400
+ value: se(e.value)
400
401
  })));
401
402
  }
402
403
  notePlanReuse() {
@@ -465,7 +466,7 @@ function P(e, t) {
465
466
  created: r
466
467
  };
467
468
  }
468
- function ce(e, t) {
469
+ function ue(e, t) {
469
470
  if (!e?.ok || !t.ok) return 0;
470
471
  let n = /* @__PURE__ */ new Set(), r = [...e.document.nodes];
471
472
  for (; r.length;) {
@@ -537,7 +538,7 @@ function R(e, t) {
537
538
  function z(e, t) {
538
539
  if (t.add(e.id), e.children) for (let n of e.children) z(n, t);
539
540
  }
540
- function le(e, t) {
541
+ function de(e, t) {
541
542
  if (!e) return;
542
543
  let n = F(e), r = F(t);
543
544
  if (!n || !r || n.kind !== r.kind) return;
@@ -577,7 +578,7 @@ function V(e) {
577
578
  function H(e) {
578
579
  return e === "streaming" || e === "final" ? e : void 0;
579
580
  }
580
- function ue() {
581
+ function fe() {
581
582
  return {
582
583
  ok: !1,
583
584
  status: "failed",
@@ -597,7 +598,7 @@ function ue() {
597
598
  }]
598
599
  };
599
600
  }
600
- function de(e) {
601
+ function pe(e) {
601
602
  try {
602
603
  return typeof e == "object" && e ? H(e.sourcePhase) : void 0;
603
604
  } catch {
@@ -638,13 +639,13 @@ function q(e, t, n) {
638
639
  for (let i of G(e)) r[n?.get(i.id) ?? i.id] = t.dependencies?.[i.id] ?? null;
639
640
  return r;
640
641
  }
641
- var J = /* @__PURE__ */ new Set(), fe = "raw-body";
642
- function pe(e) {
642
+ var J = /* @__PURE__ */ new Set(), me = "raw-body";
643
+ function he(e) {
643
644
  try {
644
- let t = f(e);
645
+ let t = m(e);
645
646
  if (!t.ok) return J;
646
647
  let n = /* @__PURE__ */ new Set();
647
- for (let [e, r] of t.schemaByName) r.form === "container" && r.structure.rule === fe && n.add(e);
648
+ for (let [e, r] of t.schemaByName) r.form === "container" && r.structure.rule === me && n.add(e);
648
649
  return n.size ? n : J;
649
650
  } catch {
650
651
  return J;
@@ -680,7 +681,7 @@ function X(e, t = J) {
680
681
  n = !0;
681
682
  continue;
682
683
  }
683
- if (["anchor", "jump"].includes(r.name ?? "") || !h(r.name ?? "")) return "unsupported";
684
+ if (["anchor", "jump"].includes(r.name ?? "") || !_(r.name ?? "")) return "unsupported";
684
685
  n = !0;
685
686
  }
686
687
  r.type === "comment" && (n = !0);
@@ -711,14 +712,14 @@ function Q(e, t, n) {
711
712
  }
712
713
  return i;
713
714
  }
714
- function me(e) {
715
+ function $(e) {
715
716
  return /\r(?!\n)/.test(e);
716
717
  }
717
- function he(e, t) {
718
+ function ge(e, t) {
718
719
  for (; t > 0 && e[t - 1] !== "\n" && e[t - 1] !== "\r";) t--;
719
720
  return t;
720
721
  }
721
- function ge(e, t) {
722
+ function _e(e, t) {
722
723
  let n = new Set(t.map((e) => e.from));
723
724
  for (let r of t) {
724
725
  let t = r.to;
@@ -733,7 +734,7 @@ function ge(e, t) {
733
734
  }
734
735
  return !1;
735
736
  }
736
- function $(e, t, n, r) {
737
+ function ve(e, t, n, r) {
737
738
  if (e.type !== n.type || e.range.start + t !== n.range.start + r || e.range.end + t !== n.range.end + r) return !1;
738
739
  let i = 0;
739
740
  for (let [a, o] of Object.entries(e)) {
@@ -743,13 +744,13 @@ function $(e, t, n, r) {
743
744
  if (a === "children") {
744
745
  let n = o, i = e;
745
746
  if (!i || n.length !== i.length) return !1;
746
- for (let e = 0; e < n.length; e++) if (!$(n[e], t, i[e], r)) return !1;
747
+ for (let e = 0; e < n.length; e++) if (!ve(n[e], t, i[e], r)) return !1;
747
748
  } else if (o !== e && JSON.stringify(o) !== JSON.stringify(e)) return !1;
748
749
  }
749
750
  for (let [e, t] of Object.entries(n)) t !== void 0 && e !== "id" && e !== "range" && i--;
750
751
  return i === 0;
751
752
  }
752
- function _e(e, t) {
753
+ function ye(e, t) {
753
754
  let n = 0, r = e.length, i = t.length;
754
755
  for (; n < r && n < i && e.charCodeAt(n) === t.charCodeAt(n);) n++;
755
756
  for (; r > n && i > n && e.charCodeAt(r - 1) === t.charCodeAt(i - 1);) r--, i--;
@@ -760,19 +761,19 @@ function _e(e, t) {
760
761
  delta: i - r
761
762
  };
762
763
  }
763
- function ve(e, t) {
764
+ function be(e, t) {
764
765
  let n = e.parsed?.plans;
765
766
  if (n?.length) {
766
767
  for (let e of n) if (e.source === t) return e.rows;
767
768
  if (n.length === 1) return n[0].rows;
768
769
  }
769
770
  }
770
- var ye = class {
771
+ var xe = class {
771
772
  disposed = !1;
772
773
  snapshot = null;
773
774
  deferred = null;
774
- parseSession = new se();
775
- semantic = new te();
775
+ parseSession = new le();
776
+ semantic = new ne();
776
777
  services = {
777
778
  parser: this.parseSession,
778
779
  semantic: this.semantic
@@ -798,8 +799,8 @@ var ye = class {
798
799
  cacheBuilds: this.cacheBuilds
799
800
  };
800
801
  }
801
- compile(e, t, n) {
802
- let i = this.compileShared(e, t, n), a = performance.now(), o = r(i);
802
+ compile(e, t, r) {
803
+ let i = this.compileShared(e, t, r), a = performance.now(), o = n(i);
803
804
  return this.lastStats = {
804
805
  ...this.lastStats,
805
806
  stages: {
@@ -810,8 +811,8 @@ var ye = class {
810
811
  }
811
812
  compileShared(e, t, n, r = !!t?.observer?.onTrace) {
812
813
  if (this.disposed) throw Error("Local compile session is disposed");
813
- if (n !== void 0 && H(n) === void 0) return ue();
814
- let i = de(t), a = H(n) ?? i;
814
+ if (n !== void 0 && H(n) === void 0) return fe();
815
+ let i = pe(t), a = H(n) ?? i;
815
816
  return a === "streaming" ? this.compileStreaming(e, t, r) : a === "final" ? this.compileFinal(e, i === "streaming" ? {
816
817
  ...t,
817
818
  sourcePhase: "final"
@@ -828,7 +829,7 @@ var ye = class {
828
829
  };
829
830
  }
830
831
  compileStreaming(e, t, n) {
831
- let r = f(t).ok, i = p(t), a = this.streamingCache;
832
+ let r = m(t).ok, i = h(t), a = this.streamingCache;
832
833
  if (r && a !== null && a.source === e && a.key === i) return this.lastStats = {
833
834
  mode: "streaming",
834
835
  totalBlocks: a.blocks,
@@ -836,7 +837,7 @@ var ye = class {
836
837
  reusedBlocks: 0,
837
838
  compiledCharacters: 0
838
839
  }, a.result;
839
- let o = ee(e, t, this.services, n), s = o.parsed?.nodes.length ?? 0;
840
+ let o = te(e, t, this.services, n), s = o.parsed?.nodes.length ?? 0;
840
841
  return this.lastStats = {
841
842
  mode: "streaming",
842
843
  totalBlocks: s,
@@ -853,12 +854,12 @@ var ye = class {
853
854
  }
854
855
  compileFinalOrLegacy(e, t, n) {
855
856
  this.epoch++;
856
- let r = p(t), i = B(t);
857
+ let r = h(t), i = B(t);
857
858
  (r !== this.sharedKey || i !== this.sharedMode) && (this.shared = null, this.sharedKey = r, this.sharedMode = i);
858
859
  let a = this.compileCore(e, t, n), o = performance.now(), s = this.shared, c = P(s ?? void 0, a).value;
859
860
  return this.shared = c, this.lastStats = {
860
861
  ...this.lastStats,
861
- sharedNodes: ce(s, c),
862
+ sharedNodes: ue(s, c),
862
863
  parse: this.parseSession.stats,
863
864
  semantic: this.lastStats.semantic ?? this.semantic.stats,
864
865
  stages: {
@@ -867,79 +868,79 @@ var ye = class {
867
868
  }
868
869
  }, c;
869
870
  }
870
- compileCore(e, t, n) {
871
+ compileCore(e, t, i) {
871
872
  if (this.disposed) throw Error("Local compile session is disposed");
872
873
  this.cacheBuilds = 0;
873
- let i = p(t), a = f(t), s = this.rawNames(i, t), c = B(t), l = c ? "recovery-reference" : "initial", u = !1, m = this.deferred;
874
- if (this.deferred = null, !c && m && m.key === i && a.ok && typeof e == "string" && e.length <= 1e6) {
875
- if (e === m.source) return this.deferred = m, this.lastStats = {
874
+ let a = h(t), o = m(t), s = this.rawNames(a, t), c = B(t), l = typeof e == "string" && e.length <= 1e6 && r(e), u = c || l, f = l ? "macro-scope" : c ? "recovery-reference" : "initial", g = !1, _ = this.deferred;
875
+ if (this.deferred = null, !u && _ && _.key === a && o.ok && typeof e == "string" && e.length <= 1e6) {
876
+ if (e === _.source) return this.deferred = _, this.lastStats = {
876
877
  mode: "cached",
877
878
  totalBlocks: this.lastStats.totalBlocks,
878
879
  compiledBlocks: 0,
879
880
  reusedBlocks: this.lastStats.totalBlocks,
880
881
  compiledCharacters: 0
881
- }, m.tracked.result;
882
- u = !0, l = "scope-or-boundary";
883
- let n = _e(m.source, e), r = (e) => n.from <= e.end && n.oldTo >= e.start, a = m.tracked.parsed;
884
- if (a && !/[`\\~]/.test(m.source.slice(n.from, n.oldTo) + e.slice(n.from, n.newTo)) && !a.nodes.some((e) => r(e.range) && X(e, s) !== "fragment") && ![a.versionDeclaration?.range, a.themeRange].some((e) => e && r(e))) try {
885
- this.snapshot = this.seed(m.source, i, m.tracked, t, void 0, s);
882
+ }, _.tracked.result;
883
+ g = !0, f = "scope-or-boundary";
884
+ let n = ye(_.source, e), r = (e) => n.from <= e.end && n.oldTo >= e.start, i = _.tracked.parsed;
885
+ if (i && !/[`\\~]/.test(_.source.slice(n.from, n.oldTo) + e.slice(n.from, n.newTo)) && !i.nodes.some((e) => r(e.range) && X(e, s) !== "fragment") && ![i.versionDeclaration?.range, i.themeRange].some((e) => e && r(e))) try {
886
+ this.snapshot = this.seed(_.source, a, _.tracked, t, void 0, s);
886
887
  } catch {
887
888
  this.snapshot = null;
888
889
  }
889
- } else m && (l = c ? "recovery-reference" : "options-or-limits");
890
- let h = this.snapshot;
891
- if (!c && h && h.key === i && a.ok && typeof e == "string" && e.length <= 1e6) {
892
- if (e === h.source) return this.lastStats = {
890
+ } else _ && !u && (f = "options-or-limits");
891
+ let v = this.snapshot;
892
+ if (!u && v && v.key === a && o.ok && typeof e == "string" && e.length <= 1e6) {
893
+ if (e === v.source) return this.lastStats = {
893
894
  mode: "cached",
894
- totalBlocks: h.blocks.length,
895
+ totalBlocks: v.blocks.length,
895
896
  compiledBlocks: 0,
896
- reusedBlocks: h.blocks.length,
897
+ reusedBlocks: v.blocks.length,
897
898
  compiledCharacters: 0
898
- }, this.publish(h);
899
- let r = null;
899
+ }, this.publish(v);
900
+ let n = null;
900
901
  try {
901
- r = this.update(h, e, t, a.maxSyntaxNodes, s, n);
902
+ n = this.update(v, e, t, o.maxSyntaxNodes, s, i);
902
903
  } catch {}
903
- if (r) return this.snapshot = r, this.publish(r);
904
- l = "scope-or-boundary", u = !0;
905
- } else h && (l = c ? "recovery-reference" : "options-or-limits");
904
+ if (n) return this.snapshot = n, this.publish(n);
905
+ f = "scope-or-boundary", g = !0;
906
+ } else v && !u && (f = "options-or-limits");
906
907
  this.snapshot = null;
907
- let g = o(e, t, this.services, void 0, n);
908
+ let y = d(e, t, this.services, void 0, i);
908
909
  if (this.lastStats = {
909
910
  mode: "full",
910
- totalBlocks: g.parsed?.nodes.length ?? 0,
911
- compiledBlocks: g.parsed?.nodes.length ?? 0,
911
+ totalBlocks: y.parsed?.nodes.length ?? 0,
912
+ compiledBlocks: y.parsed?.nodes.length ?? 0,
912
913
  reusedBlocks: 0,
913
914
  compiledCharacters: typeof e == "string" ? e.length : 0,
914
- fallbackReason: l,
915
- semantic: g.semantic,
916
- stages: g.timings
917
- }, !c && g.result.ok && !g.result.document.capabilities && g.result.diagnostics.length === 0 && !V(g.result) && a.ok && i !== "invalid") {
918
- if (u) {
919
- let n = t === void 0 ? void 0 : r(t), a = n;
920
- if (n?.config !== void 0) try {
921
- a = {
922
- ...n,
923
- config: d(n.config)
915
+ fallbackReason: f,
916
+ semantic: y.semantic,
917
+ stages: y.timings
918
+ }, !u && y.result.ok && !y.result.document.capabilities && y.result.diagnostics.length === 0 && !V(y.result) && o.ok && a !== "invalid") {
919
+ if (g) {
920
+ let r = t === void 0 ? void 0 : n(t), i = r;
921
+ if (r?.config !== void 0) try {
922
+ i = {
923
+ ...r,
924
+ config: p(r.config)
924
925
  };
925
926
  } catch {}
926
927
  this.deferred = {
927
928
  source: e,
928
- key: i,
929
- tracked: g,
930
- options: a
929
+ key: a,
930
+ tracked: y,
931
+ options: i
931
932
  };
932
933
  } else try {
933
- this.snapshot = this.seed(e, i, g, t, void 0, s);
934
+ this.snapshot = this.seed(e, a, y, t, void 0, s);
934
935
  } catch {
935
936
  this.snapshot = null;
936
937
  }
937
938
  this.snapshot && (this.lastStats.totalBlocks = this.lastStats.compiledBlocks = this.snapshot.blocks.length);
938
939
  }
939
- return this.snapshot ? this.publish(this.snapshot) : g.result;
940
+ return this.snapshot ? this.publish(this.snapshot) : y.result;
940
941
  }
941
942
  seed(e, t, n, r, i, a) {
942
- if (this.cacheBuilds++, !n.result.ok || !n.parsed || V(n.result) || e.includes("[^") || e.includes("") || me(e)) return null;
943
+ if (this.cacheBuilds++, !n.result.ok || !n.parsed || V(n.result) || e.includes("[^") || e.includes("") || $(e)) return null;
943
944
  let o = a ?? this.rawNamesFor(r), s = n.parsed.nodes, c = s.map((e) => X(e, o)), l = s.length === 1 && c[0] === "fragment" && (s[0].type === "list" || s[0].type === "table"), u = c.filter((e) => e === "raw").length;
944
945
  if (c.includes("unsupported") || !l && u === 0 && c.filter((e) => e === "fragment").length < 2) return null;
945
946
  let d = {
@@ -977,7 +978,7 @@ var ye = class {
977
978
  dependencies: {},
978
979
  cost: 0
979
980
  });
980
- if (p.sort((e, t) => e.from - t.from), ge(e, p)) return null;
981
+ if (p.sort((e, t) => e.from - t.from), _e(e, p)) return null;
981
982
  let h = Z(e, p);
982
983
  if (h.includes("<")) return null;
983
984
  let g = i ?? U.parse(h), _ = Q(g, p, h);
@@ -1021,7 +1022,7 @@ var ye = class {
1021
1022
  nodes: o,
1022
1023
  dependencies: q(o, d),
1023
1024
  cost: s,
1024
- rowPlans: ve(n, c)
1025
+ rowPlans: be(n, c)
1025
1026
  });
1026
1027
  }
1027
1028
  if (x !== m.length) return null;
@@ -1041,8 +1042,8 @@ var ye = class {
1041
1042
  });
1042
1043
  }
1043
1044
  update(e, t, n, r, i, a) {
1044
- if (t.includes("[^") || t.includes("") || me(t)) return null;
1045
- let s = i, l = _e(e.source, t);
1045
+ if (t.includes("[^") || t.includes("") || $(t)) return null;
1046
+ let o = i, l = ye(e.source, t);
1046
1047
  if (/[`\\~]/.test(e.source.slice(l.from, l.oldTo) + t.slice(l.from, l.newTo))) return null;
1047
1048
  let u = [];
1048
1049
  for (let n of e.context) {
@@ -1055,12 +1056,12 @@ var ye = class {
1055
1056
  if (t.slice(r.from, r.to) !== n.text) return null;
1056
1057
  u.push(r);
1057
1058
  }
1058
- let d = [];
1059
+ let f = [];
1059
1060
  for (let n of e.blocks) {
1060
1061
  if (!n.opaque) continue;
1061
1062
  if (l.from > n.from && l.oldTo < n.to) {
1062
1063
  let e = n.to + l.delta;
1063
- d.push({
1064
+ f.push({
1064
1065
  ...n,
1065
1066
  to: e,
1066
1067
  text: t.slice(n.from, e)
@@ -1074,52 +1075,52 @@ var ye = class {
1074
1075
  to: n.to + e
1075
1076
  };
1076
1077
  if (t.slice(r.from, r.to) !== n.text) return null;
1077
- d.push(r);
1078
+ f.push(r);
1078
1079
  }
1079
- let f = [...u, ...d].sort((e, t) => e.from - t.from);
1080
- if (ge(t, f)) return null;
1081
- let p = c.applyChanges(c.addTree(e.tree), [{
1080
+ let p = [...u, ...f].sort((e, t) => e.from - t.from);
1081
+ if (_e(t, p)) return null;
1082
+ let m = c.applyChanges(c.addTree(e.tree), [{
1082
1083
  fromA: l.from,
1083
1084
  toA: l.oldTo,
1084
1085
  fromB: l.from,
1085
1086
  toB: l.newTo
1086
- }], 0), m = Z(t, f);
1087
- if (m.includes("<")) return null;
1088
- let h = U.parse(m, p), g = Q(h, f, m);
1089
- if (!g) return null;
1090
- for (let e of d) if (g.some((t) => t.start < e.to && t.end > e.from)) return null;
1091
- let _ = [...g.map((e) => ({ range: e })), ...d.map((e) => ({
1087
+ }], 0), h = Z(t, p);
1088
+ if (h.includes("<")) return null;
1089
+ let g = U.parse(h, m), _ = Q(g, p, h);
1090
+ if (!_) return null;
1091
+ for (let e of f) if (_.some((t) => t.start < e.to && t.end > e.from)) return null;
1092
+ let v = [..._.map((e) => ({ range: e })), ...f.map((e) => ({
1092
1093
  range: {
1093
1094
  start: e.from,
1094
1095
  end: e.to
1095
1096
  },
1096
1097
  opaque: e
1097
- }))].sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end), v = new Map(e.blocks.map((e) => [`${e.from}:${e.to}`, e])), y = [], b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), S = 0, C = 0, w = 0, T = e.contextCost, E = 0, D = 0, O = 0, k = 0;
1098
- for (let i of _) {
1099
- let c = i.range, u = c.start >= l.newTo ? l.delta : 0, d = c.end <= l.from || c.start >= l.newTo ? v.get(`${c.start - u}:${c.end - u}`) : void 0, f = t.slice(c.start, c.end);
1100
- if (d && d.text === f) {
1098
+ }))].sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end), y = new Map(e.blocks.map((e) => [`${e.from}:${e.to}`, e])), b = [], x = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), C = 0, w = 0, T = 0, E = e.contextCost, D = 0, O = 0, k = 0, A = 0;
1099
+ for (let i of v) {
1100
+ let s = i.range, c = s.start >= l.newTo ? l.delta : 0, u = s.end <= l.from || s.start >= l.newTo ? y.get(`${s.start - c}:${s.end - c}`) : void 0, f = t.slice(s.start, s.end);
1101
+ if (u && u.text === f) {
1101
1102
  let e = a ? performance.now() : 0;
1102
- y.push({
1103
- ...d,
1104
- from: c.start,
1105
- to: c.end
1106
- }), S++, T += d.cost;
1107
- for (let e of G(d.nodes)) b.add(e.id);
1108
- a && (E += performance.now() - e);
1103
+ b.push({
1104
+ ...u,
1105
+ from: s.start,
1106
+ to: s.end
1107
+ }), C++, E += u.cost;
1108
+ for (let e of G(u.nodes)) x.add(e.id);
1109
+ a && (D += performance.now() - e);
1109
1110
  } else if (i.opaque) {
1110
- let e = i.opaque.prefix ?? "", t = e.length, r = o(e + f, n, this.services, void 0, a);
1111
- if (a && (D += r.timings.totalMs, O += r.timings.parseMs ?? 0, k += r.timings.semanticMs ?? 0), w += t + f.length, C++, !r.result.ok || r.result.diagnostics.length || !r.parsed || V(r.result)) return null;
1112
- let l = r.parsed.nodes.filter((e) => e.range.start >= t);
1113
- if (l.length !== 1 || X(l[0], s) !== "raw") return null;
1114
- let u = r.result.document.nodes.filter((e) => e.range.start >= t);
1115
- if (u.length !== 1) return null;
1116
- let d = new Map(G(u).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), p = K(u, 0, d), m = (r.parsed.syntaxNodes ?? 0) - (i.opaque.prefixCost ?? 0);
1111
+ let e = i.opaque.prefix ?? "", t = e.length, r = d(e + f, n, this.services, void 0, a);
1112
+ if (a && (O += r.timings.totalMs, k += r.timings.parseMs ?? 0, A += r.timings.semanticMs ?? 0), T += t + f.length, w++, !r.result.ok || r.result.diagnostics.length || !r.parsed || V(r.result)) return null;
1113
+ let c = r.parsed.nodes.filter((e) => e.range.start >= t);
1114
+ if (c.length !== 1 || X(c[0], o) !== "raw") return null;
1115
+ let l = r.result.document.nodes.filter((e) => e.range.start >= t);
1116
+ if (l.length !== 1) return null;
1117
+ let u = new Map(G(l).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), p = K(l, 0, u), m = (r.parsed.syntaxNodes ?? 0) - (i.opaque.prefixCost ?? 0);
1117
1118
  if (m < G(p).length) return null;
1118
- let h = q(u, r.result.document, d), g = Object.create(null);
1119
+ let h = q(l, r.result.document, u), g = Object.create(null);
1119
1120
  for (let e of G(p)) g[e.id] = h[e.id] ?? null;
1120
1121
  let _ = {
1121
- from: c.start,
1122
- to: c.end,
1122
+ from: s.start,
1123
+ to: s.end,
1123
1124
  origin: t,
1124
1125
  text: f,
1125
1126
  nodes: p,
@@ -1129,19 +1130,19 @@ var ye = class {
1129
1130
  prefix: e,
1130
1131
  prefixCost: i.opaque.prefixCost ?? 0
1131
1132
  };
1132
- y.push(_), x.add(_), T += m;
1133
+ b.push(_), S.add(_), E += m;
1133
1134
  } else {
1134
1135
  let t = e.prefix.length, r = e.blocks.find((e) => {
1135
1136
  let t = e.from >= l.oldTo ? e.from + l.delta : e.from, n = e.to >= l.oldTo ? e.to + l.delta : e.to;
1136
- return t < c.end && n > c.start;
1137
+ return t < s.end && n > s.start;
1137
1138
  }), i = r?.rowPlans ? {
1138
1139
  ...this.services,
1139
1140
  rowPlans: r.rowPlans
1140
- } : this.services, s = o(e.prefix + f, n, i, void 0, a);
1141
- if (a && (D += s.timings.totalMs, O += s.timings.parseMs ?? 0, k += s.timings.semanticMs ?? 0), w += t + f.length, C++, !s.result.ok || s.result.diagnostics.length || !s.parsed || V(s.result)) return null;
1142
- let u = s.parsed.nodes.filter((e) => e.range.start >= t);
1143
- if (!u.length || u.some((e) => X(e) !== "fragment")) return null;
1144
- let d = s.result.document.nodes.filter((e) => e.range.start >= t), p = new Map(G(d).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), m = K(d, 0, p), h = r ? le({
1141
+ } : this.services, o = d(e.prefix + f, n, i, void 0, a);
1142
+ if (a && (O += o.timings.totalMs, k += o.timings.parseMs ?? 0, A += o.timings.semanticMs ?? 0), T += t + f.length, w++, !o.result.ok || o.result.diagnostics.length || !o.parsed || V(o.result)) return null;
1143
+ let c = o.parsed.nodes.filter((e) => e.range.start >= t);
1144
+ if (!c.length || c.some((e) => X(e) !== "fragment")) return null;
1145
+ let u = o.result.document.nodes.filter((e) => e.range.start >= t), p = new Map(G(u).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), m = K(u, 0, p), h = r ? de({
1145
1146
  text: r.text,
1146
1147
  origin: r.origin,
1147
1148
  nodes: r.nodes
@@ -1151,55 +1152,60 @@ var ye = class {
1151
1152
  nodes: m
1152
1153
  }) : void 0;
1153
1154
  if (h) {
1154
- for (let e of h.reusedIds) if (b.has(e)) {
1155
+ for (let e of h.reusedIds) if (x.has(e)) {
1155
1156
  h = void 0;
1156
1157
  break;
1157
1158
  }
1158
1159
  }
1159
- let g = h?.nodes ?? m, _ = (s.parsed.syntaxNodes ?? 0) - e.prefixCost;
1160
+ let g = h?.nodes ?? m, _ = (o.parsed.syntaxNodes ?? 0) - e.prefixCost;
1160
1161
  if (_ < G(g).length) return null;
1161
- let v = q(d, s.result.document, p), S = Object.create(null);
1162
- for (let e of G(g)) S[e.id] = v[e.id] ?? null;
1162
+ let v = q(u, o.result.document, p), y = Object.create(null);
1163
+ for (let e of G(g)) y[e.id] = v[e.id] ?? null;
1163
1164
  if (h && r) {
1164
1165
  let e = r.nodes[0]?.id, t = m[0]?.id;
1165
- for (let n of h.reusedIds) S[n] = n === e && t !== void 0 ? v[t] ?? null : r.dependencies[n] ?? null, b.add(n);
1166
+ for (let n of h.reusedIds) y[n] = n === e && t !== void 0 ? v[t] ?? null : r.dependencies[n] ?? null, x.add(n);
1166
1167
  for (let e = 0; e < h.reused; e++) this.parseSession.noteRowReuse(h.kind);
1167
1168
  }
1168
- let E = {
1169
- from: c.start,
1170
- to: c.end,
1169
+ let C = {
1170
+ from: s.start,
1171
+ to: s.end,
1171
1172
  origin: t,
1172
1173
  text: f,
1173
1174
  nodes: g,
1174
- dependencies: S,
1175
+ dependencies: y,
1175
1176
  cost: _,
1176
- rowPlans: ve(s, f)
1177
+ rowPlans: be(o, f)
1177
1178
  };
1178
- y.push(E), x.add(E), T += _;
1179
+ b.push(C), S.add(C), E += _;
1179
1180
  }
1180
- if (T > r) return null;
1181
+ if (E > r) return null;
1182
+ }
1183
+ if (E > r) return null;
1184
+ if (u.some((e) => e.nodes.some((e) => e.type === "component" && e.name === "else")) && e.metadata.componentDefinitions?.some((e) => e.id === "reactive-md/else")) {
1185
+ let e = [...b, ...u].sort((e, t) => e.from - t.from).flatMap((e) => e.nodes);
1186
+ if (e.some((t, n) => t.type === "component" && t.name === "else" && s(e, n) !== void 0)) return null;
1181
1187
  }
1182
- return T > r || !this.sameBoundaries(t, y, u, x, l, n) ? null : (this.lastStats = {
1188
+ return this.sameBoundaries(t, b, u, S, l, n) ? (this.lastStats = {
1183
1189
  mode: "incremental",
1184
- totalBlocks: y.length,
1185
- compiledBlocks: C,
1186
- reusedBlocks: S,
1187
- compiledCharacters: w,
1190
+ totalBlocks: b.length,
1191
+ compiledBlocks: w,
1192
+ reusedBlocks: C,
1193
+ compiledCharacters: T,
1188
1194
  ...a ? { stages: {
1189
- ...S ? { reuseMs: E } : {},
1190
- ...C ? {
1191
- rebuildMs: D,
1192
- parseMs: O,
1193
- semanticMs: k
1195
+ ...C ? { reuseMs: D } : {},
1196
+ ...w ? {
1197
+ rebuildMs: O,
1198
+ parseMs: k,
1199
+ semanticMs: A
1194
1200
  } : {}
1195
1201
  } } : {}
1196
1202
  }, {
1197
1203
  ...e,
1198
1204
  source: t,
1199
- tree: h,
1205
+ tree: g,
1200
1206
  context: u,
1201
- blocks: y
1202
- });
1207
+ blocks: b
1208
+ }) : null;
1203
1209
  }
1204
1210
  sameBoundaries(e, t, n, r, i, a) {
1205
1211
  let o = new Set(n), s = [...t, ...n].sort((e, t) => e.from - t.from), c = (e) => r.has(s[e]) || r.has(s[e + 1]) || i.from <= s[e + 1].from && i.newTo >= s[e].to;
@@ -1221,7 +1227,7 @@ var ye = class {
1221
1227
  delta: a
1222
1228
  });
1223
1229
  }
1224
- let i = r[0], l = r[r.length - 1], u = "node" in i ? Math.max(s[t].from, he(e, i.node.range.start + i.delta)) : i.from, d = "node" in l ? l.node.range.end + l.delta : l.to, f = s.slice(t, n + 2).flatMap((e) => e.rowPlans ? [e.rowPlans] : []), p = f.length < 2 ? f[0] : {
1230
+ let i = r[0], l = r[r.length - 1], u = "node" in i ? Math.max(s[t].from, ge(e, i.node.range.start + i.delta)) : i.from, d = "node" in l ? l.node.range.end + l.delta : l.to, f = s.slice(t, n + 2).flatMap((e) => e.rowPlans ? [e.rowPlans] : []), p = f.length < 2 ? f[0] : {
1225
1231
  has: (e) => f.some((t) => t.has(e)),
1226
1232
  get: (e) => f.find((t) => t.has(e))?.get(e)
1227
1233
  }, m = this.parseSession.parse(e.slice(u, d), a, void 0, p);
@@ -1229,7 +1235,7 @@ var ye = class {
1229
1235
  for (let e = 0; e < r.length; e++) {
1230
1236
  let t = r[e], n = m.nodes[e];
1231
1237
  if ("node" in t) {
1232
- if (!$(n, u, t.node, t.delta)) return !1;
1238
+ if (!ve(n, u, t.node, t.delta)) return !1;
1233
1239
  } else if (n.range.start + u !== t.from || n.range.end + u !== t.to) return !1;
1234
1240
  }
1235
1241
  t = n;
@@ -1237,20 +1243,20 @@ var ye = class {
1237
1243
  return !0;
1238
1244
  }
1239
1245
  publish(e) {
1240
- let t = r(e.metadata);
1246
+ let t = n(e.metadata);
1241
1247
  t.source = e.source;
1242
- let n = [...e.blocks, ...e.context].sort((e, t) => e.from - t.from), o = new Map(this.shared?.ok ? this.shared.document.nodes.map((e) => [e.id, e]) : []);
1243
- t.nodes = n.flatMap((e) => {
1248
+ let r = [...e.blocks, ...e.context].sort((e, t) => e.from - t.from), i = new Map(this.shared?.ok ? this.shared.document.nodes.map((e) => [e.id, e]) : []);
1249
+ t.nodes = r.flatMap((e) => {
1244
1250
  let t = e.from - e.origin;
1245
1251
  if (e.publication?.delta === t) return e.publication.nodes;
1246
- let n = P(e.publication?.nodes ?? e.nodes.map((e) => o.get(e.id)).filter((e) => !!e), K(e.nodes, t)).value;
1252
+ let n = P(e.publication?.nodes ?? e.nodes.map((e) => i.get(e.id)).filter((e) => !!e), K(e.nodes, t)).value;
1247
1253
  return e.publication = {
1248
1254
  delta: t,
1249
1255
  nodes: n
1250
1256
  }, n;
1251
1257
  });
1252
1258
  let s = {};
1253
- for (let e of n) for (let [t, n] of Object.entries(e.dependencies)) Object.defineProperty(s, t, {
1259
+ for (let e of r) for (let [t, n] of Object.entries(e.dependencies)) Object.defineProperty(s, t, {
1254
1260
  value: n === null ? null : Object.freeze([...n]),
1255
1261
  enumerable: !0
1256
1262
  });
@@ -1270,7 +1276,7 @@ var ye = class {
1270
1276
  start: t.offset,
1271
1277
  end: t.offset
1272
1278
  }).start;
1273
- return t.requiresRuntime = a(t), t.usedComponents = i(t.nodes), {
1279
+ return t.requiresRuntime = o(t), t.usedComponents = a(t.nodes), {
1274
1280
  ok: !0,
1275
1281
  document: t,
1276
1282
  diagnostics: []
@@ -1336,11 +1342,11 @@ var ye = class {
1336
1342
  rawNames(e, t) {
1337
1343
  return this.rawNamesCache?.key !== e && (this.rawNamesCache = {
1338
1344
  key: e,
1339
- names: pe(t)
1345
+ names: he(t)
1340
1346
  }), this.rawNamesCache.names;
1341
1347
  }
1342
1348
  rawNamesFor(e) {
1343
- return this.rawNames(p(e), e);
1349
+ return this.rawNames(h(e), e);
1344
1350
  }
1345
1351
  clear() {
1346
1352
  this.epoch++, this.snapshot = null, this.deferred = null, this.serial = 0, this.cacheBuilds = 0, this.shared = null, this.sharedKey = void 0, this.sharedMode = void 0, this.streamingCache = null, this.rawNamesCache = null, this.parseSession.clear(), this.semantic.clear();
@@ -1349,7 +1355,7 @@ var ye = class {
1349
1355
  this.clear(), this.parseSession.dispose(), this.disposed = !0;
1350
1356
  }
1351
1357
  };
1352
- function be() {
1353
- return new ye();
1358
+ function Se() {
1359
+ return new xe();
1354
1360
  }
1355
- export { be as n, ye as t };
1361
+ export { Se as n, xe as t };