@mtkruto/node 0.1.144 → 0.1.145

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 (531) hide show
  1. package/esm/0_deps.d.ts +4 -4
  2. package/esm/0_deps.js +5 -5
  3. package/esm/4_constants.d.ts +2 -2
  4. package/esm/4_constants.js +2 -2
  5. package/esm/client/0_types.d.ts +1 -0
  6. package/esm/client/1_update_manager.js +33 -13
  7. package/esm/client/2_message_manager.d.ts +1 -1
  8. package/esm/client/2_message_manager.js +15 -15
  9. package/esm/client/4_client.d.ts +2 -0
  10. package/esm/client/4_client.js +1 -1
  11. package/esm/deps/deno.land/std@0.212.0/assert/_constants.js +2 -0
  12. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.js +39 -18
  13. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.js +1 -1
  14. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.js +1 -1
  15. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.js +1 -1
  16. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.js +1 -1
  17. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.js +1 -1
  18. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.js +1 -1
  19. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.js +1 -1
  20. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.js +1 -1
  21. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.js +1 -1
  22. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.js +1 -1
  23. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.js +1 -1
  24. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.js +1 -1
  25. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.js +1 -1
  26. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.js +1 -1
  27. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.js +1 -1
  28. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.js +1 -1
  29. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.js +1 -1
  30. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.js +1 -1
  31. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.js +1 -1
  32. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.js +1 -1
  33. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.js +1 -1
  34. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.js +1 -1
  35. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.js +1 -1
  36. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.js +1 -1
  37. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.js +1 -1
  38. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.js +1 -1
  39. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.js +1 -1
  40. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.js +1 -1
  41. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.js +1 -1
  42. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.js +1 -1
  43. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.js +1 -1
  44. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.212.0}/fmt/colors.d.ts +16 -11
  45. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/fmt/colors.js +14 -11
  46. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.js +1 -1
  47. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.js +8 -6
  48. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.js +1 -1
  49. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.js +1 -1
  50. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.js +1 -1
  51. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.js +2 -2
  52. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.js +1 -1
  53. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.js +1 -1
  54. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.js +1 -1
  55. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.js +1 -1
  56. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.js +1 -1
  57. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.js +1 -1
  58. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.js +1 -1
  59. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.js +1 -1
  60. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.js +1 -1
  61. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.js +1 -1
  62. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.js +1 -1
  63. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.js +1 -1
  64. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.js +1 -1
  65. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.js +1 -1
  66. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.js +1 -1
  67. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.js +1 -1
  68. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.js +1 -1
  69. package/esm/deps/deno.land/std@0.212.0/path/_interface.js +3 -0
  70. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.js +1 -1
  71. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.js +1 -1
  72. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.d.ts +2 -1
  73. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.js +1 -1
  74. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.js +1 -1
  75. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.js +1 -1
  76. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.js +1 -1
  77. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.js +1 -1
  78. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.js +1 -1
  79. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.js +1 -1
  80. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.js +1 -1
  81. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.js +1 -1
  82. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.js +1 -1
  83. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.js +1 -1
  84. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.js +1 -1
  85. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.js +1 -1
  86. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.js +1 -1
  87. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.js +1 -1
  88. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.js +1 -1
  89. package/{script/deps/deno.land/std@0.210.0/path → esm/deps/deno.land/std@0.212.0/path/posix}/common.d.ts +2 -1
  90. package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/common.js +1 -1
  91. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.js +1 -1
  92. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.js +1 -1
  93. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.js +1 -1
  94. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.d.ts +1 -1
  95. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.js +2 -2
  96. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.js +1 -1
  97. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.js +1 -1
  98. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.js +1 -1
  99. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.js +1 -1
  100. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.js +1 -1
  101. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.js +1 -1
  102. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.js +1 -1
  103. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.js +1 -1
  104. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.js +1 -1
  105. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.js +1 -1
  106. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.js +1 -1
  107. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.js +1 -1
  108. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.d.ts +1 -1
  109. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.js +2 -2
  110. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.js +1 -1
  111. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.js +1 -1
  112. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.js +1 -1
  113. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.js +1 -1
  114. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.js +1 -1
  115. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.js +1 -1
  116. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.js +1 -1
  117. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.js +1 -1
  118. package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/common.d.ts +2 -1
  119. package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/common.js +1 -1
  120. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.js +1 -1
  121. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.js +1 -1
  122. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.js +1 -1
  123. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.212.0}/path/windows/from_file_url.d.ts +1 -1
  124. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/from_file_url.js +2 -2
  125. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.js +1 -1
  126. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.js +1 -1
  127. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.js +1 -1
  128. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.js +1 -1
  129. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.js +1 -1
  130. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.js +1 -1
  131. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.js +1 -1
  132. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.js +1 -1
  133. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.js +1 -1
  134. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.js +1 -1
  135. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.js +1 -1
  136. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.js +1 -1
  137. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.d.ts +1 -1
  138. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.js +2 -2
  139. package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.js +1 -1
  140. package/esm/storage/0_storage.d.ts +3 -6
  141. package/esm/storage/0_storage.js +16 -16
  142. package/esm/tl/2_types.d.ts +218 -4
  143. package/esm/tl/2_types.js +632 -19
  144. package/esm/tl/3_functions.d.ts +232 -0
  145. package/esm/tl/3_functions.js +608 -4
  146. package/esm/types/0_message_entity.d.ts +2 -1
  147. package/esm/types/0_message_entity.js +27 -4
  148. package/esm/types/1_chat_p.js +1 -1
  149. package/esm/types/4_inline_query_result.d.ts +1 -1
  150. package/esm/types/4_inline_query_result.js +2 -2
  151. package/package.json +1 -1
  152. package/script/0_deps.d.ts +4 -4
  153. package/script/0_deps.js +5 -5
  154. package/script/4_constants.d.ts +2 -2
  155. package/script/4_constants.js +2 -2
  156. package/script/client/0_types.d.ts +1 -0
  157. package/script/client/1_update_manager.js +33 -13
  158. package/script/client/2_message_manager.d.ts +1 -1
  159. package/script/client/2_message_manager.js +15 -15
  160. package/script/client/4_client.d.ts +2 -0
  161. package/script/client/4_client.js +1 -1
  162. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.js +1 -1
  163. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.js +39 -18
  164. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.js +1 -1
  165. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.js +1 -1
  166. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.js +1 -1
  167. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.js +1 -1
  168. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.js +1 -1
  169. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.js +1 -1
  170. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.js +1 -1
  171. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.js +1 -1
  172. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.js +1 -1
  173. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.js +1 -1
  174. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.js +1 -1
  175. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.js +1 -1
  176. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.js +1 -1
  177. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.js +1 -1
  178. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.js +1 -1
  179. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.js +1 -1
  180. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.js +1 -1
  181. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.js +1 -1
  182. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.js +1 -1
  183. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.js +1 -1
  184. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.js +1 -1
  185. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.js +1 -1
  186. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.js +1 -1
  187. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.js +1 -1
  188. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.js +1 -1
  189. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.js +1 -1
  190. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.js +1 -1
  191. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.js +1 -1
  192. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.js +1 -1
  193. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.js +1 -1
  194. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.js +1 -1
  195. package/{esm/deps/deno.land/std@0.210.0 → script/deps/deno.land/std@0.212.0}/fmt/colors.d.ts +16 -11
  196. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/fmt/colors.js +14 -11
  197. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.js +1 -1
  198. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.js +8 -6
  199. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.js +1 -1
  200. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.js +1 -1
  201. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.js +1 -1
  202. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.js +2 -2
  203. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.js +1 -1
  204. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.js +1 -1
  205. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.js +1 -1
  206. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.js +1 -1
  207. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.js +1 -1
  208. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.js +1 -1
  209. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.js +1 -1
  210. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.js +1 -1
  211. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.js +1 -1
  212. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.js +1 -1
  213. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.js +1 -1
  214. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.js +1 -1
  215. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.js +1 -1
  216. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.js +1 -1
  217. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.js +1 -1
  218. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.js +1 -1
  219. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.js +1 -1
  220. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.js +1 -1
  221. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.js +1 -1
  222. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.js +1 -1
  223. package/{esm/deps/deno.land/std@0.210.0/path/windows → script/deps/deno.land/std@0.212.0/path}/common.d.ts +2 -1
  224. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.js +1 -1
  225. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.js +1 -1
  226. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.js +1 -1
  227. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.js +1 -1
  228. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.js +1 -1
  229. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.js +1 -1
  230. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.js +1 -1
  231. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.js +1 -1
  232. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.js +1 -1
  233. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.js +1 -1
  234. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.js +1 -1
  235. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.js +1 -1
  236. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.js +1 -1
  237. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.js +1 -1
  238. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.js +1 -1
  239. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.js +1 -1
  240. package/script/deps/deno.land/std@0.212.0/path/posix/common.d.ts +14 -0
  241. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/common.js +1 -1
  242. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.js +1 -1
  243. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.js +1 -1
  244. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.js +1 -1
  245. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.d.ts +1 -1
  246. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.js +2 -2
  247. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.js +1 -1
  248. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.js +1 -1
  249. package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/is_glob.js +1 -1
  250. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.js +1 -1
  251. package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/join_globs.js +1 -1
  252. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.js +1 -1
  253. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.js +1 -1
  254. package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/normalize_glob.js +1 -1
  255. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.js +1 -1
  256. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.js +1 -1
  257. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.js +1 -1
  258. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.js +1 -1
  259. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.d.ts +1 -1
  260. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.js +2 -2
  261. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.js +1 -1
  262. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.js +1 -1
  263. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.js +1 -1
  264. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.js +1 -1
  265. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.js +1 -1
  266. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.js +1 -1
  267. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.js +1 -1
  268. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.js +1 -1
  269. package/script/deps/deno.land/std@0.212.0/path/windows/common.d.ts +14 -0
  270. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/common.js +1 -1
  271. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.js +1 -1
  272. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.js +1 -1
  273. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.js +1 -1
  274. package/{esm/deps/deno.land/std@0.210.0 → script/deps/deno.land/std@0.212.0}/path/windows/from_file_url.d.ts +1 -1
  275. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/from_file_url.js +2 -2
  276. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.js +1 -1
  277. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.js +1 -1
  278. package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/is_glob.js +1 -1
  279. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.js +1 -1
  280. package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/join_globs.js +1 -1
  281. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.js +1 -1
  282. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.js +1 -1
  283. package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/normalize_glob.js +1 -1
  284. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.js +1 -1
  285. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.js +1 -1
  286. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.js +1 -1
  287. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.js +1 -1
  288. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.d.ts +1 -1
  289. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.js +2 -2
  290. package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.js +1 -1
  291. package/script/storage/0_storage.d.ts +3 -6
  292. package/script/storage/0_storage.js +16 -16
  293. package/script/tl/2_types.d.ts +218 -4
  294. package/script/tl/2_types.js +674 -44
  295. package/script/tl/3_functions.d.ts +232 -0
  296. package/script/tl/3_functions.js +629 -14
  297. package/script/types/0_message_entity.d.ts +2 -1
  298. package/script/types/0_message_entity.js +27 -4
  299. package/script/types/1_chat_p.js +1 -1
  300. package/script/types/4_inline_query_result.d.ts +1 -1
  301. package/script/types/4_inline_query_result.js +2 -2
  302. package/esm/deps/deno.land/std@0.210.0/assert/_constants.js +0 -2
  303. package/esm/deps/deno.land/std@0.210.0/path/_interface.js +0 -3
  304. package/script/deps/deno.land/std@0.210.0/path/posix/common.d.ts +0 -13
  305. package/script/deps/deno.land/std@0.210.0/path/windows/common.d.ts +0 -13
  306. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.d.ts +0 -0
  307. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.d.ts +0 -0
  308. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.d.ts +0 -0
  309. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.d.ts +0 -0
  310. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.d.ts +0 -0
  311. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.d.ts +0 -0
  312. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.d.ts +0 -0
  313. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.d.ts +0 -0
  314. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.d.ts +0 -0
  315. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.d.ts +0 -0
  316. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.d.ts +0 -0
  317. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.d.ts +0 -0
  318. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.d.ts +0 -0
  319. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.d.ts +0 -0
  320. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.d.ts +0 -0
  321. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.d.ts +0 -0
  322. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.d.ts +0 -0
  323. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.d.ts +0 -0
  324. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.d.ts +0 -0
  325. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.d.ts +0 -0
  326. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.d.ts +0 -0
  327. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.d.ts +0 -0
  328. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.d.ts +0 -0
  329. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.d.ts +0 -0
  330. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.d.ts +0 -0
  331. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.d.ts +0 -0
  332. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.d.ts +0 -0
  333. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.d.ts +0 -0
  334. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.d.ts +0 -0
  335. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.d.ts +0 -0
  336. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.d.ts +0 -0
  337. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.d.ts +0 -0
  338. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.d.ts +0 -0
  339. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.d.ts +0 -0
  340. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.d.ts +0 -0
  341. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.d.ts +0 -0
  342. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.d.ts +0 -0
  343. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.d.ts +0 -0
  344. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.d.ts +0 -0
  345. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.d.ts +0 -0
  346. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.d.ts +0 -0
  347. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.d.ts +0 -0
  348. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  349. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.d.ts +0 -0
  350. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.d.ts +0 -0
  351. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.d.ts +0 -0
  352. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.d.ts +0 -0
  353. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.d.ts +0 -0
  354. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.d.ts +0 -0
  355. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.d.ts +0 -0
  356. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
  357. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.d.ts +0 -0
  358. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.d.ts +0 -0
  359. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.d.ts +0 -0
  360. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  361. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.d.ts +0 -0
  362. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.d.ts +0 -0
  363. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.d.ts +0 -0
  364. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.d.ts +0 -0
  365. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.d.ts +0 -0
  366. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.d.ts +0 -0
  367. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.d.ts +0 -0
  368. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.d.ts +0 -0
  369. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.d.ts +0 -0
  370. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.d.ts +0 -0
  371. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.d.ts +0 -0
  372. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.d.ts +0 -0
  373. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.d.ts +0 -0
  374. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.d.ts +0 -0
  375. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.d.ts +0 -0
  376. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.d.ts +0 -0
  377. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.d.ts +0 -0
  378. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.d.ts +0 -0
  379. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.d.ts +0 -0
  380. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.d.ts +0 -0
  381. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.d.ts +0 -0
  382. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.d.ts +0 -0
  383. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.d.ts +0 -0
  384. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.d.ts +0 -0
  385. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.d.ts +0 -0
  386. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.d.ts +0 -0
  387. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.d.ts +0 -0
  388. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.d.ts +0 -0
  389. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.d.ts +0 -0
  390. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.d.ts +0 -0
  391. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.d.ts +0 -0
  392. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.d.ts +0 -0
  393. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.d.ts +0 -0
  394. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.d.ts +0 -0
  395. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.d.ts +0 -0
  396. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.d.ts +0 -0
  397. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.d.ts +0 -0
  398. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.d.ts +0 -0
  399. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.d.ts +0 -0
  400. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.d.ts +0 -0
  401. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.d.ts +0 -0
  402. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.d.ts +0 -0
  403. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.d.ts +0 -0
  404. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.d.ts +0 -0
  405. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.d.ts +0 -0
  406. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.d.ts +0 -0
  407. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.d.ts +0 -0
  408. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.d.ts +0 -0
  409. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.d.ts +0 -0
  410. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.d.ts +0 -0
  411. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.d.ts +0 -0
  412. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.d.ts +0 -0
  413. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.d.ts +0 -0
  414. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.d.ts +0 -0
  415. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.d.ts +0 -0
  416. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.d.ts +0 -0
  417. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.d.ts +0 -0
  418. /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.d.ts +0 -0
  419. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.d.ts +0 -0
  420. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.d.ts +0 -0
  421. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.d.ts +0 -0
  422. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.d.ts +0 -0
  423. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.d.ts +0 -0
  424. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.d.ts +0 -0
  425. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.d.ts +0 -0
  426. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.d.ts +0 -0
  427. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.d.ts +0 -0
  428. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.d.ts +0 -0
  429. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.d.ts +0 -0
  430. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.d.ts +0 -0
  431. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.d.ts +0 -0
  432. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.d.ts +0 -0
  433. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.d.ts +0 -0
  434. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.d.ts +0 -0
  435. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.d.ts +0 -0
  436. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.d.ts +0 -0
  437. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.d.ts +0 -0
  438. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.d.ts +0 -0
  439. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.d.ts +0 -0
  440. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.d.ts +0 -0
  441. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.d.ts +0 -0
  442. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.d.ts +0 -0
  443. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.d.ts +0 -0
  444. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.d.ts +0 -0
  445. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.d.ts +0 -0
  446. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.d.ts +0 -0
  447. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.d.ts +0 -0
  448. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.d.ts +0 -0
  449. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.d.ts +0 -0
  450. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.d.ts +0 -0
  451. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.d.ts +0 -0
  452. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.d.ts +0 -0
  453. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.d.ts +0 -0
  454. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.d.ts +0 -0
  455. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.d.ts +0 -0
  456. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.d.ts +0 -0
  457. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.d.ts +0 -0
  458. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.d.ts +0 -0
  459. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.d.ts +0 -0
  460. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.d.ts +0 -0
  461. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  462. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.d.ts +0 -0
  463. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.d.ts +0 -0
  464. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.d.ts +0 -0
  465. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.d.ts +0 -0
  466. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.d.ts +0 -0
  467. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.d.ts +0 -0
  468. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.d.ts +0 -0
  469. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
  470. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.d.ts +0 -0
  471. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.d.ts +0 -0
  472. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.d.ts +0 -0
  473. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  474. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.d.ts +0 -0
  475. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.d.ts +0 -0
  476. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.d.ts +0 -0
  477. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.d.ts +0 -0
  478. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.d.ts +0 -0
  479. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.d.ts +0 -0
  480. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.d.ts +0 -0
  481. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.d.ts +0 -0
  482. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.d.ts +0 -0
  483. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.d.ts +0 -0
  484. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.d.ts +0 -0
  485. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.d.ts +0 -0
  486. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.d.ts +0 -0
  487. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.d.ts +0 -0
  488. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.d.ts +0 -0
  489. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.d.ts +0 -0
  490. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.d.ts +0 -0
  491. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.d.ts +0 -0
  492. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.d.ts +0 -0
  493. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.d.ts +0 -0
  494. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.d.ts +0 -0
  495. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.d.ts +0 -0
  496. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.d.ts +0 -0
  497. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.d.ts +0 -0
  498. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.d.ts +0 -0
  499. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.d.ts +0 -0
  500. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.d.ts +0 -0
  501. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.d.ts +0 -0
  502. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.d.ts +0 -0
  503. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.d.ts +0 -0
  504. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.d.ts +0 -0
  505. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.d.ts +0 -0
  506. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.d.ts +0 -0
  507. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.d.ts +0 -0
  508. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.d.ts +0 -0
  509. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.d.ts +0 -0
  510. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.d.ts +0 -0
  511. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.d.ts +0 -0
  512. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.d.ts +0 -0
  513. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.d.ts +0 -0
  514. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.d.ts +0 -0
  515. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.d.ts +0 -0
  516. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.d.ts +0 -0
  517. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.d.ts +0 -0
  518. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.d.ts +0 -0
  519. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.d.ts +0 -0
  520. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.d.ts +0 -0
  521. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.d.ts +0 -0
  522. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.d.ts +0 -0
  523. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.d.ts +0 -0
  524. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.d.ts +0 -0
  525. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.d.ts +0 -0
  526. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.d.ts +0 -0
  527. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.d.ts +0 -0
  528. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.d.ts +0 -0
  529. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.d.ts +0 -0
  530. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.d.ts +0 -0
  531. /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.d.ts +0 -0
