@bolt-foundry/gambit-core 0.5.3-dev

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 (711) hide show
  1. package/esm/_dnt.polyfills.d.ts +12 -0
  2. package/esm/_dnt.polyfills.d.ts.map +1 -0
  3. package/esm/_dnt.polyfills.js +15 -0
  4. package/esm/_dnt.shims.d.ts +6 -0
  5. package/esm/_dnt.shims.d.ts.map +1 -0
  6. package/esm/_dnt.shims.js +61 -0
  7. package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts +6 -0
  8. package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts.map +1 -0
  9. package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.js +18 -0
  10. package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts +322 -0
  11. package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.js +95 -0
  13. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts +11 -0
  14. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.js +28 -0
  16. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts +5 -0
  17. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.js +8 -0
  19. package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts +32 -0
  20. package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.js +48 -0
  22. package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts +30 -0
  23. package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.js +35 -0
  25. package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts +30 -0
  26. package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.js +36 -0
  28. package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts +7 -0
  29. package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.js +3 -0
  31. package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts +33 -0
  32. package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +39 -0
  34. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  35. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
  37. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  38. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
  40. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
  41. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
  43. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  44. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
  46. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  47. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js +23 -0
  49. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  50. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
  52. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  53. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +8 -0
  55. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  56. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js +19 -0
  58. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  59. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
  61. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  62. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +235 -0
  64. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  65. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  66. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
  67. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  68. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  69. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
  70. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  71. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js +9 -0
  73. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  74. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
  76. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  77. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  78. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
  79. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  80. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  81. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
  82. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  83. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  84. package/esm/deps/jsr.io/@std/path/1.1.4/common.js +33 -0
  85. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  86. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  87. package/esm/deps/jsr.io/@std/path/1.1.4/constants.js +17 -0
  88. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  89. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  90. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js +28 -0
  91. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  92. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  93. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
  94. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  95. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  96. package/esm/deps/jsr.io/@std/path/1.1.4/format.js +27 -0
  97. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  98. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  99. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js +28 -0
  100. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  101. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  102. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +83 -0
  103. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  104. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  105. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
  106. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  107. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  108. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js +42 -0
  109. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  110. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  111. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
  112. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  113. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  114. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js +34 -0
  115. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  116. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  117. package/esm/deps/jsr.io/@std/path/1.1.4/mod.js +216 -0
  118. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  119. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  120. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js +32 -0
  121. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  122. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  123. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +35 -0
  124. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  125. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  126. package/esm/deps/jsr.io/@std/path/1.1.4/parse.js +39 -0
  127. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  128. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  129. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
  130. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  131. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  132. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
  133. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  134. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  135. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js +14 -0
  136. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  137. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  138. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +64 -0
  139. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  140. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  141. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
  142. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  143. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  144. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js +28 -0
  145. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  146. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  147. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
  148. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  149. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  150. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +82 -0
  151. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  152. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  153. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
  154. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  155. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  156. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
  157. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  158. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  159. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +40 -0
  160. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  161. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  162. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
  163. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  164. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  165. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +32 -0
  166. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  167. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  168. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js +115 -0
  169. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  170. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  171. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js +106 -0
  172. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  173. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  174. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +59 -0
  175. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  176. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  177. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
  178. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  179. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  180. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +20 -0
  181. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  182. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  183. package/esm/deps/jsr.io/@std/path/1.1.4/relative.js +30 -0
  184. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  185. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  186. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js +30 -0
  187. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  188. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  189. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
  190. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  191. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  192. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +29 -0
  193. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  194. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  195. package/esm/deps/jsr.io/@std/path/1.1.4/types.js +3 -0
  196. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  197. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  198. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
  199. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  200. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  201. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
  202. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  203. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  204. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js +14 -0
  205. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  206. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  207. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +113 -0
  208. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  209. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  210. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
  211. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  212. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  213. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js +28 -0
  214. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  215. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  216. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
  217. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  218. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  219. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +82 -0
  220. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  221. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  222. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
  223. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  224. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  225. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
  226. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  227. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  228. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +41 -0
  229. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  230. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  231. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
  232. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  233. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  234. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +32 -0
  235. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  236. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  237. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js +176 -0
  238. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  239. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  240. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js +131 -0
  241. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  242. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  243. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +154 -0
  244. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  245. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  246. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
  247. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  248. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  249. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +49 -0
  250. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  251. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  252. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +753 -0
  253. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  254. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  255. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.js +25 -0
  256. package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts +33 -0
  257. package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts.map +1 -0
  258. package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.js +48 -0
  259. package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts +66 -0
  260. package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts.map +1 -0
  261. package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.js +1427 -0
  262. package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts +44 -0
  263. package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts.map +1 -0
  264. package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.js +117 -0
  265. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts +3 -0
  266. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts.map +1 -0
  267. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.js +103 -0
  268. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts +3 -0
  269. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts.map +1 -0
  270. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.js +32 -0
  271. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts +3 -0
  272. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts.map +1 -0
  273. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.js +96 -0
  274. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts +3 -0
  275. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts.map +1 -0
  276. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.js +159 -0
  277. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts +3 -0
  278. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts.map +1 -0
  279. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.js +14 -0
  280. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts +3 -0
  281. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts.map +1 -0
  282. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.js +10 -0
  283. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts +3 -0
  284. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts.map +1 -0
  285. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.js +22 -0
  286. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts +3 -0
  287. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts.map +1 -0
  288. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.js +29 -0
  289. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts +3 -0
  290. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts.map +1 -0
  291. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.js +19 -0
  292. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts +3 -0
  293. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts.map +1 -0
  294. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.js +30 -0
  295. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts +3 -0
  296. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts.map +1 -0
  297. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.js +10 -0
  298. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts +3 -0
  299. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts.map +1 -0
  300. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.js +14 -0
  301. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts +3 -0
  302. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts.map +1 -0
  303. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.js +9 -0
  304. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts +3 -0
  305. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts.map +1 -0
  306. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.js +81 -0
  307. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts +3 -0
  308. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts.map +1 -0
  309. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.js +20 -0
  310. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts +32 -0
  311. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts.map +1 -0
  312. package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.js +6 -0
  313. package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts +4 -0
  314. package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts.map +1 -0
  315. package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.js +13 -0
  316. package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts +76 -0
  317. package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts.map +1 -0
  318. package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.js +93 -0
  319. package/esm/mod.d.ts +51 -0
  320. package/esm/mod.d.ts.map +1 -0
  321. package/esm/mod.js +20 -0
  322. package/esm/package.json +3 -0
  323. package/esm/src/constants.d.ts +15 -0
  324. package/esm/src/constants.d.ts.map +1 -0
  325. package/esm/src/constants.js +20 -0
  326. package/esm/src/definitions.d.ts +11 -0
  327. package/esm/src/definitions.d.ts.map +1 -0
  328. package/esm/src/definitions.js +14 -0
  329. package/esm/src/loader.d.ts +4 -0
  330. package/esm/src/loader.d.ts.map +1 -0
  331. package/esm/src/loader.js +179 -0
  332. package/esm/src/markdown.d.ts +5 -0
  333. package/esm/src/markdown.d.ts.map +1 -0
  334. package/esm/src/markdown.js +307 -0
  335. package/esm/src/openai_compat.d.ts +63 -0
  336. package/esm/src/openai_compat.d.ts.map +1 -0
  337. package/esm/src/openai_compat.js +272 -0
  338. package/esm/src/providers/openrouter.d.ts +8 -0
  339. package/esm/src/providers/openrouter.d.ts.map +1 -0
  340. package/esm/src/providers/openrouter.js +168 -0
  341. package/esm/src/render.d.ts +51 -0
  342. package/esm/src/render.d.ts.map +1 -0
  343. package/esm/src/render.js +188 -0
  344. package/esm/src/runtime.d.ts +35 -0
  345. package/esm/src/runtime.d.ts.map +1 -0
  346. package/esm/src/runtime.js +1368 -0
  347. package/esm/src/schema.d.ts +8 -0
  348. package/esm/src/schema.d.ts.map +1 -0
  349. package/esm/src/schema.js +45 -0
  350. package/esm/src/state.d.ts +34 -0
  351. package/esm/src/state.d.ts.map +1 -0
  352. package/esm/src/state.js +22 -0
  353. package/esm/src/types.d.ts +318 -0
  354. package/esm/src/types.d.ts.map +1 -0
  355. package/esm/src/types.js +1 -0
  356. package/package.json +32 -0
  357. package/script/_dnt.polyfills.d.ts +12 -0
  358. package/script/_dnt.polyfills.d.ts.map +1 -0
  359. package/script/_dnt.polyfills.js +16 -0
  360. package/script/_dnt.shims.d.ts +6 -0
  361. package/script/_dnt.shims.d.ts.map +1 -0
  362. package/script/_dnt.shims.js +65 -0
  363. package/script/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts +6 -0
  364. package/script/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts.map +1 -0
  365. package/script/deps/jsr.io/@std/collections/1.1.3/_utils.js +21 -0
  366. package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts +322 -0
  367. package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts.map +1 -0
  368. package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.js +98 -0
  369. package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts +11 -0
  370. package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts.map +1 -0
  371. package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.js +31 -0
  372. package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts +5 -0
  373. package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts.map +1 -0
  374. package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.js +11 -0
  375. package/script/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts +32 -0
  376. package/script/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts.map +1 -0
  377. package/script/deps/jsr.io/@std/front-matter/1.0.9/any.js +51 -0
  378. package/script/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts +30 -0
  379. package/script/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts.map +1 -0
  380. package/script/deps/jsr.io/@std/front-matter/1.0.9/json.js +38 -0
  381. package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts +30 -0
  382. package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts.map +1 -0
  383. package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.js +39 -0
  384. package/script/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts +7 -0
  385. package/script/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts.map +1 -0
  386. package/script/deps/jsr.io/@std/front-matter/1.0.9/types.js +4 -0
  387. package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts +33 -0
  388. package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts.map +1 -0
  389. package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +42 -0
  390. package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  391. package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  392. package/script/deps/jsr.io/@std/internal/1.0.12/_os.js +38 -0
  393. package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  394. package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  395. package/script/deps/jsr.io/@std/internal/1.0.12/os.js +8 -0
  396. package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
  397. package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  398. package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +10 -0
  399. package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  400. package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  401. package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.js +45 -0
  402. package/script/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  403. package/script/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  404. package/script/deps/jsr.io/@std/path/1.1.4/_common/common.js +26 -0
  405. package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  406. package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  407. package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.js +49 -0
  408. package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  409. package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  410. package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +11 -0
  411. package/script/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  412. package/script/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  413. package/script/deps/jsr.io/@std/path/1.1.4/_common/format.js +23 -0
  414. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  415. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  416. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +12 -0
  417. package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  418. package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  419. package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +238 -0
  420. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  421. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  422. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +11 -0
  423. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  424. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  425. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +80 -0
  426. package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  427. package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  428. package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.js +12 -0
  429. package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  430. package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  431. package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +22 -0
  432. package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  433. package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  434. package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +18 -0
  435. package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  436. package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  437. package/script/deps/jsr.io/@std/path/1.1.4/basename.js +38 -0
  438. package/script/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  439. package/script/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  440. package/script/deps/jsr.io/@std/path/1.1.4/common.js +36 -0
  441. package/script/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  442. package/script/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  443. package/script/deps/jsr.io/@std/path/1.1.4/constants.js +20 -0
  444. package/script/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  445. package/script/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  446. package/script/deps/jsr.io/@std/path/1.1.4/dirname.js +31 -0
  447. package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  448. package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  449. package/script/deps/jsr.io/@std/path/1.1.4/extname.js +31 -0
  450. package/script/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  451. package/script/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  452. package/script/deps/jsr.io/@std/path/1.1.4/format.js +30 -0
  453. package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  454. package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  455. package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.js +31 -0
  456. package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  457. package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  458. package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +86 -0
  459. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  460. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  461. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +31 -0
  462. package/script/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  463. package/script/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  464. package/script/deps/jsr.io/@std/path/1.1.4/is_glob.js +45 -0
  465. package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  466. package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  467. package/script/deps/jsr.io/@std/path/1.1.4/join.js +32 -0
  468. package/script/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  469. package/script/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  470. package/script/deps/jsr.io/@std/path/1.1.4/join_globs.js +37 -0
  471. package/script/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  472. package/script/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  473. package/script/deps/jsr.io/@std/path/1.1.4/mod.js +232 -0
  474. package/script/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  475. package/script/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  476. package/script/deps/jsr.io/@std/path/1.1.4/normalize.js +35 -0
  477. package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  478. package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  479. package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +38 -0
  480. package/script/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  481. package/script/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  482. package/script/deps/jsr.io/@std/path/1.1.4/parse.js +42 -0
  483. package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  484. package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  485. package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.js +11 -0
  486. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  487. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  488. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.js +55 -0
  489. package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  490. package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  491. package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.js +17 -0
  492. package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  493. package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  494. package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +67 -0
  495. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  496. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  497. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.js +96 -0
  498. package/script/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  499. package/script/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  500. package/script/deps/jsr.io/@std/path/1.1.4/posix/format.js +31 -0
  501. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  502. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  503. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +24 -0
  504. package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  505. package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  506. package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +85 -0
  507. package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  508. package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  509. package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +26 -0
  510. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  511. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  512. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.js +48 -0
  513. package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  514. package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  515. package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +43 -0
  516. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  517. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  518. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +61 -0
  519. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  520. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  521. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +35 -0
  522. package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  523. package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  524. package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.js +118 -0
  525. package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  526. package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  527. package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.js +109 -0
  528. package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  529. package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  530. package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +85 -0
  531. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  532. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  533. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +30 -0
  534. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  535. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  536. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +23 -0
  537. package/script/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  538. package/script/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  539. package/script/deps/jsr.io/@std/path/1.1.4/relative.js +33 -0
  540. package/script/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  541. package/script/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  542. package/script/deps/jsr.io/@std/path/1.1.4/resolve.js +33 -0
  543. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  544. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  545. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +31 -0
  546. package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  547. package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  548. package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +32 -0
  549. package/script/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  550. package/script/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  551. package/script/deps/jsr.io/@std/path/1.1.4/types.js +4 -0
  552. package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  553. package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  554. package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.js +20 -0
  555. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  556. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  557. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.js +50 -0
  558. package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  559. package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  560. package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.js +17 -0
  561. package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  562. package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  563. package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +116 -0
  564. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  565. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  566. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.js +85 -0
  567. package/script/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  568. package/script/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  569. package/script/deps/jsr.io/@std/path/1.1.4/windows/format.js +31 -0
  570. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  571. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  572. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +33 -0
  573. package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  574. package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  575. package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +85 -0
  576. package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  577. package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  578. package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +41 -0
  579. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  580. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  581. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.js +80 -0
  582. package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  583. package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  584. package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +44 -0
  585. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  586. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  587. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +138 -0
  588. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  589. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  590. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +35 -0
  591. package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  592. package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  593. package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.js +179 -0
  594. package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  595. package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  596. package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.js +134 -0
  597. package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  598. package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  599. package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +180 -0
  600. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  601. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  602. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +37 -0
  603. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  604. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  605. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +52 -0
  606. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  607. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  608. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +781 -0
  609. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  610. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  611. package/script/deps/jsr.io/@std/toml/1.0.11/parse.js +28 -0
  612. package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts +33 -0
  613. package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts.map +1 -0
  614. package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.js +55 -0
  615. package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts +66 -0
  616. package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts.map +1 -0
  617. package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.js +1431 -0
  618. package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts +44 -0
  619. package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts.map +1 -0
  620. package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.js +121 -0
  621. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts +3 -0
  622. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts.map +1 -0
  623. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.js +106 -0
  624. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts +3 -0
  625. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts.map +1 -0
  626. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.js +35 -0
  627. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts +3 -0
  628. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts.map +1 -0
  629. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.js +99 -0
  630. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts +3 -0
  631. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts.map +1 -0
  632. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.js +162 -0
  633. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts +3 -0
  634. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts.map +1 -0
  635. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.js +17 -0
  636. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts +3 -0
  637. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts.map +1 -0
  638. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.js +13 -0
  639. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts +3 -0
  640. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts.map +1 -0
  641. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.js +25 -0
  642. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts +3 -0
  643. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts.map +1 -0
  644. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.js +32 -0
  645. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts +3 -0
  646. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts.map +1 -0
  647. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.js +22 -0
  648. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts +3 -0
  649. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts.map +1 -0
  650. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.js +33 -0
  651. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts +3 -0
  652. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts.map +1 -0
  653. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.js +13 -0
  654. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts +3 -0
  655. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts.map +1 -0
  656. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.js +17 -0
  657. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts +3 -0
  658. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts.map +1 -0
  659. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.js +12 -0
  660. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts +3 -0
  661. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts.map +1 -0
  662. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.js +84 -0
  663. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts +3 -0
  664. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts.map +1 -0
  665. package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.js +23 -0
  666. package/script/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts +32 -0
  667. package/script/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts.map +1 -0
  668. package/script/deps/jsr.io/@std/yaml/1.0.10/_type.js +7 -0
  669. package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts +4 -0
  670. package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts.map +1 -0
  671. package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.js +18 -0
  672. package/script/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts +76 -0
  673. package/script/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts.map +1 -0
  674. package/script/deps/jsr.io/@std/yaml/1.0.10/parse.js +97 -0
  675. package/script/mod.d.ts +51 -0
  676. package/script/mod.d.ts.map +1 -0
  677. package/script/mod.js +30 -0
  678. package/script/package.json +3 -0
  679. package/script/src/constants.d.ts +15 -0
  680. package/script/src/constants.d.ts.map +1 -0
  681. package/script/src/constants.js +23 -0
  682. package/script/src/definitions.d.ts +11 -0
  683. package/script/src/definitions.d.ts.map +1 -0
  684. package/script/src/definitions.js +20 -0
  685. package/script/src/loader.d.ts +4 -0
  686. package/script/src/loader.d.ts.map +1 -0
  687. package/script/src/loader.js +206 -0
  688. package/script/src/markdown.d.ts +5 -0
  689. package/script/src/markdown.d.ts.map +1 -0
  690. package/script/src/markdown.js +335 -0
  691. package/script/src/openai_compat.d.ts +63 -0
  692. package/script/src/openai_compat.d.ts.map +1 -0
  693. package/script/src/openai_compat.js +276 -0
  694. package/script/src/providers/openrouter.d.ts +8 -0
  695. package/script/src/providers/openrouter.d.ts.map +1 -0
  696. package/script/src/providers/openrouter.js +197 -0
  697. package/script/src/render.d.ts +51 -0
  698. package/script/src/render.d.ts.map +1 -0
  699. package/script/src/render.js +192 -0
  700. package/script/src/runtime.d.ts +35 -0
  701. package/script/src/runtime.d.ts.map +1 -0
  702. package/script/src/runtime.js +1395 -0
  703. package/script/src/schema.d.ts +8 -0
  704. package/script/src/schema.d.ts.map +1 -0
  705. package/script/src/schema.js +51 -0
  706. package/script/src/state.d.ts +34 -0
  707. package/script/src/state.d.ts.map +1 -0
  708. package/script/src/state.js +49 -0
  709. package/script/src/types.d.ts +318 -0
  710. package/script/src/types.d.ts.map +1 -0
  711. package/script/src/types.js +2 -0
