@mtkruto/node 0.1.124 → 0.1.126

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 (617) hide show
  1. package/esm/0_deps.d.ts +4 -3
  2. package/esm/0_deps.js +4 -3
  3. package/esm/1_utilities.d.ts +1 -1
  4. package/esm/1_utilities.js +1 -1
  5. package/esm/3_types.d.ts +2 -1
  6. package/esm/3_types.js +2 -1
  7. package/esm/4_constants.d.ts +1 -1
  8. package/esm/4_constants.js +1 -1
  9. package/esm/client/1_client_abstract.d.ts +1 -1
  10. package/esm/client/3_types.d.ts +79 -2
  11. package/esm/client/3_types.js +11 -1
  12. package/esm/client/5_client.d.ts +31 -2
  13. package/esm/client/5_client.js +473 -67
  14. package/esm/connection/0_connection.d.ts +4 -0
  15. package/esm/connection/0_connection.js +6 -0
  16. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.d.ts +6 -5
  17. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +5 -6
  18. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
  19. package/esm/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
  20. package/esm/deps/deno.land/std@0.209.0/assert/assert.js +18 -0
  21. package/esm/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
  22. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
  23. package/esm/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
  24. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
  25. package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
  26. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
  27. package/esm/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
  28. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
  29. package/esm/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
  30. package/esm/deps/deno.land/std@0.209.0/assert/assert_false.js +18 -0
  31. package/esm/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
  32. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
  33. package/esm/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
  34. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
  35. package/esm/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
  36. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
  37. package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
  38. package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.js +48 -0
  39. package/esm/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
  40. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
  41. package/esm/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
  42. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
  43. package/esm/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
  44. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
  45. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
  46. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
  47. package/esm/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
  48. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
  49. package/esm/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
  50. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
  51. package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
  52. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
  53. package/esm/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
  54. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
  55. package/esm/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
  56. package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
  57. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
  58. package/esm/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
  59. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
  60. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
  61. package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
  62. package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.js +18 -0
  63. package/esm/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
  64. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
  65. package/esm/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
  66. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
  67. package/esm/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
  68. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
  69. package/esm/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
  70. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
  71. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
  72. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
  73. package/esm/deps/deno.land/std@0.209.0/media_types/_db.d.ts +5 -0
  74. package/esm/deps/deno.land/std@0.209.0/media_types/_db.js +33 -0
  75. package/esm/deps/deno.land/std@0.209.0/media_types/_util.d.ts +21 -0
  76. package/esm/deps/deno.land/std@0.209.0/media_types/_util.js +122 -0
  77. package/esm/deps/deno.land/std@0.209.0/media_types/content_type.d.ts +38 -0
  78. package/esm/deps/deno.land/std@0.209.0/media_types/content_type.js +55 -0
  79. package/esm/deps/deno.land/std@0.209.0/media_types/format_media_type.d.ts +16 -0
  80. package/esm/deps/deno.land/std@0.209.0/media_types/format_media_type.js +61 -0
  81. package/esm/deps/deno.land/std@0.209.0/media_types/get_charset.d.ts +15 -0
  82. package/esm/deps/deno.land/std@0.209.0/media_types/get_charset.js +37 -0
  83. package/esm/deps/deno.land/std@0.209.0/media_types/parse_media_type.d.ts +37 -0
  84. package/esm/deps/deno.land/std@0.209.0/media_types/parse_media_type.js +122 -0
  85. package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
  86. package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +24 -0
  87. package/esm/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.d.ts +8518 -0
  88. package/esm/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.js +8555 -0
  89. package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
  90. package/esm/storage/0_storage.d.ts +26 -2
  91. package/esm/storage/0_storage.js +60 -5
  92. package/esm/storage/0_utilities.d.ts +2 -0
  93. package/esm/storage/0_utilities.js +33 -0
  94. package/esm/storage/1_storage_indexed_db.d.ts +8 -4
  95. package/esm/storage/1_storage_indexed_db.js +42 -11
  96. package/esm/storage/1_storage_local_storage.d.ts +7 -4
  97. package/esm/storage/1_storage_local_storage.js +23 -6
  98. package/esm/storage/1_storage_memory.d.ts +7 -2
  99. package/esm/storage/1_storage_memory.js +37 -6
  100. package/esm/storage/1_storage_session_storage.d.ts +6 -2
  101. package/esm/storage/1_storage_session_storage.js +23 -6
  102. package/esm/tl/0_tl_raw_writer.d.ts +1 -0
  103. package/esm/tl/0_tl_raw_writer.js +6 -0
  104. package/esm/tl/1_tl_object.js +6 -1
  105. package/esm/tl/3_deserialize.js +1 -1
  106. package/esm/transport/0_transport.d.ts +1 -1
  107. package/esm/transport/0_transport.js +0 -6
  108. package/esm/transport/1_transport_abridged.d.ts +1 -0
  109. package/esm/transport/1_transport_abridged.js +9 -5
  110. package/esm/transport/1_transport_intermediate.d.ts +1 -0
  111. package/esm/transport/1_transport_intermediate.js +8 -4
  112. package/esm/types/{1_chat.d.ts → 1_chat_p.d.ts} +7 -20
  113. package/esm/types/{1_chat.js → 1_chat_p.js} +4 -15
  114. package/esm/types/1_user.js +4 -2
  115. package/esm/types/3_message.d.ts +9 -8
  116. package/esm/types/3_message.js +20 -15
  117. package/esm/types/4_chat.d.ts +33 -0
  118. package/esm/types/4_chat.js +117 -0
  119. package/esm/utilities/{0_base64.js → 1_base64.js} +2 -1
  120. package/package.json +1 -1
  121. package/script/0_deps.d.ts +4 -3
  122. package/script/0_deps.js +6 -4
  123. package/script/1_utilities.d.ts +1 -1
  124. package/script/1_utilities.js +1 -1
  125. package/script/3_types.d.ts +2 -1
  126. package/script/3_types.js +2 -1
  127. package/script/4_constants.d.ts +1 -1
  128. package/script/4_constants.js +1 -1
  129. package/script/client/1_client_abstract.d.ts +1 -1
  130. package/script/client/3_types.d.ts +79 -2
  131. package/script/client/3_types.js +13 -0
  132. package/script/client/5_client.d.ts +31 -2
  133. package/script/client/5_client.js +471 -65
  134. package/script/connection/0_connection.d.ts +4 -0
  135. package/script/connection/0_connection.js +6 -0
  136. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.d.ts +6 -5
  137. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +23 -24
  138. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
  139. package/script/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
  140. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert.js +11 -1
  141. package/script/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
  142. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
  143. package/script/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
  144. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
  145. package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
  146. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
  147. package/script/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
  148. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
  149. package/script/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
  150. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_false.js +11 -1
  151. package/script/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
  152. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
  153. package/script/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
  154. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
  155. package/script/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
  156. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
  157. package/script/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
  158. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_is_error.js +24 -5
  159. package/script/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
  160. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
  161. package/script/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
  162. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
  163. package/script/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
  164. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
  165. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
  166. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
  167. package/script/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
  168. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
  169. package/script/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
  170. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
  171. package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
  172. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
  173. package/script/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
  174. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
  175. package/script/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
  176. package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
  177. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
  178. package/script/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
  179. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
  180. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
  181. package/script/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
  182. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assertion_error.js +13 -7
  183. package/script/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
  184. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
  185. package/script/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
  186. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
  187. package/script/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
  188. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
  189. package/script/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
  190. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
  191. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
  192. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
  193. package/script/deps/deno.land/std@0.209.0/media_types/_db.d.ts +5 -0
  194. package/script/deps/deno.land/std@0.209.0/media_types/_db.js +39 -0
  195. package/script/deps/deno.land/std@0.209.0/media_types/_util.d.ts +21 -0
  196. package/script/deps/deno.land/std@0.209.0/media_types/_util.js +132 -0
  197. package/script/deps/deno.land/std@0.209.0/media_types/content_type.d.ts +38 -0
  198. package/script/deps/deno.land/std@0.209.0/media_types/content_type.js +59 -0
  199. package/script/deps/deno.land/std@0.209.0/media_types/format_media_type.d.ts +16 -0
  200. package/script/deps/deno.land/std@0.209.0/media_types/format_media_type.js +65 -0
  201. package/script/deps/deno.land/std@0.209.0/media_types/get_charset.d.ts +15 -0
  202. package/script/deps/deno.land/std@0.209.0/media_types/get_charset.js +41 -0
  203. package/script/deps/deno.land/std@0.209.0/media_types/parse_media_type.d.ts +37 -0
  204. package/script/deps/deno.land/std@0.209.0/media_types/parse_media_type.js +126 -0
  205. package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
  206. package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +28 -0
  207. package/script/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.d.ts +8518 -0
  208. package/script/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.js +8557 -0
  209. package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
  210. package/script/storage/0_storage.d.ts +26 -2
  211. package/script/storage/0_storage.js +60 -5
  212. package/script/storage/0_utilities.d.ts +2 -0
  213. package/script/storage/0_utilities.js +36 -1
  214. package/script/storage/1_storage_indexed_db.d.ts +8 -4
  215. package/script/storage/1_storage_indexed_db.js +41 -10
  216. package/script/storage/1_storage_local_storage.d.ts +7 -4
  217. package/script/storage/1_storage_local_storage.js +22 -5
  218. package/script/storage/1_storage_memory.d.ts +7 -2
  219. package/script/storage/1_storage_memory.js +36 -5
  220. package/script/storage/1_storage_session_storage.d.ts +6 -2
  221. package/script/storage/1_storage_session_storage.js +22 -5
  222. package/script/tl/0_tl_raw_writer.d.ts +1 -0
  223. package/script/tl/0_tl_raw_writer.js +6 -0
  224. package/script/tl/1_tl_object.js +6 -1
  225. package/script/tl/3_deserialize.js +1 -1
  226. package/script/transport/0_transport.d.ts +1 -1
  227. package/script/transport/0_transport.js +0 -6
  228. package/script/transport/1_transport_abridged.d.ts +1 -0
  229. package/script/transport/1_transport_abridged.js +9 -5
  230. package/script/transport/1_transport_intermediate.d.ts +1 -0
  231. package/script/transport/1_transport_intermediate.js +8 -4
  232. package/script/types/{1_chat.d.ts → 1_chat_p.d.ts} +7 -20
  233. package/script/types/{1_chat.js → 1_chat_p.js} +6 -17
  234. package/script/types/1_user.js +4 -2
  235. package/script/types/3_message.d.ts +9 -8
  236. package/script/types/3_message.js +20 -15
  237. package/script/types/4_chat.d.ts +33 -0
  238. package/script/types/4_chat.js +124 -0
  239. package/script/utilities/{0_base64.js → 1_base64.js} +2 -1
  240. package/esm/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
  241. package/esm/deps/deno.land/std@0.208.0/assert/assert.js +0 -8
  242. package/esm/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
  243. package/esm/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
  244. package/esm/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
  245. package/esm/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
  246. package/esm/deps/deno.land/std@0.208.0/assert/assert_false.js +0 -8
  247. package/esm/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
  248. package/esm/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
  249. package/esm/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
  250. package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
  251. package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.js +0 -29
  252. package/esm/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
  253. package/esm/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
  254. package/esm/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
  255. package/esm/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
  256. package/esm/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
  257. package/esm/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
  258. package/esm/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
  259. package/esm/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
  260. package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
  261. package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.js +0 -12
  262. package/esm/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
  263. package/esm/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
  264. package/esm/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
  265. package/esm/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
  266. package/script/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
  267. package/script/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
  268. package/script/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
  269. package/script/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
  270. package/script/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
  271. package/script/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
  272. package/script/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
  273. package/script/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
  274. package/script/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
  275. package/script/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
  276. package/script/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
  277. package/script/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
  278. package/script/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
  279. package/script/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
  280. package/script/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
  281. package/script/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
  282. package/script/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
  283. package/script/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
  284. package/script/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
  285. package/script/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
  286. package/script/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
  287. package/script/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
  288. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
  289. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
  290. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
  291. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
  292. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
  293. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
  294. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
  295. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
  296. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
  297. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
  298. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
  299. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
  300. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
  301. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
  302. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
  303. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
  304. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
  305. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
  306. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
  307. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
  308. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
  309. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
  310. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
  311. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
  312. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
  313. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
  314. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
  315. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
  316. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
  317. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
  318. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
  319. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
  320. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  321. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
  322. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
  323. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
  324. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
  325. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
  326. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
  327. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
  328. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
  329. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
  330. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
  331. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
  332. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
  333. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
  334. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
  335. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
  336. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
  337. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
  338. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
  339. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
  340. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
  341. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
  342. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
  343. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
  344. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
  345. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
  346. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
  347. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
  348. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
  349. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
  350. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
  351. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
  352. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
  353. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
  354. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
  355. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
  356. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
  357. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
  358. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
  359. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
  360. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
  361. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
  362. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
  363. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
  364. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
  365. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
  366. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
  367. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
  368. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
  369. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
  370. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
  371. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
  372. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
  373. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
  374. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
  375. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
  376. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
  377. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
  378. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
  379. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
  380. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
  381. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
  382. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
  383. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
  384. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
  385. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
  386. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
  387. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
  388. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
  389. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
  390. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
  391. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
  392. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
  393. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
  394. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
  395. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
  396. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
  397. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
  398. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
  399. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
  400. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
  401. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
  402. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
  403. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
  404. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
  405. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
  406. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
  407. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
  408. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
  409. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
  410. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
  411. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
  412. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
  413. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
  414. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
  415. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
  416. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
  417. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
  418. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
  419. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
  420. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
  421. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
  422. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
  423. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
  424. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
  425. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
  426. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
  427. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
  428. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
  429. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
  430. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
  431. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
  432. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
  433. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
  434. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
  435. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
  436. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
  437. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
  438. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
  439. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
  440. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
  441. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
  442. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
  443. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
  444. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
  445. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
  446. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
  447. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
  448. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
  449. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
  450. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
  451. /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
  452. /package/esm/utilities/{0_base64.d.ts → 1_base64.d.ts} +0 -0
  453. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
  454. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
  455. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
  456. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
  457. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
  458. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
  459. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
  460. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
  461. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
  462. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
  463. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
  464. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
  465. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
  466. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
  467. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
  468. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
  469. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
  470. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
  471. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
  472. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
  473. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
  474. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
  475. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
  476. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
  477. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
  478. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
  479. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
  480. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
  481. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
  482. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
  483. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
  484. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
  485. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  486. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
  487. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
  488. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
  489. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
  490. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
  491. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
  492. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
  493. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
  494. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
  495. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
  496. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
  497. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
  498. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
  499. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
  500. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
  501. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
  502. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
  503. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
  504. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
  505. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
  506. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
  507. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
  508. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
  509. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
  510. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
  511. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
  512. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
  513. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
  514. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
  515. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
  516. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
  517. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
  518. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
  519. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
  520. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
  521. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
  522. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
  523. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
  524. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
  525. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
  526. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
  527. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
  528. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
  529. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
  530. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
  531. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
  532. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
  533. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
  534. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
  535. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
  536. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
  537. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
  538. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
  539. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
  540. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
  541. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
  542. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
  543. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
  544. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
  545. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
  546. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
  547. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
  548. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
  549. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
  550. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
  551. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
  552. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
  553. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
  554. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
  555. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
  556. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
  557. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
  558. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
  559. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
  560. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
  561. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
  562. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
  563. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
  564. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
  565. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
  566. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
  567. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
  568. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
  569. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
  570. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
  571. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
  572. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
  573. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
  574. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
  575. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
  576. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
  577. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
  578. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
  579. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
  580. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
  581. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
  582. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
  583. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
  584. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
  585. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
  586. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
  587. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
  588. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
  589. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
  590. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
  591. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
  592. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
  593. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
  594. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
  595. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
  596. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
  597. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
  598. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
  599. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
  600. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
  601. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
  602. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
  603. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
  604. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
  605. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
  606. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
  607. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
  608. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
  609. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
  610. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
  611. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
  612. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
  613. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
  614. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
  615. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
  616. /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
  617. /package/script/utilities/{0_base64.d.ts → 1_base64.d.ts} +0 -0
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  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");
11
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkGap, _Client_checkChannelGap, _Client_lastUpdates, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
13
+ var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingLoopAbortSignal, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkGap, _Client_checkChannelGap, _Client_lastUpdates, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo, _Client_resolveFileId, _Client_sendMedia, _Client_sendChatUpdate, _Client_reassignChatLastMessage, _Client_chats, _Client_archivedChats, _Client_chatsLoadedFromStorage, _Client_getChatAnywhere, _Client_getChatList, _Client_loadChatsFromStorage, _Client_getLoadedChats, _Client_pinnedChats, _Client_pinnedArchiveChats, _Client_storageHadPinnedChats, _Client_pinnedChatsLoaded, _Client_loadPinnedChats, _Client_fetchPinnedChats, _Client_getPinnedChats, _Client_updatePinnedChats, _Client_fetchChats;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Client = exports.ConnectionError = exports.restartAuth = exports.skipInvoke = exports.handleMigrationError = void 0;
16
16
  const _0_deps_js_1 = require("../0_deps.js");
