@scriptc/cli-darwin-x64 0.0.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (960) hide show
  1. package/dist/LICENSE +202 -0
  2. package/dist/THIRD_PARTY_NOTICES +4 -0
  3. package/dist/bin/scriptc +0 -0
  4. package/dist/bin/scriptc.json +21 -0
  5. package/dist/lib/declarations/scriptc-node-fallback.d.ts +3847 -0
  6. package/dist/lib/declarations/scriptc-overrides.d.ts +92 -0
  7. package/dist/lib/declarations/scriptc.d.ts +98 -0
  8. package/dist/lib/llvm/LICENSE +1 -0
  9. package/dist/lib/llvm/SCRIPTC_LICENSE +1 -0
  10. package/dist/lib/llvm/THIRD_PARTY_NOTICES +1 -0
  11. package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
  12. package/dist/lib/llvm/package.json +35 -0
  13. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
  14. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_assert.o +0 -0
  15. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async.o +0 -0
  16. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async_dyn.o +0 -0
  17. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint.o +0 -0
  18. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint_assert.o +0 -0
  19. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
  20. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
  21. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_child.o +0 -0
  22. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_closure.o +0 -0
  23. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console.o +0 -0
  24. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console_native.o +0 -0
  25. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_copying.o +0 -0
  26. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_crypto_async.o +0 -0
  27. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_cycle.o +0 -0
  28. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dc.o +0 -0
  29. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dgram.o +0 -0
  30. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_handle.o +0 -0
  31. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_invoke.o +0 -0
  32. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_error.o +0 -0
  33. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events.o +0 -0
  34. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events_emitter.o +0 -0
  35. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_exception.o +0 -0
  36. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_fetch.o +0 -0
  37. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi.o +0 -0
  38. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi_queue.o +0 -0
  39. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
  40. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_grapheme.o +0 -0
  41. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http.o +0 -0
  42. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http2.o +0 -0
  43. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_inspect.o +0 -0
  44. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
  45. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
  46. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_epoll.o +0 -0
  47. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_kqueue.o +0 -0
  48. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_wsapoll.o +0 -0
  49. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
  50. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_net.o +0 -0
  51. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_node_builtin.o +0 -0
  52. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_number.o +0 -0
  53. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_object.o +0 -0
  54. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_path.o +0 -0
  55. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_qs.o +0 -0
  56. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_readline.o +0 -0
  57. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
  58. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_stream.o +0 -0
  59. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_string.o +0 -0
  60. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_symbol.o +0 -0
  61. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_test.o +0 -0
  62. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls.o +0 -0
  63. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls_ca.o +0 -0
  64. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_union.o +0 -0
  65. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url.o +0 -0
  66. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url_params.o +0 -0
  67. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util.o +0 -0
  68. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_watch.o +0 -0
  69. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_zlib.o +0 -0
  70. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
  71. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
  72. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
  73. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async_dyn.o +0 -0
  74. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint.o +0 -0
  75. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint_assert.o +0 -0
  76. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
  77. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
  78. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_child.o +0 -0
  79. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_closure.o +0 -0
  80. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console.o +0 -0
  81. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console_native.o +0 -0
  82. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_copying.o +0 -0
  83. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_crypto_async.o +0 -0
  84. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_cycle.o +0 -0
  85. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dc.o +0 -0
  86. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dgram.o +0 -0
  87. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_handle.o +0 -0
  88. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_invoke.o +0 -0
  89. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_error.o +0 -0
  90. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
  91. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events_emitter.o +0 -0
  92. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
  93. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_fetch.o +0 -0
  94. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi.o +0 -0
  95. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi_queue.o +0 -0
  96. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
  97. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_grapheme.o +0 -0
  98. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http.o +0 -0
  99. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http2.o +0 -0
  100. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect.o +0 -0
  101. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect_island.o +0 -0
  102. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
  103. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
  104. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
  105. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_epoll.o +0 -0
  106. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_kqueue.o +0 -0
  107. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  108. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
  109. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net.o +0 -0
  110. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net_island.o +0 -0
  111. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_node_builtin.o +0 -0
  112. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_number.o +0 -0
  113. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_object.o +0 -0
  114. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_path.o +0 -0
  115. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_qs.o +0 -0
  116. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_readline.o +0 -0
  117. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
  118. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_stream.o +0 -0
  119. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
  120. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_symbol.o +0 -0
  121. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_test.o +0 -0
  122. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls.o +0 -0
  123. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls_ca.o +0 -0
  124. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_union.o +0 -0
  125. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url.o +0 -0
  126. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url_params.o +0 -0
  127. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util.o +0 -0
  128. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_watch.o +0 -0
  129. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_web.o +0 -0
  130. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib.o +0 -0
  131. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib_island.o +0 -0
  132. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  133. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  134. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
  135. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
  136. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint.o +0 -0
  137. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint_assert.o +0 -0
  138. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
  139. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
  140. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_closure.o +0 -0
  141. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console.o +0 -0
  142. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console_native.o +0 -0
  143. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_copying.o +0 -0
  144. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_cycle.o +0 -0
  145. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_handle.o +0 -0
  146. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_invoke.o +0 -0
  147. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_error.o +0 -0
  148. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_events_emitter.o +0 -0
  149. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
  150. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_grapheme.o +0 -0
  151. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_inspect.o +0 -0
  152. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
  153. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
  154. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_library.o +0 -0
  155. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
  156. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_node_builtin.o +0 -0
  157. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_number.o +0 -0
  158. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_object.o +0 -0
  159. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_path.o +0 -0
  160. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
  161. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
  162. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_symbol.o +0 -0
  163. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_union.o +0 -0
  164. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url.o +0 -0
  165. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url_params.o +0 -0
  166. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_zlib.o +0 -0
  167. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  168. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
  169. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
  170. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint.o +0 -0
  171. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint_assert.o +0 -0
  172. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
  173. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
  174. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_closure.o +0 -0
  175. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console.o +0 -0
  176. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console_native.o +0 -0
  177. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_copying.o +0 -0
  178. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_cycle.o +0 -0
  179. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_handle.o +0 -0
  180. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_invoke.o +0 -0
  181. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_error.o +0 -0
  182. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_events_emitter.o +0 -0
  183. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
  184. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_grapheme.o +0 -0
  185. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_inspect.o +0 -0
  186. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
  187. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
  188. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_library.o +0 -0
  189. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
  190. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_node_builtin.o +0 -0
  191. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_number.o +0 -0
  192. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_object.o +0 -0
  193. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_path.o +0 -0
  194. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
  195. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_string.o +0 -0
  196. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_symbol.o +0 -0
  197. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_union.o +0 -0
  198. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url.o +0 -0
  199. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url_params.o +0 -0
  200. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_zlib.o +0 -0
  201. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  202. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
  203. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
  204. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint.o +0 -0
  205. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint_assert.o +0 -0
  206. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
  207. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
  208. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_closure.o +0 -0
  209. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console.o +0 -0
  210. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console_native.o +0 -0
  211. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_copying.o +0 -0
  212. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_cycle.o +0 -0
  213. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_handle.o +0 -0
  214. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_invoke.o +0 -0
  215. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_error.o +0 -0
  216. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_events_emitter.o +0 -0
  217. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
  218. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_grapheme.o +0 -0
  219. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_inspect.o +0 -0
  220. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
  221. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
  222. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_library.o +0 -0
  223. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
  224. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_node_builtin.o +0 -0
  225. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_number.o +0 -0
  226. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_object.o +0 -0
  227. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_path.o +0 -0
  228. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
  229. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
  230. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_symbol.o +0 -0
  231. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_union.o +0 -0
  232. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url.o +0 -0
  233. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url_params.o +0 -0
  234. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_zlib.o +0 -0
  235. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  236. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
  237. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
  238. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint.o +0 -0
  239. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint_assert.o +0 -0
  240. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
  241. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
  242. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_closure.o +0 -0
  243. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console.o +0 -0
  244. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console_native.o +0 -0
  245. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_copying.o +0 -0
  246. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_cycle.o +0 -0
  247. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_handle.o +0 -0
  248. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_invoke.o +0 -0
  249. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_error.o +0 -0
  250. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_events_emitter.o +0 -0
  251. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
  252. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_grapheme.o +0 -0
  253. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_inspect.o +0 -0
  254. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
  255. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
  256. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_library.o +0 -0
  257. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
  258. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_node_builtin.o +0 -0
  259. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_number.o +0 -0
  260. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_object.o +0 -0
  261. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_path.o +0 -0
  262. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
  263. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
  264. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_symbol.o +0 -0
  265. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_union.o +0 -0
  266. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url.o +0 -0
  267. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url_params.o +0 -0
  268. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_zlib.o +0 -0
  269. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  270. package/dist/lib/runtime-darwin-x64/artifacts/licenses/mbedtls.txt +553 -0
  271. package/dist/lib/runtime-darwin-x64/artifacts/licenses/quickjs-ng.txt +24 -0
  272. package/dist/lib/runtime-darwin-x64/artifacts/licenses/ryu.txt +23 -0
  273. package/dist/lib/runtime-darwin-x64/artifacts/licenses/scriptc-runtime.txt +202 -0
  274. package/dist/lib/runtime-darwin-x64/artifacts/licenses/unicode.txt +39 -0
  275. package/dist/lib/runtime-darwin-x64/artifacts/licenses/zlib.txt +22 -0
  276. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
  277. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_assert.o +0 -0
  278. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async.o +0 -0
  279. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async_dyn.o +0 -0
  280. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint.o +0 -0
  281. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint_assert.o +0 -0
  282. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
  283. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
  284. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_child.o +0 -0
  285. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_closure.o +0 -0
  286. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console.o +0 -0
  287. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console_native.o +0 -0
  288. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_copying.o +0 -0
  289. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_crypto_async.o +0 -0
  290. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_cycle.o +0 -0
  291. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dc.o +0 -0
  292. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dgram.o +0 -0
  293. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_handle.o +0 -0
  294. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_invoke.o +0 -0
  295. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_error.o +0 -0
  296. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events.o +0 -0
  297. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events_emitter.o +0 -0
  298. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_exception.o +0 -0
  299. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_fetch.o +0 -0
  300. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi.o +0 -0
  301. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi_queue.o +0 -0
  302. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
  303. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_grapheme.o +0 -0
  304. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http.o +0 -0
  305. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http2.o +0 -0
  306. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_inspect.o +0 -0
  307. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
  308. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
  309. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_epoll.o +0 -0
  310. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_kqueue.o +0 -0
  311. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_wsapoll.o +0 -0
  312. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
  313. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_net.o +0 -0
  314. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_node_builtin.o +0 -0
  315. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_number.o +0 -0
  316. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_object.o +0 -0
  317. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_path.o +0 -0
  318. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_qs.o +0 -0
  319. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_readline.o +0 -0
  320. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
  321. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_stream.o +0 -0
  322. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_string.o +0 -0
  323. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_symbol.o +0 -0
  324. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_test.o +0 -0
  325. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls.o +0 -0
  326. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls_ca.o +0 -0
  327. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_union.o +0 -0
  328. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url.o +0 -0
  329. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url_params.o +0 -0
  330. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util.o +0 -0
  331. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_watch.o +0 -0
  332. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_zlib.o +0 -0
  333. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
  334. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
  335. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
  336. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async_dyn.o +0 -0
  337. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint.o +0 -0
  338. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint_assert.o +0 -0
  339. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
  340. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
  341. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_child.o +0 -0
  342. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_closure.o +0 -0
  343. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console.o +0 -0
  344. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console_native.o +0 -0
  345. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_copying.o +0 -0
  346. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_crypto_async.o +0 -0
  347. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_cycle.o +0 -0
  348. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dc.o +0 -0
  349. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dgram.o +0 -0
  350. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_handle.o +0 -0
  351. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_invoke.o +0 -0
  352. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_error.o +0 -0
  353. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
  354. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events_emitter.o +0 -0
  355. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
  356. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_fetch.o +0 -0
  357. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi.o +0 -0
  358. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi_queue.o +0 -0
  359. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
  360. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_grapheme.o +0 -0
  361. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http.o +0 -0
  362. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http2.o +0 -0
  363. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect.o +0 -0
  364. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect_island.o +0 -0
  365. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
  366. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
  367. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
  368. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_epoll.o +0 -0
  369. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_kqueue.o +0 -0
  370. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  371. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
  372. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net.o +0 -0
  373. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net_island.o +0 -0
  374. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_node_builtin.o +0 -0
  375. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_number.o +0 -0
  376. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_object.o +0 -0
  377. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_path.o +0 -0
  378. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_qs.o +0 -0
  379. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_readline.o +0 -0
  380. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
  381. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_stream.o +0 -0
  382. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
  383. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_symbol.o +0 -0
  384. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_test.o +0 -0
  385. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls.o +0 -0
  386. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls_ca.o +0 -0
  387. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_union.o +0 -0
  388. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url.o +0 -0
  389. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url_params.o +0 -0
  390. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util.o +0 -0
  391. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_watch.o +0 -0
  392. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_web.o +0 -0
  393. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib.o +0 -0
  394. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib_island.o +0 -0
  395. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  396. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  397. package/dist/lib/runtime-darwin-x64/artifacts/vendor/libregexp/libscriptc-libregexp.a +0 -0
  398. package/dist/lib/runtime-darwin-x64/artifacts/vendor/mbedtls/libscriptc-mbedtls.a +0 -0
  399. package/dist/lib/runtime-darwin-x64/artifacts/vendor/quickjs/libscriptc-quickjs.a +0 -0
  400. package/dist/lib/runtime-darwin-x64/artifacts/vendor/zlib/libscriptc-zlib.a +0 -0
  401. package/dist/lib/runtime-darwin-x64/package.json +24 -0
  402. package/dist/lib/runtime-darwin-x64/runtime-pack.json +5758 -0
  403. package/dist/lib/runtime-sources/LICENSE +202 -0
  404. package/dist/lib/runtime-sources/package.json +22 -0
  405. package/dist/lib/runtime-sources/src/scr_array.c +1444 -0
  406. package/dist/lib/runtime-sources/src/scr_assert.c +1537 -0
  407. package/dist/lib/runtime-sources/src/scr_async.c +3920 -0
  408. package/dist/lib/runtime-sources/src/scr_async.test.c +134 -0
  409. package/dist/lib/runtime-sources/src/scr_async.test.ts +34 -0
  410. package/dist/lib/runtime-sources/src/scr_async_dyn.c +803 -0
  411. package/dist/lib/runtime-sources/src/scr_bigint.c +890 -0
  412. package/dist/lib/runtime-sources/src/scr_bigint_assert.c +22 -0
  413. package/dist/lib/runtime-sources/src/scr_bytes.c +2518 -0
  414. package/dist/lib/runtime-sources/src/scr_bytes_io.c +755 -0
  415. package/dist/lib/runtime-sources/src/scr_child.c +5808 -0
  416. package/dist/lib/runtime-sources/src/scr_closure.c +213 -0
  417. package/dist/lib/runtime-sources/src/scr_console.c +259 -0
  418. package/dist/lib/runtime-sources/src/scr_console_native.c +95 -0
  419. package/dist/lib/runtime-sources/src/scr_copying.c +146 -0
  420. package/dist/lib/runtime-sources/src/scr_crypto_async.c +24 -0
  421. package/dist/lib/runtime-sources/src/scr_cycle.c +565 -0
  422. package/dist/lib/runtime-sources/src/scr_dc.c +814 -0
  423. package/dist/lib/runtime-sources/src/scr_dgram.c +1182 -0
  424. package/dist/lib/runtime-sources/src/scr_dyn_handle.c +96 -0
  425. package/dist/lib/runtime-sources/src/scr_dyn_invoke.c +1626 -0
  426. package/dist/lib/runtime-sources/src/scr_error.c +372 -0
  427. package/dist/lib/runtime-sources/src/scr_events.c +1222 -0
  428. package/dist/lib/runtime-sources/src/scr_events_emitter.c +842 -0
  429. package/dist/lib/runtime-sources/src/scr_exception.c +468 -0
  430. package/dist/lib/runtime-sources/src/scr_fetch.c +7215 -0
  431. package/dist/lib/runtime-sources/src/scr_fetch_curl.c +666 -0
  432. package/dist/lib/runtime-sources/src/scr_ffi.c +143 -0
  433. package/dist/lib/runtime-sources/src/scr_ffi_queue.c +379 -0
  434. package/dist/lib/runtime-sources/src/scr_file_handle.c +562 -0
  435. package/dist/lib/runtime-sources/src/scr_grapheme.c +203 -0
  436. package/dist/lib/runtime-sources/src/scr_grapheme_data.h +842 -0
  437. package/dist/lib/runtime-sources/src/scr_http.c +5808 -0
  438. package/dist/lib/runtime-sources/src/scr_http2.c +3243 -0
  439. package/dist/lib/runtime-sources/src/scr_inspect.c +923 -0
  440. package/dist/lib/runtime-sources/src/scr_inspect_island.c +51 -0
  441. package/dist/lib/runtime-sources/src/scr_island.c +9987 -0
  442. package/dist/lib/runtime-sources/src/scr_island_manifest.h +153 -0
  443. package/dist/lib/runtime-sources/src/scr_json.c +7928 -0
  444. package/dist/lib/runtime-sources/src/scr_json.test.c +182 -0
  445. package/dist/lib/runtime-sources/src/scr_json.test.ts +33 -0
  446. package/dist/lib/runtime-sources/src/scr_lib.c +6304 -0
  447. package/dist/lib/runtime-sources/src/scr_library.c +444 -0
  448. package/dist/lib/runtime-sources/src/scr_loop_epoll.c +241 -0
  449. package/dist/lib/runtime-sources/src/scr_loop_kqueue.c +121 -0
  450. package/dist/lib/runtime-sources/src/scr_loop_wsapoll.c +208 -0
  451. package/dist/lib/runtime-sources/src/scr_map.c +705 -0
  452. package/dist/lib/runtime-sources/src/scr_musl.c +438 -0
  453. package/dist/lib/runtime-sources/src/scr_net.c +3708 -0
  454. package/dist/lib/runtime-sources/src/scr_net_island.c +458 -0
  455. package/dist/lib/runtime-sources/src/scr_node_builtin.c +281 -0
  456. package/dist/lib/runtime-sources/src/scr_number.c +192 -0
  457. package/dist/lib/runtime-sources/src/scr_object.c +80 -0
  458. package/dist/lib/runtime-sources/src/scr_path.c +1281 -0
  459. package/dist/lib/runtime-sources/src/scr_platform.h +119 -0
  460. package/dist/lib/runtime-sources/src/scr_qs.c +496 -0
  461. package/dist/lib/runtime-sources/src/scr_readline.c +288 -0
  462. package/dist/lib/runtime-sources/src/scr_regex.c +1274 -0
  463. package/dist/lib/runtime-sources/src/scr_runtime.h +7207 -0
  464. package/dist/lib/runtime-sources/src/scr_stream.c +3149 -0
  465. package/dist/lib/runtime-sources/src/scr_string.c +1849 -0
  466. package/dist/lib/runtime-sources/src/scr_symbol.c +234 -0
  467. package/dist/lib/runtime-sources/src/scr_test.c +662 -0
  468. package/dist/lib/runtime-sources/src/scr_text_decoder_data.h +7389 -0
  469. package/dist/lib/runtime-sources/src/scr_tls.c +1806 -0
  470. package/dist/lib/runtime-sources/src/scr_tls_ca.c +433 -0
  471. package/dist/lib/runtime-sources/src/scr_union.c +105 -0
  472. package/dist/lib/runtime-sources/src/scr_url.c +1231 -0
  473. package/dist/lib/runtime-sources/src/scr_url_internal.h +29 -0
  474. package/dist/lib/runtime-sources/src/scr_url_params.c +526 -0
  475. package/dist/lib/runtime-sources/src/scr_util.c +984 -0
  476. package/dist/lib/runtime-sources/src/scr_watch.c +568 -0
  477. package/dist/lib/runtime-sources/src/scr_web.c +1854 -0
  478. package/dist/lib/runtime-sources/src/scr_win.c +231 -0
  479. package/dist/lib/runtime-sources/src/scr_win_stats.h +23 -0
  480. package/dist/lib/runtime-sources/src/scr_zlib.c +358 -0
  481. package/dist/lib/runtime-sources/src/scr_zlib_island.c +15 -0
  482. package/dist/lib/runtime-sources/vendor/README.md +60 -0
  483. package/dist/lib/runtime-sources/vendor/curl/COPYRIGHT +534 -0
  484. package/dist/lib/runtime-sources/vendor/curl/include/curl/curl.h +3214 -0
  485. package/dist/lib/runtime-sources/vendor/curl/include/curl/curlver.h +79 -0
  486. package/dist/lib/runtime-sources/vendor/curl/include/curl/easy.h +125 -0
  487. package/dist/lib/runtime-sources/vendor/curl/include/curl/header.h +74 -0
  488. package/dist/lib/runtime-sources/vendor/curl/include/curl/mprintf.h +52 -0
  489. package/dist/lib/runtime-sources/vendor/curl/include/curl/multi.h +460 -0
  490. package/dist/lib/runtime-sources/vendor/curl/include/curl/options.h +70 -0
  491. package/dist/lib/runtime-sources/vendor/curl/include/curl/stdcheaders.h +35 -0
  492. package/dist/lib/runtime-sources/vendor/curl/include/curl/system.h +508 -0
  493. package/dist/lib/runtime-sources/vendor/curl/include/curl/typecheck-gcc.h +716 -0
  494. package/dist/lib/runtime-sources/vendor/curl/include/curl/urlapi.h +149 -0
  495. package/dist/lib/runtime-sources/vendor/curl/include/curl/websockets.h +84 -0
  496. package/dist/lib/runtime-sources/vendor/mbedtls/LICENSE +553 -0
  497. package/dist/lib/runtime-sources/vendor/mbedtls/include/CMakeLists.txt +22 -0
  498. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aes.h +631 -0
  499. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aria.h +343 -0
  500. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1.h +642 -0
  501. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1write.h +390 -0
  502. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/base64.h +82 -0
  503. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/bignum.h +1088 -0
  504. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/block_cipher.h +76 -0
  505. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/build_info.h +194 -0
  506. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/camellia.h +305 -0
  507. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ccm.h +526 -0
  508. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chacha20.h +209 -0
  509. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chachapoly.h +351 -0
  510. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/check_config.h +1149 -0
  511. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cipher.h +1250 -0
  512. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cmac.h +246 -0
  513. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/compat-2.x.h +46 -0
  514. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h +578 -0
  515. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h +873 -0
  516. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h +359 -0
  517. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h +145 -0
  518. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_ssl.h +91 -0
  519. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_x509.h +35 -0
  520. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_psa.h +61 -0
  521. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/constant_time.h +36 -0
  522. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ctr_drbg.h +596 -0
  523. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/debug.h +156 -0
  524. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/des.h +385 -0
  525. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/dhm.h +972 -0
  526. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdh.h +455 -0
  527. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdsa.h +674 -0
  528. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecjpake.h +298 -0
  529. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecp.h +1517 -0
  530. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/entropy.h +274 -0
  531. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/error.h +201 -0
  532. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/gcm.h +387 -0
  533. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hkdf.h +124 -0
  534. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hmac_drbg.h +434 -0
  535. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/lms.h +440 -0
  536. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/mbedtls_config.h +4446 -0
  537. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md.h +526 -0
  538. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md5.h +190 -0
  539. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/memory_buffer_alloc.h +142 -0
  540. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/net_sockets.h +299 -0
  541. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/nist_kw.h +166 -0
  542. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/oid.h +727 -0
  543. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pem.h +160 -0
  544. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pk.h +1303 -0
  545. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs12.h +186 -0
  546. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs5.h +198 -0
  547. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs7.h +252 -0
  548. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform.h +516 -0
  549. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_time.h +79 -0
  550. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_util.h +247 -0
  551. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/poly1305.h +168 -0
  552. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/private_access.h +20 -0
  553. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/psa_util.h +207 -0
  554. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ripemd160.h +136 -0
  555. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/rsa.h +1170 -0
  556. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha1.h +219 -0
  557. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha256.h +200 -0
  558. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha3.h +172 -0
  559. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha512.h +208 -0
  560. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl.h +5887 -0
  561. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cache.h +187 -0
  562. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ciphersuites.h +482 -0
  563. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cookie.h +106 -0
  564. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ticket.h +199 -0
  565. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/threading.h +167 -0
  566. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/timing.h +94 -0
  567. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/version.h +78 -0
  568. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509.h +500 -0
  569. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crl.h +184 -0
  570. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crt.h +1208 -0
  571. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_csr.h +382 -0
  572. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/build_info.h +20 -0
  573. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto.h +4998 -0
  574. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_auto_enabled.h +31 -0
  575. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_dependencies.h +51 -0
  576. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h +101 -0
  577. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_synonyms.h +49 -0
  578. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_composites.h +214 -0
  579. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_key_derivation.h +118 -0
  580. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_primitives.h +114 -0
  581. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_compat.h +230 -0
  582. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_config.h +145 -0
  583. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_common.h +44 -0
  584. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_composites.h +151 -0
  585. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h +52 -0
  586. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_primitives.h +105 -0
  587. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_extra.h +2145 -0
  588. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_legacy.h +88 -0
  589. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_platform.h +102 -0
  590. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_se_driver.h +1383 -0
  591. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_sizes.h +1319 -0
  592. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_struct.h +527 -0
  593. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_types.h +508 -0
  594. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_values.h +2782 -0
  595. package/dist/lib/runtime-sources/vendor/mbedtls/library/aes.c +2294 -0
  596. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.c +624 -0
  597. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.h +136 -0
  598. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.c +846 -0
  599. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.h +162 -0
  600. package/dist/lib/runtime-sources/vendor/mbedtls/library/alignment.h +704 -0
  601. package/dist/lib/runtime-sources/vendor/mbedtls/library/aria.c +969 -0
  602. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1parse.c +468 -0
  603. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1write.c +440 -0
  604. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64.c +322 -0
  605. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64_internal.h +45 -0
  606. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum.c +2583 -0
  607. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.c +1240 -0
  608. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.h +872 -0
  609. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core_invasive.h +38 -0
  610. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_internal.h +122 -0
  611. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.c +394 -0
  612. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.h +452 -0
  613. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.c +276 -0
  614. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.h +416 -0
  615. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw_invasive.h +34 -0
  616. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher.c +207 -0
  617. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher_internal.h +99 -0
  618. package/dist/lib/runtime-sources/vendor/mbedtls/library/bn_mul.h +1094 -0
  619. package/dist/lib/runtime-sources/vendor/mbedtls/library/camellia.c +1058 -0
  620. package/dist/lib/runtime-sources/vendor/mbedtls/library/ccm.c +777 -0
  621. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20.c +563 -0
  622. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20_internal.h +23 -0
  623. package/dist/lib/runtime-sources/vendor/mbedtls/library/chachapoly.c +487 -0
  624. package/dist/lib/runtime-sources/vendor/mbedtls/library/check_crypto_config.h +136 -0
  625. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher.c +1712 -0
  626. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_invasive.h +28 -0
  627. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.c +2482 -0
  628. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.h +178 -0
  629. package/dist/lib/runtime-sources/vendor/mbedtls/library/cmac.c +1067 -0
  630. package/dist/lib/runtime-sources/vendor/mbedtls/library/common.h +487 -0
  631. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time.c +247 -0
  632. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_impl.h +541 -0
  633. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_internal.h +579 -0
  634. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr.h +35 -0
  635. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr_drbg.c +1016 -0
  636. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug.c +475 -0
  637. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug_internal.h +185 -0
  638. package/dist/lib/runtime-sources/vendor/mbedtls/library/des.c +1042 -0
  639. package/dist/lib/runtime-sources/vendor/mbedtls/library/dhm.c +700 -0
  640. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdh.c +696 -0
  641. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdsa.c +858 -0
  642. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecjpake.c +1216 -0
  643. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp.c +3674 -0
  644. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves.c +6125 -0
  645. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves_new.c +9 -0
  646. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_internal_alt.h +287 -0
  647. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_invasive.h +305 -0
  648. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy.c +680 -0
  649. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.c +233 -0
  650. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.h +64 -0
  651. package/dist/lib/runtime-sources/vendor/mbedtls/library/error.c +878 -0
  652. package/dist/lib/runtime-sources/vendor/mbedtls/library/gcm.c +1330 -0
  653. package/dist/lib/runtime-sources/vendor/mbedtls/library/hkdf.c +161 -0
  654. package/dist/lib/runtime-sources/vendor/mbedtls/library/hmac_drbg.c +633 -0
  655. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.c +789 -0
  656. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.h +288 -0
  657. package/dist/lib/runtime-sources/vendor/mbedtls/library/lms.c +778 -0
  658. package/dist/lib/runtime-sources/vendor/mbedtls/library/md.c +1108 -0
  659. package/dist/lib/runtime-sources/vendor/mbedtls/library/md5.c +426 -0
  660. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_psa.h +26 -0
  661. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_wrap.h +46 -0
  662. package/dist/lib/runtime-sources/vendor/mbedtls/library/memory_buffer_alloc.c +751 -0
  663. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_common.h +181 -0
  664. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_error.h +89 -0
  665. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.c +538 -0
  666. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.h +366 -0
  667. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.c +112 -0
  668. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.h +154 -0
  669. package/dist/lib/runtime-sources/vendor/mbedtls/library/net_sockets.c +694 -0
  670. package/dist/lib/runtime-sources/vendor/mbedtls/library/nist_kw.c +729 -0
  671. package/dist/lib/runtime-sources/vendor/mbedtls/library/oid.c +1166 -0
  672. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.c +157 -0
  673. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.h +111 -0
  674. package/dist/lib/runtime-sources/vendor/mbedtls/library/pem.c +554 -0
  675. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk.c +1602 -0
  676. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_ecc.c +261 -0
  677. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_internal.h +241 -0
  678. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.c +1618 -0
  679. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.h +138 -0
  680. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs12.c +437 -0
  681. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs5.c +500 -0
  682. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs7.c +787 -0
  683. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkparse.c +1392 -0
  684. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.c +631 -0
  685. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.h +121 -0
  686. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform.c +402 -0
  687. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform_util.c +258 -0
  688. package/dist/lib/runtime-sources/vendor/mbedtls/library/poly1305.c +492 -0
  689. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto.c +9532 -0
  690. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.c +646 -0
  691. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.h +499 -0
  692. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.c +747 -0
  693. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.h +316 -0
  694. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_client.c +22 -0
  695. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core.h +983 -0
  696. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core_common.h +52 -0
  697. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers.h +2896 -0
  698. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.c +256 -0
  699. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.h +31 -0
  700. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.c +594 -0
  701. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.h +267 -0
  702. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.c +361 -0
  703. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.h +131 -0
  704. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.c +470 -0
  705. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.h +211 -0
  706. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_invasive.h +92 -0
  707. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_its.h +131 -0
  708. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.c +505 -0
  709. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.h +264 -0
  710. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.c +571 -0
  711. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.h +159 -0
  712. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.c +181 -0
  713. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.h +72 -0
  714. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random_impl.h +200 -0
  715. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.c +714 -0
  716. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.h +321 -0
  717. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.c +373 -0
  718. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.h +192 -0
  719. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.c +1137 -0
  720. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.h +344 -0
  721. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.c +481 -0
  722. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.h +392 -0
  723. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_its_file.c +254 -0
  724. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util.c +614 -0
  725. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util_internal.h +100 -0
  726. package/dist/lib/runtime-sources/vendor/mbedtls/library/ripemd160.c +490 -0
  727. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa.c +3121 -0
  728. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.c +455 -0
  729. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.h +209 -0
  730. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_internal.h +188 -0
  731. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha1.c +480 -0
  732. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha256.c +983 -0
  733. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha3.c +721 -0
  734. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha512.c +1115 -0
  735. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cache.c +410 -0
  736. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites.c +2050 -0
  737. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites_internal.h +154 -0
  738. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.c +1023 -0
  739. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.h +22 -0
  740. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cookie.c +384 -0
  741. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers.h +85 -0
  742. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers_generated.c +251 -0
  743. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_misc.h +3198 -0
  744. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_msg.c +6619 -0
  745. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ticket.c +556 -0
  746. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls.c +10234 -0
  747. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_client.c +3688 -0
  748. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_server.c +4311 -0
  749. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_client.c +3208 -0
  750. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_generic.c +1793 -0
  751. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_invasive.h +23 -0
  752. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.c +1918 -0
  753. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.h +668 -0
  754. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_server.c +3624 -0
  755. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading.c +193 -0
  756. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading_internal.h +28 -0
  757. package/dist/lib/runtime-sources/vendor/mbedtls/library/timing.c +152 -0
  758. package/dist/lib/runtime-sources/vendor/mbedtls/library/version.c +32 -0
  759. package/dist/lib/runtime-sources/vendor/mbedtls/library/version_features.c +856 -0
  760. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509.c +1776 -0
  761. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_create.c +570 -0
  762. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crl.c +708 -0
  763. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crt.c +3311 -0
  764. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_csr.c +648 -0
  765. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_internal.h +101 -0
  766. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write.c +174 -0
  767. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_crt.c +688 -0
  768. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_csr.c +336 -0
  769. package/dist/lib/runtime-sources/vendor/quickjs-ng/CMakeLists.txt +566 -0
  770. package/dist/lib/runtime-sources/vendor/quickjs-ng/LICENSE +24 -0
  771. package/dist/lib/runtime-sources/vendor/quickjs-ng/README.md +24 -0
  772. package/dist/lib/runtime-sources/vendor/quickjs-ng/api-test.c +1195 -0
  773. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-array-fromasync.h +119 -0
  774. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip-keyed.h +332 -0
  775. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip.h +337 -0
  776. package/dist/lib/runtime-sources/vendor/quickjs-ng/cutils.h +1998 -0
  777. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.c +1619 -0
  778. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.h +87 -0
  779. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/function_source.c +81 -0
  780. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello.c +53 -0
  781. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello_module.c +106 -0
  782. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/repl.c +3036 -0
  783. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/standalone.c +323 -0
  784. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/test_fib.c +81 -0
  785. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp-opcode.h +73 -0
  786. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.c +3474 -0
  787. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.h +101 -0
  788. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode-table.h +5173 -0
  789. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.c +2069 -0
  790. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.h +172 -0
  791. package/dist/lib/runtime-sources/vendor/quickjs-ng/list.h +107 -0
  792. package/dist/lib/runtime-sources/vendor/quickjs-ng/lre-test.c +52 -0
  793. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjs.c +762 -0
  794. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjsc.c +673 -0
  795. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-atom.h +280 -0
  796. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-c-atomics.h +54 -0
  797. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.c +5037 -0
  798. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.h +87 -0
  799. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-opcode.h +377 -0
  800. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.c +64041 -0
  801. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.h +1447 -0
  802. package/dist/lib/runtime-sources/vendor/quickjs-ng/run-test262.c +2374 -0
  803. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen.c +3121 -0
  804. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen_def.h +310 -0
  805. package/dist/lib/runtime-sources/vendor/ryu/LICENSE-Boost +23 -0
  806. package/dist/lib/runtime-sources/vendor/ryu/common.h +114 -0
  807. package/dist/lib/runtime-sources/vendor/ryu/d2s.c +509 -0
  808. package/dist/lib/runtime-sources/vendor/ryu/d2s_full_table.h +367 -0
  809. package/dist/lib/runtime-sources/vendor/ryu/d2s_intrinsics.h +357 -0
  810. package/dist/lib/runtime-sources/vendor/ryu/d2s_small_table.h +186 -0
  811. package/dist/lib/runtime-sources/vendor/ryu/digit_table.h +35 -0
  812. package/dist/lib/runtime-sources/vendor/ryu/ryu.h +46 -0
  813. package/dist/lib/runtime-sources/vendor/unicode/LICENSE +39 -0
  814. package/dist/lib/runtime-sources/vendor/zlib/LICENSE +22 -0
  815. package/dist/lib/runtime-sources/vendor/zlib/adler32.c +164 -0
  816. package/dist/lib/runtime-sources/vendor/zlib/compress.c +75 -0
  817. package/dist/lib/runtime-sources/vendor/zlib/crc32.c +1049 -0
  818. package/dist/lib/runtime-sources/vendor/zlib/crc32.h +9446 -0
  819. package/dist/lib/runtime-sources/vendor/zlib/deflate.c +2139 -0
  820. package/dist/lib/runtime-sources/vendor/zlib/deflate.h +377 -0
  821. package/dist/lib/runtime-sources/vendor/zlib/gzclose.c +23 -0
  822. package/dist/lib/runtime-sources/vendor/zlib/gzguts.h +214 -0
  823. package/dist/lib/runtime-sources/vendor/zlib/gzlib.c +582 -0
  824. package/dist/lib/runtime-sources/vendor/zlib/gzread.c +602 -0
  825. package/dist/lib/runtime-sources/vendor/zlib/gzwrite.c +631 -0
  826. package/dist/lib/runtime-sources/vendor/zlib/infback.c +628 -0
  827. package/dist/lib/runtime-sources/vendor/zlib/inffast.c +320 -0
  828. package/dist/lib/runtime-sources/vendor/zlib/inffast.h +11 -0
  829. package/dist/lib/runtime-sources/vendor/zlib/inffixed.h +94 -0
  830. package/dist/lib/runtime-sources/vendor/zlib/inflate.c +1526 -0
  831. package/dist/lib/runtime-sources/vendor/zlib/inflate.h +126 -0
  832. package/dist/lib/runtime-sources/vendor/zlib/inftrees.c +299 -0
  833. package/dist/lib/runtime-sources/vendor/zlib/inftrees.h +62 -0
  834. package/dist/lib/runtime-sources/vendor/zlib/trees.c +1117 -0
  835. package/dist/lib/runtime-sources/vendor/zlib/trees.h +128 -0
  836. package/dist/lib/runtime-sources/vendor/zlib/uncompr.c +85 -0
  837. package/dist/lib/runtime-sources/vendor/zlib/zconf.h +543 -0
  838. package/dist/lib/runtime-sources/vendor/zlib/zlib.h +1938 -0
  839. package/dist/lib/runtime-sources/vendor/zlib/zutil.c +299 -0
  840. package/dist/lib/runtime-sources/vendor/zlib/zutil.h +254 -0
  841. package/dist/lib/scriptc-comptime +0 -0
  842. package/dist/lib/typescript/LICENSE +55 -0
  843. package/dist/lib/typescript/NOTICE.txt +436 -0
  844. package/dist/lib/typescript/lib/lib.d.ts +20 -0
  845. package/dist/lib/typescript/lib/lib.decorators.d.ts +382 -0
  846. package/dist/lib/typescript/lib/lib.decorators.legacy.d.ts +20 -0
  847. package/dist/lib/typescript/lib/lib.dom.asynciterable.d.ts +18 -0
  848. package/dist/lib/typescript/lib/lib.dom.d.ts +45125 -0
  849. package/dist/lib/typescript/lib/lib.dom.iterable.d.ts +18 -0
  850. package/dist/lib/typescript/lib/lib.es2015.collection.d.ts +159 -0
  851. package/dist/lib/typescript/lib/lib.es2015.core.d.ts +595 -0
  852. package/dist/lib/typescript/lib/lib.es2015.d.ts +26 -0
  853. package/dist/lib/typescript/lib/lib.es2015.generator.d.ts +75 -0
  854. package/dist/lib/typescript/lib/lib.es2015.iterable.d.ts +603 -0
  855. package/dist/lib/typescript/lib/lib.es2015.promise.d.ts +79 -0
  856. package/dist/lib/typescript/lib/lib.es2015.proxy.d.ts +126 -0
  857. package/dist/lib/typescript/lib/lib.es2015.reflect.d.ts +142 -0
  858. package/dist/lib/typescript/lib/lib.es2015.symbol.d.ts +44 -0
  859. package/dist/lib/typescript/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  860. package/dist/lib/typescript/lib/lib.es2016.array.include.d.ts +114 -0
  861. package/dist/lib/typescript/lib/lib.es2016.d.ts +19 -0
  862. package/dist/lib/typescript/lib/lib.es2016.full.d.ts +21 -0
  863. package/dist/lib/typescript/lib/lib.es2016.intl.d.ts +29 -0
  864. package/dist/lib/typescript/lib/lib.es2017.arraybuffer.d.ts +19 -0
  865. package/dist/lib/typescript/lib/lib.es2017.d.ts +24 -0
  866. package/dist/lib/typescript/lib/lib.es2017.date.d.ts +29 -0
  867. package/dist/lib/typescript/lib/lib.es2017.full.d.ts +21 -0
  868. package/dist/lib/typescript/lib/lib.es2017.intl.d.ts +42 -0
  869. package/dist/lib/typescript/lib/lib.es2017.object.d.ts +47 -0
  870. package/dist/lib/typescript/lib/lib.es2017.sharedmemory.d.ts +133 -0
  871. package/dist/lib/typescript/lib/lib.es2017.string.d.ts +47 -0
  872. package/dist/lib/typescript/lib/lib.es2017.typedarrays.d.ts +51 -0
  873. package/dist/lib/typescript/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  874. package/dist/lib/typescript/lib/lib.es2018.asynciterable.d.ts +51 -0
  875. package/dist/lib/typescript/lib/lib.es2018.d.ts +22 -0
  876. package/dist/lib/typescript/lib/lib.es2018.full.d.ts +22 -0
  877. package/dist/lib/typescript/lib/lib.es2018.intl.d.ts +81 -0
  878. package/dist/lib/typescript/lib/lib.es2018.promise.d.ts +28 -0
  879. package/dist/lib/typescript/lib/lib.es2018.regexp.d.ts +35 -0
  880. package/dist/lib/typescript/lib/lib.es2019.array.d.ts +77 -0
  881. package/dist/lib/typescript/lib/lib.es2019.d.ts +22 -0
  882. package/dist/lib/typescript/lib/lib.es2019.full.d.ts +22 -0
  883. package/dist/lib/typescript/lib/lib.es2019.intl.d.ts +21 -0
  884. package/dist/lib/typescript/lib/lib.es2019.object.d.ts +31 -0
  885. package/dist/lib/typescript/lib/lib.es2019.string.d.ts +35 -0
  886. package/dist/lib/typescript/lib/lib.es2019.symbol.d.ts +22 -0
  887. package/dist/lib/typescript/lib/lib.es2020.bigint.d.ts +763 -0
  888. package/dist/lib/typescript/lib/lib.es2020.d.ts +25 -0
  889. package/dist/lib/typescript/lib/lib.es2020.date.d.ts +40 -0
  890. package/dist/lib/typescript/lib/lib.es2020.full.d.ts +22 -0
  891. package/dist/lib/typescript/lib/lib.es2020.intl.d.ts +472 -0
  892. package/dist/lib/typescript/lib/lib.es2020.number.d.ts +26 -0
  893. package/dist/lib/typescript/lib/lib.es2020.promise.d.ts +45 -0
  894. package/dist/lib/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  895. package/dist/lib/typescript/lib/lib.es2020.string.d.ts +42 -0
  896. package/dist/lib/typescript/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  897. package/dist/lib/typescript/lib/lib.es2021.d.ts +21 -0
  898. package/dist/lib/typescript/lib/lib.es2021.full.d.ts +22 -0
  899. package/dist/lib/typescript/lib/lib.es2021.intl.d.ts +164 -0
  900. package/dist/lib/typescript/lib/lib.es2021.promise.d.ts +46 -0
  901. package/dist/lib/typescript/lib/lib.es2021.string.d.ts +31 -0
  902. package/dist/lib/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  903. package/dist/lib/typescript/lib/lib.es2022.array.d.ts +119 -0
  904. package/dist/lib/typescript/lib/lib.es2022.d.ts +23 -0
  905. package/dist/lib/typescript/lib/lib.es2022.error.d.ts +73 -0
  906. package/dist/lib/typescript/lib/lib.es2022.full.d.ts +22 -0
  907. package/dist/lib/typescript/lib/lib.es2022.intl.d.ts +143 -0
  908. package/dist/lib/typescript/lib/lib.es2022.object.d.ts +24 -0
  909. package/dist/lib/typescript/lib/lib.es2022.regexp.d.ts +37 -0
  910. package/dist/lib/typescript/lib/lib.es2022.string.d.ts +23 -0
  911. package/dist/lib/typescript/lib/lib.es2023.array.d.ts +922 -0
  912. package/dist/lib/typescript/lib/lib.es2023.collection.d.ts +19 -0
  913. package/dist/lib/typescript/lib/lib.es2023.d.ts +20 -0
  914. package/dist/lib/typescript/lib/lib.es2023.full.d.ts +22 -0
  915. package/dist/lib/typescript/lib/lib.es2023.intl.d.ts +62 -0
  916. package/dist/lib/typescript/lib/lib.es2024.arraybuffer.d.ts +63 -0
  917. package/dist/lib/typescript/lib/lib.es2024.collection.d.ts +27 -0
  918. package/dist/lib/typescript/lib/lib.es2024.d.ts +24 -0
  919. package/dist/lib/typescript/lib/lib.es2024.full.d.ts +22 -0
  920. package/dist/lib/typescript/lib/lib.es2024.object.d.ts +27 -0
  921. package/dist/lib/typescript/lib/lib.es2024.promise.d.ts +33 -0
  922. package/dist/lib/typescript/lib/lib.es2024.regexp.d.ts +23 -0
  923. package/dist/lib/typescript/lib/lib.es2024.sharedmemory.d.ts +66 -0
  924. package/dist/lib/typescript/lib/lib.es2024.string.d.ts +27 -0
  925. package/dist/lib/typescript/lib/lib.es2025.collection.d.ts +94 -0
  926. package/dist/lib/typescript/lib/lib.es2025.d.ts +23 -0
  927. package/dist/lib/typescript/lib/lib.es2025.float16.d.ts +443 -0
  928. package/dist/lib/typescript/lib/lib.es2025.full.d.ts +22 -0
  929. package/dist/lib/typescript/lib/lib.es2025.intl.d.ts +200 -0
  930. package/dist/lib/typescript/lib/lib.es2025.iterator.d.ts +146 -0
  931. package/dist/lib/typescript/lib/lib.es2025.promise.d.ts +32 -0
  932. package/dist/lib/typescript/lib/lib.es2025.regexp.d.ts +30 -0
  933. package/dist/lib/typescript/lib/lib.es5.d.ts +4599 -0
  934. package/dist/lib/typescript/lib/lib.es6.d.ts +21 -0
  935. package/dist/lib/typescript/lib/lib.esnext.array.d.ts +33 -0
  936. package/dist/lib/typescript/lib/lib.esnext.collection.d.ts +47 -0
  937. package/dist/lib/typescript/lib/lib.esnext.d.ts +27 -0
  938. package/dist/lib/typescript/lib/lib.esnext.date.d.ts +21 -0
  939. package/dist/lib/typescript/lib/lib.esnext.decorators.d.ts +26 -0
  940. package/dist/lib/typescript/lib/lib.esnext.disposable.d.ts +191 -0
  941. package/dist/lib/typescript/lib/lib.esnext.error.d.ts +22 -0
  942. package/dist/lib/typescript/lib/lib.esnext.full.d.ts +22 -0
  943. package/dist/lib/typescript/lib/lib.esnext.intl.d.ts +107 -0
  944. package/dist/lib/typescript/lib/lib.esnext.sharedmemory.d.ts +23 -0
  945. package/dist/lib/typescript/lib/lib.esnext.temporal.d.ts +485 -0
  946. package/dist/lib/typescript/lib/lib.esnext.typedarrays.d.ts +90 -0
  947. package/dist/lib/typescript/lib/lib.scripthost.d.ts +320 -0
  948. package/dist/lib/typescript/lib/lib.webworker.asynciterable.d.ts +18 -0
  949. package/dist/lib/typescript/lib/lib.webworker.d.ts +15606 -0
  950. package/dist/lib/typescript/lib/lib.webworker.importscripts.d.ts +21 -0
  951. package/dist/lib/typescript/lib/lib.webworker.iterable.d.ts +18 -0
  952. package/dist/lib/typescript/lib/tsc +0 -0
  953. package/dist/lib/typescript/package.json +45 -0
  954. package/dist/lib/wasi/cli/wasi-paths.js +41 -0
  955. package/dist/lib/wasi/cli/wasi-runner.js +28 -0
  956. package/dist/lib/wasi/package.json +1 -0
  957. package/dist/lib/wasi/wasi-paths.js +25 -0
  958. package/package.json +22 -6
  959. package/README.md +0 -3
  960. package/index.js +0 -2
