@fedify/fedify 1.6.1-dev.856 → 1.6.1-dev.871

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 (457) hide show
  1. package/dist/actor-CM3gfkH6.js +36173 -0
  2. package/dist/{vocab/actor.js → actor-D7NMuy45.js} +5 -4
  3. package/dist/{vocab/actor.d.ts → actor-lFlm8FYo.d.ts} +2 -2
  4. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js → assert-Dv75vaGI.js} +2 -1
  5. package/dist/assert_equals-ClvzlhZu.js +1020 -0
  6. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js → assert_instance_of--9UCVKsi.js} +2 -1
  7. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js → assert_is_error-D162gXcM.js} +2 -2
  8. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js → assert_not_equals-Cyf5m9Ke.js} +2 -2
  9. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js → assert_rejects-FOHCtlD2.js} +23 -3
  10. package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js → assert_throws-CRfQJvVx.js} +3 -2
  11. package/dist/{runtime/authdocloader.js → authdocloader-BKZDAq91.js} +5 -4
  12. package/dist/authdocloader-OfYZlI31.js +51 -0
  13. package/dist/{federation/builder.js → builder-DSTiU6ue.js} +18 -17
  14. package/dist/{_virtual/rolldown_runtime.js → chunk-HsBuZ-b2.js} +1 -0
  15. package/dist/client-Dw1pCSIt.d.ts +299 -0
  16. package/dist/{nodeinfo/client.js → client-RN5A1Qgw.js} +3 -2
  17. package/dist/{federation/collection.js → collection-QaGK9TVn.js} +1 -0
  18. package/dist/compat/mod.d.ts +12 -2
  19. package/dist/compat/mod.js +2 -1
  20. package/dist/compat/transformers.test.d.ts +2 -1
  21. package/dist/compat/transformers.test.js +32 -8
  22. package/dist/context-CzJXjNR8.d.ts +2034 -0
  23. package/dist/{testing/context.js → context-DZKXS0DV.js} +5 -4
  24. package/dist/{x/denokv.js → denokv-iB_ggPGm.js} +3 -1
  25. package/dist/{testing/docloader.js → docloader-09nVWLAZ.js} +1 -0
  26. package/dist/{runtime/contexts.js → docloader-BcMxZ9JH.js} +420 -1
  27. package/dist/docloader-DDFam5Xn.js +4594 -0
  28. package/dist/{runtime/docloader.d.ts → docloader-DTRsVZPo.d.ts} +1 -1
  29. package/dist/esm-BxIKwi-M.js +1221 -0
  30. package/dist/federation/builder.test.d.ts +2 -1
  31. package/dist/federation/builder.test.js +22 -7
  32. package/dist/federation/collection.test.d.ts +2 -1
  33. package/dist/federation/collection.test.js +11 -3
  34. package/dist/federation/handler.test.d.ts +2 -1
  35. package/dist/federation/handler.test.js +40 -12
  36. package/dist/federation/inbox.test.d.ts +2 -1
  37. package/dist/federation/inbox.test.js +12 -5
  38. package/dist/federation/keycache.test.d.ts +2 -1
  39. package/dist/federation/keycache.test.js +12 -7
  40. package/dist/federation/kv.test.d.ts +2 -1
  41. package/dist/federation/kv.test.js +11 -3
  42. package/dist/federation/middleware.test.d.ts +2 -1
  43. package/dist/federation/middleware.test.js +107 -26
  44. package/dist/federation/mod.d.ts +13 -13
  45. package/dist/federation/mod.js +12 -8
  46. package/dist/federation/mq.test.d.ts +2 -1
  47. package/dist/federation/mq.test.js +153 -6
  48. package/dist/federation/retry.test.d.ts +2 -1
  49. package/dist/federation/retry.test.js +5 -5
  50. package/dist/federation/router.test.d.ts +2 -1
  51. package/dist/federation/router.test.js +24 -4
  52. package/dist/federation/send.test.d.ts +2 -1
  53. package/dist/federation/send.test.js +25 -13
  54. package/dist/{federation/mq.js → federation-Bmj7soSg.js} +47 -1
  55. package/dist/{node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js → hongminhee__deno-mock-fetch-DJKLj_H-.js} +96 -1
  56. package/dist/{sig/http.js → http-BFvv3ZId.js} +5 -4
  57. package/dist/http-BImJcLfv.d.ts +258 -0
  58. package/dist/http-v1TqJ9Qa.js +720 -0
  59. package/dist/{federation/inbox.js → inbox-XV_W1qfB.js} +10 -4
  60. package/dist/key-BNM-ickE.js +16 -0
  61. package/dist/key-CVIQ7iUB.js +262 -0
  62. package/dist/{sig/key.js → key-DIk4Rloj.js} +2 -4
  63. package/dist/key-DiVhk5ik.js +10 -0
  64. package/dist/{federation/keycache.js → keycache-uTxsh7dt.js} +2 -1
  65. package/dist/{testing/keys.js → keys-D7lJqunm.js} +2 -2
  66. package/dist/{federation/kv.js → kv-DohFOP2C.js} +1 -0
  67. package/dist/{runtime/langstr.js → langstr-DbWheeIS.js} +1 -0
  68. package/dist/{sig/ld.js → ld-bOhcKpmk.js} +6 -6
  69. package/dist/{webfinger/lookup.js → lookup-B5KVF6HM.js} +1 -3
  70. package/dist/lookup-D3xTID-6.js +131 -0
  71. package/dist/{webfinger/jrd.d.ts → lookup-DAfStZtI.d.ts} +41 -1
  72. package/dist/{vocab/lookup.js → lookup-D_v0FFGL.js} +5 -5
  73. package/dist/middleware-BFedQWFA.js +33 -0
  74. package/dist/middleware-BiYIqI0b.js +3525 -0
  75. package/dist/{federation/middleware.js → middleware-CPAfRtS5.js} +957 -105
  76. package/dist/middleware-pAGwVkRf.js +17 -0
  77. package/dist/mod-1pDWKvUL.d.ts +2 -0
  78. package/dist/{runtime/key.d.ts → mod-BxwG4X3V.d.ts} +52 -7
  79. package/dist/{compat/transformers.d.ts → mod-CeLnlsqE.d.ts} +3 -4
  80. package/dist/{vocab/lookup.d.ts → mod-DysVoXOu.d.ts} +98 -3
  81. package/dist/mod-GIh5OYxW.d.ts +2 -0
  82. package/dist/{sig/ld.d.ts → mod-XT0mRthe.d.ts} +126 -4
  83. package/dist/mod-g0xFzAP9.d.ts +2 -0
  84. package/dist/mod.d.ts +18 -34
  85. package/dist/mod.js +17 -27
  86. package/dist/multibase-DeCHcK8L.js +316 -0
  87. package/dist/nodeinfo/client.test.d.ts +2 -1
  88. package/dist/nodeinfo/client.test.js +15 -4
  89. package/dist/nodeinfo/handler.test.d.ts +2 -1
  90. package/dist/nodeinfo/handler.test.js +39 -7
  91. package/dist/nodeinfo/mod.d.ts +4 -3
  92. package/dist/nodeinfo/mod.js +3 -3
  93. package/dist/nodeinfo/semver.test.d.ts +2 -1
  94. package/dist/nodeinfo/semver.test.js +11 -4
  95. package/dist/nodeinfo/types.test.d.ts +2 -1
  96. package/dist/nodeinfo/types.test.js +12 -4
  97. package/dist/{sig/owner.d.ts → owner-BjpObx-L.d.ts} +4 -6
  98. package/dist/{sig/owner.js → owner-tYPzPLFs.js} +4 -4
  99. package/dist/proof-D0cf4R25.js +595 -0
  100. package/dist/{sig/proof.js → proof-DIsZ1VTb.js} +5 -4
  101. package/dist/{federation/retry.js → retry-BiIhZWgD.js} +1 -0
  102. package/dist/{federation/router.js → router-D_aVZZUc.js} +20 -1
  103. package/dist/runtime/authdocloader.test.d.ts +2 -1
  104. package/dist/runtime/authdocloader.test.js +24 -9
  105. package/dist/runtime/docloader.test.d.ts +2 -1
  106. package/dist/runtime/docloader.test.js +15 -11
  107. package/dist/runtime/key.test.d.ts +2 -1
  108. package/dist/runtime/key.test.js +19 -4
  109. package/dist/runtime/langstr.test.d.ts +2 -1
  110. package/dist/runtime/langstr.test.js +11 -3
  111. package/dist/runtime/mod.d.ts +5 -4
  112. package/dist/runtime/mod.js +7 -4
  113. package/dist/runtime/multibase/multibase.test.d.ts +2 -1
  114. package/dist/runtime/multibase/multibase.test.js +11 -5
  115. package/dist/runtime/url.test.d.ts +2 -1
  116. package/dist/runtime/url.test.js +7 -6
  117. package/dist/{nodeinfo/semver.js → semver-CbbIgUsa.js} +1 -0
  118. package/dist/{federation/send.js → send-CFBOnY61.js} +3 -2
  119. package/dist/sig/http.test.d.ts +2 -1
  120. package/dist/sig/http.test.js +23 -12
  121. package/dist/sig/key.test.d.ts +2 -1
  122. package/dist/sig/key.test.js +21 -8
  123. package/dist/sig/ld.test.d.ts +2 -1
  124. package/dist/sig/ld.test.js +19 -11
  125. package/dist/sig/mod.d.ts +7 -5
  126. package/dist/sig/mod.js +7 -5
  127. package/dist/sig/owner.test.d.ts +2 -1
  128. package/dist/sig/owner.test.js +23 -9
  129. package/dist/sig/proof.test.d.ts +2 -1
  130. package/dist/sig/proof.test.js +22 -10
  131. package/dist/std__assert-CaBUULmX.js +151 -0
  132. package/dist/testing/docloader.test.d.ts +2 -1
  133. package/dist/testing/docloader.test.js +11 -3
  134. package/dist/testing/mod.d.ts +1 -0
  135. package/dist/testing/mod.js +2 -136
  136. package/dist/testing-jcGLO9Lp.js +143 -0
  137. package/dist/{compat/transformers.js → transformers-jxj-4o2K.js} +1 -1
  138. package/dist/{vocab/type.js → type-D2s5lmbZ.js} +1 -0
  139. package/dist/{nodeinfo/types.js → types-CqoqWDkp.js} +2 -1
  140. package/dist/types-D4p7qK8A.js +457 -0
  141. package/dist/{runtime/url.js → url-kTAI6_KP.js} +1 -0
  142. package/dist/vocab/actor.test.d.ts +2 -1
  143. package/dist/vocab/actor.test.js +5853 -14
  144. package/dist/vocab/lookup.test.d.ts +2 -1
  145. package/dist/vocab/lookup.test.js +20 -7
  146. package/dist/vocab/mod.d.ts +5 -5
  147. package/dist/vocab/mod.js +4 -5
  148. package/dist/vocab/type.test.d.ts +2 -1
  149. package/dist/vocab/type.test.js +9 -4
  150. package/dist/vocab/vocab.test.d.ts +2 -1
  151. package/dist/vocab/vocab.test.js +2440 -15
  152. package/dist/vocab-BSNlVPPE.js +172 -0
  153. package/dist/{vocab/vocab.js → vocab-BxrrllKY.js} +331 -182
  154. package/dist/{vocab/vocab.d.ts → vocab-CLWdoo7y.d.ts} +21 -9
  155. package/dist/webfinger/handler.test.d.ts +2 -1
  156. package/dist/webfinger/handler.test.js +39 -7
  157. package/dist/webfinger/lookup.test.d.ts +2 -1
  158. package/dist/webfinger/lookup.test.js +14 -4
  159. package/dist/webfinger/mod.d.ts +4 -2
  160. package/dist/webfinger/mod.js +3 -1
  161. package/dist/x/cfworkers.d.ts +49 -0
  162. package/dist/x/cfworkers.js +73 -0
  163. package/dist/x/cfworkers.test.d.ts +3 -0
  164. package/dist/x/cfworkers.test.js +153 -0
  165. package/dist/x/hono.d.ts +11 -2
  166. package/dist/x/sveltekit.d.ts +11 -2
  167. package/package.json +6 -1
  168. package/dist/codegen/fs.js +0 -23
  169. package/dist/codegen/schema.js +0 -88
  170. package/dist/codegen/type.js +0 -392
  171. package/dist/compat/types.d.ts +0 -18
  172. package/dist/deno.js +0 -137
  173. package/dist/federation/builder.d.ts +0 -19
  174. package/dist/federation/callback.d.ts +0 -211
  175. package/dist/federation/collection.d.ts +0 -36
  176. package/dist/federation/context.d.ts +0 -757
  177. package/dist/federation/federation.d.ts +0 -689
  178. package/dist/federation/handler.d.ts +0 -44
  179. package/dist/federation/handler.js +0 -543
  180. package/dist/federation/middleware.d.ts +0 -101
  181. package/dist/federation/negotiation.js +0 -63
  182. package/dist/federation/retry.d.ts +0 -71
  183. package/dist/federation/router.d.ts +0 -91
  184. package/dist/federation/send.d.ts +0 -29
  185. package/dist/node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/mod.js +0 -101
  186. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js +0 -49
  187. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js +0 -32
  188. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js +0 -26
  189. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater.js +0 -34
  190. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater_or_equal.js +0 -34
  191. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js +0 -53
  192. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js +0 -32
  193. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js +0 -33
  194. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js +0 -79
  195. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/mod.js +0 -19
  196. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/assertion_state.js +0 -177
  197. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/build_message.js +0 -101
  198. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff.js +0 -274
  199. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff_str.js +0 -148
  200. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/format.js +0 -37
  201. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/mod.js +0 -10
  202. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/styles.js +0 -172
  203. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/assert_path.js +0 -11
  204. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/constants.js +0 -10
  205. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/dirname.js +0 -14
  206. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/from_file_url.js +0 -13
  207. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize.js +0 -14
  208. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize_string.js +0 -60
  209. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/strip_trailing_separators.js +0 -15
  210. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_os.js +0 -9
  211. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/extname.js +0 -4
  212. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/format.js +0 -4
  213. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/from_file_url.js +0 -34
  214. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/glob_to_regexp.js +0 -4
  215. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/is_absolute.js +0 -4
  216. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join.js +0 -4
  217. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join_globs.js +0 -4
  218. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/mod.js +0 -5
  219. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize.js +0 -4
  220. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize_glob.js +0 -4
  221. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/parse.js +0 -4
  222. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/_util.js +0 -13
  223. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/dirname.js +0 -54
  224. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/from_file_url.js +0 -27
  225. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/join.js +0 -47
  226. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/normalize.js +0 -59
  227. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/relative.js +0 -4
  228. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/resolve.js +0 -4
  229. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_file_url.js +0 -4
  230. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_namespaced_path.js +0 -4
  231. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/from_file_url.js +0 -31
  232. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js +0 -17
  233. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js +0 -38
  234. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js +0 -36
  235. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_chars.js +0 -47
  236. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_dumper_state.js +0 -4
  237. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_loader_state.js +0 -884
  238. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_schema.js +0 -120
  239. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/binary.js +0 -92
  240. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/bool.js +0 -41
  241. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/float.js +0 -58
  242. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/int.js +0 -118
  243. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/map.js +0 -18
  244. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/merge.js +0 -14
  245. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/nil.js +0 -23
  246. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/omap.js +0 -31
  247. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/pairs.js +0 -22
  248. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/regexp.js +0 -29
  249. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/seq.js +0 -14
  250. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/set.js +0 -17
  251. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/str.js +0 -14
  252. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/timestamp.js +0 -57
  253. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/undefined.js +0 -24
  254. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_utils.js +0 -17
  255. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/mod.js +0 -5
  256. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/parse.js +0 -54
  257. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/stringify.js +0 -4
  258. package/dist/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.js +0 -68
  259. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js +0 -30
  260. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayArbitrary.js +0 -203
  261. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayInt64Arbitrary.js +0 -122
  262. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/BigIntArbitrary.js +0 -63
  263. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ConstantArbitrary.js +0 -58
  264. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/FrequencyArbitrary.js +0 -136
  265. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/IntegerArbitrary.js +0 -64
  266. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/LazyArbitrary.js +0 -29
  267. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/StringUnitArbitrary.js +0 -45
  268. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js +0 -74
  269. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/WithShrinkFromOtherArbitrary.js +0 -40
  270. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/AnyArbitraryBuilder.js +0 -97
  271. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/BoxedArbitraryBuilder.js +0 -13
  272. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterArbitraryBuilder.js +0 -17
  273. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/RestrictedIntegerArbitraryBuilder.js +0 -23
  274. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.js +0 -32
  275. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/data/GraphemeRanges.js +0 -990
  276. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ArrayInt64.js +0 -98
  277. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BiasNumericRange.js +0 -53
  278. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSlicedGenerator.js +0 -15
  279. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/CustomEqualSet.js +0 -27
  280. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DepthContext.js +0 -24
  281. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleHelpers.js +0 -96
  282. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleOnlyHelpers.js +0 -25
  283. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatHelpers.js +0 -57
  284. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatOnlyHelpers.js +0 -26
  285. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatingOnlyHelpers.js +0 -26
  286. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/GraphemeRangesHelpers.js +0 -58
  287. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/MaxLengthFromMinLength.js +0 -72
  288. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js +0 -16
  289. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/QualifiedObjectConstraints.js +0 -58
  290. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueSet.js +0 -41
  291. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueZeroSet.js +0 -33
  292. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkBigInt.js +0 -37
  293. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkInteger.js +0 -41
  294. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SlicesForStringBuilder.js +0 -74
  295. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/StrictlyEqualSet.js +0 -38
  296. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TokenizeString.js +0 -47
  297. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/NoopSlicedGenerator.js +0 -21
  298. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SlicedBasedGenerator.js +0 -53
  299. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToMap.js +0 -16
  300. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToSet.js +0 -16
  301. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CodePointsToString.js +0 -17
  302. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToCharString.js +0 -20
  303. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToMappedConstant.js +0 -69
  304. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToPrintableIndex.js +0 -18
  305. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/KeyValuePairsToObject.js +0 -42
  306. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PatternsToString.js +0 -32
  307. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/TimeToDate.js +0 -30
  308. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UnboxedToBoxed.js +0 -22
  309. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/anything.js +0 -14
  310. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/array.js +0 -22
  311. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/bigInt.js +0 -38
  312. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/boolean.js +0 -24
  313. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constant.js +0 -13
  314. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constantFrom.js +0 -14
  315. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/date.js +0 -30
  316. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/dictionary.js +0 -27
  317. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/double.js +0 -54
  318. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float.js +0 -60
  319. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float32Array.js +0 -22
  320. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float64Array.js +0 -22
  321. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicode.js +0 -24
  322. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicodeString.js +0 -20
  323. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int16Array.js +0 -15
  324. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int32Array.js +0 -15
  325. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int8Array.js +0 -15
  326. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/integer.js +0 -26
  327. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/letrec.js +0 -28
  328. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/mapToConstant.js +0 -26
  329. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/maxSafeInteger.js +0 -15
  330. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/nat.js +0 -17
  331. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/noBias.js +0 -11
  332. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/oneof.js +0 -31
  333. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/sparseArray.js +0 -68
  334. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/string.js +0 -32
  335. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/tuple.js +0 -13
  336. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint16Array.js +0 -15
  337. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint32Array.js +0 -15
  338. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8Array.js +0 -15
  339. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8ClampedArray.js +0 -15
  340. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uniqueArray.js +0 -47
  341. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js +0 -184
  342. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js +0 -31
  343. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js +0 -19
  344. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IRawProperty.js +0 -12
  345. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IgnoreEqualValuesProperty.js +0 -52
  346. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.generic.js +0 -77
  347. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.js +0 -22
  348. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/SkipAfterProperty.js +0 -61
  349. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/TimeoutProperty.js +0 -52
  350. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/UnbiasedProperty.js +0 -29
  351. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/DecorateProperty.js +0 -26
  352. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Runner.js +0 -61
  353. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/RunnerIterator.js +0 -47
  354. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/SourceValuesIterator.js +0 -35
  355. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Tosser.js +0 -33
  356. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js +0 -12
  357. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js +0 -121
  358. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js +0 -14
  359. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/ExecutionStatus.js +0 -14
  360. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/RunExecution.js +0 -116
  361. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/PathWalker.js +0 -24
  362. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/RunDetailsFormatter.js +0 -135
  363. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/symbols.js +0 -15
  364. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/random/generator/Random.js +0 -48
  365. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js +0 -24
  366. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/Stream.js +0 -84
  367. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/StreamHelpers.js +0 -50
  368. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/apply.js +0 -28
  369. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/globals.js +0 -309
  370. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/stringify.js +0 -217
  371. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/CallHistory.js +0 -94
  372. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/FetchMock.js +0 -143
  373. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/IsSubsetOf.js +0 -103
  374. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Matchers.js +0 -195
  375. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/RequestUtils.js +0 -83
  376. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Route.js +0 -137
  377. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Router.js +0 -181
  378. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/StatusTextMap.js +0 -73
  379. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/TypeDescriptor.js +0 -97
  380. package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/index.js +0 -11
  381. package/dist/node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js +0 -87
  382. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js +0 -20
  383. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js +0 -20
  384. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js +0 -20
  385. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js +0 -20
  386. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js +0 -32
  387. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js +0 -43
  388. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js +0 -139
  389. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js +0 -26
  390. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js +0 -14
  391. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js +0 -53
  392. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js +0 -114
  393. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js +0 -26
  394. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XorShift.js +0 -83
  395. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XoroShiro.js +0 -83
  396. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand-default.js +0 -44
  397. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand.js +0 -22
  398. package/dist/node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.js +0 -37
  399. package/dist/nodeinfo/client.d.ts +0 -96
  400. package/dist/nodeinfo/handler.js +0 -46
  401. package/dist/nodeinfo/semver.d.ts +0 -78
  402. package/dist/nodeinfo/types.d.ts +0 -140
  403. package/dist/runtime/authdocloader.d.ts +0 -56
  404. package/dist/runtime/docloader.js +0 -291
  405. package/dist/runtime/key.js +0 -156
  406. package/dist/runtime/langstr.d.ts +0 -24
  407. package/dist/runtime/multibase/base.js +0 -32
  408. package/dist/runtime/multibase/constants.js +0 -172
  409. package/dist/runtime/multibase/index.js +0 -57
  410. package/dist/runtime/multibase/rfc4648.js +0 -61
  411. package/dist/runtime/multibase/util.js +0 -21
  412. package/dist/sig/http.d.ts +0 -143
  413. package/dist/sig/key.d.ts +0 -125
  414. package/dist/sig/proof.d.ts +0 -134
  415. package/dist/testing/fixtures/example.com/person.js +0 -29
  416. package/dist/testing/fixtures/example.com/person2.js +0 -48
  417. package/dist/vocab/constants.d.ts +0 -24
  418. package/dist/vocab/constants.js +0 -17
  419. package/dist/vocab/type.d.ts +0 -107
  420. package/dist/webfinger/handler.js +0 -140
  421. package/dist/webfinger/lookup.d.ts +0 -47
  422. /package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_object_match.js → compat-Bb5myD13.js} +0 -0
  423. /package/dist/{testing/fixtures → fixtures}/activitypub.academy/users/brauca_darradiul.json +0 -0
  424. /package/dist/{testing/fixtures → fixtures}/example.com/announce.json +0 -0
  425. /package/dist/{testing/fixtures → fixtures}/example.com/collection.json +0 -0
  426. /package/dist/{testing/fixtures → fixtures}/example.com/create.json +0 -0
  427. /package/dist/{testing/fixtures → fixtures}/example.com/cross-origin-actor.json +0 -0
  428. /package/dist/{testing/fixtures → fixtures}/example.com/hong-gildong.json +0 -0
  429. /package/dist/{testing/fixtures → fixtures}/example.com/invite.json +0 -0
  430. /package/dist/{testing/fixtures → fixtures}/example.com/key.json +0 -0
  431. /package/dist/{testing/fixtures → fixtures}/example.com/key2.json +0 -0
  432. /package/dist/{testing/fixtures → fixtures}/example.com/object.json +0 -0
  433. /package/dist/{testing/fixtures → fixtures}/example.com/orderedcollectionpage.json +0 -0
  434. /package/dist/{testing/fixtures → fixtures}/example.com/paged/a.json +0 -0
  435. /package/dist/{testing/fixtures → fixtures}/example.com/paged/b.json +0 -0
  436. /package/dist/{testing/fixtures → fixtures}/example.com/paged-collection.json +0 -0
  437. /package/dist/{testing/fixtures → fixtures}/example.com/person.json +0 -0
  438. /package/dist/{testing/fixtures → fixtures}/example.com/person2.json +0 -0
  439. /package/dist/{testing/fixtures → fixtures}/example.com/test.json +0 -0
  440. /package/dist/{testing/fixtures → fixtures}/example.com/users/handle.json +0 -0
  441. /package/dist/{testing/fixtures → fixtures}/example.com/wrong-type.json +0 -0
  442. /package/dist/{testing/fixtures → fixtures}/remote.domain/users/bob.json +0 -0
  443. /package/dist/{testing/fixtures → fixtures}/server.example/users/alice.json +0 -0
  444. /package/dist/{testing/fixtures → fixtures}/w3id.org/identity/v1.json +0 -0
  445. /package/dist/{testing/fixtures → fixtures}/w3id.org/security/data-integrity/v1.json +0 -0
  446. /package/dist/{testing/fixtures → fixtures}/w3id.org/security/multikey/v1.json +0 -0
  447. /package/dist/{testing/fixtures → fixtures}/w3id.org/security/v1.json +0 -0
  448. /package/dist/{testing/fixtures → fixtures}/wizard.casa/users/hongminhee.json +0 -0
  449. /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/activitystreams.json +0 -0
  450. /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/did/v1.json +0 -0
  451. /package/dist/{federation/kv.d.ts → kv-BmsWxOQ2.d.ts} +0 -0
  452. /package/dist/{federation/mq.d.ts → mq-Bue016Tz.d.ts} +0 -0
  453. /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/basename.js → nodeinfo-CyEbLjHs.js} +0 -0
  454. /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/common.js → runtime-BSkOVUWM.js} +0 -0
  455. /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/constants.js → sig-BXJO--F9.js} +0 -0
  456. /package/dist/{codegen → vocab}/schema.yaml +0 -0
  457. /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/dirname.js → webfinger-C3GIyXIg.js} +0 -0