@@ -26,6 +26,7 @@ const _0_password_js_1 = require("./0_password.js");
26
26
  const _0_utilities_js_1 = require("./0_utilities.js");
27
27
  const _1_client_abstract_js_1 = require("./1_client_abstract.js");
28
28
  const _2_client_plain_js_1 = require("./2_client_plain.js");
29
+ const _3_types_js_2 = require("./3_types.js");
29
30
  const _4_composer_js_1 = require("./4_composer.js");
30
31
  const d = (0, _0_deps_js_1.debug)("Client");
31
32
  const dGap = (0, _0_deps_js_1.debug)("Client/recoverUpdateGap");
@@ -225,6 +226,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
225
226
  const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
226
227
  return this.sendPhoto(effectiveMessage.chat.id, photo, { ...params, replyToMessageId });
227
228
  },
229
+ replyDocument: (document, params) => {
230
+ const effectiveMessage = mustGetMsg();
231
+ const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
232
+ return this.sendDocument(effectiveMessage.chat.id, document, { ...params, replyToMessageId });
233
+ },
228
234
  delete: () => {
229
235
  const effectiveMessage = mustGetMsg();
230
236
  return this.deleteMessage(effectiveMessage.chat.id, effectiveMessage.id);
@@ -295,7 +301,6 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
295
301
  const connectionState = connected ? "ready" : "notConnected";
296
302
  if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
297
303
  __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
298
- __classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
299
304
  }