@@ -0,0 +1,2069 @@
1
+ /*
2
+ * Unicode utilities
3
+ *
4
+ * Copyright (c) 2017-2018 Fabrice Bellard
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */
24
+ #include <stdlib.h>
25
+ #include <stdio.h>
26
+ #include <stdarg.h>
27
+ #include <string.h>
28
+ #include <assert.h>
29
+
30
+ #include "cutils.h"
31
+ #include "libunicode.h"
32
+ #include "libunicode-table.h"
33
+
34
+ // note: stored as 4 bit tag, not much room left
35
+ enum {
36
+ RUN_TYPE_U,
37
+ RUN_TYPE_L,
38
+ RUN_TYPE_UF,
39
+ RUN_TYPE_LF,
40
+ RUN_TYPE_UL,
41
+ RUN_TYPE_LSU,
42
+ RUN_TYPE_U2L_399_EXT2,
43
+ RUN_TYPE_UF_D20,
44
+ RUN_TYPE_UF_D1_EXT,
45
+ RUN_TYPE_U_EXT,
46
+ RUN_TYPE_LF_EXT,
47
+ RUN_TYPE_UF_EXT2,
48
+ RUN_TYPE_LF_EXT2,
49
+ RUN_TYPE_UF_EXT3,
50
+ };
51
+
52
+ static int lre_case_conv1(uint32_t c, int conv_type)
53
+ {
54
+ uint32_t res[LRE_CC_RES_LEN_MAX];
55
+ lre_case_conv(res, c, conv_type);
56
+ return res[0];
57
+ }
58
+
59
+ /* case conversion using the table entry 'idx' with value 'v' */
60
+ static int lre_case_conv_entry(uint32_t *res, uint32_t c, int conv_type, uint32_t idx, uint32_t v)
61
+ {
62
+ uint32_t code, data, type, a, is_lower;
63
+ is_lower = (conv_type != 0);
64
+ type = (v >> (32 - 17 - 7 - 4)) & 0xf;
65
+ data = ((v & 0xf) << 8) | case_conv_table2[idx];
66
+ code = v >> (32 - 17);
67
+ switch(type) {
68
+ case RUN_TYPE_U:
69
+ case RUN_TYPE_L:
70
+ case RUN_TYPE_UF:
71
+ case RUN_TYPE_LF:
72
+ if (conv_type == (type & 1) ||
73
+ (type >= RUN_TYPE_UF && conv_type == 2)) {
74
+ c = c - code + (case_conv_table1[data] >> (32 - 17));
75
+ }
76
+ break;
77
+ case RUN_TYPE_UL:
78
+ a = c - code;
79
+ if ((a & 1) != (1 - is_lower))
80
+ break;
81
+ c = (a ^ 1) + code;
82
+ break;
83
+ case RUN_TYPE_LSU:
84
+ a = c - code;
85
+ if (a == 1) {
86
+ c += 2 * is_lower - 1;
87
+ } else if (a == (1 - is_lower) * 2) {
88
+ c += (2 * is_lower - 1) * 2;
89
+ }
90
+ break;
91
+ case RUN_TYPE_U2L_399_EXT2:
92
+ if (!is_lower) {
93
+ res[0] = c - code + case_conv_ext[data >> 6];
94
+ res[1] = 0x399;
95
+ return 2;
96
+ } else {
97
+ c = c - code + case_conv_ext[data & 0x3f];
98
+ }
99
+ break;
100
+ case RUN_TYPE_UF_D20:
101
+ if (conv_type == 1)
102
+ break;
103
+ c = data + (conv_type == 2) * 0x20;
104
+ break;
105
+ case RUN_TYPE_UF_D1_EXT:
106
+ if (conv_type == 1)
107
+ break;
108
+ c = case_conv_ext[data] + (conv_type == 2);
109
+ break;
110
+ case RUN_TYPE_U_EXT:
111
+ case RUN_TYPE_LF_EXT:
112
+ if (is_lower != (type - RUN_TYPE_U_EXT))
113
+ break;
114
+ c = case_conv_ext[data];
115
+ break;
116
+ case RUN_TYPE_LF_EXT2:
117
+ if (!is_lower)
118
+ break;
119
+ res[0] = c - code + case_conv_ext[data >> 6];
120
+ res[1] = case_conv_ext[data & 0x3f];
121
+ return 2;
122
+ case RUN_TYPE_UF_EXT2:
123
+ if (conv_type == 1)
124
+ break;
125
+ res[0] = c - code + case_conv_ext[data >> 6];
126
+ res[1] = case_conv_ext[data & 0x3f];
127
+ if (conv_type == 2) {
128
+ /* convert to lower */
129
+ res[0] = lre_case_conv1(res[0], 1);
130
+ res[1] = lre_case_conv1(res[1], 1);
131
+ }
132
+ return 2;
133
+ default:
134
+ case RUN_TYPE_UF_EXT3:
135
+ if (conv_type == 1)
136
+ break;
137
+ res[0] = case_conv_ext[data >> 8];
138
+ res[1] = case_conv_ext[(data >> 4) & 0xf];
139
+ res[2] = case_conv_ext[data & 0xf];
140
+ if (conv_type == 2) {
141
+ /* convert to lower */
142
+ res[0] = lre_case_conv1(res[0], 1);
143
+ res[1] = lre_case_conv1(res[1], 1);
144
+ res[2] = lre_case_conv1(res[2], 1);
145
+ }
146
+ return 3;
147
+ }
148
+ res[0] = c;
149
+ return 1;
150
+ }
151
+
152
+ /* conv_type:
153
+ 0 = to upper
154
+ 1 = to lower
155
+ 2 = case folding (= to lower with modifications)
156
+ */
157
+ int lre_case_conv(uint32_t *res, uint32_t c, int conv_type)
158
+ {
159
+ if (c < 128) {
160
+ if (conv_type) {
161
+ if (c >= 'A' && c <= 'Z') {
162
+ c = c - 'A' + 'a';
163
+ }
164
+ } else {
165
+ if (c >= 'a' && c <= 'z') {
166
+ c = c - 'a' + 'A';
167
+ }
168
+ }
169
+ } else {
170
+ uint32_t v, code, len;
171
+ int idx, idx_min, idx_max;
172
+
173
+ idx_min = 0;
174
+ idx_max = countof(case_conv_table1) - 1;
175
+ while (idx_min <= idx_max) {
176
+ idx = (unsigned)(idx_max + idx_min) / 2;
177
+ v = case_conv_table1[idx];
178
+ code = v >> (32 - 17);
179
+ len = (v >> (32 - 17 - 7)) & 0x7f;
180
+ if (c < code) {
181
+ idx_max = idx - 1;
182
+ } else if (c >= code + len) {
183
+ idx_min = idx + 1;
184
+ } else {
185
+ return lre_case_conv_entry(res, c, conv_type, idx, v);
186
+ }
187
+ }
188
+ }
189
+ res[0] = c;
190
+ return 1;
191
+ }
192
+
193
+ static int lre_case_folding_entry(uint32_t c, uint32_t idx, uint32_t v, bool is_unicode)
194
+ {
195
+ uint32_t res[LRE_CC_RES_LEN_MAX];
196
+ int len;
197
+
198
+ if (is_unicode) {
199
+ len = lre_case_conv_entry(res, c, 2, idx, v);
200
+ if (len == 1) {
201
+ c = res[0];
202
+ } else {
203
+ /* handle the few specific multi-character cases (see
204
+ unicode_gen.c:dump_case_folding_special_cases()) */
205
+ if (c == 0xfb06) {
206
+ c = 0xfb05;
207
+ } else if (c == 0x01fd3) {
208
+ c = 0x390;
209
+ } else if (c == 0x01fe3) {
210
+ c = 0x3b0;
211
+ }
212
+ }
213
+ } else {
214
+ if (likely(c < 128)) {
215
+ if (c >= 'a' && c <= 'z')
216
+ c = c - 'a' + 'A';
217
+ } else {
218
+ /* legacy regexp: to upper case if single char >= 128 */
219
+ len = lre_case_conv_entry(res, c, false, idx, v);
220
+ if (len == 1 && res[0] >= 128)
221
+ c = res[0];
222
+ }
223
+ }
224
+ return c;
225
+ }
226
+
227
+ /* JS regexp specific rules for case folding */
228
+ int lre_canonicalize(uint32_t c, bool is_unicode)
229
+ {
230
+ if (c < 128) {
231
+ /* fast case */
232
+ if (is_unicode) {
233
+ if (c >= 'A' && c <= 'Z') {
234
+ c = c - 'A' + 'a';
235
+ }
236
+ } else {
237
+ if (c >= 'a' && c <= 'z') {
238
+ c = c - 'a' + 'A';
239
+ }
240
+ }
241
+ } else {
242
+ uint32_t v, code, len;
243
+ int idx, idx_min, idx_max;
244
+
245
+ idx_min = 0;
246
+ idx_max = countof(case_conv_table1) - 1;
247
+ while (idx_min <= idx_max) {
248
+ idx = (unsigned)(idx_max + idx_min) / 2;
249
+ v = case_conv_table1[idx];
250
+ code = v >> (32 - 17);
251
+ len = (v >> (32 - 17 - 7)) & 0x7f;
252
+ if (c < code) {
253
+ idx_max = idx - 1;
254
+ } else if (c >= code + len) {
255
+ idx_min = idx + 1;
256
+ } else {
257
+ return lre_case_folding_entry(c, idx, v, is_unicode);
258
+ }
259
+ }
260
+ }
261
+ return c;
262
+ }
263
+
264
+ static uint32_t get_le24(const uint8_t *ptr)
265
+ {
266
+ return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16);
267
+ }
268
+
269
+ #define UNICODE_INDEX_BLOCK_LEN 32
270
+
271
+ /* return -1 if not in table, otherwise the offset in the block */
272
+ static int get_index_pos(uint32_t *pcode, uint32_t c,
273
+ const uint8_t *index_table, int index_table_len)
274
+ {
275
+ uint32_t code, v;
276
+ int idx_min, idx_max, idx;
277
+
278
+ idx_min = 0;
279
+ v = get_le24(index_table);
280
+ code = v & ((1 << 21) - 1);
281
+ if (c < code) {
282
+ *pcode = 0;
283
+ return 0;
284
+ }
285
+ idx_max = index_table_len - 1;
286
+ code = get_le24(index_table + idx_max * 3);
287
+ if (c >= code)
288
+ return -1;
289
+ /* invariant: tab[idx_min] <= c < tab2[idx_max] */
290
+ while ((idx_max - idx_min) > 1) {
291
+ idx = (idx_max + idx_min) / 2;
292
+ v = get_le24(index_table + idx * 3);
293
+ code = v & ((1 << 21) - 1);
294
+ if (c < code) {
295
+ idx_max = idx;
296
+ } else {
297
+ idx_min = idx;
298
+ }
299
+ }
300
+ v = get_le24(index_table + idx_min * 3);
301
+ *pcode = v & ((1 << 21) - 1);
302
+ return (idx_min + 1) * UNICODE_INDEX_BLOCK_LEN + (v >> 21);
303
+ }
304
+
305
+ static bool lre_is_in_table(uint32_t c, const uint8_t *table,
306
+ const uint8_t *index_table, int index_table_len)
307
+ {
308
+ uint32_t code, b, bit;
309
+ int pos;
310
+ const uint8_t *p;
311
+
312
+ pos = get_index_pos(&code, c, index_table, index_table_len);
313
+ if (pos < 0)
314
+ return false; /* outside the table */
315
+ p = table + pos;
316
+ bit = 0;
317
+ for(;;) {
318
+ b = *p++;
319
+ if (b < 64) {
320
+ code += (b >> 3) + 1;
321
+ if (c < code)
322
+ return bit;
323
+ bit ^= 1;
324
+ code += (b & 7) + 1;
325
+ } else if (b >= 0x80) {
326
+ code += b - 0x80 + 1;
327
+ } else if (b < 0x60) {
328
+ code += (((b - 0x40) << 8) | p[0]) + 1;
329
+ p++;
330
+ } else {
331
+ code += (((b - 0x60) << 16) | (p[0] << 8) | p[1]) + 1;
332
+ p += 2;
333
+ }
334
+ if (c < code)
335
+ return bit;
336
+ bit ^= 1;
337
+ }
338
+ }
339
+
340
+ bool lre_is_cased(uint32_t c)
341
+ {
342
+ uint32_t v, code, len;
343
+ int idx, idx_min, idx_max;
344
+
345
+ idx_min = 0;
346
+ idx_max = countof(case_conv_table1) - 1;
347
+ while (idx_min <= idx_max) {
348
+ idx = (unsigned)(idx_max + idx_min) / 2;
349
+ v = case_conv_table1[idx];
350
+ code = v >> (32 - 17);
351
+ len = (v >> (32 - 17 - 7)) & 0x7f;
352
+ if (c < code) {
353
+ idx_max = idx - 1;
354
+ } else if (c >= code + len) {
355
+ idx_min = idx + 1;
356
+ } else {
357
+ return true;
358
+ }
359
+ }
360
+ return lre_is_in_table(c, unicode_prop_Cased1_table,
361
+ unicode_prop_Cased1_index,
362
+ sizeof(unicode_prop_Cased1_index) / 3);
363
+ }
364
+
365
+ bool lre_is_case_ignorable(uint32_t c)
366
+ {
367
+ return lre_is_in_table(c, unicode_prop_Case_Ignorable_table,
368
+ unicode_prop_Case_Ignorable_index,
369
+ sizeof(unicode_prop_Case_Ignorable_index) / 3);
370
+ }
371
+
372
+ /* character range */
373
+
374
+ static __maybe_unused void cr_dump(CharRange *cr)
375
+ {
376
+ int i;
377
+ for(i = 0; i < cr->len; i++)
378
+ printf("%d: 0x%04x\n", i, cr->points[i]);
379
+ }
380
+
381
+ static void *cr_default_realloc(void *opaque, void *ptr, size_t size)
382
+ {
383
+ return realloc(ptr, size);
384
+ }
385
+
386
+ void cr_init(CharRange *cr, void *mem_opaque, DynBufReallocFunc *realloc_func)
387
+ {
388
+ cr->len = cr->size = 0;
389
+ cr->points = NULL;
390
+ cr->mem_opaque = mem_opaque;
391
+ cr->realloc_func = realloc_func ? realloc_func : cr_default_realloc;
392
+ }
393
+
394
+ void cr_free(CharRange *cr)
395
+ {
396
+ cr->realloc_func(cr->mem_opaque, cr->points, 0);
397
+ }
398
+
399
+ int cr_realloc(CharRange *cr, int size)
400
+ {
401
+ int new_size;
402
+ uint32_t *new_buf;
403
+
404
+ if (size > cr->size) {
405
+ new_size = max_int(size, cr->size * 3 / 2);
406
+ new_buf = cr->realloc_func(cr->mem_opaque, cr->points,
407
+ new_size * sizeof(cr->points[0]));
408
+ if (!new_buf)
409
+ return -1;
410
+ cr->points = new_buf;
411
+ cr->size = new_size;
412
+ }
413
+ return 0;
414
+ }
415
+
416
+ int cr_copy(CharRange *cr, const CharRange *cr1)
417
+ {
418
+ if (cr_realloc(cr, cr1->len))
419
+ return -1;
420
+ memcpy(cr->points, cr1->points, sizeof(cr->points[0]) * cr1->len);
421
+ cr->len = cr1->len;
422
+ return 0;
423
+ }
424
+
425
+ /* merge consecutive intervals and remove empty intervals */
426
+ static void cr_compress(CharRange *cr)
427
+ {
428
+ int i, j, k, len;
429
+ uint32_t *pt;
430
+
431
+ pt = cr->points;
432
+ len = cr->len;
433
+ i = 0;
434
+ j = 0;
435
+ k = 0;
436
+ while ((i + 1) < len) {
437
+ if (pt[i] == pt[i + 1]) {
438
+ /* empty interval */
439
+ i += 2;
440
+ } else {
441
+ j = i;
442
+ while ((j + 3) < len && pt[j + 1] == pt[j + 2])
443
+ j += 2;
444
+ /* just copy */
445
+ pt[k] = pt[i];
446
+ pt[k + 1] = pt[j + 1];
447
+ k += 2;
448
+ i = j + 2;
449
+ }
450
+ }
451
+ cr->len = k;
452
+ }
453
+
454
+ /* union or intersection */
455
+ int cr_op(CharRange *cr, const uint32_t *a_pt, int a_len,
456
+ const uint32_t *b_pt, int b_len, int op)
457
+ {
458
+ int a_idx, b_idx, is_in;
459
+ uint32_t v;
460
+
461
+ a_idx = 0;
462
+ b_idx = 0;
463
+ for(;;) {
464
+ /* get one more point from a or b in increasing order */
465
+ if (a_idx < a_len && b_idx < b_len) {
466
+ if (a_pt[a_idx] < b_pt[b_idx]) {
467
+ goto a_add;
468
+ } else if (a_pt[a_idx] == b_pt[b_idx]) {
469
+ v = a_pt[a_idx];
470
+ a_idx++;
471
+ b_idx++;
472
+ } else {
473
+ goto b_add;
474
+ }
475
+ } else if (a_idx < a_len) {
476
+ a_add:
477
+ v = a_pt[a_idx++];
478
+ } else if (b_idx < b_len) {
479
+ b_add:
480
+ v = b_pt[b_idx++];
481
+ } else {
482
+ break;
483
+ }
484
+ /* add the point if the in/out status changes */
485
+ switch(op) {
486
+ case CR_OP_UNION:
487
+ is_in = (a_idx & 1) | (b_idx & 1);
488
+ break;
489
+ case CR_OP_INTER:
490
+ is_in = (a_idx & 1) & (b_idx & 1);
491
+ break;
492
+ case CR_OP_XOR:
493
+ is_in = (a_idx & 1) ^ (b_idx & 1);
494
+ break;
495
+ case CR_OP_SUB:
496
+ is_in = (a_idx & 1) & ((b_idx & 1) ^ 1);
497
+ break;
498
+ default:
499
+ abort();
500
+ }
501
+ if (is_in != (cr->len & 1)) {
502
+ if (cr_add_point(cr, v))
503
+ return -1;
504
+ }
505
+ }
506
+ cr_compress(cr);
507
+ return 0;
508
+ }
509
+
510
+ int cr_op1(CharRange *cr, const uint32_t *b_pt, int b_len, int op)
511
+ {
512
+ CharRange a = *cr;
513
+ int ret;
514
+ cr->len = 0;
515
+ cr->size = 0;
516
+ cr->points = NULL;
517
+ ret = cr_op(cr, a.points, a.len, b_pt, b_len, op);
518
+ cr_free(&a);
519
+ return ret;
520
+ }
521
+
522
+ int cr_invert(CharRange *cr)
523
+ {
524
+ int len;
525
+ len = cr->len;
526
+ if (cr_realloc(cr, len + 2))
527
+ return -1;
528
+ memmove(cr->points + 1, cr->points, len * sizeof(cr->points[0]));
529
+ cr->points[0] = 0;
530
+ cr->points[len + 1] = UINT32_MAX;
531
+ cr->len = len + 2;
532
+ cr_compress(cr);
533
+ return 0;
534
+ }
535
+
536
+ bool lre_is_id_start(uint32_t c)
537
+ {
538
+ return lre_is_in_table(c, unicode_prop_ID_Start_table,
539
+ unicode_prop_ID_Start_index,
540
+ sizeof(unicode_prop_ID_Start_index) / 3);
541
+ }
542
+
543
+ bool lre_is_id_continue(uint32_t c)
544
+ {
545
+ return lre_is_id_start(c) ||
546
+ lre_is_in_table(c, unicode_prop_ID_Continue1_table,
547
+ unicode_prop_ID_Continue1_index,
548
+ sizeof(unicode_prop_ID_Continue1_index) / 3);
549
+ }
550
+
551
+ bool lre_is_white_space(uint32_t c)
552
+ {
553
+ return lre_is_in_table(c, unicode_prop_White_Space_table,
554
+ unicode_prop_White_Space_index,
555
+ sizeof(unicode_prop_White_Space_index) / 3);
556
+ }
557
+
558
+ /*---- lre codepoint categorizing functions ----*/
559
+
560
+ #define S UNICODE_C_SPACE
561
+ #define D UNICODE_C_DIGIT
562
+ #define X UNICODE_C_XDIGIT
563
+ #define U UNICODE_C_UPPER
564
+ #define L UNICODE_C_LOWER
565
+ #define _ UNICODE_C_UNDER
566
+ #define d UNICODE_C_DOLLAR
567
+
568
+ uint8_t const lre_ctype_bits[256] = {
569
+ 0, 0, 0, 0, 0, 0, 0, 0,
570
+ 0, S, S, S, S, S, 0, 0,
571
+ 0, 0, 0, 0, 0, 0, 0, 0,
572
+ 0, 0, 0, 0, 0, 0, 0, 0,
573
+
574
+ S, 0, 0, 0, d, 0, 0, 0,
575
+ 0, 0, 0, 0, 0, 0, 0, 0,
576
+ X|D, X|D, X|D, X|D, X|D, X|D, X|D, X|D,
577
+ X|D, X|D, 0, 0, 0, 0, 0, 0,
578
+
579
+ 0, X|U, X|U, X|U, X|U, X|U, X|U, U,
580
+ U, U, U, U, U, U, U, U,
581
+ U, U, U, U, U, U, U, U,
582
+ U, U, U, 0, 0, 0, 0, _,
583
+
584
+ 0, X|L, X|L, X|L, X|L, X|L, X|L, L,
585
+ L, L, L, L, L, L, L, L,
586
+ L, L, L, L, L, L, L, L,
587
+ L, L, L, 0, 0, 0, 0, 0,
588
+
589
+ 0, 0, 0, 0, 0, 0, 0, 0,
590
+ 0, 0, 0, 0, 0, 0, 0, 0,
591
+ 0, 0, 0, 0, 0, 0, 0, 0,
592
+ 0, 0, 0, 0, 0, 0, 0, 0,
593
+
594
+ S, 0, 0, 0, 0, 0, 0, 0,
595
+ 0, 0, 0, 0, 0, 0, 0, 0,
596
+ 0, 0, 0, 0, 0, 0, 0, 0,
597
+ 0, 0, 0, 0, 0, 0, 0, 0,
598
+
599
+ 0, 0, 0, 0, 0, 0, 0, 0,
600
+ 0, 0, 0, 0, 0, 0, 0, 0,
601
+ 0, 0, 0, 0, 0, 0, 0, 0,
602
+ 0, 0, 0, 0, 0, 0, 0, 0,
603
+
604
+ 0, 0, 0, 0, 0, 0, 0, 0,
605
+ 0, 0, 0, 0, 0, 0, 0, 0,
606
+ 0, 0, 0, 0, 0, 0, 0, 0,
607
+ 0, 0, 0, 0, 0, 0, 0, 0,
608
+ };
609
+
610
+ #undef S
611
+ #undef D
612
+ #undef X
613
+ #undef U
614
+ #undef L
615
+ #undef _
616
+ #undef d
617
+
618
+ /* code point ranges for Zs,Zl or Zp property */
619
+ static const uint16_t char_range_space[] = {
620
+ 10,
621
+ 0x0009, 0x000D + 1,
622
+ 0x0020, 0x0020 + 1,
623
+ 0x00A0, 0x00A0 + 1,
624
+ 0x1680, 0x1680 + 1,
625
+ 0x2000, 0x200A + 1,
626
+ /* 2028;LINE SEPARATOR;Zl;0;WS;;;;;N;;;;; */
627
+ /* 2029;PARAGRAPH SEPARATOR;Zp;0;B;;;;;N;;;;; */
628
+ 0x2028, 0x2029 + 1,
629
+ 0x202F, 0x202F + 1,
630
+ 0x205F, 0x205F + 1,
631
+ 0x3000, 0x3000 + 1,
632
+ /* FEFF;ZERO WIDTH NO-BREAK SPACE;Cf;0;BN;;;;;N;BYTE ORDER MARK;;;; */
633
+ 0xFEFF, 0xFEFF + 1,
634
+ };
635
+
636
+ int lre_is_space_non_ascii(uint32_t c)
637
+ {
638
+ size_t i, n;
639
+
640
+ n = countof(char_range_space);
641
+ for(i = 5; i < n; i += 2) {
642
+ uint32_t low = char_range_space[i];
643
+ uint32_t high = char_range_space[i + 1];
644
+ if (c < low)
645
+ return false;
646
+ if (c < high)
647
+ return true;
648
+ }
649
+ return false;
650
+ }
651
+
652
+
653
+ #define UNICODE_DECOMP_LEN_MAX 18
654
+
655
+ typedef enum {
656
+ DECOMP_TYPE_C1, /* 16 bit char */
657
+ DECOMP_TYPE_L1, /* 16 bit char table */
658
+ DECOMP_TYPE_L2,
659
+ DECOMP_TYPE_L3,
660
+ DECOMP_TYPE_L4,
661
+ DECOMP_TYPE_L5, /* XXX: not used */
662
+ DECOMP_TYPE_L6, /* XXX: could remove */
663
+ DECOMP_TYPE_L7, /* XXX: could remove */
664
+ DECOMP_TYPE_LL1, /* 18 bit char table */
665
+ DECOMP_TYPE_LL2,
666
+ DECOMP_TYPE_S1, /* 8 bit char table */
667
+ DECOMP_TYPE_S2,
668
+ DECOMP_TYPE_S3,
669
+ DECOMP_TYPE_S4,
670
+ DECOMP_TYPE_S5,
671
+ DECOMP_TYPE_I1, /* increment 16 bit char value */
672
+ DECOMP_TYPE_I2_0,
673
+ DECOMP_TYPE_I2_1,
674
+ DECOMP_TYPE_I3_1,
675
+ DECOMP_TYPE_I3_2,
676
+ DECOMP_TYPE_I4_1,
677
+ DECOMP_TYPE_I4_2,
678
+ DECOMP_TYPE_B1, /* 16 bit base + 8 bit offset */
679
+ DECOMP_TYPE_B2,
680
+ DECOMP_TYPE_B3,
681
+ DECOMP_TYPE_B4,
682
+ DECOMP_TYPE_B5,
683
+ DECOMP_TYPE_B6,
684
+ DECOMP_TYPE_B7,
685
+ DECOMP_TYPE_B8,
686
+ DECOMP_TYPE_B18,
687
+ DECOMP_TYPE_LS2,
688
+ DECOMP_TYPE_PAT3,
689
+ DECOMP_TYPE_S2_UL,
690
+ DECOMP_TYPE_LS2_UL,
691
+ } DecompTypeEnum;
692
+
693
+ static uint32_t unicode_get_short_code(uint32_t c)
694
+ {
695
+ static const uint16_t unicode_short_table[2] = { 0x2044, 0x2215 };
696
+
697
+ if (c < 0x80)
698
+ return c;
699
+ else if (c < 0x80 + 0x50)
700
+ return c - 0x80 + 0x300;
701
+ else
702
+ return unicode_short_table[c - 0x80 - 0x50];
703
+ }
704
+
705
+ static uint32_t unicode_get_lower_simple(uint32_t c)
706
+ {
707
+ if (c < 0x100 || (c >= 0x410 && c <= 0x42f))
708
+ c += 0x20;
709
+ else
710
+ c++;
711
+ return c;
712
+ }
713
+
714
+ static uint16_t unicode_get16(const uint8_t *p)
715
+ {
716
+ return p[0] | (p[1] << 8);
717
+ }
718
+
719
+ static int unicode_decomp_entry(uint32_t *res, uint32_t c,
720
+ int idx, uint32_t code, uint32_t len,
721
+ uint32_t type)
722
+ {
723
+ uint32_t c1;
724
+ int l, i, p;
725
+ const uint8_t *d;
726
+
727
+ if (type == DECOMP_TYPE_C1) {
728
+ res[0] = unicode_decomp_table2[idx];
729
+ return 1;
730
+ } else {
731
+ d = unicode_decomp_data + unicode_decomp_table2[idx];
732
+ switch(type) {
733
+ case DECOMP_TYPE_L1:
734
+ case DECOMP_TYPE_L2:
735
+ case DECOMP_TYPE_L3:
736
+ case DECOMP_TYPE_L4:
737
+ case DECOMP_TYPE_L5:
738
+ case DECOMP_TYPE_L6:
739
+ case DECOMP_TYPE_L7:
740
+ l = type - DECOMP_TYPE_L1 + 1;
741
+ d += (c - code) * l * 2;
742
+ for(i = 0; i < l; i++) {
743
+ if ((res[i] = unicode_get16(d + 2 * i)) == 0)
744
+ return 0;
745
+ }
746
+ return l;
747
+ case DECOMP_TYPE_LL1:
748
+ case DECOMP_TYPE_LL2:
749
+ {
750
+ uint32_t k, p;
751
+ l = type - DECOMP_TYPE_LL1 + 1;
752
+ k = (c - code) * l;
753
+ p = len * l * 2;
754
+ for(i = 0; i < l; i++) {
755
+ c1 = unicode_get16(d + 2 * k) |
756
+ (((d[p + (k / 4)] >> ((k % 4) * 2)) & 3) << 16);
757
+ if (!c1)
758
+ return 0;
759
+ res[i] = c1;
760
+ k++;
761
+ }
762
+ }
763
+ return l;
764
+ case DECOMP_TYPE_S1:
765
+ case DECOMP_TYPE_S2:
766
+ case DECOMP_TYPE_S3:
767
+ case DECOMP_TYPE_S4:
768
+ case DECOMP_TYPE_S5:
769
+ l = type - DECOMP_TYPE_S1 + 1;
770
+ d += (c - code) * l;
771
+ for(i = 0; i < l; i++) {
772
+ if ((res[i] = unicode_get_short_code(d[i])) == 0)
773
+ return 0;
774
+ }
775
+ return l;
776
+ case DECOMP_TYPE_I1:
777
+ l = 1;
778
+ p = 0;
779
+ goto decomp_type_i;
780
+ case DECOMP_TYPE_I2_0:
781
+ case DECOMP_TYPE_I2_1:
782
+ case DECOMP_TYPE_I3_1:
783
+ case DECOMP_TYPE_I3_2:
784
+ case DECOMP_TYPE_I4_1:
785
+ case DECOMP_TYPE_I4_2:
786
+ l = 2 + ((type - DECOMP_TYPE_I2_0) >> 1);
787
+ p = ((type - DECOMP_TYPE_I2_0) & 1) + (l > 2);
788
+ decomp_type_i:
789
+ for(i = 0; i < l; i++) {
790
+ c1 = unicode_get16(d + 2 * i);
791
+ if (i == p)
792
+ c1 += c - code;
793
+ res[i] = c1;
794
+ }
795
+ return l;
796
+ case DECOMP_TYPE_B18:
797
+ l = 18;
798
+ goto decomp_type_b;
799
+ case DECOMP_TYPE_B1:
800
+ case DECOMP_TYPE_B2:
801
+ case DECOMP_TYPE_B3:
802
+ case DECOMP_TYPE_B4:
803
+ case DECOMP_TYPE_B5:
804
+ case DECOMP_TYPE_B6:
805
+ case DECOMP_TYPE_B7:
806
+ case DECOMP_TYPE_B8:
807
+ l = type - DECOMP_TYPE_B1 + 1;
808
+ decomp_type_b:
809
+ {
810
+ uint32_t c_min;
811
+ c_min = unicode_get16(d);
812
+ d += 2 + (c - code) * l;
813
+ for(i = 0; i < l; i++) {
814
+ c1 = d[i];
815
+ if (c1 == 0xff)
816
+ c1 = 0x20;
817
+ else
818
+ c1 += c_min;
819
+ res[i] = c1;
820
+ }
821
+ }
822
+ return l;
823
+ case DECOMP_TYPE_LS2:
824
+ d += (c - code) * 3;
825
+ if (!(res[0] = unicode_get16(d)))
826
+ return 0;
827
+ res[1] = unicode_get_short_code(d[2]);
828
+ return 2;
829
+ case DECOMP_TYPE_PAT3:
830
+ res[0] = unicode_get16(d);
831
+ res[2] = unicode_get16(d + 2);
832
+ d += 4 + (c - code) * 2;
833
+ res[1] = unicode_get16(d);
834
+ return 3;
835
+ case DECOMP_TYPE_S2_UL:
836
+ case DECOMP_TYPE_LS2_UL:
837
+ c1 = c - code;
838
+ if (type == DECOMP_TYPE_S2_UL) {
839
+ d += c1 & ~1;
840
+ c = unicode_get_short_code(*d);
841
+ d++;
842
+ } else {
843
+ d += (c1 >> 1) * 3;
844
+ c = unicode_get16(d);
845
+ d += 2;
846
+ }
847
+ if (c1 & 1)
848
+ c = unicode_get_lower_simple(c);
849
+ res[0] = c;
850
+ res[1] = unicode_get_short_code(*d);
851
+ return 2;
852
+ }
853
+ }
854
+ return 0;
855
+ }
856
+
857
+
858
+ /* return the length of the decomposition (length <=
859
+ UNICODE_DECOMP_LEN_MAX) or 0 if no decomposition */
860
+ static int unicode_decomp_char(uint32_t *res, uint32_t c, bool is_compat1)
861
+ {
862
+ uint32_t v, type, is_compat, code, len;
863
+ int idx_min, idx_max, idx;
864
+
865
+ idx_min = 0;
866
+ idx_max = countof(unicode_decomp_table1) - 1;
867
+ while (idx_min <= idx_max) {
868
+ idx = (idx_max + idx_min) / 2;
869
+ v = unicode_decomp_table1[idx];
870
+ code = v >> (32 - 18);
871
+ len = (v >> (32 - 18 - 7)) & 0x7f;
872
+ // printf("idx=%d code=%05x len=%d\n", idx, code, len);
873
+ if (c < code) {
874
+ idx_max = idx - 1;
875
+ } else if (c >= code + len) {
876
+ idx_min = idx + 1;
877
+ } else {
878
+ is_compat = v & 1;
879
+ if (is_compat1 < is_compat)
880
+ break;
881
+ type = (v >> (32 - 18 - 7 - 6)) & 0x3f;
882
+ return unicode_decomp_entry(res, c, idx, code, len, type);
883
+ }
884
+ }
885
+ return 0;
886
+ }
887
+
888
+ /* return 0 if no pair found */
889
+ static int unicode_compose_pair(uint32_t c0, uint32_t c1)
890
+ {
891
+ uint32_t code, len, type, v, idx1, d_idx, d_offset, ch;
892
+ int idx_min, idx_max, idx, d;
893
+ uint32_t pair[2];
894
+
895
+ idx_min = 0;
896
+ idx_max = countof(unicode_comp_table) - 1;
897
+ while (idx_min <= idx_max) {
898
+ idx = (idx_max + idx_min) / 2;
899
+ idx1 = unicode_comp_table[idx];
900
+
901
+ /* idx1 represent an entry of the decomposition table */
902
+ d_idx = idx1 >> 6;
903
+ d_offset = idx1 & 0x3f;
904
+ v = unicode_decomp_table1[d_idx];
905
+ code = v >> (32 - 18);
906
+ len = (v >> (32 - 18 - 7)) & 0x7f;
907
+ type = (v >> (32 - 18 - 7 - 6)) & 0x3f;
908
+ ch = code + d_offset;
909
+ unicode_decomp_entry(pair, ch, d_idx, code, len, type);
910
+ d = c0 - pair[0];
911
+ if (d == 0)
912
+ d = c1 - pair[1];
913
+ if (d < 0) {
914
+ idx_max = idx - 1;
915
+ } else if (d > 0) {
916
+ idx_min = idx + 1;
917
+ } else {
918
+ return ch;
919
+ }
920
+ }
921
+ return 0;
922
+ }
923
+
924
+ /* return the combining class of character c (between 0 and 255) */
925
+ static int unicode_get_cc(uint32_t c)
926
+ {
927
+ uint32_t code, n, type, cc, c1, b;
928
+ int pos;
929
+ const uint8_t *p;
930
+
931
+ pos = get_index_pos(&code, c,
932
+ unicode_cc_index, sizeof(unicode_cc_index) / 3);
933
+ if (pos < 0)
934
+ return 0;
935
+ p = unicode_cc_table + pos;
936
+ for(;;) {
937
+ b = *p++;
938
+ type = b >> 6;
939
+ n = b & 0x3f;
940
+ if (n < 48) {
941
+ } else if (n < 56) {
942
+ n = (n - 48) << 8;
943
+ n |= *p++;
944
+ n += 48;
945
+ } else {
946
+ n = (n - 56) << 8;
947
+ n |= *p++ << 8;
948
+ n |= *p++;
949
+ n += 48 + (1 << 11);
950
+ }
951
+ if (type <= 1)
952
+ p++;
953
+ c1 = code + n + 1;
954
+ if (c < c1) {
955
+ switch(type) {
956
+ case 0:
957
+ cc = p[-1];
958
+ break;
959
+ case 1:
960
+ cc = p[-1] + c - code;
961
+ break;
962
+ case 2:
963
+ cc = 0;
964
+ break;
965
+ default:
966
+ case 3:
967
+ cc = 230;
968
+ break;
969
+ }
970
+ return cc;
971
+ }
972
+ code = c1;
973
+ }
974
+ }
975
+
976
+ static void sort_cc(int *buf, int len)
977
+ {
978
+ int i, j, k, cc, cc1, start, ch1;
979
+
980
+ for(i = 0; i < len; i++) {
981
+ cc = unicode_get_cc(buf[i]);
982
+ if (cc != 0) {
983
+ start = i;
984
+ j = i + 1;
985
+ while (j < len) {
986
+ ch1 = buf[j];
987
+ cc1 = unicode_get_cc(ch1);
988
+ if (cc1 == 0)
989
+ break;
990
+ k = j - 1;
991
+ while (k >= start) {
992
+ if (unicode_get_cc(buf[k]) <= cc1)
993
+ break;
994
+ buf[k + 1] = buf[k];
995
+ k--;
996
+ }
997
+ buf[k + 1] = ch1;
998
+ j++;
999
+ }
1000
+ i = j;
1001
+ }
1002
+ }
1003
+ }
1004
+
1005
+ static void to_nfd_rec(DynBuf *dbuf,
1006
+ const int *src, int src_len, int is_compat)
1007
+ {
1008
+ uint32_t c, v;
1009
+ int i, l;
1010
+ uint32_t res[UNICODE_DECOMP_LEN_MAX];
1011
+
1012
+ for(i = 0; i < src_len; i++) {
1013
+ c = src[i];
1014
+ if (c >= 0xac00 && c < 0xd7a4) {
1015
+ /* Hangul decomposition */
1016
+ c -= 0xac00;
1017
+ dbuf_put_u32(dbuf, 0x1100 + c / 588);
1018
+ dbuf_put_u32(dbuf, 0x1161 + (c % 588) / 28);
1019
+ v = c % 28;
1020
+ if (v != 0)
1021
+ dbuf_put_u32(dbuf, 0x11a7 + v);
1022
+ } else {
1023
+ l = unicode_decomp_char(res, c, is_compat);
1024
+ if (l) {
1025
+ to_nfd_rec(dbuf, (int *)res, l, is_compat);
1026
+ } else {
1027
+ dbuf_put_u32(dbuf, c);
1028
+ }
1029
+ }
1030
+ }
1031
+ }
1032
+
1033
+ /* return 0 if not found */
1034
+ static int compose_pair(uint32_t c0, uint32_t c1)
1035
+ {
1036
+ /* Hangul composition */
1037
+ if (c0 >= 0x1100 && c0 < 0x1100 + 19 &&
1038
+ c1 >= 0x1161 && c1 < 0x1161 + 21) {
1039
+ return 0xac00 + (c0 - 0x1100) * 588 + (c1 - 0x1161) * 28;
1040
+ } else if (c0 >= 0xac00 && c0 < 0xac00 + 11172 &&
1041
+ (c0 - 0xac00) % 28 == 0 &&
1042
+ c1 >= 0x11a7 && c1 < 0x11a7 + 28) {
1043
+ return c0 + c1 - 0x11a7;
1044
+ } else {
1045
+ return unicode_compose_pair(c0, c1);
1046
+ }
1047
+ }
1048
+
1049
+ int unicode_normalize(uint32_t **pdst, const uint32_t *src, int src_len,
1050
+ UnicodeNormalizationEnum n_type,
1051
+ void *opaque, DynBufReallocFunc *realloc_func)
1052
+ {
1053
+ int *buf, buf_len, i, p, starter_pos, cc, last_cc, out_len;
1054
+ bool is_compat;
1055
+ DynBuf dbuf_s, *dbuf = &dbuf_s;
1056
+
1057
+ is_compat = n_type >> 1;
1058
+
1059
+ dbuf_init2(dbuf, opaque, realloc_func);
1060
+ if (dbuf_claim(dbuf, sizeof(int) * src_len))
1061
+ goto fail;
1062
+
1063
+ /* common case: latin1 is unaffected by NFC */
1064
+ if (n_type == UNICODE_NFC) {
1065
+ for(i = 0; i < src_len; i++) {
1066
+ if (src[i] >= 0x100)
1067
+ goto not_latin1;
1068
+ }
1069
+ buf = (int *)dbuf->buf;
1070
+ memcpy(buf, src, src_len * sizeof(int));
1071
+ *pdst = (uint32_t *)buf;
1072
+ return src_len;
1073
+ not_latin1: ;
1074
+ }
1075
+
1076
+ to_nfd_rec(dbuf, (const int *)src, src_len, is_compat);
1077
+ if (dbuf_error(dbuf)) {
1078
+ fail:
1079
+ *pdst = NULL;
1080
+ return -1;
1081
+ }
1082
+ buf = (int *)dbuf->buf;
1083
+ buf_len = dbuf->size / sizeof(int);
1084
+
1085
+ sort_cc(buf, buf_len);
1086
+
1087
+ if (buf_len <= 1 || (n_type & 1) != 0) {
1088
+ /* NFD / NFKD */
1089
+ *pdst = (uint32_t *)buf;
1090
+ return buf_len;
1091
+ }
1092
+
1093
+ i = 1;
1094
+ out_len = 1;
1095
+ while (i < buf_len) {
1096
+ /* find the starter character and test if it is blocked from
1097
+ the character at 'i' */
1098
+ last_cc = unicode_get_cc(buf[i]);
1099
+ starter_pos = out_len - 1;
1100
+ while (starter_pos >= 0) {
1101
+ cc = unicode_get_cc(buf[starter_pos]);
1102
+ if (cc == 0)
1103
+ break;
1104
+ if (cc >= last_cc)
1105
+ goto next;
1106
+ last_cc = 256;
1107
+ starter_pos--;
1108
+ }
1109
+ if (starter_pos >= 0 &&
1110
+ (p = compose_pair(buf[starter_pos], buf[i])) != 0) {
1111
+ buf[starter_pos] = p;
1112
+ i++;
1113
+ } else {
1114
+ next:
1115
+ buf[out_len++] = buf[i++];
1116
+ }
1117
+ }
1118
+ *pdst = (uint32_t *)buf;
1119
+ return out_len;
1120
+ }
1121
+
1122
+ /* char ranges for various unicode properties */
1123
+
1124
+ static int unicode_find_name(const char *name_table, const char *name)
1125
+ {
1126
+ const char *p, *r;
1127
+ int pos;
1128
+ size_t name_len, len;
1129
+
1130
+ p = name_table;
1131
+ pos = 0;
1132
+ name_len = strlen(name);
1133
+ while (*p) {
1134
+ for(;;) {
1135
+ r = strchr(p, ',');
1136
+ if (!r)
1137
+ len = strlen(p);
1138
+ else
1139
+ len = r - p;
1140
+ if (len == name_len && !memcmp(p, name, name_len))
1141
+ return pos;
1142
+ p += len + 1;
1143
+ if (!r)
1144
+ break;
1145
+ }
1146
+ pos++;
1147
+ }
1148
+ return -1;
1149
+ }
1150
+
1151
+ /* 'cr' must be initialized and empty. Return 0 if OK, -1 if error, -2
1152
+ if not found */
1153
+ int unicode_script(CharRange *cr,
1154
+ const char *script_name, bool is_ext)
1155
+ {
1156
+ int script_idx;
1157
+ const uint8_t *p, *p_end;
1158
+ uint32_t c, c1, b, n, v, v_len, i, type;
1159
+ CharRange cr1_s = { 0 }, *cr1 = NULL;
1160
+ CharRange cr2_s = { 0 }, *cr2 = &cr2_s;
1161
+ bool is_common;
1162
+
1163
+ if (!strcmp(script_name, "Unknown") || !strcmp(script_name, "Zzzz")) {
1164
+ /* "Unknown" (ISO 15924 code "Zzzz") is excluded from the name table;
1165
+ it matches every character outside any script. */
1166
+ script_idx = UNICODE_SCRIPT_Unknown;
1167
+ } else {
1168
+ script_idx = unicode_find_name(unicode_script_name_table, script_name);
1169
+ if (script_idx < 0)
1170
+ return -2;
1171
+ /* Note: the name table excludes the "Unknown" Script */
1172
+ script_idx += UNICODE_SCRIPT_Unknown + 1;
1173
+ }
1174
+
1175
+ is_common = (script_idx == UNICODE_SCRIPT_Common ||
1176
+ script_idx == UNICODE_SCRIPT_Inherited);
1177
+ if (is_ext) {
1178
+ cr1 = &cr1_s;
1179
+ cr_init(cr1, cr->mem_opaque, cr->realloc_func);
1180
+ cr_init(cr2, cr->mem_opaque, cr->realloc_func);
1181
+ } else {
1182
+ cr1 = cr;
1183
+ }
1184
+
1185
+ p = unicode_script_table;
1186
+ p_end = unicode_script_table + countof(unicode_script_table);
1187
+ c = 0;
1188
+ while (p < p_end) {
1189
+ b = *p++;
1190
+ type = b >> 7;
1191
+ n = b & 0x7f;
1192
+ if (n < 96) {
1193
+ } else if (n < 112) {
1194
+ n = (n - 96) << 8;
1195
+ n |= *p++;
1196
+ n += 96;
1197
+ } else {
1198
+ n = (n - 112) << 16;
1199
+ n |= *p++ << 8;
1200
+ n |= *p++;
1201
+ n += 96 + (1 << 12);
1202
+ }
1203
+ if (type == 0)
1204
+ v = 0;
1205
+ else
1206
+ v = *p++;
1207
+ c1 = c + n + 1;
1208
+ /* only script-bearing ranges (type != 0); for Unknown, match every
1209
+ such range and invert afterwards */
1210
+ if (type != 0 &&
1211
+ (v == script_idx || script_idx == UNICODE_SCRIPT_Unknown)) {
1212
+ if (cr_add_interval(cr1, c, c1))
1213
+ goto fail;
1214
+ }
1215
+ c = c1;
1216
+ }
1217
+
1218
+ if (script_idx == UNICODE_SCRIPT_Unknown) {
1219
+ /* Unknown is all the characters outside scripts */
1220
+ if (cr_invert(cr1))
1221
+ goto fail;
1222
+ }
1223
+
1224
+ if (is_ext) {
1225
+ /* add the script extensions */
1226
+ p = unicode_script_ext_table;
1227
+ p_end = unicode_script_ext_table + countof(unicode_script_ext_table);
1228
+ c = 0;
1229
+ while (p < p_end) {
1230
+ b = *p++;
1231
+ if (b < 128) {
1232
+ n = b;
1233
+ } else if (b < 128 + 64) {
1234
+ n = (b - 128) << 8;
1235
+ n |= *p++;
1236
+ n += 128;
1237
+ } else {
1238
+ n = (b - 128 - 64) << 16;
1239
+ n |= *p++ << 8;
1240
+ n |= *p++;
1241
+ n += 128 + (1 << 14);
1242
+ }
1243
+ c1 = c + n + 1;
1244
+ v_len = *p++;
1245
+ if (is_common) {
1246
+ if (v_len != 0) {
1247
+ if (cr_add_interval(cr2, c, c1))
1248
+ goto fail;
1249
+ }
1250
+ } else {
1251
+ for(i = 0; i < v_len; i++) {
1252
+ if (p[i] == script_idx) {
1253
+ if (cr_add_interval(cr2, c, c1))
1254
+ goto fail;
1255
+ break;
1256
+ }
1257
+ }
1258
+ }
1259
+ p += v_len;
1260
+ c = c1;
1261
+ }
1262
+ if (is_common) {
1263
+ /* remove all the characters with script extensions */
1264
+ if (cr_invert(cr2))
1265
+ goto fail;
1266
+ if (cr_op(cr, cr1->points, cr1->len, cr2->points, cr2->len,
1267
+ CR_OP_INTER))
1268
+ goto fail;
1269
+ } else {
1270
+ if (cr_op(cr, cr1->points, cr1->len, cr2->points, cr2->len,
1271
+ CR_OP_UNION))
1272
+ goto fail;
1273
+ }
1274
+ cr_free(cr1);
1275
+ cr_free(cr2);
1276
+ }
1277
+ return 0;
1278
+ fail:
1279
+ if (is_ext) {
1280
+ cr_free(cr1);
1281
+ cr_free(cr2);
1282
+ }
1283
+ goto fail;
1284
+ }
1285
+
1286
+ #define M(id) (1U << UNICODE_GC_ ## id)
1287
+
1288
+ static int unicode_general_category1(CharRange *cr, uint32_t gc_mask)
1289
+ {
1290
+ const uint8_t *p, *p_end;
1291
+ uint32_t c, c0, b, n, v;
1292
+
1293
+ p = unicode_gc_table;
1294
+ p_end = unicode_gc_table + countof(unicode_gc_table);
1295
+ c = 0;
1296
+ while (p < p_end) {
1297
+ b = *p++;
1298
+ n = b >> 5;
1299
+ v = b & 0x1f;
1300
+ if (n == 7) {
1301
+ n = *p++;
1302
+ if (n < 128) {
1303
+ n += 7;
1304
+ } else if (n < 128 + 64) {
1305
+ n = (n - 128) << 8;
1306
+ n |= *p++;
1307
+ n += 7 + 128;
1308
+ } else {
1309
+ n = (n - 128 - 64) << 16;
1310
+ n |= *p++ << 8;
1311
+ n |= *p++;
1312
+ n += 7 + 128 + (1 << 14);
1313
+ }
1314
+ }
1315
+ c0 = c;
1316
+ c += n + 1;
1317
+ if (v == 31) {
1318
+ /* run of Lu / Ll */
1319
+ b = gc_mask & (M(Lu) | M(Ll));
1320
+ if (b != 0) {
1321
+ if (b == (M(Lu) | M(Ll))) {
1322
+ goto add_range;
1323
+ } else {
1324
+ c0 += ((gc_mask & M(Ll)) != 0);
1325
+ for(; c0 < c; c0 += 2) {
1326
+ if (cr_add_interval(cr, c0, c0 + 1))
1327
+ return -1;
1328
+ }
1329
+ }
1330
+ }
1331
+ } else if ((gc_mask >> v) & 1) {
1332
+ add_range:
1333
+ if (cr_add_interval(cr, c0, c))
1334
+ return -1;
1335
+ }
1336
+ }
1337
+ return 0;
1338
+ }
1339
+
1340
+ static int unicode_prop1(CharRange *cr, int prop_idx)
1341
+ {
1342
+ const uint8_t *p, *p_end;
1343
+ uint32_t c, c0, b, bit;
1344
+
1345
+ p = unicode_prop_table[prop_idx];
1346
+ p_end = p + unicode_prop_len_table[prop_idx];
1347
+ c = 0;
1348
+ bit = 0;
1349
+ while (p < p_end) {
1350
+ c0 = c;
1351
+ b = *p++;
1352
+ if (b < 64) {
1353
+ c += (b >> 3) + 1;
1354
+ if (bit) {
1355
+ if (cr_add_interval(cr, c0, c))
1356
+ return -1;
1357
+ }
1358
+ bit ^= 1;
1359
+ c0 = c;
1360
+ c += (b & 7) + 1;
1361
+ } else if (b >= 0x80) {
1362
+ c += b - 0x80 + 1;
1363
+ } else if (b < 0x60) {
1364
+ c += (((b - 0x40) << 8) | p[0]) + 1;
1365
+ p++;
1366
+ } else {
1367
+ c += (((b - 0x60) << 16) | (p[0] << 8) | p[1]) + 1;
1368
+ p += 2;
1369
+ }
1370
+ if (bit) {
1371
+ if (cr_add_interval(cr, c0, c))
1372
+ return -1;
1373
+ }
1374
+ bit ^= 1;
1375
+ }
1376
+ return 0;
1377
+ }
1378
+
1379
+ #define CASE_U (1 << 0)
1380
+ #define CASE_L (1 << 1)
1381
+ #define CASE_F (1 << 2)
1382
+
1383
+ /* use the case conversion table to generate range of characters.
1384
+ CASE_U: set char if modified by uppercasing,
1385
+ CASE_L: set char if modified by lowercasing,
1386
+ CASE_F: set char if modified by case folding,
1387
+ */
1388
+ static int unicode_case1(CharRange *cr, int case_mask)
1389
+ {
1390
+ #define MR(x) (1 << RUN_TYPE_ ## x)
1391
+ const uint32_t tab_run_mask[3] = {
1392
+ MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) |
1393
+ MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
1394
+
1395
+ MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2),
1396
+
1397
+ MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
1398
+ };
1399
+ #undef MR
1400
+ uint32_t mask, v, code, type, len, i, idx;
1401
+
1402
+ if (case_mask == 0)
1403
+ return 0;
1404
+ mask = 0;
1405
+ for(i = 0; i < 3; i++) {
1406
+ if ((case_mask >> i) & 1)
1407
+ mask |= tab_run_mask[i];
1408
+ }
1409
+ for(idx = 0; idx < countof(case_conv_table1); idx++) {
1410
+ v = case_conv_table1[idx];
1411
+ type = (v >> (32 - 17 - 7 - 4)) & 0xf;
1412
+ code = v >> (32 - 17);
1413
+ len = (v >> (32 - 17 - 7)) & 0x7f;
1414
+ if ((mask >> type) & 1) {
1415
+ // printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1);
1416
+ switch(type) {
1417
+ case RUN_TYPE_UL:
1418
+ if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
1419
+ goto def_case;
1420
+ code += ((case_mask & CASE_U) != 0);
1421
+ for(i = 0; i < len; i += 2) {
1422
+ if (cr_add_interval(cr, code + i, code + i + 1))
1423
+ return -1;
1424
+ }
1425
+ break;
1426
+ case RUN_TYPE_LSU:
1427
+ if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
1428
+ goto def_case;
1429
+ if (!(case_mask & CASE_U)) {
1430
+ if (cr_add_interval(cr, code, code + 1))
1431
+ return -1;
1432
+ }
1433
+ if (cr_add_interval(cr, code + 1, code + 2))
1434
+ return -1;
1435
+ if (case_mask & CASE_U) {
1436
+ if (cr_add_interval(cr, code + 2, code + 3))
1437
+ return -1;
1438
+ }
1439
+ break;
1440
+ default:
1441
+ def_case:
1442
+ if (cr_add_interval(cr, code, code + len))
1443
+ return -1;
1444
+ break;
1445
+ }
1446
+ }
1447
+ }
1448
+ return 0;
1449
+ }
1450
+
1451
+ static int point_cmp(const void *p1, const void *p2, void *arg)
1452
+ {
1453
+ uint32_t v1 = *(uint32_t *)p1;
1454
+ uint32_t v2 = *(uint32_t *)p2;
1455
+ return (v1 > v2) - (v1 < v2);
1456
+ }
1457
+
1458
+ static void cr_sort_and_remove_overlap(CharRange *cr)
1459
+ {
1460
+ uint32_t start, end, start1, end1, i, j;
1461
+
1462
+ /* the resulting ranges are not necessarily sorted and may overlap */
1463
+ rqsort(cr->points, cr->len / 2, sizeof(cr->points[0]) * 2, point_cmp, NULL);
1464
+ j = 0;
1465
+ for(i = 0; i < cr->len; ) {
1466
+ start = cr->points[i];
1467
+ end = cr->points[i + 1];
1468
+ i += 2;
1469
+ while (i < cr->len) {
1470
+ start1 = cr->points[i];
1471
+ end1 = cr->points[i + 1];
1472
+ if (start1 > end) {
1473
+ /* |------|
1474
+ * |-------| */
1475
+ break;
1476
+ } else if (end1 <= end) {
1477
+ /* |------|
1478
+ * |--| */
1479
+ i += 2;
1480
+ } else {
1481
+ /* |------|
1482
+ * |-------| */
1483
+ end = end1;
1484
+ i += 2;
1485
+ }
1486
+ }
1487
+ cr->points[j] = start;
1488
+ cr->points[j + 1] = end;
1489
+ j += 2;
1490
+ }
1491
+ cr->len = j;
1492
+ }
1493
+
1494
+ /* canonicalize a character set using the JS regex case folding rules
1495
+ (see lre_canonicalize()) */
1496
+ int cr_regexp_canonicalize(CharRange *cr, bool is_unicode)
1497
+ {
1498
+ CharRange cr_inter, cr_mask, cr_result, cr_sub;
1499
+ uint32_t v, code, len, i, idx, start, end, c, d_start, d_end, d;
1500
+
1501
+ cr_init(&cr_mask, cr->mem_opaque, cr->realloc_func);
1502
+ cr_init(&cr_inter, cr->mem_opaque, cr->realloc_func);
1503
+ cr_init(&cr_result, cr->mem_opaque, cr->realloc_func);
1504
+ cr_init(&cr_sub, cr->mem_opaque, cr->realloc_func);
1505
+
1506
+ if (unicode_case1(&cr_mask, is_unicode ? CASE_F : CASE_U))
1507
+ goto fail;
1508
+ if (cr_op(&cr_inter, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER))
1509
+ goto fail;
1510
+
1511
+ if (cr_invert(&cr_mask))
1512
+ goto fail;
1513
+ if (cr_op(&cr_sub, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER))
1514
+ goto fail;
1515
+
1516
+ /* cr_inter = cr & cr_mask */
1517
+ /* cr_sub = cr & ~cr_mask */
1518
+
1519
+ /* use the case conversion table to compute the result */
1520
+ d_start = -1;
1521
+ d_end = -1;
1522
+ idx = 0;
1523
+ v = case_conv_table1[idx];
1524
+ code = v >> (32 - 17);
1525
+ len = (v >> (32 - 17 - 7)) & 0x7f;
1526
+ for(i = 0; i < cr_inter.len; i += 2) {
1527
+ start = cr_inter.points[i];
1528
+ end = cr_inter.points[i + 1];
1529
+
1530
+ for(c = start; c < end; c++) {
1531
+ for(;;) {
1532
+ if (c >= code && c < code + len)
1533
+ break;
1534
+ idx++;
1535
+ assert(idx < countof(case_conv_table1));
1536
+ v = case_conv_table1[idx];
1537
+ code = v >> (32 - 17);
1538
+ len = (v >> (32 - 17 - 7)) & 0x7f;
1539
+ }
1540
+ d = lre_case_folding_entry(c, idx, v, is_unicode);
1541
+ /* try to merge with the current interval */
1542
+ if (d_start == -1) {
1543
+ d_start = d;
1544
+ d_end = d + 1;
1545
+ } else if (d_end == d) {
1546
+ d_end++;
1547
+ } else {
1548
+ cr_add_interval(&cr_result, d_start, d_end);
1549
+ d_start = d;
1550
+ d_end = d + 1;
1551
+ }
1552
+ }
1553
+ }
1554
+ if (d_start != -1) {
1555
+ if (cr_add_interval(&cr_result, d_start, d_end))
1556
+ goto fail;
1557
+ }
1558
+
1559
+ /* the resulting ranges are not necessarily sorted and may overlap */
1560
+ cr_sort_and_remove_overlap(&cr_result);
1561
+
1562
+ /* or with the character not affected by the case folding */
1563
+ cr->len = 0;
1564
+ if (cr_op(cr, cr_result.points, cr_result.len, cr_sub.points, cr_sub.len, CR_OP_UNION))
1565
+ goto fail;
1566
+
1567
+ cr_free(&cr_inter);
1568
+ cr_free(&cr_mask);
1569
+ cr_free(&cr_result);
1570
+ cr_free(&cr_sub);
1571
+ return 0;
1572
+ fail:
1573
+ cr_free(&cr_inter);
1574
+ cr_free(&cr_mask);
1575
+ cr_free(&cr_result);
1576
+ cr_free(&cr_sub);
1577
+ return -1;
1578
+ }
1579
+
1580
+ typedef enum {
1581
+ POP_GC,
1582
+ POP_PROP,
1583
+ POP_CASE,
1584
+ POP_UNION,
1585
+ POP_INTER,
1586
+ POP_XOR,
1587
+ POP_INVERT,
1588
+ POP_END,
1589
+ } PropOPEnum;
1590
+
1591
+ #define POP_STACK_LEN_MAX 4
1592
+
1593
+ static int unicode_prop_ops(CharRange *cr, ...)
1594
+ {
1595
+ va_list ap;
1596
+ CharRange stack[POP_STACK_LEN_MAX];
1597
+ int stack_len, op, ret, i;
1598
+ uint32_t a;
1599
+
1600
+ va_start(ap, cr);
1601
+ stack_len = 0;
1602
+ for(;;) {
1603
+ op = va_arg(ap, int);
1604
+ switch(op) {
1605
+ case POP_GC:
1606
+ assert(stack_len < POP_STACK_LEN_MAX);
1607
+ a = va_arg(ap, int);
1608
+ cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func);
1609
+ if (unicode_general_category1(&stack[stack_len - 1], a))
1610
+ goto fail;
1611
+ break;
1612
+ case POP_PROP:
1613
+ assert(stack_len < POP_STACK_LEN_MAX);
1614
+ a = va_arg(ap, int);
1615
+ cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func);
1616
+ if (unicode_prop1(&stack[stack_len - 1], a))
1617
+ goto fail;
1618
+ break;
1619
+ case POP_CASE:
1620
+ assert(stack_len < POP_STACK_LEN_MAX);
1621
+ a = va_arg(ap, int);
1622
+ cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func);
1623
+ if (unicode_case1(&stack[stack_len - 1], a))
1624
+ goto fail;
1625
+ break;
1626
+ case POP_UNION:
1627
+ case POP_INTER:
1628
+ case POP_XOR:
1629
+ {
1630
+ CharRange *cr1, *cr2, *cr3;
1631
+ assert(stack_len >= 2);
1632
+ assert(stack_len < POP_STACK_LEN_MAX);
1633
+ cr1 = &stack[stack_len - 2];
1634
+ cr2 = &stack[stack_len - 1];
1635
+ cr3 = &stack[stack_len++];
1636
+ cr_init(cr3, cr->mem_opaque, cr->realloc_func);
1637
+ if (cr_op(cr3, cr1->points, cr1->len,
1638
+ cr2->points, cr2->len, op - POP_UNION + CR_OP_UNION))
1639
+ goto fail;
1640
+ cr_free(cr1);
1641
+ cr_free(cr2);
1642
+ *cr1 = *cr3;
1643
+ stack_len -= 2;
1644
+ }
1645
+ break;
1646
+ case POP_INVERT:
1647
+ assert(stack_len >= 1);
1648
+ if (cr_invert(&stack[stack_len - 1]))
1649
+ goto fail;
1650
+ break;
1651
+ case POP_END:
1652
+ goto done;
1653
+ default:
1654
+ abort();
1655
+ }
1656
+ }
1657
+ done:
1658
+ va_end(ap);
1659
+ assert(stack_len == 1);
1660
+ ret = cr_copy(cr, &stack[0]);
1661
+ cr_free(&stack[0]);
1662
+ return ret;
1663
+ fail:
1664
+ va_end(ap);
1665
+ for(i = 0; i < stack_len; i++)
1666
+ cr_free(&stack[i]);
1667
+ return -1;
1668
+ }
1669
+
1670
+ static const uint32_t unicode_gc_mask_table[] = {
1671
+ M(Lu) | M(Ll) | M(Lt), /* LC */
1672
+ M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo), /* L */
1673
+ M(Mn) | M(Mc) | M(Me), /* M */
1674
+ M(Nd) | M(Nl) | M(No), /* N */
1675
+ M(Sm) | M(Sc) | M(Sk) | M(So), /* S */
1676
+ M(Pc) | M(Pd) | M(Ps) | M(Pe) | M(Pi) | M(Pf) | M(Po), /* P */
1677
+ M(Zs) | M(Zl) | M(Zp), /* Z */
1678
+ M(Cc) | M(Cf) | M(Cs) | M(Co) | M(Cn), /* C */
1679
+ };
1680
+
1681
+ /* 'cr' must be initialized and empty. Return 0 if OK, -1 if error, -2
1682
+ if not found */
1683
+ int unicode_general_category(CharRange *cr, const char *gc_name)
1684
+ {
1685
+ int gc_idx;
1686
+ uint32_t gc_mask;
1687
+
1688
+ gc_idx = unicode_find_name(unicode_gc_name_table, gc_name);
1689
+ if (gc_idx < 0)
1690
+ return -2;
1691
+ if (gc_idx <= UNICODE_GC_Co) {
1692
+ gc_mask = (uint64_t)1 << gc_idx;
1693
+ } else {
1694
+ gc_mask = unicode_gc_mask_table[gc_idx - UNICODE_GC_LC];
1695
+ }
1696
+ return unicode_general_category1(cr, gc_mask);
1697
+ }
1698
+
1699
+
1700
+ /* 'cr' must be initialized and empty. Return 0 if OK, -1 if error, -2
1701
+ if not found */
1702
+ /* Unicode "properties of strings" (e.g. \p{RGI_Emoji}) used by the v flag;
1703
+ expands a string property into a list of code-point sequences via the
1704
+ callback. Returns -2 if the property name is unknown. */
1705
+ #define SEQ_MAX_LEN 16
1706
+
1707
+ static int unicode_sequence_prop1(int seq_prop_idx, UnicodeSequencePropCB *cb, void *opaque,
1708
+ CharRange *cr)
1709
+ {
1710
+ int i, c, j;
1711
+ uint32_t seq[SEQ_MAX_LEN];
1712
+
1713
+ switch(seq_prop_idx) {
1714
+ case UNICODE_SEQUENCE_PROP_Basic_Emoji:
1715
+ if (unicode_prop1(cr, UNICODE_PROP_Basic_Emoji1) < 0)
1716
+ return -1;
1717
+ for(i = 0; i < cr->len; i += 2) {
1718
+ for(c = cr->points[i]; c < cr->points[i + 1]; c++) {
1719
+ seq[0] = c;
1720
+ cb(opaque, seq, 1);
1721
+ }
1722
+ }
1723
+
1724
+ cr->len = 0;
1725
+
1726
+ if (unicode_prop1(cr, UNICODE_PROP_Basic_Emoji2) < 0)
1727
+ return -1;
1728
+ for(i = 0; i < cr->len; i += 2) {
1729
+ for(c = cr->points[i]; c < cr->points[i + 1]; c++) {
1730
+ seq[0] = c;
1731
+ seq[1] = 0xfe0f;
1732
+ cb(opaque, seq, 2);
1733
+ }
1734
+ }
1735
+
1736
+ break;
1737
+ case UNICODE_SEQUENCE_PROP_RGI_Emoji_Modifier_Sequence:
1738
+ if (unicode_prop1(cr, UNICODE_PROP_Emoji_Modifier_Base) < 0)
1739
+ return -1;
1740
+ for(i = 0; i < cr->len; i += 2) {
1741
+ for(c = cr->points[i]; c < cr->points[i + 1]; c++) {
1742
+ for(j = 0; j < 5; j++) {
1743
+ seq[0] = c;
1744
+ seq[1] = 0x1f3fb + j;
1745
+ cb(opaque, seq, 2);
1746
+ }
1747
+ }
1748
+ }
1749
+ break;
1750
+ case UNICODE_SEQUENCE_PROP_RGI_Emoji_Flag_Sequence:
1751
+ if (unicode_prop1(cr, UNICODE_PROP_RGI_Emoji_Flag_Sequence) < 0)
1752
+ return -1;
1753
+ for(i = 0; i < cr->len; i += 2) {
1754
+ for(c = cr->points[i]; c < cr->points[i + 1]; c++) {
1755
+ int c0, c1;
1756
+ c0 = c / 26;
1757
+ c1 = c % 26;
1758
+ seq[0] = 0x1F1E6 + c0;
1759
+ seq[1] = 0x1F1E6 + c1;
1760
+ cb(opaque, seq, 2);
1761
+ }
1762
+ }
1763
+ break;
1764
+ case UNICODE_SEQUENCE_PROP_RGI_Emoji_ZWJ_Sequence:
1765
+ {
1766
+ int len, code, pres, k, mod, mod_count, mod_pos[2], hc_pos, n_mod, n_hc, mod1;
1767
+ int mod_idx, hc_idx, i0, i1;
1768
+ const uint8_t *tab = unicode_rgi_emoji_zwj_sequence;
1769
+
1770
+ for(i = 0; i < countof(unicode_rgi_emoji_zwj_sequence);) {
1771
+ len = tab[i++];
1772
+ k = 0;
1773
+ mod = 0;
1774
+ mod_count = 0;
1775
+ hc_pos = -1;
1776
+ for(j = 0; j < len; j++) {
1777
+ code = tab[i++];
1778
+ code |= tab[i++] << 8;
1779
+ pres = code >> 15;
1780
+ mod1 = (code >> 13) & 3;
1781
+ code &= 0x1fff;
1782
+ if (code < 0x1000) {
1783
+ c = code + 0x2000;
1784
+ } else {
1785
+ c = 0x1f000 + (code - 0x1000);
1786
+ }
1787
+ if (c == 0x1f9b0)
1788
+ hc_pos = k;
1789
+ seq[k++] = c;
1790
+ if (mod1 != 0) {
1791
+ assert(mod_count < 2);
1792
+ mod = mod1;
1793
+ mod_pos[mod_count++] = k;
1794
+ seq[k++] = 0; /* will be filled later */
1795
+ }
1796
+ if (pres) {
1797
+ seq[k++] = 0xfe0f;
1798
+ }
1799
+ if (j < len - 1) {
1800
+ seq[k++] = 0x200d;
1801
+ }
1802
+ }
1803
+
1804
+ /* genrate all the variants */
1805
+ switch(mod) {
1806
+ case 1:
1807
+ n_mod = 5;
1808
+ break;
1809
+ case 2:
1810
+ n_mod = 25;
1811
+ break;
1812
+ case 3:
1813
+ n_mod = 20;
1814
+ break;
1815
+ default:
1816
+ n_mod = 1;
1817
+ break;
1818
+ }
1819
+ if (hc_pos >= 0)
1820
+ n_hc = 4;
1821
+ else
1822
+ n_hc = 1;
1823
+ for(hc_idx = 0; hc_idx < n_hc; hc_idx++) {
1824
+ for(mod_idx = 0; mod_idx < n_mod; mod_idx++) {
1825
+ if (hc_pos >= 0)
1826
+ seq[hc_pos] = 0x1f9b0 + hc_idx;
1827
+
1828
+ switch(mod) {
1829
+ case 1:
1830
+ seq[mod_pos[0]] = 0x1f3fb + mod_idx;
1831
+ break;
1832
+ case 2:
1833
+ case 3:
1834
+ i0 = mod_idx / 5;
1835
+ i1 = mod_idx % 5;
1836
+ /* avoid identical values */
1837
+ if (mod == 3 && i0 >= i1)
1838
+ i0++;
1839
+ seq[mod_pos[0]] = 0x1f3fb + i0;
1840
+ seq[mod_pos[1]] = 0x1f3fb + i1;
1841
+ break;
1842
+ default:
1843
+ break;
1844
+ }
1845
+ #if 0
1846
+ for(j = 0; j < k; j++)
1847
+ printf(" %04x", seq[j]);
1848
+ printf("\n");
1849
+ #endif
1850
+ cb(opaque, seq, k);
1851
+ }
1852
+ }
1853
+ }
1854
+ }
1855
+ break;
1856
+ case UNICODE_SEQUENCE_PROP_RGI_Emoji_Tag_Sequence:
1857
+ {
1858
+ for(i = 0; i < countof(unicode_rgi_emoji_tag_sequence);) {
1859
+ j = 0;
1860
+ seq[j++] = 0x1F3F4;
1861
+ for(;;) {
1862
+ c = unicode_rgi_emoji_tag_sequence[i++];
1863
+ if (c == 0x00)
1864
+ break;
1865
+ seq[j++] = 0xe0000 + c;
1866
+ }
1867
+ seq[j++] = 0xe007f;
1868
+ cb(opaque, seq, j);
1869
+ }
1870
+ }
1871
+ break;
1872
+ case UNICODE_SEQUENCE_PROP_Emoji_Keycap_Sequence:
1873
+ if (unicode_prop1(cr, UNICODE_PROP_Emoji_Keycap_Sequence) < 0)
1874
+ return -1;
1875
+ for(i = 0; i < cr->len; i += 2) {
1876
+ for(c = cr->points[i]; c < cr->points[i + 1]; c++) {
1877
+ seq[0] = c;
1878
+ seq[1] = 0xfe0f;
1879
+ seq[2] = 0x20e3;
1880
+ cb(opaque, seq, 3);
1881
+ }
1882
+ }
1883
+ break;
1884
+ case UNICODE_SEQUENCE_PROP_RGI_Emoji:
1885
+ /* all prevous sequences */
1886
+ for(i = UNICODE_SEQUENCE_PROP_Basic_Emoji; i <= UNICODE_SEQUENCE_PROP_RGI_Emoji_ZWJ_Sequence; i++) {
1887
+ int ret;
1888
+ ret = unicode_sequence_prop1(i, cb, opaque, cr);
1889
+ if (ret < 0)
1890
+ return ret;
1891
+ cr->len = 0;
1892
+ }
1893
+ break;
1894
+ default:
1895
+ return -2;
1896
+ }
1897
+ return 0;
1898
+ }
1899
+
1900
+ /* build a unicode sequence property */
1901
+ /* return -2 if not found, -1 if other error. 'cr' is used as temporary memory. */
1902
+ int unicode_sequence_prop(const char *prop_name, UnicodeSequencePropCB *cb, void *opaque,
1903
+ CharRange *cr)
1904
+ {
1905
+ int seq_prop_idx;
1906
+ seq_prop_idx = unicode_find_name(unicode_sequence_prop_name_table, prop_name);
1907
+ if (seq_prop_idx < 0)
1908
+ return -2;
1909
+ return unicode_sequence_prop1(seq_prop_idx, cb, opaque, cr);
1910
+ }
1911
+
1912
+ int unicode_prop(CharRange *cr, const char *prop_name)
1913
+ {
1914
+ int prop_idx, ret;
1915
+
1916
+ prop_idx = unicode_find_name(unicode_prop_name_table, prop_name);
1917
+ if (prop_idx < 0)
1918
+ return -2;
1919
+ prop_idx += UNICODE_PROP_ASCII_Hex_Digit;
1920
+
1921
+ ret = 0;
1922
+ switch(prop_idx) {
1923
+ case UNICODE_PROP_ASCII:
1924
+ if (cr_add_interval(cr, 0x00, 0x7f + 1))
1925
+ return -1;
1926
+ break;
1927
+ case UNICODE_PROP_Any:
1928
+ if (cr_add_interval(cr, 0x00000, 0x10ffff + 1))
1929
+ return -1;
1930
+ break;
1931
+ case UNICODE_PROP_Assigned:
1932
+ ret = unicode_prop_ops(cr,
1933
+ POP_GC, M(Cn),
1934
+ POP_INVERT,
1935
+ POP_END);
1936
+ break;
1937
+ case UNICODE_PROP_Math:
1938
+ ret = unicode_prop_ops(cr,
1939
+ POP_GC, M(Sm),
1940
+ POP_PROP, UNICODE_PROP_Other_Math,
1941
+ POP_UNION,
1942
+ POP_END);
1943
+ break;
1944
+ case UNICODE_PROP_Lowercase:
1945
+ ret = unicode_prop_ops(cr,
1946
+ POP_GC, M(Ll),
1947
+ POP_PROP, UNICODE_PROP_Other_Lowercase,
1948
+ POP_UNION,
1949
+ POP_END);
1950
+ break;
1951
+ case UNICODE_PROP_Uppercase:
1952
+ ret = unicode_prop_ops(cr,
1953
+ POP_GC, M(Lu),
1954
+ POP_PROP, UNICODE_PROP_Other_Uppercase,
1955
+ POP_UNION,
1956
+ POP_END);
1957
+ break;
1958
+ case UNICODE_PROP_Cased:
1959
+ ret = unicode_prop_ops(cr,
1960
+ POP_GC, M(Lu) | M(Ll) | M(Lt),
1961
+ POP_PROP, UNICODE_PROP_Other_Uppercase,
1962
+ POP_UNION,
1963
+ POP_PROP, UNICODE_PROP_Other_Lowercase,
1964
+ POP_UNION,
1965
+ POP_END);
1966
+ break;
1967
+ case UNICODE_PROP_Alphabetic:
1968
+ ret = unicode_prop_ops(cr,
1969
+ POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
1970
+ POP_PROP, UNICODE_PROP_Other_Uppercase,
1971
+ POP_UNION,
1972
+ POP_PROP, UNICODE_PROP_Other_Lowercase,
1973
+ POP_UNION,
1974
+ POP_PROP, UNICODE_PROP_Other_Alphabetic,
1975
+ POP_UNION,
1976
+ POP_END);
1977
+ break;
1978
+ case UNICODE_PROP_Grapheme_Base:
1979
+ ret = unicode_prop_ops(cr,
1980
+ POP_GC, M(Cc) | M(Cf) | M(Cs) | M(Co) | M(Cn) | M(Zl) | M(Zp) | M(Me) | M(Mn),
1981
+ POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
1982
+ POP_UNION,
1983
+ POP_INVERT,
1984
+ POP_END);
1985
+ break;
1986
+ case UNICODE_PROP_Grapheme_Extend:
1987
+ ret = unicode_prop_ops(cr,
1988
+ POP_GC, M(Me) | M(Mn),
1989
+ POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
1990
+ POP_UNION,
1991
+ POP_END);
1992
+ break;
1993
+ case UNICODE_PROP_XID_Start:
1994
+ ret = unicode_prop_ops(cr,
1995
+ POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
1996
+ POP_PROP, UNICODE_PROP_Other_ID_Start,
1997
+ POP_UNION,
1998
+ POP_PROP, UNICODE_PROP_Pattern_Syntax,
1999
+ POP_PROP, UNICODE_PROP_Pattern_White_Space,
2000
+ POP_UNION,
2001
+ POP_PROP, UNICODE_PROP_XID_Start1,
2002
+ POP_UNION,
2003
+ POP_INVERT,
2004
+ POP_INTER,
2005
+ POP_END);
2006
+ break;
2007
+ case UNICODE_PROP_XID_Continue:
2008
+ ret = unicode_prop_ops(cr,
2009
+ POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl) |
2010
+ M(Mn) | M(Mc) | M(Nd) | M(Pc),
2011
+ POP_PROP, UNICODE_PROP_Other_ID_Start,
2012
+ POP_UNION,
2013
+ POP_PROP, UNICODE_PROP_Other_ID_Continue,
2014
+ POP_UNION,
2015
+ POP_PROP, UNICODE_PROP_Pattern_Syntax,
2016
+ POP_PROP, UNICODE_PROP_Pattern_White_Space,
2017
+ POP_UNION,
2018
+ POP_PROP, UNICODE_PROP_XID_Continue1,
2019
+ POP_UNION,
2020
+ POP_INVERT,
2021
+ POP_INTER,
2022
+ POP_END);
2023
+ break;
2024
+ case UNICODE_PROP_Changes_When_Uppercased:
2025
+ ret = unicode_case1(cr, CASE_U);
2026
+ break;
2027
+ case UNICODE_PROP_Changes_When_Lowercased:
2028
+ ret = unicode_case1(cr, CASE_L);
2029
+ break;
2030
+ case UNICODE_PROP_Changes_When_Casemapped:
2031
+ ret = unicode_case1(cr, CASE_U | CASE_L | CASE_F);
2032
+ break;
2033
+ case UNICODE_PROP_Changes_When_Titlecased:
2034
+ ret = unicode_prop_ops(cr,
2035
+ POP_CASE, CASE_U,
2036
+ POP_PROP, UNICODE_PROP_Changes_When_Titlecased1,
2037
+ POP_XOR,
2038
+ POP_END);
2039
+ break;
2040
+ case UNICODE_PROP_Changes_When_Casefolded:
2041
+ ret = unicode_prop_ops(cr,
2042
+ POP_CASE, CASE_F,
2043
+ POP_PROP, UNICODE_PROP_Changes_When_Casefolded1,
2044
+ POP_XOR,
2045
+ POP_END);
2046
+ break;
2047
+ case UNICODE_PROP_Changes_When_NFKC_Casefolded:
2048
+ ret = unicode_prop_ops(cr,
2049
+ POP_CASE, CASE_F,
2050
+ POP_PROP, UNICODE_PROP_Changes_When_NFKC_Casefolded1,
2051
+ POP_XOR,
2052
+ POP_END);
2053
+ break;
2054
+ /* we use the existing tables */
2055
+ case UNICODE_PROP_ID_Continue:
2056
+ ret = unicode_prop_ops(cr,
2057
+ POP_PROP, UNICODE_PROP_ID_Start,
2058
+ POP_PROP, UNICODE_PROP_ID_Continue1,
2059
+ POP_XOR,
2060
+ POP_END);
2061
+ break;
2062
+ default:
2063
+ if (prop_idx >= countof(unicode_prop_table))
2064
+ return -2;
2065
+ ret = unicode_prop1(cr, prop_idx);
2066
+ break;
2067
+ }
2068
+ return ret;
2069
+ }