@mtkruto/node 0.1.138 → 0.1.140

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 (287) hide show
  1. package/esm/3_types.d.ts +10 -36
  2. package/esm/3_types.js +10 -36
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +1 -1
  5. package/esm/5_client.d.ts +1 -1
  6. package/esm/5_client.js +1 -1
  7. package/esm/_dnt.polyfills.d.ts +6 -0
  8. package/esm/client/0_filters.d.ts +60 -0
  9. package/esm/client/0_filters.js +27 -0
  10. package/esm/client/0_message.js +2 -2
  11. package/esm/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  12. package/esm/client/0_types.d.ts +39 -0
  13. package/esm/client/0_types.js +2 -0
  14. package/esm/client/0_utilities.d.ts +1 -47
  15. package/esm/client/0_utilities.js +0 -27
  16. package/esm/client/1_composer.d.ts +1 -1
  17. package/esm/client/1_composer.js +1 -1
  18. package/esm/client/1_file_manager.d.ts +10 -0
  19. package/esm/client/1_file_manager.js +241 -0
  20. package/esm/client/1_update_manager.d.ts +18 -0
  21. package/esm/client/1_update_manager.js +553 -0
  22. package/esm/client/2_message_manager.d.ts +40 -0
  23. package/esm/client/2_message_manager.js +621 -0
  24. package/esm/client/3_chat_list_manager.d.ts +21 -0
  25. package/esm/client/3_chat_list_manager.js +353 -0
  26. package/esm/client/3_reaction_manager.d.ts +16 -0
  27. package/esm/client/3_reaction_manager.js +61 -0
  28. package/esm/client/4_client.d.ts +187 -60
  29. package/esm/client/4_client.js +492 -1699
  30. package/esm/connection/1_connection_web_socket.js +6 -6
  31. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  32. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +1 -1
  33. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  34. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +524 -0
  35. package/esm/mod.d.ts +1 -0
  36. package/esm/mod.js +1 -0
  37. package/esm/storage/0_storage.d.ts +5 -3
  38. package/esm/storage/0_storage.js +14 -4
  39. package/esm/tl/1_tl_object.d.ts +1 -0
  40. package/esm/tl/1_tl_object.js +24 -0
  41. package/esm/types/0_bot_command.d.ts +1 -0
  42. package/esm/types/0_chat_member_rights.d.ts +37 -0
  43. package/esm/types/0_chat_photo.d.ts +4 -4
  44. package/esm/types/0_file_source.d.ts +5 -0
  45. package/esm/types/0_giveaway_parameters.js +2 -1
  46. package/esm/types/0_id.d.ts +4 -0
  47. package/esm/types/0_message_entity.d.ts +20 -20
  48. package/esm/types/1__getters.d.ts +2 -2
  49. package/esm/types/1_animation.d.ts +1 -1
  50. package/esm/types/1_bot_command_scope.d.ts +5 -4
  51. package/esm/types/1_chat_p.d.ts +5 -6
  52. package/esm/types/1_document.d.ts +1 -0
  53. package/esm/types/1_input_message_content.d.ts +88 -0
  54. package/esm/types/1_photo.d.ts +1 -1
  55. package/esm/types/1_sticker.d.ts +1 -1
  56. package/esm/types/1_user.d.ts +1 -1
  57. package/esm/types/1_video.d.ts +1 -1
  58. package/esm/types/1_video_note.d.ts +1 -1
  59. package/esm/types/2_inline_keyboard_button.d.ts +10 -10
  60. package/esm/types/2_message_reaction_count.d.ts +3 -0
  61. package/esm/types/2_message_reaction_count.js +17 -1
  62. package/esm/types/2_message_reactions.d.ts +15 -0
  63. package/esm/types/2_message_reactions.js +37 -0
  64. package/esm/types/3_reply_markup.d.ts +42 -0
  65. package/esm/types/3_reply_markup.js +117 -0
  66. package/esm/types/4_inline_query_result.d.ts +193 -0
  67. package/esm/types/{5_inline_query_result.js → 4_inline_query_result.js} +2 -2
  68. package/esm/types/4_message.d.ts +36 -39
  69. package/esm/types/4_message.js +7 -24
  70. package/esm/types/5_callback_query.d.ts +2 -1
  71. package/esm/types/5_chat.d.ts +8 -5
  72. package/esm/types/6_update.d.ts +12 -2
  73. package/esm/utilities/0_buffer.js +9 -6
  74. package/esm/utilities/0_object.d.ts +1 -1
  75. package/esm/utilities/0_object.js +1 -6
  76. package/esm/utilities/1_misc.d.ts +2 -0
  77. package/esm/utilities/1_misc.js +6 -0
  78. package/package.json +1 -2
  79. package/script/3_types.d.ts +10 -36
  80. package/script/3_types.js +10 -36
  81. package/script/4_constants.d.ts +1 -1
  82. package/script/4_constants.js +1 -1
  83. package/script/5_client.d.ts +1 -1
  84. package/script/5_client.js +1 -1
  85. package/script/_dnt.polyfills.d.ts +6 -0
  86. package/script/client/0_filters.d.ts +60 -0
  87. package/script/client/0_filters.js +31 -0
  88. package/script/client/0_message.js +1 -1
  89. package/script/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  90. package/script/client/0_types.d.ts +39 -0
  91. package/script/client/0_types.js +6 -0
  92. package/script/client/0_utilities.d.ts +1 -47
  93. package/script/client/0_utilities.js +1 -29
  94. package/script/client/1_composer.d.ts +1 -1
  95. package/script/client/1_composer.js +2 -2
  96. package/script/client/1_file_manager.d.ts +10 -0
  97. package/script/client/1_file_manager.js +245 -0
  98. package/script/client/1_update_manager.d.ts +18 -0
  99. package/script/client/1_update_manager.js +557 -0
  100. package/script/client/2_message_manager.d.ts +40 -0
  101. package/script/client/2_message_manager.js +625 -0
  102. package/script/client/3_chat_list_manager.d.ts +21 -0
  103. package/script/client/3_chat_list_manager.js +357 -0
  104. package/script/client/3_reaction_manager.d.ts +16 -0
  105. package/script/client/3_reaction_manager.js +65 -0
  106. package/script/client/4_client.d.ts +187 -60
  107. package/script/client/4_client.js +491 -1699
  108. package/script/connection/1_connection_web_socket.js +5 -5
  109. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  110. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +2 -2
  111. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  112. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +550 -0
  113. package/script/mod.d.ts +1 -0
  114. package/script/mod.js +1 -0
  115. package/script/storage/0_storage.d.ts +5 -3
  116. package/script/storage/0_storage.js +14 -4
  117. package/script/tl/1_tl_object.d.ts +1 -0
  118. package/script/tl/1_tl_object.js +24 -0
  119. package/script/types/0_bot_command.d.ts +1 -0
  120. package/script/types/0_chat_member_rights.d.ts +37 -0
  121. package/script/types/0_chat_photo.d.ts +4 -4
  122. package/script/types/0_file_source.d.ts +5 -0
  123. package/script/types/0_giveaway_parameters.js +2 -1
  124. package/script/types/0_id.d.ts +4 -0
  125. package/script/types/0_message_entity.d.ts +20 -20
  126. package/script/types/1__getters.d.ts +2 -2
  127. package/script/types/1_animation.d.ts +1 -1
  128. package/script/types/1_bot_command_scope.d.ts +5 -4
  129. package/script/types/1_chat_p.d.ts +5 -6
  130. package/script/types/1_document.d.ts +1 -0
  131. package/script/types/1_input_message_content.d.ts +88 -0
  132. package/script/types/1_photo.d.ts +1 -1
  133. package/script/types/1_sticker.d.ts +1 -1
  134. package/script/types/1_user.d.ts +1 -1
  135. package/script/types/1_video.d.ts +1 -1
  136. package/script/types/1_video_note.d.ts +1 -1
  137. package/script/types/2_inline_keyboard_button.d.ts +10 -10
  138. package/script/types/2_message_reaction_count.d.ts +3 -0
  139. package/script/types/2_message_reaction_count.js +19 -0
  140. package/script/types/2_message_reactions.d.ts +15 -0
  141. package/script/types/2_message_reactions.js +41 -0
  142. package/script/types/3_reply_markup.d.ts +42 -0
  143. package/script/types/3_reply_markup.js +122 -0
  144. package/script/types/4_inline_query_result.d.ts +193 -0
  145. package/script/types/{5_inline_query_result.js → 4_inline_query_result.js} +3 -3
  146. package/script/types/4_message.d.ts +36 -39
  147. package/script/types/4_message.js +6 -23
  148. package/script/types/5_callback_query.d.ts +2 -1
  149. package/script/types/5_chat.d.ts +8 -5
  150. package/script/types/6_update.d.ts +12 -2
  151. package/script/utilities/0_buffer.js +9 -6
  152. package/script/utilities/0_object.d.ts +1 -1
  153. package/script/utilities/0_object.js +1 -6
  154. package/script/utilities/1_misc.d.ts +2 -0
  155. package/script/utilities/1_misc.js +9 -1
  156. package/esm/types/0_chat_id.d.ts +0 -4
  157. package/esm/types/0_force_reply.d.ts +0 -12
  158. package/esm/types/0_force_reply.js +0 -17
  159. package/esm/types/0_input_contact_message_content.d.ts +0 -11
  160. package/esm/types/0_input_location_message_content.d.ts +0 -15
  161. package/esm/types/0_input_venue_message_content.d.ts +0 -19
  162. package/esm/types/0_reply_keyboard_remove.d.ts +0 -10
  163. package/esm/types/0_reply_keyboard_remove.js +0 -8
  164. package/esm/types/1_input_invoice_message_content.d.ts +0 -23
  165. package/esm/types/1_input_text_message_content.d.ts +0 -8
  166. package/esm/types/1_input_text_message_content.js +0 -1
  167. package/esm/types/2_input_message_content.d.ts +0 -6
  168. package/esm/types/2_input_message_content.js +0 -1
  169. package/esm/types/2_reply_keyboard_markup.d.ts +0 -12
  170. package/esm/types/2_reply_keyboard_markup.js +0 -37
  171. package/esm/types/3_inline_keyboard_markup.d.ts +0 -8
  172. package/esm/types/3_inline_keyboard_markup.js +0 -24
  173. package/esm/types/4_inline_query_result_article.d.ts +0 -15
  174. package/esm/types/4_inline_query_result_article.js +0 -1
  175. package/esm/types/4_inline_query_result_audio.d.ts +0 -17
  176. package/esm/types/4_inline_query_result_audio.js +0 -1
  177. package/esm/types/4_inline_query_result_cached_audio.d.ts +0 -14
  178. package/esm/types/4_inline_query_result_cached_audio.js +0 -1
  179. package/esm/types/4_inline_query_result_cached_document.d.ts +0 -15
  180. package/esm/types/4_inline_query_result_cached_document.js +0 -1
  181. package/esm/types/4_inline_query_result_cached_gif.d.ts +0 -15
  182. package/esm/types/4_inline_query_result_cached_gif.js +0 -1
  183. package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  184. package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +0 -1
  185. package/esm/types/4_inline_query_result_cached_photo.d.ts +0 -16
  186. package/esm/types/4_inline_query_result_cached_photo.js +0 -1
  187. package/esm/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  188. package/esm/types/4_inline_query_result_cached_sticker.js +0 -1
  189. package/esm/types/4_inline_query_result_cached_video.d.ts +0 -16
  190. package/esm/types/4_inline_query_result_cached_video.js +0 -1
  191. package/esm/types/4_inline_query_result_cached_voice.d.ts +0 -15
  192. package/esm/types/4_inline_query_result_cached_voice.js +0 -1
  193. package/esm/types/4_inline_query_result_contact.d.ts +0 -15
  194. package/esm/types/4_inline_query_result_contact.js +0 -1
  195. package/esm/types/4_inline_query_result_document.d.ts +0 -18
  196. package/esm/types/4_inline_query_result_document.js +0 -1
  197. package/esm/types/4_inline_query_result_game.d.ts +0 -7
  198. package/esm/types/4_inline_query_result_game.js +0 -1
  199. package/esm/types/4_inline_query_result_gif.d.ts +0 -20
  200. package/esm/types/4_inline_query_result_gif.js +0 -1
  201. package/esm/types/4_inline_query_result_location.d.ts +0 -18
  202. package/esm/types/4_inline_query_result_location.js +0 -1
  203. package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  204. package/esm/types/4_inline_query_result_mpeg4_gif.js +0 -1
  205. package/esm/types/4_inline_query_result_photo.d.ts +0 -19
  206. package/esm/types/4_inline_query_result_photo.js +0 -1
  207. package/esm/types/4_inline_query_result_venue.d.ts +0 -19
  208. package/esm/types/4_inline_query_result_venue.js +0 -1
  209. package/esm/types/4_inline_query_result_video.d.ts +0 -21
  210. package/esm/types/4_inline_query_result_video.js +0 -1
  211. package/esm/types/4_inline_query_result_voice.d.ts +0 -16
  212. package/esm/types/4_inline_query_result_voice.js +0 -1
  213. package/esm/types/4_reply_markup.d.ts +0 -7
  214. package/esm/types/4_reply_markup.js +0 -22
  215. package/esm/types/5_inline_query_result.d.ts +0 -28
  216. package/script/types/0_chat_id.d.ts +0 -4
  217. package/script/types/0_force_reply.d.ts +0 -12
  218. package/script/types/0_force_reply.js +0 -22
  219. package/script/types/0_input_contact_message_content.d.ts +0 -11
  220. package/script/types/0_input_location_message_content.d.ts +0 -15
  221. package/script/types/0_input_venue_message_content.d.ts +0 -19
  222. package/script/types/0_reply_keyboard_remove.d.ts +0 -10
  223. package/script/types/0_reply_keyboard_remove.js +0 -13
  224. package/script/types/1_input_invoice_message_content.d.ts +0 -23
  225. package/script/types/1_input_text_message_content.d.ts +0 -8
  226. package/script/types/1_input_text_message_content.js +0 -2
  227. package/script/types/2_input_message_content.d.ts +0 -6
  228. package/script/types/2_input_message_content.js +0 -2
  229. package/script/types/2_reply_keyboard_markup.d.ts +0 -12
  230. package/script/types/2_reply_keyboard_markup.js +0 -42
  231. package/script/types/3_inline_keyboard_markup.d.ts +0 -8
  232. package/script/types/3_inline_keyboard_markup.js +0 -29
  233. package/script/types/4_inline_query_result_article.d.ts +0 -15
  234. package/script/types/4_inline_query_result_article.js +0 -2
  235. package/script/types/4_inline_query_result_audio.d.ts +0 -17
  236. package/script/types/4_inline_query_result_audio.js +0 -2
  237. package/script/types/4_inline_query_result_cached_audio.d.ts +0 -14
  238. package/script/types/4_inline_query_result_cached_audio.js +0 -2
  239. package/script/types/4_inline_query_result_cached_document.d.ts +0 -15
  240. package/script/types/4_inline_query_result_cached_document.js +0 -2
  241. package/script/types/4_inline_query_result_cached_gif.d.ts +0 -15
  242. package/script/types/4_inline_query_result_cached_gif.js +0 -2
  243. package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  244. package/script/types/4_inline_query_result_cached_mpeg4_gif.js +0 -2
  245. package/script/types/4_inline_query_result_cached_photo.d.ts +0 -16
  246. package/script/types/4_inline_query_result_cached_photo.js +0 -2
  247. package/script/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  248. package/script/types/4_inline_query_result_cached_sticker.js +0 -2
  249. package/script/types/4_inline_query_result_cached_video.d.ts +0 -16
  250. package/script/types/4_inline_query_result_cached_video.js +0 -2
  251. package/script/types/4_inline_query_result_cached_voice.d.ts +0 -15
  252. package/script/types/4_inline_query_result_cached_voice.js +0 -2
  253. package/script/types/4_inline_query_result_contact.d.ts +0 -15
  254. package/script/types/4_inline_query_result_contact.js +0 -2
  255. package/script/types/4_inline_query_result_document.d.ts +0 -18
  256. package/script/types/4_inline_query_result_document.js +0 -2
  257. package/script/types/4_inline_query_result_game.d.ts +0 -7
  258. package/script/types/4_inline_query_result_game.js +0 -2
  259. package/script/types/4_inline_query_result_gif.d.ts +0 -20
  260. package/script/types/4_inline_query_result_gif.js +0 -2
  261. package/script/types/4_inline_query_result_location.d.ts +0 -18
  262. package/script/types/4_inline_query_result_location.js +0 -2
  263. package/script/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  264. package/script/types/4_inline_query_result_mpeg4_gif.js +0 -2
  265. package/script/types/4_inline_query_result_photo.d.ts +0 -19
  266. package/script/types/4_inline_query_result_photo.js +0 -2
  267. package/script/types/4_inline_query_result_venue.d.ts +0 -19
  268. package/script/types/4_inline_query_result_venue.js +0 -2
  269. package/script/types/4_inline_query_result_video.d.ts +0 -21
  270. package/script/types/4_inline_query_result_video.js +0 -2
  271. package/script/types/4_inline_query_result_voice.d.ts +0 -16
  272. package/script/types/4_inline_query_result_voice.js +0 -2
  273. package/script/types/4_reply_markup.d.ts +0 -7
  274. package/script/types/4_reply_markup.js +0 -26
  275. package/script/types/5_inline_query_result.d.ts +0 -28
  276. /package/esm/{client/3_params.js → _dnt.polyfills.js} +0 -0
  277. /package/esm/{types/0_chat_id.js → client/0_params.js} +0 -0
  278. /package/esm/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  279. /package/esm/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  280. /package/esm/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  281. /package/esm/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
  282. /package/script/{client/3_params.js → _dnt.polyfills.js} +0 -0
  283. /package/script/{types/0_chat_id.js → client/0_params.js} +0 -0
  284. /package/script/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  285. /package/script/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  286. /package/script/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  287. /package/script/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