300
305
  }
301
306
  finally {
@@ -310,6 +315,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
310
315
  _Client_connectionInited.set(this, false);
311
316
  _Client_lastPropagatedAuthorizationState.set(this, null);
312
317
  _Client_selfId.set(this, null);
318
+ _Client_pingLoopAbortSignal.set(this, null);
313
319
  _Client_pingInterval.set(this, 60 * 1000); // 60 seconds
314
320
  _Client_pingLoopStarted.set(this, false);
315
321
  _Client_autoStarted.set(this, false);
@@ -350,6 +356,13 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
350
356
  });
351
357
  //#region Composer
352
358
  _Client_handle.set(this, _4_composer_js_1.skip);
359
+ _Client_chats.set(this, new Map());
360
+ _Client_archivedChats.set(this, new Map());
361
+ _Client_chatsLoadedFromStorage.set(this, false);
362
+ _Client_pinnedChats.set(this, new Array());
363
+ _Client_pinnedArchiveChats.set(this, new Array());
364
+ _Client_storageHadPinnedChats.set(this, false);
365
+ _Client_pinnedChatsLoaded.set(this, false);
353
366
  this.storage = storage ?? new _3_storage_js_1.StorageMemory();
354
367
  this.parseMode = params?.parseMode ?? null;
355
368
  this.appVersion = params?.appVersion ?? _4_constants_js_1.APP_VERSION;