package/esm/0_deps.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./deps/deno.land/std@0.210.0/assert/mod.js";
2
- export * as path from "./deps/deno.land/std@0.210.0/path/mod.js";
3
- export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.210.0/encoding/base64.js";
4
- export { contentType } from "./deps/deno.land/std@0.210.0/media_types/content_type.js";
1
+ export * from "./deps/deno.land/std@0.212.0/assert/mod.js";
2
+ export * as path from "./deps/deno.land/std@0.212.0/path/mod.js";
3
+ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.212.0/encoding/base64.js";
4
+ export { contentType } from "./deps/deno.land/std@0.212.0/media_types/content_type.js";
5
5
  export declare function extension(mimeType: string): string;
6
6
  export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
7
7
  export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
package/esm/0_deps.js CHANGED
@@ -1,8 +1,8 @@
1
- export * from "./deps/deno.land/std@0.210.0/assert/mod.js";
2
- export * as path from "./deps/deno.land/std@0.210.0/path/mod.js";
3
- export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.210.0/encoding/base64.js";
4
- export { contentType } from "./deps/deno.land/std@0.210.0/media_types/content_type.js";
5
- import { extension as extension_ } from "./deps/deno.land/std@0.210.0/media_types/extension.js";
1
+ export * from "./deps/deno.land/std@0.212.0/assert/mod.js";
2
+ export * as path from "./deps/deno.land/std@0.212.0/path/mod.js";
3
+ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.212.0/encoding/base64.js";
4
+ export { contentType } from "./deps/deno.land/std@0.212.0/media_types/content_type.js";
5
+ import { extension as extension_ } from "./deps/deno.land/std@0.212.0/media_types/extension.js";
6
6
  export function extension(mimeType) {
7
7
  if (mimeType == "application/x-tgsticker") {
8
8
  return "tgs";
@@ -3,8 +3,8 @@ export declare const ACK_THRESHOLD = 10;
3
3
  export type PublicKeys = readonly [bigint, [bigint, bigint]][];
4
4
  export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const INITIAL_DC: DC;
6
- export declare const LAYER = 169;
7
- export declare const APP_VERSION = "MTKruto 0.1.144";
6
+ export declare const LAYER = 172;
7
+ export declare const APP_VERSION = "MTKruto 0.1.145";
8
8
  export declare const DEVICE_MODEL: string;
9
9
  export declare const LANG_CODE: string;
10
10
  export declare const LANG_PACK = "";
@@ -52,8 +52,8 @@ export const PUBLIC_KEYS = Object.freeze([
52
52
  ],
53
53
  ]);
54
54
  export const INITIAL_DC = "2";
55
- export const LAYER = 169;
56
- export const APP_VERSION = "MTKruto 0.1.144";
55
+ export const LAYER = 172;
56
+ export const APP_VERSION = "MTKruto 0.1.145";
57
57
  // @ts-ignore: lib
58
58
  export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
59
59
  export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -35,6 +35,7 @@ export interface C {
35
35
  apiFactory: ApiFactory;
36
36
  ignoreOutgoing: boolean | null;
37
37
  cdn: boolean;
38
+ dropPendingUpdates?: boolean;
38
39
  }
39
40
  export declare class ConnectionError extends Error {
40
41
  }
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _UpdateManager_instances, _a, _UpdateManager_c, _UpdateManager_updateState, _UpdateManager_updateHandler, _UpdateManager_handleUpdateQueues, _UpdateManager_checkGap, _UpdateManager_checkChannelGap, _UpdateManager_channelUpdateQueues, _UpdateManager_processChannelPtsUpdateInner, _UpdateManager_queueUpdate, _UpdateManager_processChannelPtsUpdate, _UpdateManager_processPtsUpdateInner, _UpdateManager_ptsUpdateQueue, _UpdateManager_processPtsUpdate, _UpdateManager_processUpdatesQueue, _UpdateManager_processUpdates, _UpdateManager_setUpdateStateDate, _UpdateManager_setUpdatePts, _UpdateManager_getLocalState, _UpdateManager_recoverChannelUpdateGap, _UpdateManager_handleUpdatesSet, _UpdateManager_handleStoredUpdates, _UpdateManager_handleUpdate;
12
+ var _UpdateManager_instances, _a, _UpdateManager_c, _UpdateManager_updateState, _UpdateManager_updateHandler, _UpdateManager_defaultDropPendingUpdates, _UpdateManager_mustDropPendingUpdates, _UpdateManager_handleUpdateQueues, _UpdateManager_nonFirst, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck, _UpdateManager_checkGap, _UpdateManager_checkChannelGap, _UpdateManager_channelUpdateQueues, _UpdateManager_processChannelPtsUpdateInner, _UpdateManager_queueUpdate, _UpdateManager_processChannelPtsUpdate, _UpdateManager_processPtsUpdateInner, _UpdateManager_ptsUpdateQueue, _UpdateManager_processPtsUpdate, _UpdateManager_processUpdatesQueue, _UpdateManager_processUpdates, _UpdateManager_setUpdateStateDate, _UpdateManager_setUpdatePts, _UpdateManager_getLocalState, _UpdateManager_recoverChannelUpdateGap, _UpdateManager_handleUpdatesSet, _UpdateManager_handleStoredUpdates, _UpdateManager_handleUpdate;
13
13
  import { debug } from "../0_deps.js";
14
14
  import { Queue, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
15
15
  import { as, functions, inputPeerToPeer, peerToChatId, types } from "../2_tl.js";
@@ -24,7 +24,9 @@ export class UpdateManager {
24
24
  _UpdateManager_c.set(this, void 0);
25
25
  _UpdateManager_updateState.set(this, void 0);
26
26
  _UpdateManager_updateHandler.set(this, void 0);
27
+ _UpdateManager_defaultDropPendingUpdates.set(this, null);
27
28
  _UpdateManager_handleUpdateQueues.set(this, new Map());
29
+ _UpdateManager_nonFirst.set(this, new Set());
28
30
  _UpdateManager_channelUpdateQueues.set(this, new Map());
29
31
  _UpdateManager_ptsUpdateQueue.set(this, new Queue("ptsUpdate"));
30
32
  _UpdateManager_processUpdatesQueue.set(this, new Queue("UpdateManager/processUpdates"));
@@ -35,25 +37,24 @@ export class UpdateManager {
35
37
  const state = await __classPrivateFieldGet(this, _UpdateManager_c, "f").api.updates.getState();
36
38
  __classPrivateFieldSet(this, _UpdateManager_updateState, state, "f");
37
39
  d("state fetched [%s]", source);
40
+ if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this)) {
41
+ await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setState(state);
42
+ }
38
43
  }
39
44
  async processChats(chats) {
40
45
  for (const chat of chats) {
41
- if (chat instanceof types.Channel && chat.access_hash) {
46
+ if (chat instanceof types.Channel || chat instanceof types.ChannelForbidden) {
42
47
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
43
- await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setChannelAccessHash(chat.id, chat.access_hash);
44
- if (chat.username) {
48
+ if ("username" in chat && chat.username) {
45
49
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, [chat.username]);
46
50
  }
47
- if (chat.usernames) {
51
+ if ("usernames" in chat && chat.usernames) {
48
52
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, chat.usernames.map((v) => v.username));
49
53
  }
50
54
  }
51
- else if (chat instanceof types.Chat) {
55
+ else if (chat instanceof types.Chat || chat instanceof types.ChatForbidden) {
52
56
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
53
57
  }
54
- else if (chat instanceof types.ChannelForbidden || chat instanceof types.ChatForbidden) {
55
- await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.removeEntity(chat);
56
- }
57
58
  }
58
59
  }
59
60
  async processResult(result) {
@@ -117,7 +118,6 @@ export class UpdateManager {
117
118
  for (const user of users) {
118
119
  if (user instanceof types.User && user.access_hash) {
119
120
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(user);
120
- await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUserAccessHash(user.id, user.access_hash);
121
121
  if (user.username) {
122
122
  await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("user", user.id, [user.username]);
123
123
  }
@@ -193,13 +193,33 @@ export class UpdateManager {
193
193
  __classPrivateFieldSet(this, _UpdateManager_updateHandler, handler, "f");
194
194
  }
195
195
  }
196
- _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState = new WeakMap(), _UpdateManager_updateHandler = new WeakMap(), _UpdateManager_handleUpdateQueues = new WeakMap(), _UpdateManager_channelUpdateQueues = new WeakMap(), _UpdateManager_ptsUpdateQueue = new WeakMap(), _UpdateManager_processUpdatesQueue = new WeakMap(), _UpdateManager_handleUpdatesSet = new WeakMap(), _UpdateManager_instances = new WeakSet(), _UpdateManager_checkGap = async function _UpdateManager_checkGap(pts, ptsCount) {
196
+ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState = new WeakMap(), _UpdateManager_updateHandler = new WeakMap(), _UpdateManager_defaultDropPendingUpdates = new WeakMap(), _UpdateManager_handleUpdateQueues = new WeakMap(), _UpdateManager_nonFirst = new WeakMap(), _UpdateManager_channelUpdateQueues = new WeakMap(), _UpdateManager_ptsUpdateQueue = new WeakMap(), _UpdateManager_processUpdatesQueue = new WeakMap(), _UpdateManager_handleUpdatesSet = new WeakMap(), _UpdateManager_instances = new WeakSet(), _UpdateManager_mustDropPendingUpdates = async function _UpdateManager_mustDropPendingUpdates() {
197
+ if (typeof __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates === "boolean") {
198
+ return __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates;
199
+ }
200
+ if (__classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f") == null) {
201
+ __classPrivateFieldSet(this, _UpdateManager_defaultDropPendingUpdates, await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getAccountType() == "bot", "f");
202
+ }
203
+ return __classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f");
204
+ }, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck = async function _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck(channelId) {
205
+ if (!(await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this))) {
206
+ return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
207
+ }
208
+ const first = !__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").has(channelId);
209
+ if (first) {
210
+ __classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").add(channelId);
211
+ return null;
212
+ }
213
+ else {
214
+ return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
215
+ }
216
+ }, _UpdateManager_checkGap = async function _UpdateManager_checkGap(pts, ptsCount) {
197
217
  const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
198
218
  if (localState.pts + ptsCount < pts) {
199
219
  await this.recoverUpdateGap("processUpdates");
200
220
  }
201
221
  }, _UpdateManager_checkChannelGap = async function _UpdateManager_checkChannelGap(channelId, pts, ptsCount) {
202
- let localPts = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
222
+ let localPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
203
223
  if (!localPts) {
204
224
  localPts = pts - ptsCount;
205
225
  }
@@ -220,7 +240,7 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
220
240
  if (checkGap) {
221
241
  await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkChannelGap).call(this, channelId, update.pts, ptsCount);
222
242
  }
223
- let currentPts = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
243
+ let currentPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
224
244
  currentPts ??= update.pts - ptsCount;
225
245
  if (currentPts + ptsCount > update.pts) {
226
246
  return;
@@ -16,7 +16,7 @@ export declare class MessageManager {
16
16
  parseText(text: string, params?: {
17
17
  parseMode?: ParseMode;
18
18
  entities?: MessageEntity[];
19
- }): readonly [string, (import("../tl/2_types.js").MessageEntityMention_ | import("../tl/2_types.js").MessageEntityHashtag_ | import("../tl/2_types.js").MessageEntityBotCommand_ | import("../tl/2_types.js").MessageEntityUrl_ | import("../tl/2_types.js").MessageEntityEmail_ | import("../tl/2_types.js").MessageEntityBold_ | import("../tl/2_types.js").MessageEntityItalic_ | import("../tl/2_types.js").MessageEntityCode_ | import("../tl/2_types.js").MessageEntityPre_ | import("../tl/2_types.js").MessageEntityTextUrl_ | import("../tl/2_types.js").MessageEntityMentionName_ | import("../tl/2_types.js").MessageEntityPhone_ | import("../tl/2_types.js").MessageEntityCashtag_ | import("../tl/2_types.js").MessageEntityUnderline_ | import("../tl/2_types.js").MessageEntityStrike_ | import("../tl/2_types.js").MessageEntityBankCard_ | import("../tl/2_types.js").MessageEntitySpoiler_ | import("../tl/2_types.js").MessageEntityCustomEmoji_ | import("../tl/2_types.js").MessageEntityBlockquote_)[] | undefined];
19
+ }): Promise<readonly [string, (import("../tl/2_types.js").MessageEntityMention_ | import("../tl/2_types.js").MessageEntityHashtag_ | import("../tl/2_types.js").MessageEntityBotCommand_ | import("../tl/2_types.js").MessageEntityUrl_ | import("../tl/2_types.js").MessageEntityEmail_ | import("../tl/2_types.js").MessageEntityBold_ | import("../tl/2_types.js").MessageEntityItalic_ | import("../tl/2_types.js").MessageEntityCode_ | import("../tl/2_types.js").MessageEntityPre_ | import("../tl/2_types.js").MessageEntityTextUrl_ | import("../tl/2_types.js").InputMessageEntityMentionName_ | import("../tl/2_types.js").MessageEntityPhone_ | import("../tl/2_types.js").MessageEntityCashtag_ | import("../tl/2_types.js").MessageEntityUnderline_ | import("../tl/2_types.js").MessageEntityStrike_ | import("../tl/2_types.js").MessageEntityBankCard_ | import("../tl/2_types.js").MessageEntitySpoiler_ | import("../tl/2_types.js").MessageEntityCustomEmoji_ | import("../tl/2_types.js").MessageEntityBlockquote_)[] | undefined]>;
20
20
  getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?: number): Promise<string>;
21
21
  constructMessage(message_: enums.Message, r?: boolean): Promise<Message>;
22
22
  forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
@@ -83,7 +83,7 @@ export class MessageManager {
83
83
  const messages = await this.getMessages(chatId, [messageId]);
84
84
  return messages[0] ?? null;
85
85
  }
86
- parseText(text, params) {
86
+ async parseText(text, params) {
87
87
  const entities_ = params?.entities ?? [];
88
88
  const parseMode = params?.parseMode ?? __classPrivateFieldGet(this, _MessageManager_c, "f").parseMode;
89
89
  switch (parseMode) {
@@ -100,7 +100,7 @@ export class MessageManager {
100
100
  default:
101
101
  UNREACHABLE();
102
102
  }
103
- const entities = entities_?.length > 0 ? entities_.map((v) => messageEntityToTlObject(v)) : undefined;
103
+ const entities = entities_?.length > 0 ? await Promise.all(entities_.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity))) : undefined;
104
104
  return [text, entities];
105
105
  }
106
106
  async getStickerSetName(inputStickerSet, hash = 0) {
@@ -177,7 +177,7 @@ export class MessageManager {
177
177
  return messages;
178
178
  }
179
179
  async sendMessage(chatId, text, params) {
180
- const [message, entities] = this.parseText(text, params);
180
+ const [message, entities] = await this.parseText(text, params);
181
181
  const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
182
182
  const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
183
183
  const randomId = getRandomId();
@@ -192,7 +192,7 @@ export class MessageManager {
192
192
  no_webpage: noWebpage,
193
193
  silent,
194
194
  noforwards,
195
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
195
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
196
196
  send_as: sendAs,
197
197
  entities,
198
198
  reply_markup: replyMarkup,
@@ -212,7 +212,7 @@ export class MessageManager {
212
212
  random_id: randomId,
213
213
  silent,
214
214
  noforwards,
215
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
215
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
216
216
  send_as: sendAs,
217
217
  reply_markup: replyMarkup,
218
218
  media: new types.InputMediaVenue({
@@ -243,7 +243,7 @@ export class MessageManager {
243
243
  random_id: randomId,
244
244
  silent,
245
245
  noforwards,
246
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
246
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
247
247
  send_as: sendAs,
248
248
  reply_markup: replyMarkup,
249
249
  media: new types.InputMediaContact({
@@ -269,7 +269,7 @@ export class MessageManager {
269
269
  random_id: randomId,
270
270
  silent,
271
271
  noforwards,
272
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
272
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
273
273
  send_as: sendAs,
274
274
  reply_markup: replyMarkup,
275
275
  media: new types.InputMediaDice({
@@ -292,7 +292,7 @@ export class MessageManager {
292
292
  random_id: randomId,
293
293
  silent,
294
294
  noforwards,
295
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
295
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
296
296
  send_as: sendAs,
297
297
  reply_markup: replyMarkup,
298
298
  media: params?.livePeriod !== undefined
@@ -408,7 +408,7 @@ export class MessageManager {
408
408
  const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
409
409
  const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
410
410
  const explanation = params?.explanation;
411
- const parseResult = explanation !== undefined ? this.parseText(explanation, { parseMode: params?.explanationParseMode, entities: params?.explanationEntities }) : undefined;
411
+ const parseResult = explanation !== undefined ? await this.parseText(explanation, { parseMode: params?.explanationParseMode, entities: params?.explanationEntities }) : undefined;
412
412
  const solution = parseResult === undefined ? undefined : parseResult[0];
413
413
  const solutionEntities = parseResult === undefined ? undefined : parseResult[1];
414
414
  const answers = options.map((v, i) => new types.PollAnswer({ option: new Uint8Array([i]), text: v }));
@@ -435,7 +435,7 @@ export class MessageManager {
435
435
  silent,
436
436
  noforwards,
437
437
  reply_markup: replyMarkup,
438
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
438
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
439
439
  send_as: sendAs,
440
440
  media,
441
441
  message: "",
@@ -453,7 +453,7 @@ export class MessageManager {
453
453
  return message_;
454
454
  }
455
455
  async editMessageText(chatId, messageId, text, params) {
456
- const [message, entities] = this.parseText(text, params);
456
+ const [message, entities] = await this.parseText(text, params);
457
457
  const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
458
458
  id: messageId,
459
459
  peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
@@ -790,10 +790,10 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
790
790
  await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("sendAs");
791
791
  return sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(sendAs) : undefined;
792
792
  }
793
- }, _MessageManager_constructReplyTo = function _MessageManager_constructReplyTo(params) {
793
+ }, _MessageManager_constructReplyTo = async function _MessageManager_constructReplyTo(params) {
794
794
  const topMsgId = params?.messageThreadId;
795
795
  const replyToMsgId = params?.replyToMessageId;
796
- return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: params?.replyQuote?.entities.map(messageEntityToTlObject), quote_offset: params?.replyQuote?.offset }) : undefined;
796
+ return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined;
797
797
  }, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false) {
798
798
  let media = null;
799
799
  const spoiler = params?.hasSpoiler ? true : undefined;
@@ -842,7 +842,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
842
842
  const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
843
843
  const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
844
844
  const caption_ = params?.caption;
845
- const parseResult = caption_ !== undefined ? this.parseText(caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
845
+ const parseResult = caption_ !== undefined ? await this.parseText(caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
846
846
  const caption = parseResult === undefined ? undefined : parseResult[0];
847
847
  const captionEntities = parseResult === undefined ? undefined : parseResult[1];
848
848
  const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.sendMedia({
@@ -851,7 +851,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
851
851
  silent,
852
852
  noforwards,
853
853
  reply_markup: replyMarkup,
854
- reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
854
+ reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
855
855
  send_as: sendAs,
856
856
  media,
857
857
  message: caption ?? "",
@@ -158,6 +158,8 @@ export interface ClientParams extends ClientPlainParams {
158
158
  prefixes?: string | string[];
159
159
  /** Whether to guarantee that order-sensitive updates are delivered at least once before delivering next ones. Useful mainly for clients providing a user interface à la Telegram Desktop. Defaults to `false`. */
160
160
  guaranteeUpdateDelivery?: boolean;
161
+ /** Whether to not handle updates received when the client was not running. Defaults to `true` for bots, and `false` for users. */
162
+ dropPendingUpdates?: boolean;
161
163
  }
162
164
  export declare class Client<C extends Context = Context> extends ClientAbstract {
163
165
  #private;
@@ -566,6 +566,7 @@ export class Client extends ClientAbstract {
566
566
  },
567
567
  cdn: params?.cdn ?? false,
568
568
  ignoreOutgoing: __classPrivateFieldGet(this, _Client_ignoreOutgoing, "f"),
569
+ dropPendingUpdates: params?.dropPendingUpdates,
569
570
  };
570
571
  __classPrivateFieldSet(this, _Client_updateManager, new UpdateManager(c), "f");
571
572
  __classPrivateFieldSet(this, _Client_networkStatisticsManager, new NetworkStatisticsManager(c), "f");
@@ -918,7 +919,6 @@ export class Client extends ClientAbstract {
918
919
  }
919
920
  else {
920
921
  inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getUserAccessHash).call(this, inputPeer.user_id);
921
- await this.storage.setUserAccessHash(inputPeer.user_id, inputPeer.access_hash);
922
922
  }
923
923
  }
924
924
  return inputPeer;
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ export const CAN_NOT_DISPLAY = "[Cannot display]";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { bgGreen, bgRed, bold, gray, green, red, white, } from "../fmt/colors.js";
4
4
  export const DiffType = {
@@ -14,8 +14,10 @@ function createCommon(A, B, reverse) {
14
14
  if (A.length === 0 || B.length === 0)
15
15
  return [];
16
16
  for (let i = 0; i < Math.min(A.length, B.length); i += 1) {
17
- if (A[reverse ? A.length - i - 1 : i] === B[reverse ? B.length - i - 1 : i]) {
18
- common.push(A[reverse ? A.length - i - 1 : i]);
17
+ const a = reverse ? A[A.length - i - 1] : A[i];
18
+ const b = reverse ? B[B.length - i - 1] : B[i];
19
+ if (a !== undefined && a === b) {
20
+ common.push(a);
19
21
  }
20
22
  else {
21
23
  return common;
@@ -23,6 +25,12 @@ function createCommon(A, B, reverse) {
23
25
  }
24
26
  return common;
25
27
  }
28
+ function ensureDefined(item) {
29
+ if (item === undefined) {
30
+ throw Error("Unexpected missing FarthestPoint");
31
+ }
32
+ return item;
33
+ }
26
34
  /**
27
35
  * Renders the differences between the actual and expected values
28
36
  * @param A Actual value
@@ -109,22 +117,26 @@ export function diff(A, B) {
109
117
  if (slide && slide.y === -1 && down && down.y === -1) {
110
118
  return { y: 0, id: 0 };
111
119
  }
112
- if ((down && down.y === -1) ||
120
+ const isAdding = (down?.y === -1) ||
113
121
  k === M ||
114
- (slide && slide.y) > (down && down.y) + 1) {
122
+ (slide?.y || 0) > (down?.y || 0) + 1;
123
+ if (slide && isAdding) {
115
124
  const prev = slide.id;
116
125
  ptr++;
117
126
  routes[ptr] = prev;
118
127
  routes[ptr + diffTypesPtrOffset] = ADDED;
119
128
  return { y: slide.y, id: ptr };
120
129
  }
121
- else {
130
+ else if (down && !isAdding) {
122
131
  const prev = down.id;
123
132
  ptr++;
124
133
  routes[ptr] = prev;
125
134
  routes[ptr + diffTypesPtrOffset] = REMOVED;
126
135
  return { y: down.y + 1, id: ptr };
127
136
  }
137
+ else {
138
+ throw new Error("Unexpected missing FarthestPoint");
139
+ }
128
140
  }
129
141
  function snake(k, slide, down, _offset, A, B) {
130
142
  const M = A.length;
@@ -142,7 +154,8 @@ export function diff(A, B) {
142
154
  }
143
155
  return fp;
144
156
  }
145
- while (fp[delta + offset].y < N) {
157
+ let currentFP = ensureDefined(fp[delta + offset]);
158
+ while (currentFP && currentFP.y < N) {
146
159
  p = p + 1;
147
160
  for (let k = -p; k < delta; ++k) {
148
161
  fp[k + offset] = snake(k, fp[k - 1 + offset], fp[k + 1 + offset], offset, A, B);
@@ -151,10 +164,11 @@ export function diff(A, B) {
151
164
  fp[k + offset] = snake(k, fp[k - 1 + offset], fp[k + 1 + offset], offset, A, B);
152
165
  }
153
166
  fp[delta + offset] = snake(delta, fp[delta - 1 + offset], fp[delta + 1 + offset], offset, A, B);
167
+ currentFP = ensureDefined(fp[delta + offset]);
154
168
  }
155
169
  return [
156
170
  ...prefixCommon.map((c) => ({ type: DiffType.common, value: c })),
157
- ...backTrace(A, B, fp[delta + offset], swapped),
171
+ ...backTrace(A, B, currentFP, swapped),
158
172
  ...suffixCommon.map((c) => ({ type: DiffType.common, value: c })),
159
173
  ];
160
174
  }
@@ -184,9 +198,14 @@ export function diffstr(A, B) {
184
198
  const words = /^[a-zA-Z\u{C0}-\u{FF}\u{D8}-\u{F6}\u{F8}-\u{2C6}\u{2C8}-\u{2D7}\u{2DE}-\u{2FF}\u{1E00}-\u{1EFF}]+$/u;
185
199
  // Join boundary splits that we do not consider to be boundaries and merge empty strings surrounded by word chars
186
200
  for (let i = 0; i < tokens.length - 1; i++) {
187
- if (!tokens[i + 1] && tokens[i + 2] && words.test(tokens[i]) &&
188
- words.test(tokens[i + 2])) {
189
- tokens[i] += tokens[i + 2];
201
+ const token = tokens[i];
202
+ const tokenPlusTwo = tokens[i + 2];
203
+ if (!tokens[i + 1] &&
204
+ token &&
205
+ tokenPlusTwo &&
206
+ words.test(token) &&
207
+ words.test(tokenPlusTwo)) {
208
+ tokens[i] += tokenPlusTwo;
190
209
  tokens.splice(i + 1, 2);
191
210
  i--;
192
211
  }
@@ -195,18 +214,19 @@ export function diffstr(A, B) {
195
214
  }
196
215
  else {
197
216
  // Split string on new lines symbols
198
- const tokens = [], lines = string.split(/(\n|\r\n)/);
217
+ const tokens = [];
218
+ const lines = string.split(/(\n|\r\n)/);
199
219
  // Ignore final empty token when text ends with a newline
200
220
  if (!lines[lines.length - 1]) {
201
221
  lines.pop();
202
222
  }
203
223
  // Merge the content and line separators into single tokens
204
- for (let i = 0; i < lines.length; i++) {
224
+ for (const [i, line] of lines.entries()) {
205
225
  if (i % 2) {
206
- tokens[tokens.length - 1] += lines[i];
226
+ tokens[tokens.length - 1] += line;
207
227
  }
208
228
  else {
209
- tokens.push(lines[i]);
229
+ tokens.push(line);
210
230
  }
211
231
  }
212
232
  return tokens;
@@ -216,11 +236,12 @@ export function diffstr(A, B) {
216
236
  // and merge "space-diff" if surrounded by word-diff for cleaner displays
217
237
  function createDetails(line, tokens) {
218
238
  return tokens.filter(({ type }) => type === line.type || type === DiffType.common).map((result, i, t) => {
219
- if ((result.type === DiffType.common) && (t[i - 1]) &&
220
- (t[i - 1]?.type === t[i + 1]?.type) && /\s+/.test(result.value)) {
239
+ const token = t[i - 1];
240
+ if ((result.type === DiffType.common) && token &&
241
+ (token.type === t[i + 1]?.type) && /\s+/.test(result.value)) {
221
242
  return {
222
243
  ...result,
223
- type: t[i - 1].type,
244
+ type: token.type,
224
245
  };
225
246
  }
226
247
  return result;
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  // This file been copied to `std/expect`.
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion, error will be thrown if `expr` does not have truthy value.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion that `actual` and `expected` are almost equal numbers
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { equal } from "./equal.js";
3
3
  import { format } from "./_format.js";
4
4
  import { AssertionError } from "./assertion_error.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { equal } from "./equal.js";
3
3
  import { format } from "./_format.js";
4
4
  import { AssertionError } from "./assertion_error.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion that actual is not null or undefined.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion, error will be thrown if `expr` have truthy value.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { format } from "./_format.js";
3
3
  import { AssertionError } from "./assertion_error.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { format } from "./_format.js";
3
3
  import { AssertionError } from "./assertion_error.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion that `obj` is an instance of `type`.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  import { stripAnsiCode } from "../fmt/colors.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { format } from "./_format.js";
3
3
  import { AssertionError } from "./assertion_error.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { format } from "./_format.js";
3
3
  import { AssertionError } from "./assertion_error.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion that `actual` match RegExp `expected`. If not
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { equal } from "./equal.js";
3
3
  import { AssertionError } from "./assertion_error.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { assertFalse } from "./assert_false.js";
3
3
  /**
4
4
  * Make an assertion that `obj` is not an instance of `type`.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  /**
4
4
  * Make an assertion that `actual` not match RegExp `expected`. If match
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { AssertionError } from "./assertion_error.js";
3
3
  import { format } from "./_format.js";
4
4
  /**