@@ -1,24 +1,2449 @@
1
1
 
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
4
5
 
5
- import { decode } from "../runtime/multibase/index.js";
6
- import { LanguageString } from "../runtime/langstr.js";
7
- import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Source, vocab_exports } from "./vocab.js";
8
- import { assertEquals } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js";
9
- import { assertInstanceOf } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js";
10
- import { test } from "../testing/mod.js";
11
- import { assertFalse } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js";
12
- import { assertNotEquals } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js";
13
- import { assertRejects } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js";
14
- import { assertThrows } from "../node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js";
15
- import { mockDocumentLoader } from "../testing/docloader.js";
16
- import { ed25519PublicKey, rsaPublicKey1 } from "../testing/keys.js";
17
- import { loadSchemaFiles } from "../codegen/schema.js";
18
- import { areAllScalarTypes } from "../codegen/type.js";
19
- import { parseLanguageTag } from "@phensley/language-tag";
6
+ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
+ import "../assert-Dv75vaGI.js";
8
+ import { assertInstanceOf } from "../assert_instance_of--9UCVKsi.js";
9
+ import "../docloader-BcMxZ9JH.js";
10
+ import "../url-kTAI6_KP.js";
11
+ import { decode } from "../multibase-DeCHcK8L.js";
12
+ import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Source, vocab_exports } from "../vocab-BxrrllKY.js";
13
+ import { LanguageString } from "../langstr-DbWheeIS.js";
14
+ import { test } from "../testing-jcGLO9Lp.js";
15
+ import "../std__assert-CaBUULmX.js";
16
+ import { assertFalse, assertRejects } from "../assert_rejects-FOHCtlD2.js";
17
+ import "../assert_is_error-D162gXcM.js";
18
+ import { assertNotEquals } from "../assert_not_equals-Cyf5m9Ke.js";
19
+ import { assertThrows } from "../assert_throws-CRfQJvVx.js";
20
+ import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
21
+ import { ed25519PublicKey, rsaPublicKey1 } from "../keys-D7lJqunm.js";
20
22
  import { pascalCase } from "@es-toolkit/es-toolkit";