@@ -362,16 +375,36 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
362
375
  __classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
363
376
  __classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
364
377
  __classPrivateFieldSet(this, _Client_prefixes, params?.prefixes, "f");
378
+ const transportProvider = this.transportProvider;
379
+ this.transportProvider = (params) => {
380
+ const transport = transportProvider(params);
381
+ transport.connection.callback = {
382
+ read: async (count) => {
383
+ const key = params.cdn ? "netstat_cdn_read" : "netstat_messages_read";
384
+ await this.storage.incr([key], count);
385
+ },
386
+ write: async (count) => {
387
+ const key = params.cdn ? "netstat_cdn_write" : "netstat_messages_write";
388
+ await this.storage.incr([key], count);
389
+ },
390
+ };
391
+ return transport;
392
+ };
365
393
  if (params?.defaultHandlers ?? true) {
366
394
  this.on("connectionState", ({ connectionState }, next) => {
367
395
  (0, _1_utilities_js_1.drop)((async () => {
368
396
  if (connectionState == "notConnected") {
397
+ if (!this.transport?.transport.initialized) {
398
+ d("not reconnecting");
399
+ return;
400
+ }
369
401
  let delay = 5;
370
402
  while (!this.connected) {
371
403
  d("reconnecting");
372
404
  try {
373
405
  await this.connect();
374
406
  d("reconnected");
407
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "reconnect"));
375
408
  break;
376
409
  }
377
410
  catch (err) {
@@ -471,10 +504,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
471
504
  release();
472
505
  }
473
506
  }
474
- async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
507
+ async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingLoopAbortSignal = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_chats = new WeakMap(), _Client_archivedChats = new WeakMap(), _Client_chatsLoadedFromStorage = new WeakMap(), _Client_pinnedChats = new WeakMap(), _Client_pinnedArchiveChats = new WeakMap(), _Client_storageHadPinnedChats = new WeakMap(), _Client_pinnedChatsLoaded = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
475
508
  __classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
476
509
  await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), _0_utilities_js_1.resolve);
477
510
  });
511
+ __classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
478
512
  }, _Client_setAuth = async function _Client_setAuth(key) {
479
513
  const hash = await (0, _1_utilities_js_1.sha1)(key);
480
514
  const id = (0, _1_utilities_js_1.bigIntFromBuffer)(hash.slice(-8), true, false);
@@ -499,9 +533,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
499
533
  await this.reconnect(newDc);
500
534
  d("migrated to DC%s", newDc);
501
535
  }