@@ -55,7 +55,7 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
55
55
  _ConnectionWebSocket_webSocket.set(this, void 0);
56
56
  _ConnectionWebSocket_rMutex.set(this, new _0_deps_js_1.Mutex());
57
57
  _ConnectionWebSocket_wMutex.set(this, new _0_deps_js_1.Mutex());
58
- _ConnectionWebSocket_buffer.set(this, new Array());
58
+ _ConnectionWebSocket_buffer.set(this, new Uint8Array());
59
59
  _ConnectionWebSocket_nextResolve.set(this, null);
60
60
  _ConnectionWebSocket_wasConnected.set(this, false);
61
61
  _ConnectionWebSocket_isConnecting.set(this, false);
@@ -102,7 +102,9 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
102
102
  if (__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").length < p.length) {
103
103
  await new Promise((resolve, reject) => __classPrivateFieldSet(this, _ConnectionWebSocket_nextResolve, [p.length, { resolve, reject }], "f"));
104
104
  }
105
- p.set(__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").splice(0, p.length));
105
+ const slice = __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").slice(0, p.length);
106
+ p.set(slice);
107
+ __classPrivateFieldSet(this, _ConnectionWebSocket_buffer, __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").slice(slice.length), "f");
106
108
  }
107
109
  finally {
108
110
  release();
@@ -142,9 +144,7 @@ _ConnectionWebSocket_webSocket = new WeakMap(), _ConnectionWebSocket_rMutex = ne
142
144
  }
143
145
  const release = await mutex.acquire();
144
146
  const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob || v instanceof Uint8Array ? v : v instanceof ArrayBuffer ? v : (0, _1_utilities_js_1.UNREACHABLE)())).arrayBuffer());