23
+ import { parseLanguageTag } from "@phensley/language-tag";
24
+ import { Validator } from "@cfworker/json-schema";
25
+ import { readFile, readdir } from "node:fs/promises";
26
+ import { join } from "node:path";
27
+
28
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_os.js
29
+ const isWindows = globalThis.Deno?.build.os === "windows" || globalThis.navigator?.platform?.startsWith("Win") || globalThis.process?.platform?.startsWith("win") || false;
30
+
31
+ //#endregion
32
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/assert_path.js
33
+ function assertPath(path) {
34
+ if (typeof path !== "string") throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
35
+ }
36
+
37
+ //#endregion
38
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/strip_trailing_separators.js
39
+ function stripTrailingSeparators(segment, isSep) {
40
+ if (segment.length <= 1) return segment;
41
+ let end = segment.length;
42
+ for (let i = segment.length - 1; i > 0; i--) if (isSep(segment.charCodeAt(i))) end = i;
43
+ else break;
44
+ return segment.slice(0, end);
45
+ }
46
+
47
+ //#endregion
48
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/constants.js
49
+ const CHAR_DOT = 46;
50
+ const CHAR_FORWARD_SLASH = 47;
51
+
52
+ //#endregion
53
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/posix/_util.js
54
+ function isPosixPathSeparator(code) {
55
+ return code === CHAR_FORWARD_SLASH;
56
+ }
57
+
58
+ //#endregion
59
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/dirname.js
60
+ function assertArg$2(path) {
61
+ assertPath(path);
62
+ if (path.length === 0) return ".";
63
+ }
64
+
65
+ //#endregion
66
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/posix/dirname.js
67
+ /**
68
+ * Return the directory path of a `path`.
69
+ *
70
+ * @example Usage
71
+ * ```ts
72
+ * import { dirname } from "@std/path/posix/dirname";
73
+ * import { assertEquals } from "@std/assert";
74
+ *
75
+ * assertEquals(dirname("/home/user/Documents/"), "/home/user");
76
+ * assertEquals(dirname("/home/user/Documents/image.png"), "/home/user/Documents");
77
+ * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path");
78
+ * ```
79
+ *
80
+ * @example Working with URLs
81
+ *
82
+ * ```ts
83
+ * import { dirname } from "@std/path/posix/dirname";
84
+ * import { assertEquals } from "@std/assert";
85
+ *
86
+ * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path");
87
+ * assertEquals(dirname("https://deno.land/std/path/mod.ts?a=b"), "https://deno.land/std/path");
88
+ * assertEquals(dirname("https://deno.land/std/path/mod.ts#header"), "https://deno.land/std/path");
89
+ * ```
90
+ *
91
+ * Note: If you are working with file URLs,
92
+ * use the new version of `dirname` from `@std/path/posix/unstable-dirname`.
93
+ *
94
+ * @param path The path to get the directory from.
95
+ * @returns The directory path.
96
+ */ function dirname$1(path) {
97
+ assertArg$2(path);
98
+ let end = -1;
99
+ let matchedNonSeparator = false;
100
+ for (let i = path.length - 1; i >= 1; --i) if (isPosixPathSeparator(path.charCodeAt(i))) {
101
+ if (matchedNonSeparator) {
102
+ end = i;
103
+ break;
104
+ }
105
+ } else matchedNonSeparator = true;
106
+ if (end === -1) return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : ".";
107
+ return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
108
+ }
109
+
110
+ //#endregion
111
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/from_file_url.js
112
+ function assertArg$1(url) {
113
+ url = url instanceof URL ? url : new URL(url);
114
+ if (url.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
115
+ return url;
116
+ }
117
+
118
+ //#endregion
119
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/posix/from_file_url.js
120
+ /**
121
+ * Converts a file URL to a path string.
122
+ *
123
+ * @example Usage
124
+ * ```ts
125
+ * import { fromFileUrl } from "@std/path/posix/from-file-url";
126
+ * import { assertEquals } from "@std/assert";
127
+ *
128
+ * assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo");
129
+ * ```
130
+ *
131
+ * @param url The file URL to convert.
132
+ * @returns The path string.
133
+ */ function fromFileUrl$2(url) {
134
+ url = assertArg$1(url);
135
+ return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
136
+ }
137
+
138
+ //#endregion
139
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/windows/from_file_url.js
140
+ /**
141
+ * Converts a file URL to a path string.
142
+ *
143
+ * @example Usage
144
+ * ```ts
145
+ * import { fromFileUrl } from "@std/path/windows/from-file-url";
146
+ * import { assertEquals } from "@std/assert";
147
+ *
148
+ * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
149
+ * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo");
150
+ * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo");
151
+ * ```
152
+ *
153
+ * @param url The file URL to convert.
154
+ * @returns The path string.
155
+ */ function fromFileUrl$1(url) {
156
+ url = assertArg$1(url);
157
+ let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
158
+ if (url.hostname !== "") path = `\\\\${url.hostname}${path}`;
159
+ return path;
160
+ }
161
+
162
+ //#endregion
163
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/from_file_url.js
164
+ /**
165
+ * Converts a file URL to a path string.
166
+ *
167
+ * @example Usage
168
+ * ```ts
169
+ * import { fromFileUrl } from "@std/path/from-file-url";
170
+ * import { assertEquals } from "@std/assert";
171
+ *
172
+ * if (Deno.build.os === "windows") {
173
+ * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
174
+ * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo");
175
+ * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo");
176
+ * } else {
177
+ * assertEquals(fromFileUrl("file:///home/foo"), "/home/foo");
178
+ * }
179
+ * ```
180
+ *
181
+ * @param url The file URL to convert to a path.
182
+ * @returns The path string.
183
+ */ function fromFileUrl(url) {
184
+ return isWindows ? fromFileUrl$1(url) : fromFileUrl$2(url);
185
+ }
186
+
187
+ //#endregion
188
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize.js
189
+ function assertArg(path) {
190
+ assertPath(path);
191
+ if (path.length === 0) return ".";
192
+ }
193
+
194
+ //#endregion
195
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize_string.js
196
+ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
197
+ let res = "";
198
+ let lastSegmentLength = 0;
199
+ let lastSlash = -1;
200
+ let dots = 0;
201
+ let code;
202
+ for (let i = 0; i <= path.length; ++i) {
203
+ if (i < path.length) code = path.charCodeAt(i);
204
+ else if (isPathSeparator(code)) break;
205
+ else code = CHAR_FORWARD_SLASH;
206
+ if (isPathSeparator(code)) {
207
+ if (lastSlash === i - 1 || dots === 1) {} else if (lastSlash !== i - 1 && dots === 2) {
208
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {
209
+ if (res.length > 2) {
210
+ const lastSlashIndex = res.lastIndexOf(separator);
211
+ if (lastSlashIndex === -1) {
212
+ res = "";
213
+ lastSegmentLength = 0;
214
+ } else {
215
+ res = res.slice(0, lastSlashIndex);
216
+ lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
217
+ }
218
+ lastSlash = i;
219
+ dots = 0;
220
+ continue;
221
+ } else if (res.length === 2 || res.length === 1) {
222
+ res = "";
223
+ lastSegmentLength = 0;
224
+ lastSlash = i;
225
+ dots = 0;
226
+ continue;
227
+ }
228
+ }
229
+ if (allowAboveRoot) {
230
+ if (res.length > 0) res += `${separator}..`;
231
+ else res = "..";
232
+ lastSegmentLength = 2;
233
+ }
234
+ } else {
235
+ if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);
236
+ else res = path.slice(lastSlash + 1, i);
237
+ lastSegmentLength = i - lastSlash - 1;
238
+ }
239
+ lastSlash = i;
240
+ dots = 0;
241
+ } else if (code === CHAR_DOT && dots !== -1) ++dots;
242
+ else dots = -1;
243
+ }
244
+ return res;
245
+ }
246
+
247
+ //#endregion
248
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/posix/normalize.js
249
+ /**
250
+ * Normalize the `path`, resolving `'..'` and `'.'` segments.
251
+ * Note that resolving these segments does not necessarily mean that all will be eliminated.
252
+ * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
253
+ *
254
+ * @example Usage
255
+ * ```ts
256
+ * import { normalize } from "@std/path/posix/normalize";
257
+ * import { assertEquals } from "@std/assert";
258
+ *
259
+ * const path = normalize("/foo/bar//baz/asdf/quux/..");
260
+ * assertEquals(path, "/foo/bar/baz/asdf");
261
+ * ```
262
+ *
263
+ * @example Working with URLs
264
+ *
265
+ * Note: This function will remove the double slashes from a URL's scheme.
266
+ * Hence, do not pass a full URL to this function. Instead, pass the pathname of
267
+ * the URL.
268
+ *
269
+ * ```ts
270
+ * import { normalize } from "@std/path/posix/normalize";
271
+ * import { assertEquals } from "@std/assert";
272
+ *
273
+ * const url = new URL("https://deno.land");
274
+ * url.pathname = normalize("//std//assert//.//mod.ts");
275
+ * assertEquals(url.href, "https://deno.land/std/assert/mod.ts");
276
+ *
277
+ * url.pathname = normalize("std/assert/../async/retry.ts");
278
+ * assertEquals(url.href, "https://deno.land/std/async/retry.ts");
279
+ * ```
280
+ *
281
+ * Note: If you are working with file URLs,
282
+ * use the new version of `normalize` from `@std/path/posix/unstable-normalize`.
283
+ *
284
+ * @param path The path to normalize.
285
+ * @returns The normalized path.
286
+ */ function normalize(path) {
287
+ assertArg(path);
288
+ const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
289
+ const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));
290
+ path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator);
291
+ if (path.length === 0 && !isAbsolute) path = ".";
292
+ if (path.length > 0 && trailingSeparator) path += "/";
293
+ if (isAbsolute) return `/${path}`;
294
+ return path;
295
+ }
296
+
297
+ //#endregion
298
+ //#region node_modules/.pnpm/@jsr+std__path@1.0.9/node_modules/@jsr/std__path/posix/join.js
299
+ /**
300
+ * Join all given a sequence of `paths`,then normalizes the resulting path.
301
+ *
302
+ * @example Usage
303
+ * ```ts
304
+ * import { join } from "@std/path/posix/join";
305
+ * import { assertEquals } from "@std/assert";
306
+ *
307
+ * const path = join("/foo", "bar", "baz/asdf", "quux", "..");
308
+ * assertEquals(path, "/foo/bar/baz/asdf");
309
+ * ```
310
+ *
311
+ * @example Working with URLs
312
+ * ```ts
313
+ * import { join } from "@std/path/posix/join";
314
+ * import { assertEquals } from "@std/assert";
315
+ *
316
+ * const url = new URL("https://deno.land");
317
+ * url.pathname = join("std", "path", "mod.ts");
318
+ * assertEquals(url.href, "https://deno.land/std/path/mod.ts");
319
+ *
320
+ * url.pathname = join("//std", "path/", "/mod.ts");
321
+ * assertEquals(url.href, "https://deno.land/std/path/mod.ts");
322
+ * ```
323
+ *
324
+ * Note: If you are working with file URLs,
325
+ * use the new version of `join` from `@std/path/posix/unstable-join`.
326
+ *
327
+ * @param paths The paths to join.
328
+ * @returns The joined path.
329
+ */ function join$2(...paths) {
330
+ if (paths.length === 0) return ".";
331
+ paths.forEach((path) => assertPath(path));
332
+ const joined = paths.filter((path) => path.length > 0).join("/");
333
+ return joined === "" ? "." : normalize(joined);
334
+ }
335
+
336
+ //#endregion
337
+ //#region node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js
338
+ /**
339
+ * Strips any hash (eg. `#header`) or search parameters (eg. `?foo=bar`) from the provided URL.
340
+ *
341
+ * (Mutates the original url provided)
342
+ * @param url to be stripped.
343
+ */ function strip(url) {
344
+ url.hash = "";
345
+ url.search = "";
346
+ }
347
+
348
+ //#endregion
349
+ //#region node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js
350
+ /**
351
+ * Returns the directory path URL of a URL or URL string.
352
+ *
353
+ * The directory path is the portion of a URL up to but excluding the final path
354
+ * segment. URL queries and hashes are ignored.
355
+ *
356
+ * @param url URL to extract the directory from.
357
+ * @returns The directory path URL of the URL.
358
+ *
359
+ * @example Usage
360
+ * ```ts
361
+ * import { dirname } from "@std/url/dirname";
362
+ * import { assertEquals } from "@std/assert";
363
+ *
364
+ * assertEquals(dirname("https://deno.land/std/path/mod.ts"), new URL("https://deno.land/std/path"));
365
+ * assertEquals(dirname(new URL("https://deno.land/std/path/mod.ts")), new URL("https://deno.land/std/path"));
366
+ * ```
367
+ *
368
+ * @deprecated Use
369
+ * {@linkcode https://jsr.io/@std/path/doc/posix/~/dirname | @std/path/posix/dirname}
370
+ * instead (examples included). `@std/url` will be removed in the future.
371
+ */ function dirname(url) {
372
+ url = new URL(url);
373
+ strip(url);
374
+ url.pathname = dirname$1(url.pathname);
375
+ return url;
376
+ }
377
+
378
+ //#endregion
379
+ //#region node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js
380
+ /**
381
+ * Joins a base URL or URL string, and a sequence of path segments together,
382
+ * then normalizes the resulting URL.
383
+ *
384
+ * @param url Base URL to be joined with the paths and normalized.
385
+ * @param paths Array of path segments to be joined to the base URL.
386
+ * @returns A complete URL containing the base URL joined with the paths.
387
+ *
388
+ * @example Usage
389
+ *
390
+ * ```ts
391
+ * import { join } from "@std/url/join";
392
+ * import { assertEquals } from "@std/assert";
393
+ *
394
+ * assertEquals(join("https://deno.land/", "std", "path", "mod.ts").href, "https://deno.land/std/path/mod.ts");
395
+ * assertEquals(join("https://deno.land", "//std", "path/", "/mod.ts").href, "https://deno.land/std/path/mod.ts");
396
+ * ```
397
+ *
398
+ * @deprecated Use
399
+ * {@linkcode https://jsr.io/@std/path/doc/posix/~/join | @std/path/posix/join}
400
+ * instead (examples included). `@std/url` will be removed in the future.
401
+ */ function join$1(url, ...paths) {
402
+ url = new URL(url);
403
+ url.pathname = join$2(url.pathname, ...paths);
404
+ return url;
405
+ }
406
+
407
+ //#endregion
408
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_chars.js
409
+ const TAB = 9;
410
+ const LINE_FEED = 10;
411
+ const CARRIAGE_RETURN = 13;
412
+ const SPACE = 32;
413
+ const EXCLAMATION = 33;
414
+ const DOUBLE_QUOTE = 34;
415
+ const SHARP = 35;
416
+ const PERCENT = 37;
417
+ const AMPERSAND = 38;
418
+ const SINGLE_QUOTE = 39;
419
+ const ASTERISK = 42;
420
+ const PLUS = 43;
421
+ const COMMA = 44;
422
+ const MINUS = 45;
423
+ const DOT = 46;
424
+ const COLON = 58;
425
+ const SMALLER_THAN = 60;
426
+ const GREATER_THAN = 62;
427
+ const QUESTION = 63;
428
+ const COMMERCIAL_AT = 64;
429
+ const LEFT_SQUARE_BRACKET = 91;
430
+ const BACKSLASH = 92;
431
+ const RIGHT_SQUARE_BRACKET = 93;
432
+ const GRAVE_ACCENT = 96;
433
+ const LEFT_CURLY_BRACKET = 123;
434
+ const VERTICAL_LINE = 124;
435
+ const RIGHT_CURLY_BRACKET = 125;
436
+ function isEOL(c) {
437
+ return c === LINE_FEED || c === CARRIAGE_RETURN;
438
+ }
439
+ function isWhiteSpace(c) {
440
+ return c === TAB || c === SPACE;
441
+ }
442
+ function isWhiteSpaceOrEOL(c) {
443
+ return isWhiteSpace(c) || isEOL(c);
444
+ }
445
+ function isFlowIndicator(c) {
446
+ return c === COMMA || c === LEFT_SQUARE_BRACKET || c === RIGHT_SQUARE_BRACKET || c === LEFT_CURLY_BRACKET || c === RIGHT_CURLY_BRACKET;
447
+ }
448
+
449
+ //#endregion
450
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/binary.js
451
+ const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
452
+ function resolveYamlBinary(data) {
453
+ if (data === null) return false;
454
+ let code;
455
+ let bitlen = 0;
456
+ const max = data.length;
457
+ const map$1 = BASE64_MAP;
458
+ for (let idx = 0; idx < max; idx++) {
459
+ code = map$1.indexOf(data.charAt(idx));
460
+ if (code > 64) continue;
461
+ if (code < 0) return false;
462
+ bitlen += 6;
463
+ }
464
+ return bitlen % 8 === 0;
465
+ }
466
+ function constructYamlBinary(data) {
467
+ const input = data.replace(/[\r\n=]/g, "");
468
+ const max = input.length;
469
+ const map$1 = BASE64_MAP;
470
+ const result = [];
471
+ let bits = 0;
472
+ for (let idx = 0; idx < max; idx++) {
473
+ if (idx % 4 === 0 && idx) {
474
+ result.push(bits >> 16 & 255);
475
+ result.push(bits >> 8 & 255);
476
+ result.push(bits & 255);
477
+ }
478
+ bits = bits << 6 | map$1.indexOf(input.charAt(idx));
479
+ }
480
+ const tailbits = max % 4 * 6;
481
+ if (tailbits === 0) {
482
+ result.push(bits >> 16 & 255);
483
+ result.push(bits >> 8 & 255);
484
+ result.push(bits & 255);
485
+ } else if (tailbits === 18) {
486
+ result.push(bits >> 10 & 255);
487
+ result.push(bits >> 2 & 255);
488
+ } else if (tailbits === 12) result.push(bits >> 4 & 255);
489
+ return new Uint8Array(result);
490
+ }
491
+ function representYamlBinary(object) {
492
+ const max = object.length;
493
+ const map$1 = BASE64_MAP;
494
+ let result = "";
495
+ let bits = 0;
496
+ for (let idx = 0; idx < max; idx++) {
497
+ if (idx % 3 === 0 && idx) {
498
+ result += map$1[bits >> 18 & 63];
499
+ result += map$1[bits >> 12 & 63];
500
+ result += map$1[bits >> 6 & 63];
501
+ result += map$1[bits & 63];
502
+ }
503
+ bits = (bits << 8) + object[idx];
504
+ }
505
+ const tail = max % 3;
506
+ if (tail === 0) {
507
+ result += map$1[bits >> 18 & 63];
508
+ result += map$1[bits >> 12 & 63];
509
+ result += map$1[bits >> 6 & 63];
510
+ result += map$1[bits & 63];
511
+ } else if (tail === 2) {
512
+ result += map$1[bits >> 10 & 63];
513
+ result += map$1[bits >> 4 & 63];
514
+ result += map$1[bits << 2 & 63];
515
+ result += map$1[64];
516
+ } else if (tail === 1) {
517
+ result += map$1[bits >> 2 & 63];
518
+ result += map$1[bits << 4 & 63];
519
+ result += map$1[64];
520
+ result += map$1[64];
521
+ }
522
+ return result;
523
+ }
524
+ function isBinary(obj) {
525
+ return obj instanceof Uint8Array;
526
+ }
527
+ const binary = {
528
+ tag: "tag:yaml.org,2002:binary",
529
+ construct: constructYamlBinary,
530
+ kind: "scalar",
531
+ predicate: isBinary,
532
+ represent: representYamlBinary,
533
+ resolve: resolveYamlBinary
534
+ };
535
+
536
+ //#endregion
537
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/bool.js
538
+ const YAML_TRUE_BOOLEANS = [
539
+ "true",
540
+ "True",
541
+ "TRUE"
542
+ ];
543
+ const YAML_FALSE_BOOLEANS = [
544
+ "false",
545
+ "False",
546
+ "FALSE"
547
+ ];
548
+ const YAML_BOOLEANS = [...YAML_TRUE_BOOLEANS, ...YAML_FALSE_BOOLEANS];
549
+ const bool = {
550
+ tag: "tag:yaml.org,2002:bool",
551
+ kind: "scalar",
552
+ defaultStyle: "lowercase",
553
+ predicate: (value) => typeof value === "boolean" || value instanceof Boolean,
554
+ construct: (data) => YAML_TRUE_BOOLEANS.includes(data),
555
+ resolve: (data) => YAML_BOOLEANS.includes(data),
556
+ represent: {
557
+ lowercase: (object) => {
558
+ const value = object instanceof Boolean ? object.valueOf() : object;
559
+ return value ? "true" : "false";
560
+ },
561
+ uppercase: (object) => {
562
+ const value = object instanceof Boolean ? object.valueOf() : object;
563
+ return value ? "TRUE" : "FALSE";
564
+ },
565
+ camelcase: (object) => {
566
+ const value = object instanceof Boolean ? object.valueOf() : object;
567
+ return value ? "True" : "False";
568
+ }
569
+ }
570
+ };
571
+
572
+ //#endregion
573
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_utils.js
574
+ function isObject(value) {
575
+ return value !== null && typeof value === "object";
576
+ }
577
+ function isNegativeZero(i) {
578
+ return i === 0 && Number.NEGATIVE_INFINITY === 1 / i;
579
+ }
580
+ function isPlainObject(object) {
581
+ return Object.prototype.toString.call(object) === "[object Object]";
582
+ }
583
+
584
+ //#endregion
585
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/float.js
586
+ const YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
587
+ function resolveYamlFloat(data) {
588
+ if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") return false;
589
+ return true;
590
+ }
591
+ function constructYamlFloat(data) {
592
+ let value = data.replace(/_/g, "").toLowerCase();
593
+ const sign = value[0] === "-" ? -1 : 1;
594
+ if (value[0] && "+-".includes(value[0])) value = value.slice(1);
595
+ if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
596
+ if (value === ".nan") return NaN;
597
+ return sign * parseFloat(value);
598
+ }
599
+ const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
600
+ function representYamlFloat(object, style) {
601
+ const value = object instanceof Number ? object.valueOf() : object;
602
+ if (isNaN(value)) switch (style) {
603
+ case "lowercase": return ".nan";
604
+ case "uppercase": return ".NAN";
605
+ case "camelcase": return ".NaN";
606
+ }
607
+ else if (Number.POSITIVE_INFINITY === value) switch (style) {
608
+ case "lowercase": return ".inf";
609
+ case "uppercase": return ".INF";
610
+ case "camelcase": return ".Inf";
611
+ }
612
+ else if (Number.NEGATIVE_INFINITY === value) switch (style) {
613
+ case "lowercase": return "-.inf";
614
+ case "uppercase": return "-.INF";
615
+ case "camelcase": return "-.Inf";
616
+ }
617
+ else if (isNegativeZero(value)) return "-0.0";
618
+ const res = value.toString(10);
619
+ return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
620
+ }
621
+ function isFloat(object) {
622
+ if (object instanceof Number) object = object.valueOf();
623
+ return typeof object === "number" && (object % 1 !== 0 || isNegativeZero(object));
624
+ }
625
+ const float = {
626
+ tag: "tag:yaml.org,2002:float",
627
+ construct: constructYamlFloat,
628
+ defaultStyle: "lowercase",
629
+ kind: "scalar",
630
+ predicate: isFloat,
631
+ represent: representYamlFloat,
632
+ resolve: resolveYamlFloat
633
+ };
634
+
635
+ //#endregion
636
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/int.js
637
+ function isCharCodeInRange(c, lower, upper) {
638
+ return lower <= c && c <= upper;
639
+ }
640
+ function isHexCode(c) {
641
+ return isCharCodeInRange(c, 48, 57) || isCharCodeInRange(c, 65, 70) || isCharCodeInRange(c, 97, 102);
642
+ }
643
+ function isOctCode(c) {
644
+ return isCharCodeInRange(c, 48, 55);
645
+ }
646
+ function isDecCode(c) {
647
+ return isCharCodeInRange(c, 48, 57);
648
+ }
649
+ function resolveYamlInteger(data) {
650
+ const max = data.length;
651
+ let index = 0;
652
+ let hasDigits = false;
653
+ if (!max) return false;
654
+ let ch = data[index];
655
+ if (ch === "-" || ch === "+") ch = data[++index];
656
+ if (ch === "0") {
657
+ if (index + 1 === max) return true;
658
+ ch = data[++index];
659
+ if (ch === "b") {
660
+ index++;
661
+ for (; index < max; index++) {
662
+ ch = data[index];
663
+ if (ch === "_") continue;
664
+ if (ch !== "0" && ch !== "1") return false;
665
+ hasDigits = true;
666
+ }
667
+ return hasDigits && ch !== "_";
668
+ }
669
+ if (ch === "x") {
670
+ index++;
671
+ for (; index < max; index++) {
672
+ ch = data[index];
673
+ if (ch === "_") continue;
674
+ if (!isHexCode(data.charCodeAt(index))) return false;
675
+ hasDigits = true;
676
+ }
677
+ return hasDigits && ch !== "_";
678
+ }
679
+ for (; index < max; index++) {
680
+ ch = data[index];
681
+ if (ch === "_") continue;
682
+ if (!isOctCode(data.charCodeAt(index))) return false;
683
+ hasDigits = true;
684
+ }
685
+ return hasDigits && ch !== "_";
686
+ }
687
+ if (ch === "_") return false;
688
+ for (; index < max; index++) {
689
+ ch = data[index];
690
+ if (ch === "_") continue;
691
+ if (!isDecCode(data.charCodeAt(index))) return false;
692
+ hasDigits = true;
693
+ }
694
+ if (!hasDigits || ch === "_") return false;
695
+ return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
696
+ }
697
+ function constructYamlInteger(data) {
698
+ let value = data;
699
+ if (value.includes("_")) value = value.replace(/_/g, "");
700
+ let sign = 1;
701
+ let ch = value[0];
702
+ if (ch === "-" || ch === "+") {
703
+ if (ch === "-") sign = -1;
704
+ value = value.slice(1);
705
+ ch = value[0];
706
+ }
707
+ if (value === "0") return 0;
708
+ if (ch === "0") {
709
+ if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
710
+ if (value[1] === "x") return sign * parseInt(value, 16);
711
+ return sign * parseInt(value, 8);
712
+ }
713
+ return sign * parseInt(value, 10);
714
+ }
715
+ function isInteger(object) {
716
+ if (object instanceof Number) object = object.valueOf();
717
+ return typeof object === "number" && object % 1 === 0 && !isNegativeZero(object);
718
+ }
719
+ const int = {
720
+ tag: "tag:yaml.org,2002:int",
721
+ construct: constructYamlInteger,
722
+ defaultStyle: "decimal",
723
+ kind: "scalar",
724
+ predicate: isInteger,
725
+ represent: {
726
+ binary(object) {
727
+ const value = object instanceof Number ? object.valueOf() : object;
728
+ return value >= 0 ? `0b${value.toString(2)}` : `-0b${value.toString(2).slice(1)}`;
729
+ },
730
+ octal(object) {
731
+ const value = object instanceof Number ? object.valueOf() : object;
732
+ return value >= 0 ? `0${value.toString(8)}` : `-0${value.toString(8).slice(1)}`;
733
+ },
734
+ decimal(object) {
735
+ const value = object instanceof Number ? object.valueOf() : object;
736
+ return value.toString(10);
737
+ },
738
+ hexadecimal(object) {
739
+ const value = object instanceof Number ? object.valueOf() : object;
740
+ return value >= 0 ? `0x${value.toString(16).toUpperCase()}` : `-0x${value.toString(16).toUpperCase().slice(1)}`;
741
+ }
742
+ },
743
+ resolve: resolveYamlInteger
744
+ };
745
+
746
+ //#endregion
747
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/map.js
748
+ const map = {
749
+ tag: "tag:yaml.org,2002:map",
750
+ resolve() {
751
+ return true;
752
+ },
753
+ construct(data) {
754
+ return data !== null ? data : {};
755
+ },
756
+ kind: "mapping"
757
+ };
758
+
759
+ //#endregion
760
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/merge.js
761
+ const merge = {
762
+ tag: "tag:yaml.org,2002:merge",
763
+ kind: "scalar",
764
+ resolve: (data) => data === "<<" || data === null,
765
+ construct: (data) => data
766
+ };
767
+
768
+ //#endregion
769
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/nil.js
770
+ const nil = {
771
+ tag: "tag:yaml.org,2002:null",
772
+ kind: "scalar",
773
+ defaultStyle: "lowercase",
774
+ predicate: (object) => object === null,
775
+ construct: () => null,
776
+ resolve: (data) => {
777
+ return data === "~" || data === "null" || data === "Null" || data === "NULL";
778
+ },
779
+ represent: {
780
+ lowercase: () => "null",
781
+ uppercase: () => "NULL",
782
+ camelcase: () => "Null"
783
+ }
784
+ };
785
+
786
+ //#endregion
787
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/omap.js
788
+ function resolveYamlOmap(data) {
789
+ const objectKeys = new Set();
790
+ for (const object of data) {
791
+ if (!isPlainObject(object)) return false;
792
+ const keys = Object.keys(object);
793
+ if (keys.length !== 1) return false;
794
+ for (const key of keys) {
795
+ if (objectKeys.has(key)) return false;
796
+ objectKeys.add(key);
797
+ }
798
+ }
799
+ return true;
800
+ }
801
+ const omap = {
802
+ tag: "tag:yaml.org,2002:omap",
803
+ kind: "sequence",
804
+ resolve: resolveYamlOmap,
805
+ construct(data) {
806
+ return data;
807
+ }
808
+ };
809
+
810
+ //#endregion
811
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/pairs.js
812
+ function resolveYamlPairs(data) {
813
+ if (data === null) return true;
814
+ return data.every((it) => isPlainObject(it) && Object.keys(it).length === 1);
815
+ }
816
+ const pairs = {
817
+ tag: "tag:yaml.org,2002:pairs",
818
+ construct(data) {
819
+ return data?.flatMap(Object.entries) ?? [];
820
+ },
821
+ kind: "sequence",
822
+ resolve: resolveYamlPairs
823
+ };
824
+
825
+ //#endregion
826
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/regexp.js
827
+ const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
828
+ const regexp = {
829
+ tag: "tag:yaml.org,2002:js/regexp",
830
+ kind: "scalar",
831
+ resolve(data) {
832
+ if (data === null || !data.length) return false;
833
+ if (data.charAt(0) === "/") {
834
+ const groups = data.match(REGEXP)?.groups;
835
+ if (!groups) return false;
836
+ const modifiers = groups.modifiers ?? "";
837
+ if (new Set(modifiers).size < modifiers.length) return false;
838
+ }
839
+ return true;
840
+ },
841
+ construct(data) {
842
+ const { regexp: regexp$1 = data, modifiers = "" } = data.match(REGEXP)?.groups ?? {};
843
+ return new RegExp(regexp$1, modifiers);
844
+ },
845
+ predicate: (object) => object instanceof RegExp,
846
+ represent: (object) => object.toString()
847
+ };
848
+
849
+ //#endregion
850
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/seq.js
851
+ const seq = {
852
+ tag: "tag:yaml.org,2002:seq",
853
+ kind: "sequence",
854
+ resolve: () => true,
855
+ construct: (data) => data !== null ? data : []
856
+ };
857
+
858
+ //#endregion
859
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/set.js
860
+ const set = {
861
+ tag: "tag:yaml.org,2002:set",
862
+ kind: "mapping",
863
+ construct: (data) => data !== null ? data : {},
864
+ resolve: (data) => {
865
+ if (data === null) return true;
866
+ return Object.values(data).every((it) => it === null);
867
+ }
868
+ };
869
+
870
+ //#endregion
871
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/str.js
872
+ const str = {
873
+ tag: "tag:yaml.org,2002:str",
874
+ kind: "scalar",
875
+ resolve: () => true,
876
+ construct: (data) => data !== null ? data : ""
877
+ };
878
+
879
+ //#endregion
880
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/timestamp.js
881
+ const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
882
+ const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
883
+ function resolveYamlTimestamp(data) {
884
+ if (data === null) return false;
885
+ if (YAML_DATE_REGEXP.exec(data) !== null) return true;
886
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
887
+ return false;
888
+ }
889
+ function constructYamlTimestamp(data) {
890
+ let match = YAML_DATE_REGEXP.exec(data);
891
+ if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
892
+ if (match === null) throw new Error("Cannot construct YAML timestamp: date resolve error");
893
+ const year = +match[1];
894
+ const month = +match[2] - 1;
895
+ const day = +match[3];
896
+ if (!match[4]) return new Date(Date.UTC(year, month, day));
897
+ const hour = +match[4];
898
+ const minute = +match[5];
899
+ const second = +match[6];
900
+ let fraction = 0;
901
+ if (match[7]) {
902
+ let partFraction = match[7].slice(0, 3);
903
+ while (partFraction.length < 3) partFraction += "0";
904
+ fraction = +partFraction;
905
+ }
906
+ let delta = null;
907
+ if (match[9] && match[10]) {
908
+ const tzHour = +match[10];
909
+ const tzMinute = +(match[11] || 0);
910
+ delta = (tzHour * 60 + tzMinute) * 6e4;
911
+ if (match[9] === "-") delta = -delta;
912
+ }
913
+ const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
914
+ if (delta) date.setTime(date.getTime() - delta);
915
+ return date;
916
+ }
917
+ function representYamlTimestamp(date) {
918
+ return date.toISOString();
919
+ }
920
+ const timestamp = {
921
+ tag: "tag:yaml.org,2002:timestamp",
922
+ construct: constructYamlTimestamp,
923
+ predicate(object) {
924
+ return object instanceof Date;
925
+ },
926
+ kind: "scalar",
927
+ represent: representYamlTimestamp,
928
+ resolve: resolveYamlTimestamp
929
+ };
930
+
931
+ //#endregion
932
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/undefined.js
933
+ const undefinedType = {
934
+ tag: "tag:yaml.org,2002:js/undefined",
935
+ kind: "scalar",
936
+ resolve() {
937
+ return true;
938
+ },
939
+ construct() {
940
+ return void 0;
941
+ },
942
+ predicate(object) {
943
+ return typeof object === "undefined";
944
+ },
945
+ represent() {
946
+ return "";
947
+ }
948
+ };
949
+
950
+ //#endregion
951
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_schema.js
952
+ function createTypeMap(implicitTypes, explicitTypes) {
953
+ const result = {
954
+ fallback: new Map(),
955
+ mapping: new Map(),
956
+ scalar: new Map(),
957
+ sequence: new Map()
958
+ };
959
+ const fallbackMap = result.fallback;
960
+ for (const type of [...implicitTypes, ...explicitTypes]) {
961
+ const map$1 = result[type.kind];
962
+ map$1.set(type.tag, type);
963
+ fallbackMap.set(type.tag, type);
964
+ }
965
+ return result;
966
+ }
967
+ function createSchema({ explicitTypes = [], implicitTypes = [], include }) {
968
+ if (include) {
969
+ implicitTypes.push(...include.implicitTypes);
970
+ explicitTypes.push(...include.explicitTypes);
971
+ }
972
+ const typeMap = createTypeMap(implicitTypes, explicitTypes);
973
+ return {
974
+ implicitTypes,
975
+ explicitTypes,
976
+ typeMap
977
+ };
978
+ }
979
+ /**
980
+ * Standard YAML's failsafe schema.
981
+ *
982
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2802346}
983
+ */ const FAILSAFE_SCHEMA = createSchema({ explicitTypes: [
984
+ str,
985
+ seq,
986
+ map
987
+ ] });
988
+ /**
989
+ * Standard YAML's JSON schema.
990
+ *
991
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2803231}
992
+ */ const JSON_SCHEMA = createSchema({
993
+ implicitTypes: [
994
+ nil,
995
+ bool,
996
+ int,
997
+ float
998
+ ],
999
+ include: FAILSAFE_SCHEMA
1000
+ });
1001
+ /**
1002
+ * Standard YAML's core schema.
1003
+ *
1004
+ * @see {@link http://www.yaml.org/spec/1.2/spec.html#id2804923}
1005
+ */ const CORE_SCHEMA = createSchema({ include: JSON_SCHEMA });
1006
+ /**
1007
+ * Default YAML schema. It is not described in the YAML specification.
1008
+ */ const DEFAULT_SCHEMA = createSchema({
1009
+ explicitTypes: [
1010
+ binary,
1011
+ omap,
1012
+ pairs,
1013
+ set
1014
+ ],
1015
+ implicitTypes: [timestamp, merge],
1016
+ include: CORE_SCHEMA
1017
+ });
1018
+ /***
1019
+ * Extends JS-YAML default schema with additional JavaScript types
1020
+ * It is not described in the YAML specification.
1021
+ * Functions are no longer supported for security reasons.
1022
+ *
1023
+ * @example
1024
+ * ```ts
1025
+ * import { parse } from "@std/yaml";
1026
+ *
1027
+ * const data = parse(
1028
+ * `
1029
+ * regexp:
1030
+ * simple: !!js/regexp foobar
1031
+ * modifiers: !!js/regexp /foobar/mi
1032
+ * undefined: !!js/undefined ~
1033
+ * `,
1034
+ * { schema: "extended" },
1035
+ * );
1036
+ * ```
1037
+ */ const EXTENDED_SCHEMA = createSchema({
1038
+ explicitTypes: [regexp, undefinedType],
1039
+ include: DEFAULT_SCHEMA
1040
+ });
1041
+ const SCHEMA_MAP = new Map([
1042
+ ["core", CORE_SCHEMA],
1043
+ ["default", DEFAULT_SCHEMA],
1044
+ ["failsafe", FAILSAFE_SCHEMA],
1045
+ ["json", JSON_SCHEMA],
1046
+ ["extended", EXTENDED_SCHEMA]
1047
+ ]);
1048
+
1049
+ //#endregion
1050
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/_loader_state.js
1051
+ const CONTEXT_FLOW_IN = 1;
1052
+ const CONTEXT_FLOW_OUT = 2;
1053
+ const CONTEXT_BLOCK_IN = 3;
1054
+ const CONTEXT_BLOCK_OUT = 4;
1055
+ const CHOMPING_CLIP = 1;
1056
+ const CHOMPING_STRIP = 2;
1057
+ const CHOMPING_KEEP = 3;
1058
+ const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
1059
+ const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
1060
+ const PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
1061
+ const PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
1062
+ const PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1063
+ const ESCAPED_HEX_LENGTHS = new Map([
1064
+ [120, 2],
1065
+ [117, 4],
1066
+ [85, 8]
1067
+ ]);
1068
+ const SIMPLE_ESCAPE_SEQUENCES = new Map([
1069
+ [48, "\0"],
1070
+ [97, "\x07"],
1071
+ [98, "\b"],
1072
+ [116, " "],
1073
+ [9, " "],
1074
+ [110, "\n"],
1075
+ [118, "\v"],
1076
+ [102, "\f"],
1077
+ [114, "\r"],
1078
+ [101, "\x1B"],
1079
+ [32, " "],
1080
+ [34, "\""],
1081
+ [47, "/"],
1082
+ [92, "\\"],
1083
+ [78, "…"],
1084
+ [95, "\xA0"],
1085
+ [76, "\u2028"],
1086
+ [80, "\u2029"]
1087
+ ]);
1088
+ /**
1089
+ * Converts a hexadecimal character code to its decimal value.
1090
+ */ function hexCharCodeToNumber(charCode) {
1091
+ if (48 <= charCode && charCode <= 57) return charCode - 48;
1092
+ const lc = charCode | 32;
1093
+ if (97 <= lc && lc <= 102) return lc - 97 + 10;
1094
+ return -1;
1095
+ }
1096
+ /**
1097
+ * Converts a decimal character code to its decimal value.
1098
+ */ function decimalCharCodeToNumber(charCode) {
1099
+ if (48 <= charCode && charCode <= 57) return charCode - 48;
1100
+ return -1;
1101
+ }
1102
+ /**
1103
+ * Converts a Unicode code point to a string.
1104
+ */ function codepointToChar(codepoint) {
1105
+ if (codepoint <= 65535) return String.fromCharCode(codepoint);
1106
+ return String.fromCharCode((codepoint - 65536 >> 10) + 55296, (codepoint - 65536 & 1023) + 56320);
1107
+ }
1108
+ const INDENT = 4;
1109
+ const MAX_LENGTH = 75;
1110
+ const DELIMITERS = "\0\r\n…\u2028\u2029";
1111
+ function getSnippet(buffer, position) {
1112
+ if (!buffer) return null;
1113
+ let start = position;
1114
+ let end = position;
1115
+ let head = "";
1116
+ let tail = "";
1117
+ while (start > 0 && !DELIMITERS.includes(buffer.charAt(start - 1))) {
1118
+ start--;
1119
+ if (position - start > MAX_LENGTH / 2 - 1) {
1120
+ head = " ... ";
1121
+ start += 5;
1122
+ break;
1123
+ }
1124
+ }
1125
+ while (end < buffer.length && !DELIMITERS.includes(buffer.charAt(end))) {
1126
+ end++;
1127
+ if (end - position > MAX_LENGTH / 2 - 1) {
1128
+ tail = " ... ";
1129
+ end -= 5;
1130
+ break;
1131
+ }
1132
+ }
1133
+ const snippet = buffer.slice(start, end);
1134
+ const indent = " ".repeat(INDENT);
1135
+ const caretIndent = " ".repeat(INDENT + position - start + head.length);
1136
+ return `${indent + head + snippet + tail}\n${caretIndent}^`;
1137
+ }
1138
+ function markToString(buffer, position, line, column) {
1139
+ let where = `at line ${line + 1}, column ${column + 1}`;
1140
+ const snippet = getSnippet(buffer, position);
1141
+ if (snippet) where += `:\n${snippet}`;
1142
+ return where;
1143
+ }
1144
+ var LoaderState = class {
1145
+ input;
1146
+ length;
1147
+ lineIndent = 0;
1148
+ lineStart = 0;
1149
+ position = 0;
1150
+ line = 0;
1151
+ onWarning;
1152
+ allowDuplicateKeys;
1153
+ implicitTypes;
1154
+ typeMap;
1155
+ version;
1156
+ checkLineBreaks = false;
1157
+ tagMap = new Map();
1158
+ anchorMap = new Map();
1159
+ tag;
1160
+ anchor;
1161
+ kind;
1162
+ result = "";
1163
+ constructor(input, { schema = DEFAULT_SCHEMA, onWarning, allowDuplicateKeys = false }) {
1164
+ this.input = input;
1165
+ this.onWarning = onWarning;
1166
+ this.allowDuplicateKeys = allowDuplicateKeys;
1167
+ this.implicitTypes = schema.implicitTypes;
1168
+ this.typeMap = schema.typeMap;
1169
+ this.length = input.length;
1170
+ this.version = null;
1171
+ this.readIndent();
1172
+ }
1173
+ skipWhitespaces() {
1174
+ let ch = this.peek();
1175
+ while (isWhiteSpace(ch)) ch = this.next();
1176
+ }
1177
+ skipComment() {
1178
+ let ch = this.peek();
1179
+ if (ch !== SHARP) return;
1180
+ ch = this.next();
1181
+ while (ch !== 0 && !isEOL(ch)) ch = this.next();
1182
+ }
1183
+ readIndent() {
1184
+ let char = this.peek();
1185
+ while (char === SPACE) {
1186
+ this.lineIndent += 1;
1187
+ char = this.next();
1188
+ }
1189
+ }
1190
+ peek(offset = 0) {
1191
+ return this.input.charCodeAt(this.position + offset);
1192
+ }
1193
+ next() {
1194
+ this.position += 1;
1195
+ return this.peek();
1196
+ }
1197
+ #createError(message) {
1198
+ const mark = markToString(this.input, this.position, this.line, this.position - this.lineStart);
1199
+ return new SyntaxError(`${message} ${mark}`);
1200
+ }
1201
+ dispatchWarning(message) {
1202
+ const error = this.#createError(message);
1203
+ this.onWarning?.(error);
1204
+ }
1205
+ yamlDirectiveHandler(...args) {
1206
+ if (this.version !== null) throw this.#createError("Cannot handle YAML directive: duplication of %YAML directive");
1207
+ if (args.length !== 1) throw this.#createError("Cannot handle YAML directive: YAML directive accepts exactly one argument");
1208
+ const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
1209
+ if (match === null) throw this.#createError("Cannot handle YAML directive: ill-formed argument");
1210
+ const major = parseInt(match[1], 10);
1211
+ const minor = parseInt(match[2], 10);
1212
+ if (major !== 1) throw this.#createError("Cannot handle YAML directive: unacceptable YAML version");
1213
+ this.version = args[0] ?? null;
1214
+ this.checkLineBreaks = minor < 2;
1215
+ if (minor !== 1 && minor !== 2) return this.dispatchWarning("Cannot handle YAML directive: unsupported YAML version");
1216
+ }
1217
+ tagDirectiveHandler(...args) {
1218
+ if (args.length !== 2) throw this.#createError(`Cannot handle tag directive: directive accepts exactly two arguments, received ${args.length}`);
1219
+ const handle = args[0];
1220
+ const prefix = args[1];
1221
+ if (!PATTERN_TAG_HANDLE.test(handle)) throw this.#createError(`Cannot handle tag directive: ill-formed handle (first argument) in "${handle}"`);
1222
+ if (this.tagMap.has(handle)) throw this.#createError(`Cannot handle tag directive: previously declared suffix for "${handle}" tag handle`);
1223
+ if (!PATTERN_TAG_URI.test(prefix)) throw this.#createError("Cannot handle tag directive: ill-formed tag prefix (second argument) of the TAG directive");
1224
+ this.tagMap.set(handle, prefix);
1225
+ }
1226
+ captureSegment(start, end, checkJson) {
1227
+ if (start < end) {
1228
+ const result = this.input.slice(start, end);
1229
+ if (checkJson) for (let position = 0; position < result.length; position++) {
1230
+ const character = result.charCodeAt(position);
1231
+ if (!(character === 9 || 32 <= character && character <= 1114111)) throw this.#createError(`Expected valid JSON character: received "${character}"`);
1232
+ }
1233
+ else if (PATTERN_NON_PRINTABLE.test(result)) throw this.#createError("Stream contains non-printable characters");
1234
+ this.result += result;
1235
+ }
1236
+ }
1237
+ readBlockSequence(nodeIndent) {
1238
+ let detected = false;
1239
+ const tag = this.tag;
1240
+ const anchor = this.anchor;
1241
+ const result = [];
1242
+ if (this.anchor !== null && typeof this.anchor !== "undefined") this.anchorMap.set(this.anchor, result);
1243
+ let ch = this.peek();
1244
+ while (ch !== 0) {
1245
+ if (ch !== MINUS) break;
1246
+ const following = this.peek(1);
1247
+ if (!isWhiteSpaceOrEOL(following)) break;
1248
+ detected = true;
1249
+ this.position++;
1250
+ if (this.skipSeparationSpace(true, -1)) {
1251
+ if (this.lineIndent <= nodeIndent) {
1252
+ result.push(null);
1253
+ ch = this.peek();
1254
+ continue;
1255
+ }
1256
+ }
1257
+ const line = this.line;
1258
+ this.composeNode(nodeIndent, CONTEXT_BLOCK_IN, false, true);
1259
+ result.push(this.result);
1260
+ this.skipSeparationSpace(true, -1);
1261
+ ch = this.peek();
1262
+ if ((this.line === line || this.lineIndent > nodeIndent) && ch !== 0) throw this.#createError("Cannot read block sequence: bad indentation of a sequence entry");
1263
+ else if (this.lineIndent < nodeIndent) break;
1264
+ }
1265
+ if (detected) {
1266
+ this.tag = tag;
1267
+ this.anchor = anchor;
1268
+ this.kind = "sequence";
1269
+ this.result = result;
1270
+ return true;
1271
+ }
1272
+ return false;
1273
+ }
1274
+ mergeMappings(destination, source, overridableKeys) {
1275
+ if (!isObject(source)) throw this.#createError("Cannot merge mappings: the provided source object is unacceptable");
1276
+ for (const [key, value] of Object.entries(source)) {
1277
+ if (Object.hasOwn(destination, key)) continue;
1278
+ Object.defineProperty(destination, key, {
1279
+ value,
1280
+ writable: true,
1281
+ enumerable: true,
1282
+ configurable: true
1283
+ });
1284
+ overridableKeys.add(key);
1285
+ }
1286
+ }
1287
+ storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
1288
+ if (Array.isArray(keyNode)) {
1289
+ keyNode = Array.prototype.slice.call(keyNode);
1290
+ for (let index = 0; index < keyNode.length; index++) {
1291
+ if (Array.isArray(keyNode[index])) throw this.#createError("Cannot store mapping pair: nested arrays are not supported inside keys");
1292
+ if (typeof keyNode === "object" && isPlainObject(keyNode[index])) keyNode[index] = "[object Object]";
1293
+ }
1294
+ }
1295
+ if (typeof keyNode === "object" && isPlainObject(keyNode)) keyNode = "[object Object]";
1296
+ keyNode = String(keyNode);
1297
+ if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) for (let index = 0; index < valueNode.length; index++) this.mergeMappings(result, valueNode[index], overridableKeys);
1298
+ else this.mergeMappings(result, valueNode, overridableKeys);
1299
+ else {
1300
+ if (!this.allowDuplicateKeys && !overridableKeys.has(keyNode) && Object.hasOwn(result, keyNode)) {
1301
+ this.line = startLine || this.line;
1302
+ this.position = startPos || this.position;
1303
+ throw this.#createError("Cannot store mapping pair: duplicated key");
1304
+ }
1305
+ Object.defineProperty(result, keyNode, {
1306
+ value: valueNode,
1307
+ writable: true,
1308
+ enumerable: true,
1309
+ configurable: true
1310
+ });
1311
+ overridableKeys.delete(keyNode);
1312
+ }
1313
+ return result;
1314
+ }
1315
+ readLineBreak() {
1316
+ const ch = this.peek();
1317
+ if (ch === LINE_FEED) this.position++;
1318
+ else if (ch === CARRIAGE_RETURN) {
1319
+ this.position++;
1320
+ if (this.peek() === LINE_FEED) this.position++;
1321
+ } else throw this.#createError("Cannot read line: line break not found");
1322
+ this.line += 1;
1323
+ this.lineStart = this.position;
1324
+ }
1325
+ skipSeparationSpace(allowComments, checkIndent) {
1326
+ let lineBreaks = 0;
1327
+ let ch = this.peek();
1328
+ while (ch !== 0) {
1329
+ this.skipWhitespaces();
1330
+ ch = this.peek();
1331
+ if (allowComments) {
1332
+ this.skipComment();
1333
+ ch = this.peek();
1334
+ }
1335
+ if (isEOL(ch)) {
1336
+ this.readLineBreak();
1337
+ ch = this.peek();
1338
+ lineBreaks++;
1339
+ this.lineIndent = 0;
1340
+ this.readIndent();
1341
+ ch = this.peek();
1342
+ } else break;
1343
+ }
1344
+ if (checkIndent !== -1 && lineBreaks !== 0 && this.lineIndent < checkIndent) this.dispatchWarning("deficient indentation");
1345
+ return lineBreaks;
1346
+ }
1347
+ testDocumentSeparator() {
1348
+ let ch = this.peek();
1349
+ if ((ch === MINUS || ch === DOT) && ch === this.peek(1) && ch === this.peek(2)) {
1350
+ ch = this.peek(3);
1351
+ if (ch === 0 || isWhiteSpaceOrEOL(ch)) return true;
1352
+ }
1353
+ return false;
1354
+ }
1355
+ writeFoldedLines(count) {
1356
+ if (count === 1) this.result += " ";
1357
+ else if (count > 1) this.result += "\n".repeat(count - 1);
1358
+ }
1359
+ readPlainScalar(nodeIndent, withinFlowCollection) {
1360
+ const kind = this.kind;
1361
+ const result = this.result;
1362
+ let ch = this.peek();
1363
+ if (isWhiteSpaceOrEOL(ch) || isFlowIndicator(ch) || ch === SHARP || ch === AMPERSAND || ch === ASTERISK || ch === EXCLAMATION || ch === VERTICAL_LINE || ch === GREATER_THAN || ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE || ch === PERCENT || ch === COMMERCIAL_AT || ch === GRAVE_ACCENT) return false;
1364
+ let following;
1365
+ if (ch === QUESTION || ch === MINUS) {
1366
+ following = this.peek(1);
1367
+ if (isWhiteSpaceOrEOL(following) || withinFlowCollection && isFlowIndicator(following)) return false;
1368
+ }
1369
+ this.kind = "scalar";
1370
+ this.result = "";
1371
+ let captureEnd = this.position;
1372
+ let captureStart = this.position;
1373
+ let hasPendingContent = false;
1374
+ let line = 0;
1375
+ while (ch !== 0) {
1376
+ if (ch === COLON) {
1377
+ following = this.peek(1);
1378
+ if (isWhiteSpaceOrEOL(following) || withinFlowCollection && isFlowIndicator(following)) break;
1379
+ } else if (ch === SHARP) {
1380
+ const preceding = this.peek(-1);
1381
+ if (isWhiteSpaceOrEOL(preceding)) break;
1382
+ } else if (this.position === this.lineStart && this.testDocumentSeparator() || withinFlowCollection && isFlowIndicator(ch)) break;
1383
+ else if (isEOL(ch)) {
1384
+ line = this.line;
1385
+ const lineStart = this.lineStart;
1386
+ const lineIndent = this.lineIndent;
1387
+ this.skipSeparationSpace(false, -1);
1388
+ if (this.lineIndent >= nodeIndent) {
1389
+ hasPendingContent = true;
1390
+ ch = this.peek();
1391
+ continue;
1392
+ } else {
1393
+ this.position = captureEnd;
1394
+ this.line = line;
1395
+ this.lineStart = lineStart;
1396
+ this.lineIndent = lineIndent;
1397
+ break;
1398
+ }
1399
+ }
1400
+ if (hasPendingContent) {
1401
+ this.captureSegment(captureStart, captureEnd, false);
1402
+ this.writeFoldedLines(this.line - line);
1403
+ captureStart = captureEnd = this.position;
1404
+ hasPendingContent = false;
1405
+ }
1406
+ if (!isWhiteSpace(ch)) captureEnd = this.position + 1;
1407
+ ch = this.next();
1408
+ }
1409
+ this.captureSegment(captureStart, captureEnd, false);
1410
+ if (this.result) return true;
1411
+ this.kind = kind;
1412
+ this.result = result;
1413
+ return false;
1414
+ }
1415
+ readSingleQuotedScalar(nodeIndent) {
1416
+ let ch = this.peek();
1417
+ if (ch !== SINGLE_QUOTE) return false;
1418
+ this.kind = "scalar";
1419
+ this.result = "";
1420
+ this.position++;
1421
+ let captureStart = this.position;
1422
+ let captureEnd = this.position;
1423
+ ch = this.peek();
1424
+ while (ch !== 0) {
1425
+ if (ch === SINGLE_QUOTE) {
1426
+ this.captureSegment(captureStart, this.position, true);
1427
+ ch = this.next();
1428
+ if (ch === SINGLE_QUOTE) {
1429
+ captureStart = this.position;
1430
+ this.position++;
1431
+ captureEnd = this.position;
1432
+ } else return true;
1433
+ } else if (isEOL(ch)) {
1434
+ this.captureSegment(captureStart, captureEnd, true);
1435
+ this.writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
1436
+ captureStart = captureEnd = this.position;
1437
+ } else if (this.position === this.lineStart && this.testDocumentSeparator()) throw this.#createError("Unexpected end of the document within a single quoted scalar");
1438
+ else {
1439
+ this.position++;
1440
+ captureEnd = this.position;
1441
+ }
1442
+ ch = this.peek();
1443
+ }
1444
+ throw this.#createError("Unexpected end of the stream within a single quoted scalar");
1445
+ }
1446
+ readDoubleQuotedScalar(nodeIndent) {
1447
+ let ch = this.peek();
1448
+ if (ch !== DOUBLE_QUOTE) return false;
1449
+ this.kind = "scalar";
1450
+ this.result = "";
1451
+ this.position++;
1452
+ let captureEnd = this.position;
1453
+ let captureStart = this.position;
1454
+ let tmp;
1455
+ ch = this.peek();
1456
+ while (ch !== 0) {
1457
+ if (ch === DOUBLE_QUOTE) {
1458
+ this.captureSegment(captureStart, this.position, true);
1459
+ this.position++;
1460
+ return true;
1461
+ }
1462
+ if (ch === BACKSLASH) {
1463
+ this.captureSegment(captureStart, this.position, true);
1464
+ ch = this.next();
1465
+ if (isEOL(ch)) this.skipSeparationSpace(false, nodeIndent);
1466
+ else if (ch < 256 && SIMPLE_ESCAPE_SEQUENCES.has(ch)) {
1467
+ this.result += SIMPLE_ESCAPE_SEQUENCES.get(ch);
1468
+ this.position++;
1469
+ } else if ((tmp = ESCAPED_HEX_LENGTHS.get(ch) ?? 0) > 0) {
1470
+ let hexLength = tmp;
1471
+ let hexResult = 0;
1472
+ for (; hexLength > 0; hexLength--) {
1473
+ ch = this.next();
1474
+ if ((tmp = hexCharCodeToNumber(ch)) >= 0) hexResult = (hexResult << 4) + tmp;
1475
+ else throw this.#createError("Cannot read double quoted scalar: expected hexadecimal character");
1476
+ }
1477
+ this.result += codepointToChar(hexResult);
1478
+ this.position++;
1479
+ } else throw this.#createError("Cannot read double quoted scalar: unknown escape sequence");
1480
+ captureStart = captureEnd = this.position;
1481
+ } else if (isEOL(ch)) {
1482
+ this.captureSegment(captureStart, captureEnd, true);
1483
+ this.writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
1484
+ captureStart = captureEnd = this.position;
1485
+ } else if (this.position === this.lineStart && this.testDocumentSeparator()) throw this.#createError("Unexpected end of the document within a double quoted scalar");
1486
+ else {
1487
+ this.position++;
1488
+ captureEnd = this.position;
1489
+ }
1490
+ ch = this.peek();
1491
+ }
1492
+ throw this.#createError("Unexpected end of the stream within a double quoted scalar");
1493
+ }
1494
+ readFlowCollection(nodeIndent) {
1495
+ let ch = this.peek();
1496
+ let terminator;
1497
+ let isMapping = true;
1498
+ let result = {};
1499
+ if (ch === LEFT_SQUARE_BRACKET) {
1500
+ terminator = RIGHT_SQUARE_BRACKET;
1501
+ isMapping = false;
1502
+ result = [];
1503
+ } else if (ch === LEFT_CURLY_BRACKET) terminator = RIGHT_CURLY_BRACKET;
1504
+ else return false;
1505
+ if (this.anchor !== null && typeof this.anchor !== "undefined") this.anchorMap.set(this.anchor, result);
1506
+ ch = this.next();
1507
+ const tag = this.tag;
1508
+ const anchor = this.anchor;
1509
+ let readNext = true;
1510
+ let valueNode = null;
1511
+ let keyNode = null;
1512
+ let keyTag = null;
1513
+ let isExplicitPair = false;
1514
+ let isPair = false;
1515
+ let following = 0;
1516
+ let line = 0;
1517
+ const overridableKeys = new Set();
1518
+ while (ch !== 0) {
1519
+ this.skipSeparationSpace(true, nodeIndent);
1520
+ ch = this.peek();
1521
+ if (ch === terminator) {
1522
+ this.position++;
1523
+ this.tag = tag;
1524
+ this.anchor = anchor;
1525
+ this.kind = isMapping ? "mapping" : "sequence";
1526
+ this.result = result;
1527
+ return true;
1528
+ }
1529
+ if (!readNext) throw this.#createError("Cannot read flow collection: missing comma between flow collection entries");
1530
+ keyTag = keyNode = valueNode = null;
1531
+ isPair = isExplicitPair = false;
1532
+ if (ch === QUESTION) {
1533
+ following = this.peek(1);
1534
+ if (isWhiteSpaceOrEOL(following)) {
1535
+ isPair = isExplicitPair = true;
1536
+ this.position++;
1537
+ this.skipSeparationSpace(true, nodeIndent);
1538
+ }
1539
+ }
1540
+ line = this.line;
1541
+ this.composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true);
1542
+ keyTag = this.tag || null;
1543
+ keyNode = this.result;
1544
+ this.skipSeparationSpace(true, nodeIndent);
1545
+ ch = this.peek();
1546
+ if ((isExplicitPair || this.line === line) && ch === COLON) {
1547
+ isPair = true;
1548
+ ch = this.next();
1549
+ this.skipSeparationSpace(true, nodeIndent);
1550
+ this.composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true);
1551
+ valueNode = this.result;
1552
+ }
1553
+ if (isMapping) this.storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode);
1554
+ else if (isPair) result.push(this.storeMappingPair({}, overridableKeys, keyTag, keyNode, valueNode));
1555
+ else result.push(keyNode);
1556
+ this.skipSeparationSpace(true, nodeIndent);
1557
+ ch = this.peek();
1558
+ if (ch === COMMA) {
1559
+ readNext = true;
1560
+ ch = this.next();
1561
+ } else readNext = false;
1562
+ }
1563
+ throw this.#createError("Cannot read flow collection: unexpected end of the stream within a flow collection");
1564
+ }
1565
+ readBlockScalar(nodeIndent) {
1566
+ let chomping = CHOMPING_CLIP;
1567
+ let didReadContent = false;
1568
+ let detectedIndent = false;
1569
+ let textIndent = nodeIndent;
1570
+ let emptyLines = 0;
1571
+ let atMoreIndented = false;
1572
+ let ch = this.peek();
1573
+ let folding = false;
1574
+ if (ch === VERTICAL_LINE) folding = false;
1575
+ else if (ch === GREATER_THAN) folding = true;
1576
+ else return false;
1577
+ this.kind = "scalar";
1578
+ this.result = "";
1579
+ let tmp = 0;
1580
+ while (ch !== 0) {
1581
+ ch = this.next();
1582
+ if (ch === PLUS || ch === MINUS) if (CHOMPING_CLIP === chomping) chomping = ch === PLUS ? CHOMPING_KEEP : CHOMPING_STRIP;
1583
+ else throw this.#createError("Cannot read block: chomping mode identifier repeated");
1584
+ else if ((tmp = decimalCharCodeToNumber(ch)) >= 0) if (tmp === 0) throw this.#createError("Cannot read block: indentation width must be greater than 0");
1585
+ else if (!detectedIndent) {
1586
+ textIndent = nodeIndent + tmp - 1;
1587
+ detectedIndent = true;
1588
+ } else throw this.#createError("Cannot read block: indentation width identifier repeated");
1589
+ else break;
1590
+ }
1591
+ if (isWhiteSpace(ch)) {
1592
+ this.skipWhitespaces();
1593
+ this.skipComment();
1594
+ ch = this.peek();
1595
+ }
1596
+ while (ch !== 0) {
1597
+ this.readLineBreak();
1598
+ this.lineIndent = 0;
1599
+ ch = this.peek();
1600
+ while ((!detectedIndent || this.lineIndent < textIndent) && ch === SPACE) {
1601
+ this.lineIndent++;
1602
+ ch = this.next();
1603
+ }
1604
+ if (!detectedIndent && this.lineIndent > textIndent) textIndent = this.lineIndent;
1605
+ if (isEOL(ch)) {
1606
+ emptyLines++;
1607
+ continue;
1608
+ }
1609
+ if (this.lineIndent < textIndent) {
1610
+ if (chomping === CHOMPING_KEEP) this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
1611
+ else if (chomping === CHOMPING_CLIP) {
1612
+ if (didReadContent) this.result += "\n";
1613
+ }
1614
+ break;
1615
+ }
1616
+ if (folding) if (isWhiteSpace(ch)) {
1617
+ atMoreIndented = true;
1618
+ this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
1619
+ } else if (atMoreIndented) {
1620
+ atMoreIndented = false;
1621
+ this.result += "\n".repeat(emptyLines + 1);
1622
+ } else if (emptyLines === 0) {
1623
+ if (didReadContent) this.result += " ";
1624
+ } else this.result += "\n".repeat(emptyLines);
1625
+ else this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
1626
+ didReadContent = true;
1627
+ detectedIndent = true;
1628
+ emptyLines = 0;
1629
+ const captureStart = this.position;
1630
+ while (!isEOL(ch) && ch !== 0) ch = this.next();
1631
+ this.captureSegment(captureStart, this.position, false);
1632
+ }
1633
+ return true;
1634
+ }
1635
+ readBlockMapping(nodeIndent, flowIndent) {
1636
+ const tag = this.tag;
1637
+ const anchor = this.anchor;
1638
+ const result = {};
1639
+ const overridableKeys = new Set();
1640
+ let allowCompact = false;
1641
+ let line;
1642
+ let pos;
1643
+ let keyTag = null;
1644
+ let keyNode = null;
1645
+ let valueNode = null;
1646
+ let atExplicitKey = false;
1647
+ let detected = false;
1648
+ if (this.anchor !== null && typeof this.anchor !== "undefined") this.anchorMap.set(this.anchor, result);
1649
+ let ch = this.peek();
1650
+ while (ch !== 0) {
1651
+ const following = this.peek(1);
1652
+ line = this.line;
1653
+ pos = this.position;
1654
+ if ((ch === QUESTION || ch === COLON) && isWhiteSpaceOrEOL(following)) {
1655
+ if (ch === QUESTION) {
1656
+ if (atExplicitKey) {
1657
+ this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
1658
+ keyTag = null;
1659
+ keyNode = null;
1660
+ valueNode = null;
1661
+ }
1662
+ detected = true;
1663
+ atExplicitKey = true;
1664
+ allowCompact = true;
1665
+ } else if (atExplicitKey) {
1666
+ atExplicitKey = false;
1667
+ allowCompact = true;
1668
+ } else throw this.#createError("Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");
1669
+ this.position += 1;
1670
+ ch = following;
1671
+ } else if (this.composeNode(flowIndent, CONTEXT_FLOW_OUT, false, true)) if (this.line === line) {
1672
+ ch = this.peek();
1673
+ this.skipWhitespaces();
1674
+ ch = this.peek();
1675
+ if (ch === COLON) {
1676
+ ch = this.next();
1677
+ if (!isWhiteSpaceOrEOL(ch)) throw this.#createError("Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
1678
+ if (atExplicitKey) {
1679
+ this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
1680
+ keyTag = null;
1681
+ keyNode = null;
1682
+ valueNode = null;
1683
+ }
1684
+ detected = true;
1685
+ atExplicitKey = false;
1686
+ allowCompact = false;
1687
+ keyTag = this.tag;
1688
+ keyNode = this.result;
1689
+ } else if (detected) throw this.#createError("Cannot read an implicit mapping pair: missing colon");
1690
+ else {
1691
+ this.tag = tag;
1692
+ this.anchor = anchor;
1693
+ return true;
1694
+ }
1695
+ } else if (detected) throw this.#createError("Cannot read a block mapping entry: a multiline key may not be an implicit key");
1696
+ else {
1697
+ this.tag = tag;
1698
+ this.anchor = anchor;
1699
+ return true;
1700
+ }
1701
+ else break;
1702
+ if (this.line === line || this.lineIndent > nodeIndent) {
1703
+ if (this.composeNode(nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = this.result;
1704
+ else valueNode = this.result;
1705
+ if (!atExplicitKey) {
1706
+ this.storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode, line, pos);
1707
+ keyTag = keyNode = valueNode = null;
1708
+ }
1709
+ this.skipSeparationSpace(true, -1);
1710
+ ch = this.peek();
1711
+ }
1712
+ if (this.lineIndent > nodeIndent && ch !== 0) throw this.#createError("Cannot read block: bad indentation of a mapping entry");
1713
+ else if (this.lineIndent < nodeIndent) break;
1714
+ }
1715
+ if (atExplicitKey) this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
1716
+ if (detected) {
1717
+ this.tag = tag;
1718
+ this.anchor = anchor;
1719
+ this.kind = "mapping";
1720
+ this.result = result;
1721
+ }
1722
+ return detected;
1723
+ }
1724
+ readTagProperty() {
1725
+ let isVerbatim = false;
1726
+ let isNamed = false;
1727
+ let tagHandle = "";
1728
+ let tagName;
1729
+ let ch = this.peek();
1730
+ if (ch !== EXCLAMATION) return false;
1731
+ if (this.tag !== null) throw this.#createError("Cannot read tag property: duplication of a tag property");
1732
+ ch = this.next();
1733
+ if (ch === SMALLER_THAN) {
1734
+ isVerbatim = true;
1735
+ ch = this.next();
1736
+ } else if (ch === EXCLAMATION) {
1737
+ isNamed = true;
1738
+ tagHandle = "!!";
1739
+ ch = this.next();
1740
+ } else tagHandle = "!";
1741
+ let position = this.position;
1742
+ if (isVerbatim) {
1743
+ do
1744
+ ch = this.next();
1745
+ while (ch !== 0 && ch !== GREATER_THAN);
1746
+ if (this.position < this.length) {
1747
+ tagName = this.input.slice(position, this.position);
1748
+ ch = this.next();
1749
+ } else throw this.#createError("Cannot read tag property: unexpected end of stream");
1750
+ } else {
1751
+ while (ch !== 0 && !isWhiteSpaceOrEOL(ch)) {
1752
+ if (ch === EXCLAMATION) if (!isNamed) {
1753
+ tagHandle = this.input.slice(position - 1, this.position + 1);
1754
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) throw this.#createError("Cannot read tag property: named tag handle contains invalid characters");
1755
+ isNamed = true;
1756
+ position = this.position + 1;
1757
+ } else throw this.#createError("Cannot read tag property: tag suffix cannot contain an exclamation mark");
1758
+ ch = this.next();
1759
+ }
1760
+ tagName = this.input.slice(position, this.position);
1761
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) throw this.#createError("Cannot read tag property: tag suffix cannot contain flow indicator characters");
1762
+ }
1763
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) throw this.#createError(`Cannot read tag property: invalid characters in tag name "${tagName}"`);
1764
+ if (isVerbatim) this.tag = tagName;
1765
+ else if (this.tagMap.has(tagHandle)) this.tag = this.tagMap.get(tagHandle) + tagName;
1766
+ else if (tagHandle === "!") this.tag = `!${tagName}`;
1767
+ else if (tagHandle === "!!") this.tag = `tag:yaml.org,2002:${tagName}`;
1768
+ else throw this.#createError(`Cannot read tag property: undeclared tag handle "${tagHandle}"`);
1769
+ return true;
1770
+ }
1771
+ readAnchorProperty() {
1772
+ let ch = this.peek();
1773
+ if (ch !== AMPERSAND) return false;
1774
+ if (this.anchor !== null) throw this.#createError("Cannot read anchor property: duplicate anchor property");
1775
+ ch = this.next();
1776
+ const position = this.position;
1777
+ while (ch !== 0 && !isWhiteSpaceOrEOL(ch) && !isFlowIndicator(ch)) ch = this.next();
1778
+ if (this.position === position) throw this.#createError("Cannot read anchor property: name of an anchor node must contain at least one character");
1779
+ this.anchor = this.input.slice(position, this.position);
1780
+ return true;
1781
+ }
1782
+ readAlias() {
1783
+ if (this.peek() !== ASTERISK) return false;
1784
+ let ch = this.next();
1785
+ const position = this.position;
1786
+ while (ch !== 0 && !isWhiteSpaceOrEOL(ch) && !isFlowIndicator(ch)) ch = this.next();
1787
+ if (this.position === position) throw this.#createError("Cannot read alias: alias name must contain at least one character");
1788
+ const alias = this.input.slice(position, this.position);
1789
+ if (!this.anchorMap.has(alias)) throw this.#createError(`Cannot read alias: unidentified alias "${alias}"`);
1790
+ this.result = this.anchorMap.get(alias);
1791
+ this.skipSeparationSpace(true, -1);
1792
+ return true;
1793
+ }
1794
+ composeNode(parentIndent, nodeContext, allowToSeek, allowCompact) {
1795
+ let indentStatus = 1;
1796
+ let atNewLine = false;
1797
+ let hasContent = false;
1798
+ let type;
1799
+ this.tag = null;
1800
+ this.anchor = null;
1801
+ this.kind = null;
1802
+ this.result = null;
1803
+ const allowBlockScalars = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
1804
+ let allowBlockCollections = allowBlockScalars;
1805
+ const allowBlockStyles = allowBlockScalars;
1806
+ if (allowToSeek) {
1807
+ if (this.skipSeparationSpace(true, -1)) {
1808
+ atNewLine = true;
1809
+ if (this.lineIndent > parentIndent) indentStatus = 1;
1810
+ else if (this.lineIndent === parentIndent) indentStatus = 0;
1811
+ else if (this.lineIndent < parentIndent) indentStatus = -1;
1812
+ }
1813
+ }
1814
+ if (indentStatus === 1) while (this.readTagProperty() || this.readAnchorProperty()) if (this.skipSeparationSpace(true, -1)) {
1815
+ atNewLine = true;
1816
+ allowBlockCollections = allowBlockStyles;
1817
+ if (this.lineIndent > parentIndent) indentStatus = 1;
1818
+ else if (this.lineIndent === parentIndent) indentStatus = 0;
1819
+ else if (this.lineIndent < parentIndent) indentStatus = -1;
1820
+ } else allowBlockCollections = false;
1821
+ if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact;
1822
+ if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
1823
+ const cond = CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext;
1824
+ const flowIndent = cond ? parentIndent : parentIndent + 1;
1825
+ const blockIndent = this.position - this.lineStart;
1826
+ if (indentStatus === 1) if (allowBlockCollections && (this.readBlockSequence(blockIndent) || this.readBlockMapping(blockIndent, flowIndent)) || this.readFlowCollection(flowIndent)) hasContent = true;
1827
+ else {
1828
+ if (allowBlockScalars && this.readBlockScalar(flowIndent) || this.readSingleQuotedScalar(flowIndent) || this.readDoubleQuotedScalar(flowIndent)) hasContent = true;
1829
+ else if (this.readAlias()) {
1830
+ hasContent = true;
1831
+ if (this.tag !== null || this.anchor !== null) throw this.#createError("Cannot compose node: alias node should not have any properties");
1832
+ } else if (this.readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
1833
+ hasContent = true;
1834
+ if (this.tag === null) this.tag = "?";
1835
+ }
1836
+ if (this.anchor !== null) this.anchorMap.set(this.anchor, this.result);
1837
+ }
1838
+ else if (indentStatus === 0) hasContent = allowBlockCollections && this.readBlockSequence(blockIndent);
1839
+ }
1840
+ if (this.tag !== null && this.tag !== "!") if (this.tag === "?") for (let typeIndex = 0; typeIndex < this.implicitTypes.length; typeIndex++) {
1841
+ type = this.implicitTypes[typeIndex];
1842
+ if (type.resolve(this.result)) {
1843
+ this.result = type.construct(this.result);
1844
+ this.tag = type.tag;
1845
+ if (this.anchor !== null) this.anchorMap.set(this.anchor, this.result);
1846
+ break;
1847
+ }
1848
+ }
1849
+ else if (this.typeMap[this.kind ?? "fallback"].has(this.tag)) {
1850
+ const map$1 = this.typeMap[this.kind ?? "fallback"];
1851
+ type = map$1.get(this.tag);
1852
+ if (this.result !== null && type.kind !== this.kind) throw this.#createError(`Unacceptable node kind for !<${this.tag}> tag: it should be "${type.kind}", not "${this.kind}"`);
1853
+ if (!type.resolve(this.result)) throw this.#createError(`Cannot resolve a node with !<${this.tag}> explicit tag`);
1854
+ else {
1855
+ this.result = type.construct(this.result);
1856
+ if (this.anchor !== null) this.anchorMap.set(this.anchor, this.result);
1857
+ }
1858
+ } else throw this.#createError(`Cannot resolve unknown tag !<${this.tag}>`);
1859
+ return this.tag !== null || this.anchor !== null || hasContent;
1860
+ }
1861
+ readDocument() {
1862
+ const documentStart = this.position;
1863
+ let hasDirectives = false;
1864
+ this.version = null;
1865
+ this.checkLineBreaks = false;
1866
+ this.tagMap = new Map();
1867
+ this.anchorMap = new Map();
1868
+ let ch = this.peek();
1869
+ while (ch !== 0) {
1870
+ this.skipSeparationSpace(true, -1);
1871
+ ch = this.peek();
1872
+ if (this.lineIndent > 0 || ch !== PERCENT) break;
1873
+ hasDirectives = true;
1874
+ ch = this.next();
1875
+ let position = this.position;
1876
+ while (ch !== 0 && !isWhiteSpaceOrEOL(ch)) ch = this.next();
1877
+ const directiveName = this.input.slice(position, this.position);
1878
+ const directiveArgs = [];
1879
+ if (directiveName.length < 1) throw this.#createError("Cannot read document: directive name length must be greater than zero");
1880
+ while (ch !== 0) {
1881
+ this.skipWhitespaces();
1882
+ this.skipComment();
1883
+ ch = this.peek();
1884
+ if (isEOL(ch)) break;
1885
+ position = this.position;
1886
+ while (ch !== 0 && !isWhiteSpaceOrEOL(ch)) ch = this.next();
1887
+ directiveArgs.push(this.input.slice(position, this.position));
1888
+ }
1889
+ if (ch !== 0) this.readLineBreak();
1890
+ switch (directiveName) {
1891
+ case "YAML":
1892
+ this.yamlDirectiveHandler(...directiveArgs);
1893
+ break;
1894
+ case "TAG":
1895
+ this.tagDirectiveHandler(...directiveArgs);
1896
+ break;
1897
+ default:
1898
+ this.dispatchWarning(`unknown document directive "${directiveName}"`);
1899
+ break;
1900
+ }
1901
+ ch = this.peek();
1902
+ }
1903
+ this.skipSeparationSpace(true, -1);
1904
+ if (this.lineIndent === 0 && this.peek() === MINUS && this.peek(1) === MINUS && this.peek(2) === MINUS) {
1905
+ this.position += 3;
1906
+ this.skipSeparationSpace(true, -1);
1907
+ } else if (hasDirectives) throw this.#createError("Cannot read document: directives end mark is expected");
1908
+ this.composeNode(this.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
1909
+ this.skipSeparationSpace(true, -1);
1910
+ if (this.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(this.input.slice(documentStart, this.position))) this.dispatchWarning("non-ASCII line breaks are interpreted as content");
1911
+ if (this.position === this.lineStart && this.testDocumentSeparator()) {
1912
+ if (this.peek() === DOT) {
1913
+ this.position += 3;
1914
+ this.skipSeparationSpace(true, -1);
1915
+ }
1916
+ } else if (this.position < this.length - 1) throw this.#createError("Cannot read document: end of the stream or a document separator is expected");
1917
+ return this.result;
1918
+ }
1919
+ *readDocuments() {
1920
+ while (this.position < this.length - 1) yield this.readDocument();
1921
+ }
1922
+ };
1923
+
1924
+ //#endregion
1925
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.6/node_modules/@jsr/std__yaml/parse.js
1926
+ function sanitizeInput(input) {
1927
+ input = String(input);
1928
+ if (input.length > 0) {
1929
+ if (!isEOL(input.charCodeAt(input.length - 1))) input += "\n";
1930
+ if (input.charCodeAt(0) === 65279) input = input.slice(1);
1931
+ }
1932
+ input += "\0";
1933
+ return input;
1934
+ }
1935
+ /**
1936
+ * Parse and return a YAML string as a parsed YAML document object.
1937
+ *
1938
+ * Note: This does not support functions. Untrusted data is safe to parse.
1939
+ *
1940
+ * @example Usage
1941
+ * ```ts
1942
+ * import { parse } from "@std/yaml/parse";
1943
+ * import { assertEquals } from "@std/assert";
1944
+ *
1945
+ * const data = parse(`
1946
+ * id: 1
1947
+ * name: Alice
1948
+ * `);
1949
+ *
1950
+ * assertEquals(data, { id: 1, name: "Alice" });
1951
+ * ```
1952
+ *
1953
+ * @throws {SyntaxError} Throws error on invalid YAML.
1954
+ * @param content YAML string to parse.
1955
+ * @param options Parsing options.
1956
+ * @returns Parsed document.
1957
+ */ function parse(content, options = {}) {
1958
+ content = sanitizeInput(content);
1959
+ const state = new LoaderState(content, {
1960
+ ...options,
1961
+ schema: SCHEMA_MAP.get(options.schema)
1962
+ });
1963
+ const documentGenerator = state.readDocuments();
1964
+ const document = documentGenerator.next().value;
1965
+ if (!documentGenerator.next().done) throw new SyntaxError("Found more than 1 document in the stream: expected a single document");
1966
+ return document ?? null;
1967
+ }
1968
+
1969
+ //#endregion
1970
+ //#region codegen/fs.ts
1971
+ /**
1972
+ * Recursively read a directory, yielding the paths of all files. File paths
1973
+ * are relative to the directory, and directories are not yielded.
1974
+ * @param dir The directory to read.
1975
+ * @returns An async iterable of file paths.
1976
+ */
1977
+ async function* readDirRecursive(dir) {
1978
+ for (const entry of await readdir(dir, { withFileTypes: true })) if (entry.isDirectory()) {
1979
+ const path = join(dir, entry.name);
1980
+ for await (const subentry of readDirRecursive(path)) yield join(entry.name, subentry);
1981
+ } else yield entry.name;
1982
+ }
1983
+
1984
+ //#endregion
1985
+ //#region codegen/schema.ts
1986
+ /**
1987
+ * An error that occurred while loading a schema file.
1988
+ */
1989
+ var SchemaError = class extends Error {
1990
+ /**
1991
+ * The path of the schema file.
1992
+ */
1993
+ path;
1994
+ /**
1995
+ * Constructs a new `SchemaError`.
1996
+ * @param path The path of the schema file.
1997
+ * @param message The error message.
1998
+ */
1999
+ constructor(path, message) {
2000
+ super(message);
2001
+ this.path = path;
2002
+ }
2003
+ };
2004
+ async function loadSchemaValidator() {
2005
+ const thisFile = new URL(import.meta.url);
2006
+ const schemaFile = join$1(dirname(thisFile), "schema.yaml");
2007
+ let content;
2008
+ if (schemaFile.protocol !== "file:") {
2009
+ const response = await fetch(schemaFile);
2010
+ content = await response.text();
2011
+ } else content = await readFile(fromFileUrl(schemaFile), { encoding: "utf-8" });
2012
+ const schemaObject = parse(content);
2013
+ return new Validator(schemaObject);
2014
+ }
2015
+ let schemaValidator = void 0;
2016
+ async function loadSchema(path) {
2017
+ const content = await readFile(path, { encoding: "utf-8" });
2018
+ const schema = parse(content);
2019
+ if (schemaValidator == null) schemaValidator = await loadSchemaValidator();
2020
+ const result = schemaValidator.validate(schema);
2021
+ const errors = [];
2022
+ if (result.valid) return schema;
2023
+ for (const e of result.errors) errors.push(new SchemaError(path, `${path}:${e.instanceLocation}: ${e.error}`));
2024
+ throw new AggregateError(errors);
2025
+ }
2026
+ /**
2027
+ * Loads all schema files in the directory.
2028
+ * @param dir The path of the directory to load schema files from.
2029
+ * @returns A map from the qualified URI of a type to its {@link SchemaFile}.
2030
+ * @throws {@link AggregateError} if any schema file is invalid. It contains
2031
+ * all {@link SchemaError}s of the invalid schema files.
2032
+ */
2033
+ async function loadSchemaFiles(dir) {
2034
+ if (typeof dir !== "string") throw new TypeError("Expected a directory path in string");
2035
+ const result = {};
2036
+ const errors = [];
2037
+ for await (const relPath of readDirRecursive(dir)) {
2038
+ if (!relPath.match(/\.ya?ml$/i)) continue;
2039
+ if (relPath.match(/(^|[/\\])schema.yaml$/i)) continue;
2040
+ const path = join(dir, relPath);
2041
+ let schema;
2042
+ try {
2043
+ schema = await loadSchema(path);
2044
+ } catch (e) {
2045
+ if (e instanceof AggregateError && e.errors.length > 0 && e.errors[0] instanceof SchemaError) {
2046
+ errors.push(...e.errors);
2047
+ continue;
2048
+ }
2049
+ throw e;
2050
+ }
2051
+ result[schema.uri] = schema;
2052
+ }
2053
+ if (errors.length > 0) throw new AggregateError(errors);
2054
+ const entries = Object.entries(result);
2055
+ entries.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
2056
+ return Object.fromEntries(entries);
2057
+ }
2058
+
2059
+ //#endregion
2060
+ //#region codegen/type.ts
2061
+ const scalarTypes = {
2062
+ "http://www.w3.org/2001/XMLSchema#boolean": {
2063
+ name: "boolean",
2064
+ typeGuard(v) {
2065
+ return `typeof ${v} === "boolean"`;
2066
+ },
2067
+ encoder(v) {
2068
+ return `{ "@value": ${v} }`;
2069
+ },
2070
+ compactEncoder(v) {
2071
+ return v;
2072
+ },
2073
+ dataCheck(v) {
2074
+ return `typeof ${v} === "object" && "@value" in ${v}
2075
+ && typeof ${v}["@value"] === "boolean"`;
2076
+ },
2077
+ decoder(v) {
2078
+ return `${v}["@value"]`;
2079
+ }
2080
+ },
2081
+ "http://www.w3.org/2001/XMLSchema#integer": {
2082
+ name: "number",
2083
+ typeGuard(v) {
2084
+ return `typeof ${v} === "number" && Number.isInteger(${v})`;
2085
+ },
2086
+ encoder(v) {
2087
+ return `{
2088
+ "@type": "http://www.w3.org/2001/XMLSchema#integer",
2089
+ "@value": ${v},
2090
+ }`;
2091
+ },
2092
+ compactEncoder(v) {
2093
+ return v;
2094
+ },
2095
+ dataCheck(v) {
2096
+ return `typeof ${v} === "object" && "@type" in ${v}
2097
+ && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#integer"
2098
+ && "@value" in ${v} && typeof ${v}["@value"] === "number"`;
2099
+ },
2100
+ decoder(v) {
2101
+ return `${v}["@value"] as number`;
2102
+ }
2103
+ },
2104
+ "http://www.w3.org/2001/XMLSchema#nonNegativeInteger": {
2105
+ name: "number",
2106
+ typeGuard(v) {
2107
+ return `typeof ${v} === "number" && Number.isInteger(${v}) && ${v} >= 0`;
2108
+ },
2109
+ encoder(v) {
2110
+ return `{
2111
+ "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
2112
+ "@value": ${v},
2113
+ }`;
2114
+ },
2115
+ compactEncoder(v) {
2116
+ return v;
2117
+ },
2118
+ dataCheck(v) {
2119
+ return `typeof ${v} === "object" && "@type" in ${v}
2120
+ && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
2121
+ && "@value" in ${v} && typeof ${v}["@value"] === "number"`;
2122
+ },
2123
+ decoder(v) {
2124
+ return `${v}["@value"]`;
2125
+ }
2126
+ },
2127
+ "http://www.w3.org/2001/XMLSchema#float": {
2128
+ name: "number",
2129
+ typeGuard(v) {
2130
+ return `typeof ${v} === "number" && !Number.isNaN(${v})`;
2131
+ },
2132
+ encoder(v) {
2133
+ return `{
2134
+ "@type": "http://www.w3.org/2001/XMLSchema#float",
2135
+ "@value": ${v},
2136
+ }`;
2137
+ },
2138
+ compactEncoder(v) {
2139
+ return v;
2140
+ },
2141
+ dataCheck(v) {
2142
+ return `typeof ${v} === "object" && "@type" in ${v}
2143
+ && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#float"
2144
+ && "@value" in ${v} && typeof ${v}["@value"] === "number"`;
2145
+ },
2146
+ decoder(v) {
2147
+ return `${v}["@value"]`;
2148
+ }
2149
+ },
2150
+ "http://www.w3.org/2001/XMLSchema#string": {
2151
+ name: "string",
2152
+ typeGuard(v) {
2153
+ return `typeof ${v} === "string"`;
2154
+ },
2155
+ encoder(v) {
2156
+ return `{ "@value": ${v} }`;
2157
+ },
2158
+ compactEncoder(v) {
2159
+ return v;
2160
+ },
2161
+ dataCheck(v) {
2162
+ return `typeof ${v} === "object" && "@value" in ${v}
2163
+ && typeof ${v}["@value"] === "string" && !("@language" in ${v})`;
2164
+ },
2165
+ decoder(v) {
2166
+ return `${v}["@value"]`;
2167
+ }
2168
+ },
2169
+ "http://www.w3.org/2001/XMLSchema#anyURI": {
2170
+ name: "URL",
2171
+ typeGuard(v) {
2172
+ return `${v} instanceof URL`;
2173
+ },
2174
+ encoder(v) {
2175
+ return `{ "@id": ${v}.href }`;
2176
+ },
2177
+ compactEncoder(v) {
2178
+ return `${v}.href`;
2179
+ },
2180
+ dataCheck(v) {
2181
+ return `typeof ${v} === "object" && "@id" in ${v}
2182
+ && typeof ${v}["@id"] === "string"
2183
+ && ${v}["@id"] !== "" && ${v}["@id"] !== "/"`;
2184
+ },
2185
+ decoder(v) {
2186
+ return `new URL(${v}["@id"])`;
2187
+ }
2188
+ },
2189
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString": {
2190
+ name: "LanguageString",
2191
+ typeGuard(v) {
2192
+ return `${v} instanceof LanguageString`;
2193
+ },
2194
+ encoder(v) {
2195
+ return `{
2196
+ "@value": ${v}.toString(),
2197
+ "@language": ${v}.language.compact(),
2198
+ }`;
2199
+ },
2200
+ dataCheck(v) {
2201
+ return `typeof ${v} === "object" && "@language" in ${v} && "@value" in ${v}
2202
+ && typeof ${v}["@language"] === "string"
2203
+ && typeof ${v}["@value"] === "string"`;
2204
+ },
2205
+ decoder(v) {
2206
+ return `new LanguageString(${v}["@value"], ${v}["@language"])`;
2207
+ }
2208
+ },
2209
+ "http://www.w3.org/2001/XMLSchema#dateTime": {
2210
+ name: "Temporal.Instant",
2211
+ typeGuard(v) {
2212
+ return `${v} instanceof Temporal.Instant`;
2213
+ },
2214
+ encoder(v) {
2215
+ return `{
2216
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
2217
+ "@value": ${v}.toString(),
2218
+ }`;
2219
+ },
2220
+ compactEncoder(v) {
2221
+ return `${v}.toString()`;
2222
+ },
2223
+ dataCheck(v) {
2224
+ return `typeof ${v} === "object" && "@type" in ${v}
2225
+ && "@value" in ${v} && typeof ${v}["@value"] === "string"
2226
+ && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#dateTime"
2227
+ // Check if the value is a valid RFC 3339 date-time string
2228
+ && new Date(${v}["@value"]).toString() !== "Invalid Date"
2229
+ `;
2230
+ },
2231
+ decoder(v) {
2232
+ return `Temporal.Instant.from(
2233
+ ${v}["@value"].substring(19).match(/[Z+-]/)
2234
+ ? ${v}["@value"]
2235
+ : ${v}["@value"] + "Z"
2236
+ )`;
2237
+ }
2238
+ },
2239
+ "http://www.w3.org/2001/XMLSchema#duration": {
2240
+ name: "Temporal.Duration",
2241
+ typeGuard(v) {
2242
+ return `${v} instanceof Temporal.Duration`;
2243
+ },
2244
+ encoder(v) {
2245
+ return `{
2246
+ "@type": "http://www.w3.org/2001/XMLSchema#duration",
2247
+ "@value": ${v}.toString(),
2248
+ }`;
2249
+ },
2250
+ compactEncoder(v) {
2251
+ return `${v}.toString()`;
2252
+ },
2253
+ dataCheck(v) {
2254
+ return `typeof ${v} === "object" && "@type" in ${v}
2255
+ && "@value" in ${v} && typeof ${v}["@value"] === "string"
2256
+ && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#duration"`;
2257
+ },
2258
+ decoder(v) {
2259
+ return `Temporal.Duration.from(${v}["@value"])`;
2260
+ }
2261
+ },
2262
+ "https://w3id.org/security#cryptosuiteString": {
2263
+ name: "\"eddsa-jcs-2022\"",
2264
+ typeGuard(v) {
2265
+ return `${v} == "eddsa-jcs-2022"`;
2266
+ },
2267
+ encoder(v) {
2268
+ return `{ "@value": ${v} }`;
2269
+ },
2270
+ compactEncoder(v) {
2271
+ return v;
2272
+ },
2273
+ dataCheck(v) {
2274
+ return `typeof ${v} === "object" && "@value" in ${v}
2275
+ && !("@language" in ${v}) && ${v}["@value"] === "eddsa-jcs-2022"`;
2276
+ },
2277
+ decoder(v) {
2278
+ return `${v}["@value"]`;
2279
+ }
2280
+ },
2281
+ "https://w3id.org/security#multibase": {
2282
+ name: "Uint8Array",
2283
+ typeGuard(v) {
2284
+ return `${v} instanceof Uint8Array`;
2285
+ },
2286
+ encoder(v) {
2287
+ return `{
2288
+ "@type": "https://w3id.org/security#multibase",
2289
+ "@value": new TextDecoder().decode(encodeMultibase("base58btc", ${v})),
2290
+ }`;
2291
+ },
2292
+ compactEncoder(v) {
2293
+ return `new TextDecoder().decode(encodeMultibase("base58btc", ${v}))`;
2294
+ },
2295
+ dataCheck(v) {
2296
+ return `typeof ${v} === "object" && "@value" in ${v}
2297
+ && typeof ${v}["@value"] === "string"`;
2298
+ },
2299
+ decoder(v) {
2300
+ return `decodeMultibase(${v}["@value"])`;
2301
+ }
2302
+ },
2303
+ "fedify:langTag": {
2304
+ name: "LanguageTag",
2305
+ typeGuard(v) {
2306
+ return `${v} instanceof LanguageTag`;
2307
+ },
2308
+ encoder(v) {
2309
+ return `{ "@value": ${v}.compact() }`;
2310
+ },
2311
+ compactEncoder(v) {
2312
+ return `${v}.compact()`;
2313
+ },
2314
+ dataCheck(v) {
2315
+ return `typeof ${v} === "object" && "@value" in ${v}
2316
+ && typeof ${v}["@value"] === "string" && !("@language" in ${v})`;
2317
+ },
2318
+ decoder(v) {
2319
+ return `parseLanguageTag(${v}["@value"])`;
2320
+ }
2321
+ },
2322
+ "fedify:url": {
2323
+ name: "URL",
2324
+ typeGuard(v) {
2325
+ return `${v} instanceof URL`;
2326
+ },
2327
+ encoder(v) {
2328
+ return `{ "@value": ${v}.href }`;
2329
+ },
2330
+ compactEncoder(v) {
2331
+ return `${v}.href`;
2332
+ },
2333
+ dataCheck(v) {
2334
+ return `typeof ${v} === "object" && "@value" in ${v}
2335
+ && typeof ${v}["@value"] === "string"
2336
+ && ${v}["@value"] !== "" && ${v}["@value"] !== "/"`;
2337
+ },
2338
+ decoder(v) {
2339
+ return `new URL(${v}["@value"])`;
2340
+ }
2341
+ },
2342
+ "fedify:publicKey": {
2343
+ name: "CryptoKey",
2344
+ typeGuard(v) {
2345
+ return `
2346
+ // @ts-ignore: CryptoKey exists in the global scope.
2347
+ ${v} instanceof CryptoKey
2348
+ `;
2349
+ },
2350
+ encoder(v) {
2351
+ return `{ "@value": await exportSpki(${v}) }`;
2352
+ },
2353
+ compactEncoder(v) {
2354
+ return `await exportSpki(${v})`;
2355
+ },
2356
+ dataCheck(v) {
2357
+ return `typeof ${v} === "object" && "@value" in ${v}
2358
+ && typeof ${v}["@value"] === "string"`;
2359
+ },
2360
+ decoder(v) {
2361
+ return `await importPem(${v}["@value"])`;
2362
+ }
2363
+ },
2364
+ "fedify:multibaseKey": {
2365
+ name: "CryptoKey",
2366
+ typeGuard(v) {
2367
+ return `
2368
+ // @ts-ignore: CryptoKey exists in the global scope.
2369
+ ${v} instanceof CryptoKey
2370
+ `;
2371
+ },
2372
+ encoder(v) {
2373
+ return `{
2374
+ "@type": "https://w3id.org/security#multibase",
2375
+ "@value": await exportMultibaseKey(${v}),
2376
+ }`;
2377
+ },
2378
+ compactEncoder(v) {
2379
+ return `await exportMultibaseKey(${v})`;
2380
+ },
2381
+ dataCheck(v) {
2382
+ return `typeof ${v} === "object" && "@value" in ${v}
2383
+ && typeof ${v}["@value"] === "string"`;
2384
+ },
2385
+ decoder(v) {
2386
+ return `await importMultibaseKey(${v}["@value"])`;
2387
+ }
2388
+ },
2389
+ "fedify:proofPurpose": {
2390
+ name: "\"assertionMethod\" | \"authentication\" | \"capabilityInvocation\" | \"capabilityDelegation\" | \"keyAgreement\"",
2391
+ typeGuard(v) {
2392
+ return `${v} === "assertionMethod" || ${v} === "authentication" ||
2393
+ ${v} === "capabilityInvocation" || ${v} === "capabilityDelegation" ||
2394
+ ${v} === "keyAgreement"`;
2395
+ },
2396
+ encoder(v) {
2397
+ return `{
2398
+ "@id": "https://w3id.org/security#" + ${v},
2399
+ }`;
2400
+ },
2401
+ compactEncoder(v) {
2402
+ return v;
2403
+ },
2404
+ dataCheck(v) {
2405
+ return `typeof ${v} === "object" && "@id" in ${v}
2406
+ && typeof ${v}["@id"] === "string"
2407
+ && ${v}["@id"].startsWith("https://w3id.org/security#")
2408
+ && [
2409
+ "assertionMethod", "authentication", "capabilityInvocation",
2410
+ "capabilityDelegation", "keyAgreement",
2411
+ ].includes(${v}["@id"].substring(26))`;
2412
+ },
2413
+ decoder(v) {
2414
+ return `${v}["@id"].substring(26)`;
2415
+ }
2416
+ },
2417
+ "fedify:units": {
2418
+ name: "\"cm\" | \"feet\" | \"inches\" | \"km\" | \"m\" | \"miles\"",
2419
+ typeGuard(v) {
2420
+ return `${v} == "cm" || ${v} == "feet" || ${v} == "inches" || ${v} == "km" || ${v} == "m" || ${v} == "miles"`;
2421
+ },
2422
+ encoder(v) {
2423
+ return `{ "@value": ${v} }`;
2424
+ },
2425
+ compactEncoder(v) {
2426
+ return v;
2427
+ },
2428
+ dataCheck(v) {
2429
+ return `typeof ${v} === "object" && "@value" in ${v}
2430
+ && (${v}["@value"] == "cm" || ${v}["@value"] == "feet" || ${v}["@value"] == "inches" || ${v}["@value"] == "km" || ${v}["@value"] == "m" || ${v}["@value"] == "miles")`;
2431
+ },
2432
+ decoder(v) {
2433
+ return `${v}["@value"]`;
2434
+ }
2435
+ }
2436
+ };
2437
+ function isScalarType(typeUri, types$1) {
2438
+ if (typeUri in scalarTypes) return true;
2439
+ else if (typeUri in types$1) return !types$1[typeUri].entity;
2440
+ throw new Error(`Unknown type: ${typeUri}`);
2441
+ }
2442
+ function areAllScalarTypes(typeUris, types$1) {
2443
+ return typeUris.every((typeUri) => isScalarType(typeUri, types$1));
2444
+ }
21
2445
 
2446
+ //#endregion
22
2447
  //#region vocab/vocab.test.ts
23
2448
  test("new Object()", () => {
24
2449
  const obj = new Object$1({