502
- disconnect() {
536
+ async disconnect() {
503
537
  __classPrivateFieldSet(this, _Client_connectionInited, false, "f");
504
- return super.disconnect();
538
+ await super.disconnect();
539
+ __classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f")?.abort();
505
540
  }
506
541
  /**
507
542
  * Calls [initConnection](1) and authorizes the client with one of the following:
@@ -541,6 +576,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
541
576
  try {
542
577
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
543
578
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
579
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "authorize"));
544
580
  d("already authorized");
545
581
  return;
546
582
  }
@@ -689,19 +725,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
689
725
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
690
726
  if (!__classPrivateFieldGet(this, _Client_authKeyWasCreated, "f")) {
691
727
  (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "start"));
728
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "start"));
692
729
  return;
693
730
  }
694
- try {
695
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
696
- d("already authorized");
697
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
698
- return;
699
- }
700
- catch (err) {
701
- if (!(err instanceof _4_errors_js_1.AuthKeyUnregistered)) {
702
- throw err;
703
- }
704
- }
705
731
  await this.authorize(params);
706
732
  }
707
733
  /**
@@ -772,7 +798,16 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
772
798
  }
773
799
  catch (err) {
774
800
  dRecv("failed to decrypt message: %o", err);
775
- (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "decryption"));
801
+ (0, _1_utilities_js_1.drop)((async () => {
802
+ try {
803
+ await this.disconnect();
804
+ }
805
+ catch {
806
+ //
807
+ }
808
+ await this.connect();
809
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "decryption");
810
+ })());
776
811
  continue;
777
812
  }
778
813
  const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
@@ -866,9 +901,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
866
901
  (0, _1_utilities_js_1.UNREACHABLE)();
867
902
  }
868
903
  }, _Client_pingLoop = async function _Client_pingLoop() {
904
+ __classPrivateFieldSet(this, _Client_pingLoopAbortSignal, new AbortController(), "f");
869
905
  while (this.connected) {
870
- await new Promise((r) => setTimeout(r, __classPrivateFieldGet(this, _Client_pingInterval, "f")));
871
906
  try {
907
+ await new Promise((resolve, reject) => {
908
+ setTimeout(resolve, __classPrivateFieldGet(this, _Client_pingInterval, "f"));
909
+ __classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f").signal.onabort = () => {
910
+ reject(__classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f")?.signal.reason);
911
+ };
912
+ });
872
913
  await this.invoke(new _2_tl_js_1.functions.ping_delay_disconnect({ ping_id: (0, _1_utilities_js_1.getRandomId)(), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") / 1000 + 15 }));
873
914
  if (Date.now() - __classPrivateFieldGet(this, _Client_lastUpdates, "f").getTime() >= 15 * 60 * 1000) {
874
915
  (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "lastUpdates"));
@@ -1208,6 +1249,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
1208
1249
  }
1209
1250
  else if (difference instanceof _2_tl_js_1.types.updates.DifferenceTooLong) {
1210
1251
  await this.storage.deleteMessages();
1252
+ await this.storage.removeChats(0);
1253
+ await this.storage.removeChats(1);
1211
1254
  state.pts = difference.pts;
1212
1255
  dGap("received differenceTooLong");
1213
1256
  }
@@ -1223,6 +1266,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
1223
1266
  }
1224
1267
  finally {
1225
1268
  this.stateChangeHandler(this.connected);
1269
+ __classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
1226
1270
  }
1227
1271
  }, _Client_recoverChannelUpdateGap = async function _Client_recoverChannelUpdateGap(channelId, source) {
1228
1272
  dGapC("recovering channel update gap [%o, %s]", channelId, source);
@@ -1250,7 +1294,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
1250
1294
  break;
1251
1295
  }
1252
1296
  else if (difference instanceof _2_tl_js_1.types.updates.ChannelDifferenceTooLong) {
1253
- // invalidate messages
1297
+ // TODO: invalidate messages
1254
1298
  dGapC("received channelDifferenceTooLong");
1255
1299
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
1256
1300
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
@@ -1377,6 +1421,13 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
1377
1421
  if ("users" in result) {
1378
1422
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, result.users);
1379
1423
  }
1424
+ if ("messages" in result) {
1425
+ for (const message of result.messages) {
1426
+ if (message instanceof _2_tl_js_1.types.Message || message instanceof _2_tl_js_1.types.MessageService) {
1427
+ await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(message.peer_id), message.id, message);
1428
+ }
1429
+ }
1430
+ }
1380
1431
  }
1381
1432
  if (result instanceof _2_tl_js_1.types.messages.Messages) {
1382
1433
  for (const message of result.messages) {
@@ -1522,7 +1573,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
1522
1573
  if (shouldFetch) {
1523
1574
  if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
1524
1575
  messages_ = await this.invoke(new _2_tl_js_1.functions.channels.getMessages({
1525
- channel: new _2_tl_js_1.types.InputChannel({ channel_id: peer.channel_id, access_hash: peer.access_hash }),
1576
+ channel: new _2_tl_js_1.types.InputChannel(peer),
1526
1577
  id: messageIds.map((v) => new _2_tl_js_1.types.InputMessageID({ id: v })),
1527
1578
  })).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.messages.ChannelMessages).messages);
1528
1579
  }
@@ -2128,26 +2179,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
2128
2179
  let media = null;
2129
2180
  const spoiler = params?.hasSpoiler ? true : undefined;
2130
2181
  if (typeof photo === "string") {
2131
- let fileId = null;
2132
- try {
2133
- fileId = _3_types_js_1.FileID.decode(photo);
2134
- }
2135
- catch (err) {
2136
- d("fileId: %o", err);
2137
- }
2182
+ const fileId = __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveFileId).call(this, photo, _3_types_js_1.FileType.Photo);
2138
2183
  if (fileId != null) {
2139
- if (fileId.fileType != _3_types_js_1.FileType.Photo) {
2140
- (0, _1_utilities_js_1.UNREACHABLE)();
2141
- }
2142
- if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
2143
- (0, _1_utilities_js_1.UNREACHABLE)();
2144
- }
2145
2184
  media = new _2_tl_js_1.types.InputMediaPhoto({
2146
- id: new _2_tl_js_1.types.InputPhoto({
2147
- id: fileId.params.mediaId,
2148
- access_hash: fileId.params.accessHash,
2149
- file_reference: fileId.params.fileReference,
2150
- }),
2185
+ id: new _2_tl_js_1.types.InputPhoto(fileId),
2151
2186
  spoiler,
2152
2187
  });
2153
2188
  }
@@ -2162,33 +2197,150 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
2162
2197
  media = new _2_tl_js_1.types.InputMediaUploadedPhoto({ file, spoiler });
2163
2198
  }
2164
2199
  }
2165
- const peer = await this.getInputPeer(chatId);
2166
- const randomId = (0, _1_utilities_js_1.getRandomId)();
2167
- const silent = params?.disableNotification ? true : undefined;
2168
- const noforwards = params?.protectContent ? true : undefined;
2169
- const replyToMsgId = params?.replyToMessageId;
2170
- const topMsgId = params?.messageThreadId;
2171
- const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
2172
- const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
2173
- const caption_ = params?.caption;
2174
- const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
2175
- const caption = parseResult === undefined ? undefined : parseResult[0];
2176
- const captionEntities = parseResult === undefined ? undefined : parseResult[1];
2177
- const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
2178
- peer,
2179
- random_id: randomId,
2180
- silent,
2181
- noforwards,
2182
- reply_markup: replyMarkup,
2183
- reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
2184
- send_as: sendAs,
2185
- media,
2186
- message: caption ?? "",
2187
- entities: captionEntities,
2188
- }));
2189
- const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
2200
+ const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendMedia).call(this, chatId, media, params);
2190
2201
  return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "photo");
2191
2202
  }
2203
+ /**
2204
+ * Send a document.
2205
+ *
2206
+ * @method
2207
+ * @param chatId The chat to send the document to.
2208
+ * @param document The document to send.
2209
+ */
2210
+ async sendDocument(chatId, document, params) {
2211
+ let media = null;
2212
+ const spoiler = params?.hasSpoiler ? true : undefined;
2213
+ if (typeof document === "string") {
2214
+ const fileId = __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveFileId).call(this, document, _3_types_js_1.FileType.Document);
2215
+ if (fileId != null) {
2216
+ media = new _2_tl_js_1.types.InputMediaDocument({
2217
+ id: new _2_tl_js_1.types.InputDocument(fileId),
2218
+ spoiler,
2219
+ });
2220
+ }
2221
+ }
2222
+ if (media == null) {
2223
+ if (typeof document === "string" && (0, _0_utilities_js_1.isHttpUrl)(document)) {
2224
+ media = new _2_tl_js_1.types.InputMediaDocumentExternal({ url: document, spoiler });
2225
+ }
2226
+ else {
2227
+ const [contents, fileName_] = await (0, _0_utilities_js_1.getFileContents)(document);
2228
+ const fileName = params?.fileName ?? fileName_;
2229
+ const mimeType = params?.mimeType ?? (0, _0_deps_js_1.contentType)(fileName.split(".").slice(-1)[0]) ?? "application/octet-stream";
2230
+ const file = await this.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
2231
+ media = new _2_tl_js_1.types.InputMediaUploadedDocument({
2232
+ file,
2233
+ spoiler,
2234
+ attributes: [new _2_tl_js_1.types.DocumentAttributeFilename({ file_name: fileName })],
2235
+ mime_type: mimeType,
2236
+ });
2237
+ }
2238
+ }
2239
+ const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendMedia).call(this, chatId, media, params);
2240
+ return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "document");
2241
+ }
2242
+ /**
2243
+ * Get network statistics. This might not always be available.
2244
+ *
2245
+ * @method
2246
+ */
2247
+ async getNetworkStatistics() {
2248
+ const [messagesRead, messagesWrite, cdnRead, cdnWrite] = await Promise.all([
2249
+ this.storage.get(["netstat_messages_read"]),
2250
+ this.storage.get(["netstat_messages_write"]),
2251
+ this.storage.get(["netstat_cdn_read"]),
2252
+ this.storage.get(["netstat_cdn_write"]),
2253
+ ]);
2254
+ const messages = {
2255
+ sent: Number(messagesWrite || 0),
2256
+ received: Number(messagesRead || 0),
2257
+ };
2258
+ const cdn = {
2259
+ sent: Number(cdnWrite || 0),
2260
+ received: Number(cdnRead || 0),
2261
+ };
2262
+ return { messages, cdn };
2263
+ }
2264
+ /**
2265
+ * Get chats.
2266
+ *
2267
+ * @method
2268
+ */
2269
+ async getChats(params) {
2270
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "getChats");
2271
+ if (!__classPrivateFieldGet(this, _Client_chatsLoadedFromStorage, "f")) {
2272
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_loadChatsFromStorage).call(this);
2273
+ }
2274
+ if (params?.after?.id && !__classPrivateFieldGet(this, _Client_chats, "f").has(params.after.id)) {
2275
+ throw new Error("Invalid after");
2276
+ }
2277
+ let limit = params?.limit ?? 100;
2278
+ if (limit <= 0 || limit > 100) {
2279
+ limit = 100;
2280
+ }
2281
+ const listId = (0, _3_types_js_2.getChatListId)(params?.from ?? "main");
2282
+ let chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLoadedChats).call(this, listId);
2283
+ if (params?.after) {
2284
+ chats = chats
2285
+ .filter((v) => v.id < params.after.id);
2286
+ }
2287
+ if (chats.length < limit) {
2288
+ d("have only %d chats but %d more is needed", chats.length, limit - chats.length);
2289
+ if (!await this.storage.hasAllChats(listId)) {
2290
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchChats).call(this, listId, limit, params?.after);
2291
+ return await this.getChats(params);
2292
+ }
2293
+ }
2294
+ chats = chats.slice(0, limit);
2295
+ return chats;
2296
+ }
2297
+ /**
2298
+ * Get chat history.
2299
+ *
2300
+ * @param chatId The identifier of the chat to get its history.
2301
+ * @method
2302
+ */
2303
+ async getHistory(chatId, params) {
2304
+ let limit = params?.limit ?? 100;
2305
+ if (limit <= 0) {
2306
+ limit = 1;
2307
+ }
2308
+ else if (limit > 100) {
2309
+ limit = 100;
2310
+ }
2311
+ let offsetId = params?.after?.id ?? 0;
2312
+ if (offsetId < 0) {
2313
+ offsetId = 0;
2314
+ }
2315
+ const peer = await this.getInputPeer(chatId);
2316
+ const messages = new Array();
2317
+ for (const message_ of await this.storage.getHistory((0, _2_tl_js_1.peerToChatId)(peer), offsetId, limit)) {
2318
+ const message = await (0, _3_types_js_1.constructMessage)(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this), false);
2319
+ messages.push(message);
2320
+ }
2321
+ if (messages.length < limit) {
2322
+ d("have only %d messages but need %d more", messages.length, limit - messages.length);
2323
+ offsetId = messages[messages.length - 1].id; // TODO: track id of oldest message and don't send requests for it
2324
+ const result = await this.api.messages.getHistory({
2325
+ peer: peer,
2326
+ offset_id: offsetId,
2327
+ offset_date: 0,
2328
+ add_offset: 0,
2329
+ limit,
2330
+ max_id: 0,
2331
+ min_id: 0,
2332
+ hash: 0n,
2333
+ });
2334
+ if (!("messages" in result)) {
2335
+ (0, _1_utilities_js_1.UNREACHABLE)();
2336
+ }
2337
+ for (const message_ of result.messages) {
2338
+ const message = await (0, _3_types_js_1.constructMessage)(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this), false);
2339
+ messages.push(message);
2340
+ }
2341
+ }
2342
+ return messages;
2343
+ }
2192
2344
  }