145
- for (const byte of data) {
146
- __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").push(byte);
147
- }
147
+ __classPrivateFieldSet(this, _ConnectionWebSocket_buffer, (0, _1_utilities_js_1.concat)(__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f"), data), "f");
148
148
  if (__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f") != null && __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").length >= __classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[0]) {
149
149
  __classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[1].resolve();
150
150
  __classPrivateFieldSet(this, _ConnectionWebSocket_nextResolve, null, "f");
@@ -1,2 +1,2 @@
1
1
  export * as colors from "../../../../deno.land/std@0.69.0/fmt/colors.js";
2
- export { default as inspect } from "object-inspect";
2
+ export { default as inspect } from "../../object-inspect/main/index.js";
@@ -28,5 +28,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.inspect = exports.colors = void 0;
30
30
  exports.colors = __importStar(require("../../../../deno.land/std@0.69.0/fmt/colors.js"));
31
- var object_inspect_1 = require("object-inspect");
32
- Object.defineProperty(exports, "inspect", { enumerable: true, get: function () { return __importDefault(object_inspect_1).default; } });
31
+ var index_js_1 = require("../../object-inspect/main/index.js");
32
+ Object.defineProperty(exports, "inspect", { enumerable: true, get: function () { return __importDefault(index_js_1).default; } });
@@ -0,0 +1 @@
1
+ export default function inspect_(obj: any, options: any, depth: any, seen: any): any;
@@ -0,0 +1,550 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
27
+ var hasMap = typeof Map === 'function' && Map.prototype;
28
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
29
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
30
+ var mapForEach = hasMap && Map.prototype.forEach;
31
+ var hasSet = typeof Set === 'function' && Set.prototype;
32
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
33
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
34
+ var setForEach = hasSet && Set.prototype.forEach;
35
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
36
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
37
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
38
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
39
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
40
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
41
+ var booleanValueOf = Boolean.prototype.valueOf;
42
+ var objectToString = Object.prototype.toString;
43
+ var functionToString = Function.prototype.toString;
44
+ var $match = String.prototype.match;
45
+ var $slice = String.prototype.slice;
46
+ var $replace = String.prototype.replace;
47
+ var $toUpperCase = String.prototype.toUpperCase;
48
+ var $toLowerCase = String.prototype.toLowerCase;
49
+ var $test = RegExp.prototype.test;
50
+ var $concat = Array.prototype.concat;
51
+ var $join = Array.prototype.join;
52
+ var $arrSlice = Array.prototype.slice;
53
+ var $floor = Math.floor;
54
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
55
+ var gOPS = Object.getOwnPropertySymbols;
56
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
57
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
58
+ // ie, `has-tostringtag/shams
59
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
60
+ ? Symbol.toStringTag
61
+ : null;
62
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
63
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto
64
+ ? function (O) {
65
+ return O.__proto__; // eslint-disable-line no-proto
66
+ }
67
+ : null);
68
+ function addNumericSeparator(num, str) {
69
+ if (num === Infinity
70
+ || num === -Infinity
71
+ || num !== num
72
+ || (num && num > -1000 && num < 1000)
73
+ || $test.call(/e/, str)) {
74
+ return str;
75
+ }
76
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
77
+ if (typeof num === 'number') {
78
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
79
+ if (int !== num) {
80
+ var intStr = String(int);
81
+ var dec = $slice.call(str, intStr.length + 1);
82
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
83
+ }
84
+ }
85
+ return $replace.call(str, sepRegex, '$&_');
86
+ }
87
+ // var utilInspect = require('./util.inspect');
88
+ // var inspectCustom = utilInspect.custom;
89
+ var inspectSymbol = null;
90
+ function inspect_(obj, options, depth, seen) {
91
+ var opts = options || {};
92
+ if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
93
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
94
+ }
95
+ if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
96
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
97
+ : opts.maxStringLength !== null)) {
98
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
99
+ }
100
+ var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
101
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
102
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
103
+ }
104
+ if (has(opts, 'indent')
105
+ && opts.indent !== null
106
+ && opts.indent !== '\t'
107
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
108
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
109
+ }
110
+ if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
111
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
112
+ }
113
+ var numericSeparator = opts.numericSeparator;
114
+ if (typeof obj === 'undefined') {
115
+ return 'undefined';
116
+ }
117
+ if (obj === null) {
118
+ return 'null';
119
+ }
120
+ if (typeof obj === 'boolean') {
121
+ return obj ? 'true' : 'false';
122
+ }
123
+ if (typeof obj === 'string') {
124
+ return inspectString(obj, opts);
125
+ }
126
+ if (typeof obj === 'number') {
127
+ if (obj === 0) {
128
+ return Infinity / obj > 0 ? '0' : '-0';
129
+ }
130
+ var str = String(obj);
131
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
132
+ }
133
+ if (typeof obj === 'bigint') {
134
+ var bigIntStr = String(obj) + 'n';
135
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
136
+ }
137
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
138
+ if (typeof depth === 'undefined') {
139
+ depth = 0;
140
+ }
141
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
142
+ return isArray(obj) ? '[Array]' : '[Object]';
143
+ }
144
+ var indent = getIndent(opts, depth);
145
+ if (typeof seen === 'undefined') {
146
+ seen = [];
147
+ }
148
+ else if (indexOf(seen, obj) >= 0) {
149
+ return '[Circular]';
150
+ }
151
+ function inspect(value, from, noIndent) {
152
+ if (from) {
153
+ seen = $arrSlice.call(seen);
154
+ seen.push(from);
155
+ }
156
+ if (noIndent) {
157
+ var newOpts = {
158
+ depth: opts.depth
159
+ };
160
+ if (has(opts, 'quoteStyle')) {
161
+ newOpts.quoteStyle = opts.quoteStyle;
162
+ }
163
+ return inspect_(value, newOpts, depth + 1, seen);
164
+ }
165
+ return inspect_(value, opts, depth + 1, seen);
166
+ }
167
+ if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
168
+ var name = nameOf(obj);
169
+ var keys = arrObjKeys(obj, inspect);
170
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
171
+ }
172
+ if (isSymbol(obj)) {
173
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
174
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
175
+ }
176
+ if (isElement(obj)) {
177
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
178
+ var attrs = obj.attributes || [];
179
+ for (var i = 0; i < attrs.length; i++) {
180
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
181
+ }
182
+ s += '>';
183
+ if (obj.childNodes && obj.childNodes.length) {
184
+ s += '...';
185
+ }
186
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
187
+ return s;
188
+ }
189
+ if (isArray(obj)) {
190
+ if (obj.length === 0) {
191
+ return '[]';
192
+ }
193
+ var xs = arrObjKeys(obj, inspect);
194
+ if (indent && !singleLineValues(xs)) {
195
+ return '[' + indentedJoin(xs, indent) + ']';
196
+ }
197
+ return '[ ' + $join.call(xs, ', ') + ' ]';
198
+ }
199
+ if (isError(obj)) {
200
+ var parts = arrObjKeys(obj, inspect);
201
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
202
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
203
+ }
204
+ if (parts.length === 0) {
205
+ return '[' + String(obj) + ']';
206
+ }
207
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
208
+ }
209
+ if (typeof obj === 'object' && customInspect) {
210
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
211
+ return utilInspect(obj, { depth: maxDepth - depth });
212
+ }
213
+ else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
214
+ return obj.inspect();
215
+ }
216
+ }
217
+ if (isMap(obj)) {
218
+ var mapParts = [];
219
+ if (mapForEach) {
220
+ mapForEach.call(obj, function (value, key) {
221
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
222
+ });
223
+ }
224
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
225
+ }
226
+ if (isSet(obj)) {
227
+ var setParts = [];
228
+ if (setForEach) {
229
+ setForEach.call(obj, function (value) {
230
+ setParts.push(inspect(value, obj));
231
+ });
232
+ }
233
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
234
+ }
235
+ if (isWeakMap(obj)) {
236
+ return weakCollectionOf('WeakMap');
237
+ }
238
+ if (isWeakSet(obj)) {
239
+ return weakCollectionOf('WeakSet');
240
+ }
241
+ if (isWeakRef(obj)) {
242
+ return weakCollectionOf('WeakRef');
243
+ }
244
+ if (isNumber(obj)) {
245
+ return markBoxed(inspect(Number(obj)));
246
+ }
247
+ if (isBigInt(obj)) {
248
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
249
+ }
250
+ if (isBoolean(obj)) {
251
+ return markBoxed(booleanValueOf.call(obj));
252
+ }
253
+ if (isString(obj)) {
254
+ return markBoxed(inspect(String(obj)));
255
+ }
256
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
257
+ /* eslint-env browser */
258
+ if (typeof dntShim.dntGlobalThis !== 'undefined' && obj === dntShim.dntGlobalThis) {
259
+ return '{ [object Window] }';
260
+ }
261
+ if (obj === global) {
262
+ return '{ [object globalThis] }';
263
+ }
264
+ if (!isDate(obj) && !isRegExp(obj)) {
265
+ var ys = arrObjKeys(obj, inspect);
266
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
267
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
268
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
269
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
270
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
271
+ if (ys.length === 0) {
272
+ return tag + '{}';
273
+ }
274
+ if (indent) {
275
+ return tag + '{' + indentedJoin(ys, indent) + '}';
276
+ }
277
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
278
+ }
279
+ return String(obj);
280
+ }
281
+ exports.default = inspect_;
282
+ ;
283
+ function wrapQuotes(s, defaultStyle, opts) {
284
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
285
+ return quoteChar + s + quoteChar;
286
+ }
287
+ function quote(s) {
288
+ return $replace.call(String(s), /"/g, '&quot;');
289
+ }
290
+ function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
291
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
292
+ function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
293
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
294
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
295
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
296
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
297
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
298
+ function isSymbol(obj) {
299
+ if (hasShammedSymbols) {
300
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
301
+ }
302
+ if (typeof obj === 'symbol') {
303
+ return true;
304
+ }
305
+ if (!obj || typeof obj !== 'object' || !symToString) {
306
+ return false;
307
+ }
308
+ try {
309
+ symToString.call(obj);
310
+ return true;
311
+ }
312
+ catch (e) { }
313
+ return false;
314
+ }
315
+ function isBigInt(obj) {
316
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
317
+ return false;
318
+ }
319
+ try {
320
+ bigIntValueOf.call(obj);
321
+ return true;
322
+ }
323
+ catch (e) { }
324
+ return false;
325
+ }
326
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
327
+ function has(obj, key) {
328
+ return hasOwn.call(obj, key);
329
+ }
330
+ function toStr(obj) {
331
+ return objectToString.call(obj);
332
+ }
333
+ function nameOf(f) {
334
+ if (f.name) {
335
+ return f.name;
336
+ }
337
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
338
+ if (m) {
339
+ return m[1];
340
+ }
341
+ return null;
342
+ }
343
+ function indexOf(xs, x) {
344
+ if (xs.indexOf) {
345
+ return xs.indexOf(x);
346
+ }
347
+ for (var i = 0, l = xs.length; i < l; i++) {
348
+ if (xs[i] === x) {
349
+ return i;
350
+ }
351
+ }
352
+ return -1;
353
+ }
354
+ function isMap(x) {
355
+ if (!mapSize || !x || typeof x !== 'object') {
356
+ return false;
357
+ }
358
+ try {
359
+ mapSize.call(x);
360
+ try {
361
+ setSize.call(x);
362
+ }
363
+ catch (s) {
364
+ return true;
365
+ }
366
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
367
+ }
368
+ catch (e) { }
369
+ return false;
370
+ }
371
+ function isWeakMap(x) {
372
+ if (!weakMapHas || !x || typeof x !== 'object') {
373
+ return false;
374
+ }
375
+ try {
376
+ weakMapHas.call(x, weakMapHas);
377
+ try {
378
+ weakSetHas.call(x, weakSetHas);
379
+ }
380
+ catch (s) {
381
+ return true;
382
+ }
383
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
384
+ }
385
+ catch (e) { }
386
+ return false;
387
+ }
388
+ function isWeakRef(x) {
389
+ if (!weakRefDeref || !x || typeof x !== 'object') {
390
+ return false;
391
+ }
392
+ try {
393
+ weakRefDeref.call(x);
394
+ return true;
395
+ }
396
+ catch (e) { }
397
+ return false;
398
+ }
399
+ function isSet(x) {
400
+ if (!setSize || !x || typeof x !== 'object') {
401
+ return false;
402
+ }
403
+ try {
404
+ setSize.call(x);
405
+ try {
406
+ mapSize.call(x);
407
+ }
408
+ catch (m) {
409
+ return true;
410
+ }
411
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
412
+ }
413
+ catch (e) { }
414
+ return false;
415
+ }
416
+ function isWeakSet(x) {
417
+ if (!weakSetHas || !x || typeof x !== 'object') {
418
+ return false;
419
+ }
420
+ try {
421
+ weakSetHas.call(x, weakSetHas);
422
+ try {
423
+ weakMapHas.call(x, weakMapHas);
424
+ }
425
+ catch (s) {
426
+ return true;
427
+ }
428
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
429
+ }
430
+ catch (e) { }
431
+ return false;
432
+ }
433
+ function isElement(x) {
434
+ if (!x || typeof x !== 'object') {
435
+ return false;
436
+ }
437
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
438
+ return true;
439
+ }
440
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
441
+ }
442
+ function inspectString(str, opts) {
443
+ if (str.length > opts.maxStringLength) {
444
+ var remaining = str.length - opts.maxStringLength;
445
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
446
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
447
+ }
448
+ // eslint-disable-next-line no-control-regex
449
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
450
+ return wrapQuotes(s, 'single', opts);
451
+ }
452
+ function lowbyte(c) {
453
+ var n = c.charCodeAt(0);
454
+ var x = {
455
+ 8: 'b',
456
+ 9: 't',
457
+ 10: 'n',
458
+ 12: 'f',
459
+ 13: 'r'
460
+ }[n];
461
+ if (x) {
462
+ return '\\' + x;
463
+ }
464
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
465
+ }
466
+ function markBoxed(str) {
467
+ return 'Object(' + str + ')';
468
+ }
469
+ function weakCollectionOf(type) {
470
+ return type + ' { ? }';
471
+ }
472
+ function collectionOf(type, size, entries, indent) {
473
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
474
+ return type + ' (' + size + ') {' + joinedEntries + '}';
475
+ }
476
+ function singleLineValues(xs) {
477
+ for (var i = 0; i < xs.length; i++) {
478
+ if (indexOf(xs[i], '\n') >= 0) {
479
+ return false;
480
+ }
481
+ }
482
+ return true;
483
+ }
484
+ function getIndent(opts, depth) {
485
+ var baseIndent;
486
+ if (opts.indent === '\t') {
487
+ baseIndent = '\t';
488
+ }
489
+ else if (typeof opts.indent === 'number' && opts.indent > 0) {
490
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
491
+ }
492
+ else {
493
+ return null;
494
+ }
495
+ return {
496
+ base: baseIndent,
497
+ prev: $join.call(Array(depth + 1), baseIndent)
498
+ };
499
+ }
500
+ function indentedJoin(xs, indent) {
501
+ if (xs.length === 0) {
502
+ return '';
503
+ }
504
+ var lineJoiner = '\n' + indent.prev + indent.base;
505
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
506
+ }
507
+ function arrObjKeys(obj, inspect) {
508
+ var isArr = isArray(obj);
509
+ var xs = [];
510
+ if (isArr) {
511
+ xs.length = obj.length;
512
+ for (var i = 0; i < obj.length; i++) {
513
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
514
+ }
515
+ }
516
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
517
+ var symMap;
518
+ if (hasShammedSymbols) {
519
+ symMap = {};
520
+ for (var k = 0; k < syms.length; k++) {
521
+ symMap['$' + syms[k]] = syms[k];
522
+ }
523
+ }
524
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
525
+ if (!has(obj, key)) {
526
+ continue;
527
+ } // eslint-disable-line no-restricted-syntax, no-continue
528
+ if (isArr && String(Number(key)) === key && key < obj.length) {
529
+ continue;
530
+ } // eslint-disable-line no-restricted-syntax, no-continue
531
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
532
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
533
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
534
+ }
535
+ else if ($test.call(/[^\w$]/, key)) {
536
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
537
+ }
538
+ else {
539
+ xs.push(key + ': ' + inspect(obj[key], obj));
540
+ }
541
+ }
542
+ if (typeof gOPS === 'function') {
543
+ for (var j = 0; j < syms.length; j++) {
544
+ if (isEnumerable.call(obj, syms[j])) {
545
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
546
+ }
547
+ }
548
+ }
549
+ return xs;
550
+ }
package/script/mod.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import "./_dnt.polyfills.js";
1
2
  export { getColorFromPeerId, getColorName, getRandomId } from "./1_utilities.js";