@@ -0,0 +1,753 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
4
+ if (kind === "m") throw new TypeError("Private method is not writable");
5
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
6
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13
+ };
14
+ var _Scanner_whitespace, _Scanner_position, _Scanner_source;
15
+ import { deepMerge } from "../../collections/1.1.3/deep_merge.js";
16
+ /**
17
+ * Copy of `import { isLeap } from "@std/datetime";` because it cannot be impoted as long as it is unstable.
18
+ */
19
+ function isLeap(yearNumber) {
20
+ return ((yearNumber % 4 === 0 && yearNumber % 100 !== 0) || yearNumber % 400 === 0);
21
+ }
22
+ export class Scanner {
23
+ constructor(source) {
24
+ _Scanner_whitespace.set(this, /[ \t]/);
25
+ _Scanner_position.set(this, 0);
26
+ _Scanner_source.set(this, void 0);
27
+ __classPrivateFieldSet(this, _Scanner_source, source, "f");
28
+ }
29
+ get position() {
30
+ return __classPrivateFieldGet(this, _Scanner_position, "f");
31
+ }
32
+ get source() {
33
+ return __classPrivateFieldGet(this, _Scanner_source, "f");
34
+ }
35
+ /**
36
+ * Get current character
37
+ * @param index - relative index from current position
38
+ */
39
+ char(index = 0) {
40
+ return __classPrivateFieldGet(this, _Scanner_source, "f")[__classPrivateFieldGet(this, _Scanner_position, "f") + index] ?? "";
41
+ }
42
+ /**
43
+ * Get sliced string
44
+ * @param start - start position relative from current position
45
+ * @param end - end position relative from current position
46
+ */
47
+ slice(start, end) {
48
+ return __classPrivateFieldGet(this, _Scanner_source, "f").slice(__classPrivateFieldGet(this, _Scanner_position, "f") + start, __classPrivateFieldGet(this, _Scanner_position, "f") + end);
49
+ }
50
+ /**
51
+ * Move position to next
52
+ */
53
+ next(count = 1) {
54
+ __classPrivateFieldSet(this, _Scanner_position, __classPrivateFieldGet(this, _Scanner_position, "f") + count, "f");
55
+ }
56
+ skipWhitespaces() {
57
+ while (__classPrivateFieldGet(this, _Scanner_whitespace, "f").test(this.char()) && !this.eof()) {
58
+ this.next();
59
+ }
60
+ // Invalid if current char is other kinds of whitespace
61
+ if (!this.isCurrentCharEOL() && /\s/.test(this.char())) {
62
+ const escaped = "\\u" + this.char().charCodeAt(0).toString(16);
63
+ const position = __classPrivateFieldGet(this, _Scanner_position, "f");
64
+ throw new SyntaxError(`Cannot parse the TOML: It contains invalid whitespace at position '${position}': \`${escaped}\``);
65
+ }
66
+ }
67
+ nextUntilChar(options = { skipComments: true }) {
68
+ while (!this.eof()) {
69
+ const char = this.char();
70
+ if (__classPrivateFieldGet(this, _Scanner_whitespace, "f").test(char) || this.isCurrentCharEOL()) {
71
+ this.next();
72
+ }
73
+ else if (options.skipComments && this.char() === "#") {
74
+ // entering comment
75
+ while (!this.isCurrentCharEOL() && !this.eof()) {
76
+ this.next();
77
+ }
78
+ }
79
+ else {
80
+ break;
81
+ }
82
+ }
83
+ }
84
+ /**
85
+ * Position reached EOF or not
86
+ */
87
+ eof() {
88
+ return __classPrivateFieldGet(this, _Scanner_position, "f") >= __classPrivateFieldGet(this, _Scanner_source, "f").length;
89
+ }
90
+ isCurrentCharEOL() {
91
+ return this.char() === "\n" || this.startsWith("\r\n");
92
+ }
93
+ startsWith(searchString) {
94
+ return __classPrivateFieldGet(this, _Scanner_source, "f").startsWith(searchString, __classPrivateFieldGet(this, _Scanner_position, "f"));
95
+ }
96
+ match(regExp) {
97
+ if (!regExp.sticky) {
98
+ throw new Error(`RegExp ${regExp} does not have a sticky 'y' flag`);
99
+ }
100
+ regExp.lastIndex = __classPrivateFieldGet(this, _Scanner_position, "f");
101
+ return __classPrivateFieldGet(this, _Scanner_source, "f").match(regExp);
102
+ }
103
+ }
104
+ _Scanner_whitespace = new WeakMap(), _Scanner_position = new WeakMap(), _Scanner_source = new WeakMap();
105
+ // -----------------------
106
+ // Utilities
107
+ // -----------------------
108
+ function success(body) {
109
+ return { ok: true, body };
110
+ }
111
+ function failure() {
112
+ return { ok: false };
113
+ }
114
+ /**
115
+ * Creates a nested object from the keys and values.
116
+ *
117
+ * e.g. `unflat(["a", "b", "c"], 1)` returns `{ a: { b: { c: 1 } } }`
118
+ */
119
+ export function unflat(keys, values = { __proto__: null }) {
120
+ return keys.reduceRight((acc, key) => ({ [key]: acc }), values);
121
+ }
122
+ function isObject(value) {
123
+ return typeof value === "object" && value !== null;
124
+ }
125
+ function getTargetValue(target, keys) {
126
+ const key = keys[0];
127
+ if (!key) {
128
+ throw new Error("Cannot parse the TOML: key length is not a positive number");
129
+ }
130
+ return target[key];
131
+ }
132
+ function deepAssignTable(target, table) {
133
+ const { keys, type, value } = table;
134
+ const currentValue = getTargetValue(target, keys);
135
+ if (currentValue === undefined) {
136
+ return Object.assign(target, unflat(keys, value));
137
+ }
138
+ if (Array.isArray(currentValue)) {
139
+ const last = currentValue.at(-1);
140
+ deepAssign(last, { type, keys: keys.slice(1), value });
141
+ return target;
142
+ }
143
+ if (isObject(currentValue)) {
144
+ deepAssign(currentValue, { type, keys: keys.slice(1), value });
145
+ return target;
146
+ }
147
+ throw new Error("Unexpected assign");
148
+ }
149
+ function deepAssignTableArray(target, table) {
150
+ const { type, keys, value } = table;
151
+ const currentValue = getTargetValue(target, keys);
152
+ if (currentValue === undefined) {
153
+ return Object.assign(target, unflat(keys, [value]));
154
+ }
155
+ if (Array.isArray(currentValue)) {
156
+ if (table.keys.length === 1) {
157
+ currentValue.push(value);
158
+ }
159
+ else {
160
+ const last = currentValue.at(-1);
161
+ deepAssign(last, {
162
+ type: table.type,
163
+ keys: table.keys.slice(1),
164
+ value: table.value,
165
+ });
166
+ }
167
+ return target;
168
+ }
169
+ if (isObject(currentValue)) {
170
+ deepAssign(currentValue, { type, keys: keys.slice(1), value });
171
+ return target;
172
+ }
173
+ throw new Error("Unexpected assign");
174
+ }
175
+ export function deepAssign(target, body) {
176
+ switch (body.type) {
177
+ case "Block":
178
+ return deepMerge(target, body.value);
179
+ case "Table":
180
+ return deepAssignTable(target, body);
181
+ case "TableArray":
182
+ return deepAssignTableArray(target, body);
183
+ }
184
+ }
185
+ // ---------------------------------
186
+ // Parser combinators and generators
187
+ // ---------------------------------
188
+ // deno-lint-ignore no-explicit-any
189
+ function or(parsers) {
190
+ return (scanner) => {
191
+ for (const parse of parsers) {
192
+ const result = parse(scanner);
193
+ if (result.ok)
194
+ return result;
195
+ }
196
+ return failure();
197
+ };
198
+ }
199
+ /** Join the parse results of the given parser into an array.
200
+ *
201
+ * If the parser fails at the first attempt, it will return an empty array.
202
+ */
203
+ function join(parser, separator) {
204
+ const Separator = character(separator);
205
+ return (scanner) => {
206
+ const out = [];
207
+ const first = parser(scanner);
208
+ if (!first.ok)
209
+ return success(out);
210
+ out.push(first.body);
211
+ while (!scanner.eof()) {
212
+ if (!Separator(scanner).ok)
213
+ break;
214
+ const result = parser(scanner);
215
+ if (!result.ok) {
216
+ throw new SyntaxError(`Invalid token after "${separator}"`);
217
+ }
218
+ out.push(result.body);
219
+ }
220
+ return success(out);
221
+ };
222
+ }
223
+ /** Join the parse results of the given parser into an array.
224
+ *
225
+ * This requires the parser to succeed at least once.
226
+ */
227
+ function join1(parser, separator) {
228
+ const Separator = character(separator);
229
+ return (scanner) => {
230
+ const first = parser(scanner);
231
+ if (!first.ok)
232
+ return failure();
233
+ const out = [first.body];
234
+ while (!scanner.eof()) {
235
+ if (!Separator(scanner).ok)
236
+ break;
237
+ const result = parser(scanner);
238
+ if (!result.ok) {
239
+ throw new SyntaxError(`Invalid token after "${separator}"`);
240
+ }
241
+ out.push(result.body);
242
+ }
243
+ return success(out);
244
+ };
245
+ }
246
+ function kv(keyParser, separator, valueParser) {
247
+ const Separator = character(separator);
248
+ return (scanner) => {
249
+ const position = scanner.position;
250
+ const key = keyParser(scanner);
251
+ if (!key.ok)
252
+ return failure();
253
+ const sep = Separator(scanner);
254
+ if (!sep.ok) {
255
+ throw new SyntaxError(`key/value pair doesn't have "${separator}"`);
256
+ }
257
+ const value = valueParser(scanner);
258
+ if (!value.ok) {
259
+ const lineEndIndex = scanner.source.indexOf("\n", scanner.position);
260
+ const endPosition = lineEndIndex > 0
261
+ ? lineEndIndex
262
+ : scanner.source.length;
263
+ const line = scanner.source.slice(position, endPosition);
264
+ throw new SyntaxError(`Cannot parse value on line '${line}'`);
265
+ }
266
+ return success(unflat(key.body, value.body));
267
+ };
268
+ }
269
+ function merge(parser) {
270
+ return (scanner) => {
271
+ const result = parser(scanner);
272
+ if (!result.ok)
273
+ return failure();
274
+ let body = { __proto__: null };
275
+ for (const record of result.body) {
276
+ if (typeof record === "object" && record !== null) {
277
+ body = deepMerge(body, record);
278
+ }
279
+ }
280
+ return success(body);
281
+ };
282
+ }
283
+ function repeat(parser) {
284
+ return (scanner) => {
285
+ const body = [];
286
+ while (!scanner.eof()) {
287
+ const result = parser(scanner);
288
+ if (!result.ok)
289
+ break;
290
+ body.push(result.body);
291
+ scanner.nextUntilChar();
292
+ }
293
+ if (body.length === 0)
294
+ return failure();
295
+ return success(body);
296
+ };
297
+ }
298
+ function surround(left, parser, right) {
299
+ const Left = character(left);
300
+ const Right = character(right);
301
+ return (scanner) => {
302
+ if (!Left(scanner).ok) {
303
+ return failure();
304
+ }
305
+ const result = parser(scanner);
306
+ if (!result.ok) {
307
+ throw new SyntaxError(`Invalid token after "${left}"`);
308
+ }
309
+ if (!Right(scanner).ok) {
310
+ throw new SyntaxError(`Not closed by "${right}" after started with "${left}"`);
311
+ }
312
+ return success(result.body);
313
+ };
314
+ }
315
+ function character(str) {
316
+ return (scanner) => {
317
+ scanner.skipWhitespaces();
318
+ if (!scanner.startsWith(str))
319
+ return failure();
320
+ scanner.next(str.length);
321
+ scanner.skipWhitespaces();
322
+ return success(undefined);
323
+ };
324
+ }
325
+ // -----------------------
326
+ // Parser components
327
+ // -----------------------
328
+ const BARE_KEY_REGEXP = /[A-Za-z0-9_-]+/y;
329
+ export function bareKey(scanner) {
330
+ scanner.skipWhitespaces();
331
+ const key = scanner.match(BARE_KEY_REGEXP)?.[0];
332
+ if (!key)
333
+ return failure();
334
+ scanner.next(key.length);
335
+ return success(key);
336
+ }
337
+ function escapeSequence(scanner) {
338
+ if (scanner.char() !== "\\")
339
+ return failure();
340
+ scanner.next();
341
+ // See https://toml.io/en/v1.0.0-rc.3#string
342
+ switch (scanner.char()) {
343
+ case "b":
344
+ scanner.next();
345
+ return success("\b");
346
+ case "t":
347
+ scanner.next();
348
+ return success("\t");
349
+ case "n":
350
+ scanner.next();
351
+ return success("\n");
352
+ case "f":
353
+ scanner.next();
354
+ return success("\f");
355
+ case "r":
356
+ scanner.next();
357
+ return success("\r");
358
+ case "u":
359
+ case "U": {
360
+ // Unicode character
361
+ const codePointLen = scanner.char() === "u" ? 4 : 6;
362
+ const codePoint = parseInt("0x" + scanner.slice(1, 1 + codePointLen), 16);
363
+ const str = String.fromCodePoint(codePoint);
364
+ scanner.next(codePointLen + 1);
365
+ return success(str);
366
+ }
367
+ case '"':
368
+ scanner.next();
369
+ return success('"');
370
+ case "\\":
371
+ scanner.next();
372
+ return success("\\");
373
+ default:
374
+ throw new SyntaxError(`Invalid escape sequence: \\${scanner.char()}`);
375
+ }
376
+ }
377
+ export function basicString(scanner) {
378
+ scanner.skipWhitespaces();
379
+ if (scanner.char() !== '"')
380
+ return failure();
381
+ scanner.next();
382
+ const acc = [];
383
+ while (scanner.char() !== '"' && !scanner.eof()) {
384
+ if (scanner.char() === "\n") {
385
+ throw new SyntaxError("Single-line string cannot contain EOL");
386
+ }
387
+ const escapedChar = escapeSequence(scanner);
388
+ if (escapedChar.ok) {
389
+ acc.push(escapedChar.body);
390
+ }
391
+ else {
392
+ acc.push(scanner.char());
393
+ scanner.next();
394
+ }
395
+ }
396
+ if (scanner.eof()) {
397
+ throw new SyntaxError(`Single-line string is not closed:\n${acc.join("")}`);
398
+ }
399
+ scanner.next(); // skip last '""
400
+ return success(acc.join(""));
401
+ }
402
+ export function literalString(scanner) {
403
+ scanner.skipWhitespaces();
404
+ if (scanner.char() !== "'")
405
+ return failure();
406
+ scanner.next();
407
+ const acc = [];
408
+ while (scanner.char() !== "'" && !scanner.eof()) {
409
+ if (scanner.char() === "\n") {
410
+ throw new SyntaxError("Single-line string cannot contain EOL");
411
+ }
412
+ acc.push(scanner.char());
413
+ scanner.next();
414
+ }
415
+ if (scanner.eof()) {
416
+ throw new SyntaxError(`Single-line string is not closed:\n${acc.join("")}`);
417
+ }
418
+ scanner.next(); // skip last "'"
419
+ return success(acc.join(""));
420
+ }
421
+ export function multilineBasicString(scanner) {
422
+ scanner.skipWhitespaces();
423
+ if (!scanner.startsWith('"""'))
424
+ return failure();
425
+ scanner.next(3);
426
+ if (scanner.char() === "\n") {
427
+ // The first newline (LF) is trimmed
428
+ scanner.next();
429
+ }
430
+ else if (scanner.startsWith("\r\n")) {
431
+ // The first newline (CRLF) is trimmed
432
+ scanner.next(2);
433
+ }
434
+ const acc = [];
435
+ while (!scanner.startsWith('"""') && !scanner.eof()) {
436
+ // line ending backslash
437
+ if (scanner.startsWith("\\\n")) {
438
+ scanner.next();
439
+ scanner.nextUntilChar({ skipComments: false });
440
+ continue;
441
+ }
442
+ else if (scanner.startsWith("\\\r\n")) {
443
+ scanner.next();
444
+ scanner.nextUntilChar({ skipComments: false });
445
+ continue;
446
+ }
447
+ const escapedChar = escapeSequence(scanner);
448
+ if (escapedChar.ok) {
449
+ acc.push(escapedChar.body);
450
+ }
451
+ else {
452
+ acc.push(scanner.char());
453
+ scanner.next();
454
+ }
455
+ }
456
+ if (scanner.eof()) {
457
+ throw new SyntaxError(`Multi-line string is not closed:\n${acc.join("")}`);
458
+ }
459
+ // if ends with 4 `"`, push the fist `"` to string
460
+ if (scanner.char(3) === '"') {
461
+ acc.push('"');
462
+ scanner.next();
463
+ }
464
+ scanner.next(3); // skip last '""""
465
+ return success(acc.join(""));
466
+ }
467
+ export function multilineLiteralString(scanner) {
468
+ scanner.skipWhitespaces();
469
+ if (!scanner.startsWith("'''"))
470
+ return failure();
471
+ scanner.next(3);
472
+ if (scanner.char() === "\n") {
473
+ // The first newline (LF) is trimmed
474
+ scanner.next();
475
+ }
476
+ else if (scanner.startsWith("\r\n")) {
477
+ // The first newline (CRLF) is trimmed
478
+ scanner.next(2);
479
+ }
480
+ const acc = [];
481
+ while (!scanner.startsWith("'''") && !scanner.eof()) {
482
+ acc.push(scanner.char());
483
+ scanner.next();
484
+ }
485
+ if (scanner.eof()) {
486
+ throw new SyntaxError(`Multi-line string is not closed:\n${acc.join("")}`);
487
+ }
488
+ // if ends with 4 `'`, push the fist `'` to string
489
+ if (scanner.char(3) === "'") {
490
+ acc.push("'");
491
+ scanner.next();
492
+ }
493
+ scanner.next(3); // skip last "'''"
494
+ return success(acc.join(""));
495
+ }
496
+ const BOOLEAN_REGEXP = /(?:true|false)\b/y;
497
+ export function boolean(scanner) {
498
+ scanner.skipWhitespaces();
499
+ const match = scanner.match(BOOLEAN_REGEXP);
500
+ if (!match)
501
+ return failure();
502
+ const string = match[0];
503
+ scanner.next(string.length);
504
+ const value = string === "true";
505
+ return success(value);
506
+ }
507
+ const INFINITY_MAP = new Map([
508
+ ["inf", Infinity],
509
+ ["+inf", Infinity],
510
+ ["-inf", -Infinity],
511
+ ]);
512
+ const INFINITY_REGEXP = /[+-]?inf\b/y;
513
+ export function infinity(scanner) {
514
+ scanner.skipWhitespaces();
515
+ const match = scanner.match(INFINITY_REGEXP);
516
+ if (!match)
517
+ return failure();
518
+ const string = match[0];
519
+ scanner.next(string.length);
520
+ const value = INFINITY_MAP.get(string);
521
+ return success(value);
522
+ }
523
+ const NAN_REGEXP = /[+-]?nan\b/y;
524
+ export function nan(scanner) {
525
+ scanner.skipWhitespaces();
526
+ const match = scanner.match(NAN_REGEXP);
527
+ if (!match)
528
+ return failure();
529
+ const string = match[0];
530
+ scanner.next(string.length);
531
+ const value = NaN;
532
+ return success(value);
533
+ }
534
+ export const dottedKey = join1(or([bareKey, basicString, literalString]), ".");
535
+ const BINARY_REGEXP = /0b[01]+(?:_[01]+)*\b/y;
536
+ export function binary(scanner) {
537
+ scanner.skipWhitespaces();
538
+ const match = scanner.match(BINARY_REGEXP)?.[0];
539
+ if (!match)
540
+ return failure();
541
+ scanner.next(match.length);
542
+ const value = match.slice(2).replaceAll("_", "");
543
+ const number = parseInt(value, 2);
544
+ return isNaN(number) ? failure() : success(number);
545
+ }
546
+ const OCTAL_REGEXP = /0o[0-7]+(?:_[0-7]+)*\b/y;
547
+ export function octal(scanner) {
548
+ scanner.skipWhitespaces();
549
+ const match = scanner.match(OCTAL_REGEXP)?.[0];
550
+ if (!match)
551
+ return failure();
552
+ scanner.next(match.length);
553
+ const value = match.slice(2).replaceAll("_", "");
554
+ const number = parseInt(value, 8);
555
+ return isNaN(number) ? failure() : success(number);
556
+ }
557
+ const HEX_REGEXP = /0x[0-9a-f]+(?:_[0-9a-f]+)*\b/yi;
558
+ export function hex(scanner) {
559
+ scanner.skipWhitespaces();
560
+ const match = scanner.match(HEX_REGEXP)?.[0];
561
+ if (!match)
562
+ return failure();
563
+ scanner.next(match.length);
564
+ const value = match.slice(2).replaceAll("_", "");
565
+ const number = parseInt(value, 16);
566
+ return isNaN(number) ? failure() : success(number);
567
+ }
568
+ const INTEGER_REGEXP = /[+-]?(?:0|[1-9][0-9]*(?:_[0-9]+)*)\b/y;
569
+ export function integer(scanner) {
570
+ scanner.skipWhitespaces();
571
+ const match = scanner.match(INTEGER_REGEXP)?.[0];
572
+ if (!match)
573
+ return failure();
574
+ scanner.next(match.length);
575
+ const value = match.replaceAll("_", "");
576
+ const int = parseInt(value, 10);
577
+ return success(int);
578
+ }
579
+ const FLOAT_REGEXP = /[+-]?(?:0|[1-9][0-9]*(?:_[0-9]+)*)(?:\.[0-9]+(?:_[0-9]+)*)?(?:e[+-]?[0-9]+(?:_[0-9]+)*)?\b/yi;
580
+ export function float(scanner) {
581
+ scanner.skipWhitespaces();
582
+ const match = scanner.match(FLOAT_REGEXP)?.[0];
583
+ if (!match)
584
+ return failure();
585
+ scanner.next(match.length);
586
+ const value = match.replaceAll("_", "");
587
+ const float = parseFloat(value);
588
+ if (isNaN(float))
589
+ return failure();
590
+ return success(float);
591
+ }
592
+ const DATE_TIME_REGEXP = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})(?:[ 0-9TZ.:+-]+)?\b/y;
593
+ export function dateTime(scanner) {
594
+ scanner.skipWhitespaces();
595
+ const match = scanner.match(DATE_TIME_REGEXP);
596
+ if (!match)
597
+ return failure();
598
+ const string = match[0];
599
+ scanner.next(string.length);
600
+ const groups = match.groups;
601
+ // special case if month is February
602
+ if (groups.month == "02") {
603
+ const days = parseInt(groups.day);
604
+ if (days > 29) {
605
+ throw new SyntaxError(`Invalid date string "${match}"`);
606
+ }
607
+ const year = parseInt(groups.year);
608
+ if (days > 28 && !isLeap(year)) {
609
+ throw new SyntaxError(`Invalid date string "${match}"`);
610
+ }
611
+ }
612
+ const date = new Date(string.trim());
613
+ // invalid date
614
+ if (isNaN(date.getTime())) {
615
+ throw new SyntaxError(`Invalid date string "${match}"`);
616
+ }
617
+ return success(date);
618
+ }
619
+ const LOCAL_TIME_REGEXP = /(\d{2}):(\d{2}):(\d{2})(?:\.[0-9]+)?\b/y;
620
+ export function localTime(scanner) {
621
+ scanner.skipWhitespaces();
622
+ const match = scanner.match(LOCAL_TIME_REGEXP)?.[0];
623
+ if (!match)
624
+ return failure();
625
+ scanner.next(match.length);
626
+ return success(match);
627
+ }
628
+ export function arrayValue(scanner) {
629
+ scanner.skipWhitespaces();
630
+ if (scanner.char() !== "[")
631
+ return failure();
632
+ scanner.next();
633
+ const array = [];
634
+ while (!scanner.eof()) {
635
+ scanner.nextUntilChar();
636
+ const result = value(scanner);
637
+ if (!result.ok)
638
+ break;
639
+ array.push(result.body);
640
+ scanner.skipWhitespaces();
641
+ // may have a next item, but trailing comma is allowed at array
642
+ if (scanner.char() !== ",")
643
+ break;
644
+ scanner.next();
645
+ }
646
+ scanner.nextUntilChar();
647
+ if (scanner.char() !== "]")
648
+ throw new SyntaxError("Array is not closed");
649
+ scanner.next();
650
+ return success(array);
651
+ }
652
+ export function inlineTable(scanner) {
653
+ scanner.nextUntilChar();
654
+ if (scanner.char(1) === "}") {
655
+ scanner.next(2);
656
+ return success({ __proto__: null });
657
+ }
658
+ const pairs = surround("{", join(pair, ","), "}")(scanner);
659
+ if (!pairs.ok)
660
+ return failure();
661
+ let table = { __proto__: null };
662
+ for (const pair of pairs.body) {
663
+ table = deepMerge(table, pair);
664
+ }
665
+ return success(table);
666
+ }
667
+ export const value = or([
668
+ multilineBasicString,
669
+ multilineLiteralString,
670
+ basicString,
671
+ literalString,
672
+ boolean,
673
+ infinity,
674
+ nan,
675
+ dateTime,
676
+ localTime,
677
+ binary,
678
+ octal,
679
+ hex,
680
+ float,
681
+ integer,
682
+ arrayValue,
683
+ inlineTable,
684
+ ]);
685
+ export const pair = kv(dottedKey, "=", value);
686
+ export function block(scanner) {
687
+ scanner.nextUntilChar();
688
+ const result = merge(repeat(pair))(scanner);
689
+ if (result.ok)
690
+ return success({ type: "Block", value: result.body });
691
+ return failure();
692
+ }
693
+ export const tableHeader = surround("[", dottedKey, "]");
694
+ export function table(scanner) {
695
+ scanner.nextUntilChar();
696
+ const header = tableHeader(scanner);
697
+ if (!header.ok)
698
+ return failure();
699
+ scanner.nextUntilChar();
700
+ const b = block(scanner);
701
+ return success({
702
+ type: "Table",
703
+ keys: header.body,
704
+ value: b.ok ? b.body.value : { __proto__: null },
705
+ });
706
+ }
707
+ export const tableArrayHeader = surround("[[", dottedKey, "]]");
708
+ export function tableArray(scanner) {
709
+ scanner.nextUntilChar();
710
+ const header = tableArrayHeader(scanner);
711
+ if (!header.ok)
712
+ return failure();
713
+ scanner.nextUntilChar();
714
+ const b = block(scanner);
715
+ return success({
716
+ type: "TableArray",
717
+ keys: header.body,
718
+ value: b.ok ? b.body.value : { __proto__: null },
719
+ });
720
+ }
721
+ export function toml(scanner) {
722
+ const blocks = repeat(or([block, tableArray, table]))(scanner);
723
+ if (!blocks.ok)
724
+ return success({ __proto__: null });
725
+ const body = blocks.body.reduce(deepAssign, { __proto__: null });
726
+ return success(body);
727
+ }
728
+ function createParseErrorMessage(scanner, message) {
729
+ const string = scanner.source.slice(0, scanner.position);
730
+ const lines = string.split("\n");
731
+ const row = lines.length;
732
+ const column = lines.at(-1)?.length ?? 0;
733
+ return `Parse error on line ${row}, column ${column}: ${message}`;
734
+ }
735
+ export function parserFactory(parser) {
736
+ return (tomlString) => {
737
+ const scanner = new Scanner(tomlString);
738
+ try {
739
+ const result = parser(scanner);
740
+ if (result.ok && scanner.eof())
741
+ return result.body;
742
+ const message = `Unexpected character: "${scanner.char()}"`;
743
+ throw new SyntaxError(createParseErrorMessage(scanner, message));
744
+ }
745
+ catch (error) {
746
+ if (error instanceof Error) {
747
+ throw new SyntaxError(createParseErrorMessage(scanner, error.message));
748
+ }
749
+ const message = "Invalid error type caught";
750
+ throw new SyntaxError(createParseErrorMessage(scanner, message));
751
+ }
752
+ };
753
+ }