2193
2345
  exports.Client = Client;
2194
2346
  _a = Client, _Client_getMe = async function _Client_getMe() {
@@ -2247,9 +2399,11 @@ async function _Client_handleUpdate(update) {
2247
2399
  pts_count: update.pts_count,
2248
2400
  });
2249
2401
  }
2250
- if (update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage) {
2402
+ if (update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage) {
2251
2403
  if (update.message instanceof _2_tl_js_1.types.Message || update.message instanceof _2_tl_js_1.types.MessageService) {
2252
- await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(update.message.peer_id), update.message.id, update.message);
2404
+ const chatId = (0, _2_tl_js_1.peerToChatId)(update.message.peer_id);
2405
+ await this.storage.setMessage(chatId, update.message.id, update.message);
2406
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
2253
2407
  }
2254
2408
  }
2255
2409
  if (update instanceof _2_tl_js_1.types.UpdateNewMessage ||
@@ -2279,6 +2433,7 @@ async function _Client_handleUpdate(update) {
2279
2433
  deletedMessages.push(await (0, _3_types_js_1.constructMessage)(message, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this)));
2280
2434
  }
2281
2435
  await this.storage.setMessage(chatId, messageId, null);
2436
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
2282
2437
  }
2283
2438
  }
2284
2439
  if (deletedMessages.length > 0) {
@@ -2294,6 +2449,7 @@ async function _Client_handleUpdate(update) {
2294
2449
  deletedMessages.push(await (0, _3_types_js_1.constructMessage)(message, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this)));
2295
2450
  }
2296
2451
  await this.storage.setMessage(chatId, messageId, null);
2452
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
2297
2453
  }
2298
2454
  if (deletedMessages.length > 0) {
2299
2455
  await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { deletedMessages: deletedMessages }), _0_utilities_js_1.resolve);
@@ -2308,6 +2464,9 @@ async function _Client_handleUpdate(update) {
2308
2464
  else if (update instanceof _2_tl_js_1.types.UpdateBotInlineSend) {
2309
2465
  await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { chosenInlineResult: await (0, _3_types_js_1.constructChosenInlineResult)(update, this[getEntity].bind(this)) }), _0_utilities_js_1.resolve);
2310
2466
  }
2467
+ if (update instanceof _2_tl_js_1.types.UpdatePinnedDialogs) {
2468
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatePinnedChats).call(this, update);
2469
+ }
2311
2470
  }, _Client_constructReplyMarkup = async function _Client_constructReplyMarkup(params) {
2312
2471
  if (params?.replyMarkup) {
2313
2472
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "replyMarkup");
@@ -2324,4 +2483,251 @@ async function _Client_setMyInfo(info) {
2324
2483
  await this.invoke(new _2_tl_js_1.functions.bots.setBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), ...info }));
2325
2484
  }, _Client_getMyInfo = function _Client_getMyInfo(languageCode) {
2326
2485
  return this.invoke(new _2_tl_js_1.functions.bots.getBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), lang_code: languageCode ?? "" }));