2
3
  export { checkPassword } from "./client/0_password.js";
3
4
  export * from "./2_connection.js";
package/script/mod.js CHANGED
@@ -27,6 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.getRandomId = exports.getColorName = exports.getColorFromPeerId = void 0;
30
+ require("./_dnt.polyfills.js");
30
31
  var _1_utilities_js_1 = require("./1_utilities.js");
31
32
  Object.defineProperty(exports, "getColorFromPeerId", { enumerable: true, get: function () { return _1_utilities_js_1.getColorFromPeerId; } });
32
33
  Object.defineProperty(exports, "getColorName", { enumerable: true, get: function () { return _1_utilities_js_1.getColorName; } });
@@ -67,13 +67,15 @@ export declare abstract class Storage {
67
67
  setPinnedChats(listId: number, chatIds: number[] | null): Promise<void>;
68
68
  getPinnedChats(listId: number): Promise<number[] | null>;
69
69
  getHistory(chatId: number, offsetId: number, limit: number): Promise<enums.Message[]>;
70
- getFile(id: bigint): Promise<number | null>;
71
- iterFileParts(id: bigint, partCount: number): AsyncGenerator<Uint8Array, void, unknown>;
70
+ getFile(id: bigint): Promise<[number, number] | null>;
71
+ iterFileParts(id: bigint, partCount: number, offset: number): AsyncGenerator<Uint8Array, void, unknown>;
72
72
  saveFilePart(id: bigint, index: number, bytes: Uint8Array): Promise<void>;
73
- setFilePartCount(id: bigint, partCount: number): Promise<void>;
73
+ setFilePartCount(id: bigint, partCount: number, chunkSize: number): Promise<void>;
74
74
  setCustomEmojiDocument(id: bigint, document: types.Document): Promise<void>;
75
75
  getCustomEmojiDocument(id: bigint): Promise<[import("../tl/2_types.js").Document_, Date] | null>;
76
76
  setUpdate(boxId: bigint, update: enums.Update): Promise<void>;
77
77
  deleteUpdates(): Promise<void>;
78
78
  getFirstUpdate(boxId: bigint): Promise<readonly [readonly StorageKeyPart[], import("../tl/2_types.js").UpdateNewMessage_ | import("../tl/2_types.js").UpdateMessageID_ | import("../tl/2_types.js").UpdateDeleteMessages_ | import("../tl/2_types.js").UpdateUserTyping_ | import("../tl/2_types.js").UpdateChatUserTyping_ | import("../tl/2_types.js").UpdateChatParticipants_ | import("../tl/2_types.js").UpdateUserStatus_ | import("../tl/2_types.js").UpdateUserName_ | import("../tl/2_types.js").UpdateNewAuthorization_ | import("../tl/2_types.js").UpdateNewEncryptedMessage_ | import("../tl/2_types.js").UpdateEncryptedChatTyping_ | import("../tl/2_types.js").UpdateEncryption_ | import("../tl/2_types.js").UpdateEncryptedMessagesRead_ | import("../tl/2_types.js").UpdateChatParticipantAdd_ | import("../tl/2_types.js").UpdateChatParticipantDelete_ | import("../tl/2_types.js").UpdateDcOptions_ | import("../tl/2_types.js").UpdateNotifySettings_ | import("../tl/2_types.js").UpdateServiceNotification_ | import("../tl/2_types.js").UpdatePrivacy_ | import("../tl/2_types.js").UpdateUserPhone_ | import("../tl/2_types.js").UpdateReadHistoryInbox_ | import("../tl/2_types.js").UpdateReadHistoryOutbox_ | import("../tl/2_types.js").UpdateWebPage_ | import("../tl/2_types.js").UpdateReadMessagesContents_ | import("../tl/2_types.js").UpdateChannelTooLong_ | import("../tl/2_types.js").UpdateChannel_ | import("../tl/2_types.js").UpdateNewChannelMessage_ | import("../tl/2_types.js").UpdateReadChannelInbox_ | import("../tl/2_types.js").UpdateDeleteChannelMessages_ | import("../tl/2_types.js").UpdateChannelMessageViews_ | import("../tl/2_types.js").UpdateChatParticipantAdmin_ | import("../tl/2_types.js").UpdateNewStickerSet_ | import("../tl/2_types.js").UpdateStickerSetsOrder_ | import("../tl/2_types.js").UpdateStickerSets_ | import("../tl/2_types.js").UpdateSavedGifs_ | import("../tl/2_types.js").UpdateBotInlineQuery_ | import("../tl/2_types.js").UpdateBotInlineSend_ | import("../tl/2_types.js").UpdateEditChannelMessage_ | import("../tl/2_types.js").UpdateBotCallbackQuery_ | import("../tl/2_types.js").UpdateEditMessage_ | import("../tl/2_types.js").UpdateInlineBotCallbackQuery_ | import("../tl/2_types.js").UpdateReadChannelOutbox_ | import("../tl/2_types.js").UpdateDraftMessage_ | import("../tl/2_types.js").UpdateReadFeaturedStickers_ | import("../tl/2_types.js").UpdateRecentStickers_ | import("../tl/2_types.js").UpdateConfig_ | import("../tl/2_types.js").UpdatePtsChanged_ | import("../tl/2_types.js").UpdateChannelWebPage_ | import("../tl/2_types.js").UpdateDialogPinned_ | import("../tl/2_types.js").UpdatePinnedDialogs_ | import("../tl/2_types.js").UpdateBotWebhookJSON_ | import("../tl/2_types.js").UpdateBotWebhookJSONQuery_ | import("../tl/2_types.js").UpdateBotShippingQuery_ | import("../tl/2_types.js").UpdateBotPrecheckoutQuery_ | import("../tl/2_types.js").UpdatePhoneCall_ | import("../tl/2_types.js").UpdateLangPackTooLong_ | import("../tl/2_types.js").UpdateLangPack_ | import("../tl/2_types.js").UpdateFavedStickers_ | import("../tl/2_types.js").UpdateChannelReadMessagesContents_ | import("../tl/2_types.js").UpdateContactsReset_ | import("../tl/2_types.js").UpdateChannelAvailableMessages_ | import("../tl/2_types.js").UpdateDialogUnreadMark_ | import("../tl/2_types.js").UpdateMessagePoll_ | import("../tl/2_types.js").UpdateChatDefaultBannedRights_ | import("../tl/2_types.js").UpdateFolderPeers_ | import("../tl/2_types.js").UpdatePeerSettings_ | import("../tl/2_types.js").UpdatePeerLocated_ | import("../tl/2_types.js").UpdateNewScheduledMessage_ | import("../tl/2_types.js").UpdateDeleteScheduledMessages_ | import("../tl/2_types.js").UpdateTheme_ | import("../tl/2_types.js").UpdateGeoLiveViewed_ | import("../tl/2_types.js").UpdateLoginToken_ | import("../tl/2_types.js").UpdateMessagePollVote_ | import("../tl/2_types.js").UpdateDialogFilter_ | import("../tl/2_types.js").UpdateDialogFilterOrder_ | import("../tl/2_types.js").UpdateDialogFilters_ | import("../tl/2_types.js").UpdatePhoneCallSignalingData_ | import("../tl/2_types.js").UpdateChannelMessageForwards_ | import("../tl/2_types.js").UpdateReadChannelDiscussionInbox_ | import("../tl/2_types.js").UpdateReadChannelDiscussionOutbox_ | import("../tl/2_types.js").UpdatePeerBlocked_ | import("../tl/2_types.js").UpdateChannelUserTyping_ | import("../tl/2_types.js").UpdatePinnedMessages_ | import("../tl/2_types.js").UpdatePinnedChannelMessages_ | import("../tl/2_types.js").UpdateChat_ | import("../tl/2_types.js").UpdateGroupCallParticipants_ | import("../tl/2_types.js").UpdateGroupCall_ | import("../tl/2_types.js").UpdatePeerHistoryTTL_ | import("../tl/2_types.js").UpdateChatParticipant_ | import("../tl/2_types.js").UpdateChannelParticipant_ | import("../tl/2_types.js").UpdateBotStopped_ | import("../tl/2_types.js").UpdateGroupCallConnection_ | import("../tl/2_types.js").UpdateBotCommands_ | import("../tl/2_types.js").UpdatePendingJoinRequests_ | import("../tl/2_types.js").UpdateBotChatInviteRequester_ | import("../tl/2_types.js").UpdateMessageReactions_ | import("../tl/2_types.js").UpdateAttachMenuBots_ | import("../tl/2_types.js").UpdateWebViewResultSent_ | import("../tl/2_types.js").UpdateBotMenuButton_ | import("../tl/2_types.js").UpdateSavedRingtones_ | import("../tl/2_types.js").UpdateTranscribedAudio_ | import("../tl/2_types.js").UpdateReadFeaturedEmojiStickers_ | import("../tl/2_types.js").UpdateUserEmojiStatus_ | import("../tl/2_types.js").UpdateRecentEmojiStatuses_ | import("../tl/2_types.js").UpdateRecentReactions_ | import("../tl/2_types.js").UpdateMoveStickerSetToTop_ | import("../tl/2_types.js").UpdateMessageExtendedMedia_ | import("../tl/2_types.js").UpdateChannelPinnedTopic_ | import("../tl/2_types.js").UpdateChannelPinnedTopics_ | import("../tl/2_types.js").UpdateUser_ | import("../tl/2_types.js").UpdateAutoSaveSettings_ | import("../tl/2_types.js").UpdateGroupInvitePrivacyForbidden_ | import("../tl/2_types.js").UpdateStory_ | import("../tl/2_types.js").UpdateReadStories_ | import("../tl/2_types.js").UpdateStoryID_ | import("../tl/2_types.js").UpdateStoriesStealthMode_ | import("../tl/2_types.js").UpdateSentStoryReaction_ | import("../tl/2_types.js").UpdateBotChatBoost_ | import("../tl/2_types.js").UpdateChannelViewForumAsMessages_ | import("../tl/2_types.js").UpdatePeerWallpaper_ | import("../tl/2_types.js").UpdateBotMessageReaction_ | import("../tl/2_types.js").UpdateBotMessageReactions_] | null>;
79
+ assertUser(source: string): Promise<void>;
80
+ assertBot(source: string): Promise<void>;
79
81
  }