2486
+ }, _Client_resolveFileId = function _Client_resolveFileId(maybeFileId, expectedFileType) {
2487
+ let fileId = null;
2488
+ try {
2489
+ fileId = _3_types_js_1.FileID.decode(maybeFileId);
2490
+ }
2491
+ catch (err) {
2492
+ d("fileId: %o", err);
2493
+ }
2494
+ if (fileId != null) {
2495
+ if (fileId.fileType != expectedFileType) {
2496
+ (0, _1_utilities_js_1.UNREACHABLE)();
2497
+ }
2498
+ if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
2499
+ (0, _1_utilities_js_1.UNREACHABLE)();
2500
+ }
2501
+ return {
2502
+ id: fileId.params.mediaId,
2503
+ access_hash: fileId.params.accessHash,
2504
+ file_reference: fileId.params.fileReference,
2505
+ };
2506
+ }
2507
+ return null;
2508
+ }, _Client_sendMedia = async function _Client_sendMedia(chatId, media, params) {
2509
+ const peer = await this.getInputPeer(chatId);
2510
+ const randomId = (0, _1_utilities_js_1.getRandomId)();
2511
+ const silent = params?.disableNotification ? true : undefined;
2512
+ const noforwards = params?.protectContent ? true : undefined;
2513
+ const replyToMsgId = params?.replyToMessageId;
2514
+ const topMsgId = params?.messageThreadId;
2515
+ const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
2516
+ const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
2517
+ const caption_ = params?.caption;
2518
+ const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
2519
+ const caption = parseResult === undefined ? undefined : parseResult[0];
2520
+ const captionEntities = parseResult === undefined ? undefined : parseResult[1];
2521
+ const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
2522
+ peer,
2523
+ random_id: randomId,
2524
+ silent,
2525
+ noforwards,
2526
+ reply_markup: replyMarkup,
2527
+ reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
2528
+ send_as: sendAs,
2529
+ media,
2530
+ message: caption ?? "",
2531
+ entities: captionEntities,
2532
+ }));
2533
+ return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
2534
+ }, _Client_sendChatUpdate = async function _Client_sendChatUpdate(chatId, added) {
2535
+ try {
2536
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "");
2537
+ }
2538
+ catch {
2539
+ return;
2540
+ }
2541
+ const chat = __classPrivateFieldGet(this, _Client_chats, "f").get(chatId);
2542
+ const update = chat === undefined ? { deletedChat: { chatId } } : added ? { newChat: chat } : { editedChat: chat };
2543
+ __classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
2544
+ await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), _0_utilities_js_1.resolve);
2545
+ });
2546
+ }, _Client_reassignChatLastMessage = async function _Client_reassignChatLastMessage(chatId, add = false) {
2547
+ try {
2548
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "");
2549
+ }
2550
+ catch {
2551
+ return;
2552
+ }
2553
+ const [chat, listId] = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatAnywhere).call(this, chatId);
2554
+ if (!chat && !add) {
2555
+ return;
2556
+ }
2557
+ const message_ = await this.storage.getLastMessage(chatId);
2558
+ if (message_ != null) {
2559
+ const message = await (0, _3_types_js_1.constructMessage)(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this));
2560
+ if (chat) {
2561
+ chat.order = (0, _3_types_js_1.getChatOrder)(message, chat.pinned);
2562
+ chat.lastMessage = message;
2563
+ await this.storage.setChat(listId, chatId, chat.pinned, message.id, message.date);
2564
+ }
2565
+ else {
2566
+ const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
2567
+ const chat = await (0, _3_types_js_1.constructChat2)(chatId, pinnedChats.indexOf(chatId), message, this[getEntity].bind(this));
2568
+ if (chat == null) {
2569
+ (0, _1_utilities_js_1.UNREACHABLE)();
2570
+ }
2571
+ __classPrivateFieldGet(this, _Client_chats, "f").set(chatId, chat);
2572
+ await this.storage.setChat(listId, chatId, chat.pinned, chat.lastMessage?.id ?? 0, chat.lastMessage?.date ?? new Date(0));
2573
+ }
2574
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, !chat);
2575
+ return;
2576
+ }
2577
+ const message = await this.getHistory(chatId, { limit: 1 }).then((v) => v[0]);
2578
+ if (message !== undefined) {
2579
+ if (chat) {
2580
+ chat.order = (0, _3_types_js_1.getChatOrder)(message, chat.pinned);
2581
+ chat.lastMessage = message;
2582
+ await this.storage.setChat(listId, chatId, chat.pinned, message.id, message.date);
2583
+ }
2584
+ else {
2585
+ const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
2586
+ const chat = await (0, _3_types_js_1.constructChat2)(chatId, pinnedChats.indexOf(chatId), message, this[getEntity].bind(this));
2587
+ if (chat == null) {
2588
+ (0, _1_utilities_js_1.UNREACHABLE)();
2589
+ }
2590
+ __classPrivateFieldGet(this, _Client_chats, "f").set(chatId, chat);
2591
+ }
2592
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, !chat);
2593
+ return;
2594
+ }
2595
+ if (chat) {
2596
+ chat.order = (0, _3_types_js_1.getChatOrder)(undefined, chat.pinned);
2597
+ chat.lastMessage = undefined;
2598
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, false);
2599
+ }
2600
+ }, _Client_getChatAnywhere = function _Client_getChatAnywhere(chatId) {
2601
+ let chat = __classPrivateFieldGet(this, _Client_chats, "f").get(chatId);
2602
+ if (chat) {
2603
+ return [chat, 0];
2604
+ }
2605
+ chat = __classPrivateFieldGet(this, _Client_archivedChats, "f").get(chatId);
2606
+ if (chat) {
2607
+ return [chat, 1];
2608
+ }
2609
+ return [undefined, -1];
2610
+ }, _Client_getChatList = function _Client_getChatList(listId) {
2611
+ switch (listId) {
2612
+ case 0:
2613
+ return __classPrivateFieldGet(this, _Client_chats, "f");
2614
+ case 1:
2615
+ return __classPrivateFieldGet(this, _Client_archivedChats, "f");
2616
+ default:
2617
+ throw new Error("Invalid chat list: " + listId);
2618
+ }
2619
+ }, _Client_loadChatsFromStorage = async function _Client_loadChatsFromStorage() {
2620
+ const chats = await this.storage.getChats(0);
2621
+ const archivedChats = await this.storage.getChats(1);
2622
+ for (const { chatId, pinned, topMessageId } of chats) {
2623
+ const chat = await (0, _3_types_js_1.constructChat3)(chatId, pinned, topMessageId, this[getEntity].bind(this), this.getMessage.bind(this));
2624
+ if (chat == null) {
2625
+ continue;
2626
+ }
2627
+ __classPrivateFieldGet(this, _Client_chats, "f").set(chat.id, chat);
2628
+ }
2629
+ for (const { chatId, pinned, topMessageId } of archivedChats) {
2630
+ const chat = await (0, _3_types_js_1.constructChat3)(chatId, pinned, topMessageId, this[getEntity].bind(this), this.getMessage.bind(this));
2631
+ if (chat == null) {
2632
+ continue;
2633
+ }
2634
+ __classPrivateFieldGet(this, _Client_archivedChats, "f").set(chat.id, chat);
2635
+ }
2636
+ __classPrivateFieldSet(this, _Client_chatsLoadedFromStorage, true, "f");
2637
+ }, _Client_getLoadedChats = function _Client_getLoadedChats(listId) {
2638
+ const chats_ = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
2639
+ const chats = new Array();
2640
+ for (const chat of chats_.values()) {
2641
+ chats.push(chat);
2642
+ }
2643
+ return chats
2644
+ .sort((a, b) => b.id - a.id)
2645
+ .sort((a, b) => b.order.localeCompare(a.order));
2646
+ }, _Client_loadPinnedChats = async function _Client_loadPinnedChats() {
2647
+ const [pinnedChats, pinnedArchiveChats] = await Promise.all([this.storage.getPinnedChats(0), this.storage.getPinnedChats(1)]);
2648
+ if (pinnedChats != null && pinnedArchiveChats != null) {
2649
+ __classPrivateFieldSet(this, _Client_pinnedChats, pinnedChats, "f");
2650
+ __classPrivateFieldSet(this, _Client_pinnedArchiveChats, pinnedArchiveChats, "f");
2651
+ __classPrivateFieldSet(this, _Client_storageHadPinnedChats, true, "f");
2652
+ }
2653
+ __classPrivateFieldSet(this, _Client_pinnedChatsLoaded, true, "f");
2654
+ }, _Client_fetchPinnedChats = async function _Client_fetchPinnedChats(listId = null) {
2655
+ if (listId == null || listId == 0) {
2656
+ const dialogs = await this.api.messages.getPinnedDialogs({ folder_id: 0 });
2657
+ const pinnedChats = new Array();
2658
+ for (const dialog of dialogs.dialogs) {
2659
+ pinnedChats.push((0, _2_tl_js_1.peerToChatId)(dialog.peer));
2660
+ }
2661
+ __classPrivateFieldSet(this, _Client_pinnedChats, pinnedChats, "f");
2662
+ await this.storage.setPinnedChats(0, __classPrivateFieldGet(this, _Client_pinnedChats, "f"));
2663
+ }
2664
+ if (listId == null || listId == 1) {
2665
+ const dialogs = await this.api.messages.getPinnedDialogs({ folder_id: 1 });
2666
+ const pinnedArchiveChats = new Array();
2667
+ for (const dialog of dialogs.dialogs) {
2668
+ pinnedArchiveChats.push((0, _2_tl_js_1.peerToChatId)(dialog.peer));
2669
+ }
2670
+ __classPrivateFieldSet(this, _Client_pinnedArchiveChats, pinnedArchiveChats, "f");
2671
+ await this.storage.setPinnedChats(1, __classPrivateFieldGet(this, _Client_pinnedArchiveChats, "f"));
2672
+ }
2673
+ if (listId != null && listId != 0 && listId != 1) {
2674
+ (0, _1_utilities_js_1.UNREACHABLE)();
2675
+ }
2676
+ }, _Client_getPinnedChats = async function _Client_getPinnedChats(listId) {
2677
+ if (!__classPrivateFieldGet(this, _Client_pinnedChatsLoaded, "f")) {
2678
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_loadPinnedChats).call(this);
2679
+ }
2680
+ if (!__classPrivateFieldGet(this, _Client_storageHadPinnedChats, "f")) {
2681
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchPinnedChats).call(this);
2682
+ }
2683
+ switch (listId) {
2684
+ case 0:
2685
+ return __classPrivateFieldGet(this, _Client_pinnedChats, "f");
2686
+ case 1:
2687
+ return __classPrivateFieldGet(this, _Client_pinnedArchiveChats, "f");
2688
+ default:
2689
+ (0, _1_utilities_js_1.UNREACHABLE)();
2690
+ }
2691
+ }, _Client_updatePinnedChats = async function _Client_updatePinnedChats(update) {
2692
+ const listId = update.folder_id ?? 0;
2693
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchPinnedChats).call(this, update.folder_id);
2694
+ const chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
2695
+ const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
2696
+ for (const [i, chatId] of pinnedChats.entries()) {
2697
+ const chat = chats.get(chatId);
2698
+ if (chat !== undefined) {
2699
+ chat.order = (0, _3_types_js_1.getChatOrder)(chat.lastMessage, i);
2700
+ chat.pinned = i;
2701
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, false);
2702
+ }
2703
+ }
2704
+ for (const chat of chats.values()) {
2705
+ if (chat.pinned != -1 && pinnedChats.indexOf(chat.id) == -1) {
2706
+ chat.order = (0, _3_types_js_1.getChatOrder)(chat.lastMessage, -1);
2707
+ chat.pinned = -1;
2708
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chat.id, false);
2709
+ }
2710
+ }
2711
+ }, _Client_fetchChats = async function _Client_fetchChats(listId, limit, after) {
2712
+ const dialogs = await this.api.messages.getDialogs({
2713
+ limit,
2714
+ offset_id: after?.lastMessage?.id ?? 0,
2715
+ offset_date: after?.lastMessage?.date ? Math.ceil(after.lastMessage.date.getTime() / 1000) : 0,
2716
+ offset_peer: after ? await this.getInputPeer(after.id) : new _2_tl_js_1.types.InputPeerEmpty(),
2717
+ hash: 0n,
2718
+ folder_id: listId,
2719
+ });
2720
+ const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
2721
+ if (!(dialogs instanceof _2_tl_js_1.types.messages.Dialogs) && !(dialogs instanceof _2_tl_js_1.types.messages.DialogsSlice)) {
2722
+ (0, _1_utilities_js_1.UNREACHABLE)();
2723
+ }
2724
+ if (dialogs.dialogs.length == 0) {
2725
+ await this.storage.setHasAllChats(listId, true);
2726
+ }
2727
+ const chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
2728
+ for (const dialog of dialogs.dialogs) {
2729
+ const chat = await (0, _3_types_js_1.constructChat)(dialog, dialogs, pinnedChats, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this));
2730
+ chats.set(chat.id, chat);
2731
+ await this.storage.setChat(listId, chat.id, chat.pinned, chat.lastMessage?.id ?? 0, chat.lastMessage?.date ?? new Date(0));
2732
+ }
2327
2733
  };