@mtkruto/node 0.1.170 → 0.1.190
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.
- package/esm/0_deps.d.ts +4 -4
- package/esm/0_deps.js +5 -5
- package/esm/4_constants.d.ts +1 -2
- package/esm/4_constants.js +2 -3
- package/esm/5_client.d.ts +2 -2
- package/esm/5_client.js +2 -2
- package/esm/client/0_client_abstract.d.ts +6 -4
- package/esm/client/0_client_abstract.js +11 -5
- package/esm/client/0_html.js +0 -6
- package/esm/client/0_markdown.d.ts +21 -0
- package/esm/client/0_markdown.js +321 -0
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +3 -6
- package/esm/client/0_params.d.ts +16 -0
- package/esm/client/1_client_encrypted.d.ts +34 -0
- package/esm/client/1_client_encrypted.js +239 -0
- package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/esm/client/1_composer.d.ts +2 -3
- package/esm/client/2_message_manager.d.ts +8 -3
- package/esm/client/2_message_manager.js +101 -9
- package/esm/client/4_client.d.ts +98 -40
- package/esm/client/4_client.js +263 -414
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
- package/{script/deps/deno.land/std@0.219.0 → esm/deps/deno.land/std@0.221.0}/path/basename.d.ts +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
- package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
- package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/basename.d.ts +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
- package/esm/storage/0_storage.d.ts +10 -1
- package/esm/storage/0_storage.js +40 -5
- package/esm/tl/6_message.d.ts +3 -2
- package/esm/tl/6_message.js +1 -1
- package/esm/tl/7_message_container.d.ts +6 -4
- package/esm/tl/7_message_container.js +22 -7
- package/esm/types/0_message_entity.d.ts +1 -0
- package/esm/types/0_message_entity.js +34 -0
- package/esm/types/0_parse_mode.d.ts +1 -1
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +4 -0
- package/esm/utilities/0_bigint.d.ts +1 -0
- package/esm/utilities/0_bigint.js +1 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/4_constants.d.ts +1 -2
- package/script/4_constants.js +3 -4
- package/script/5_client.d.ts +2 -2
- package/script/5_client.js +2 -2
- package/script/client/0_client_abstract.d.ts +6 -4
- package/script/client/0_client_abstract.js +11 -5
- package/script/client/0_html.js +0 -6
- package/script/client/0_markdown.d.ts +21 -0
- package/script/client/0_markdown.js +325 -0
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +3 -6
- package/script/client/0_params.d.ts +16 -0
- package/script/client/1_client_encrypted.d.ts +34 -0
- package/script/client/1_client_encrypted.js +243 -0
- package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/script/client/1_composer.d.ts +2 -3
- package/script/client/2_message_manager.d.ts +8 -3
- package/script/client/2_message_manager.js +101 -9
- package/script/client/4_client.d.ts +98 -40
- package/script/client/4_client.js +259 -410
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
- package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/basename.d.ts +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
- package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/parse.js +13 -1
- package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
- package/{esm/deps/deno.land/std@0.219.0/path → script/deps/deno.land/std@0.221.0/path/windows}/basename.d.ts +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
- package/script/storage/0_storage.d.ts +10 -1
- package/script/storage/0_storage.js +40 -5
- package/script/tl/6_message.d.ts +3 -2
- package/script/tl/6_message.js +1 -1
- package/script/tl/7_message_container.d.ts +6 -4
- package/script/tl/7_message_container.js +20 -5
- package/script/types/0_message_entity.d.ts +1 -0
- package/script/types/0_message_entity.js +36 -1
- package/script/types/0_parse_mode.d.ts +1 -1
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +4 -0
- package/script/utilities/0_bigint.d.ts +1 -0
- package/script/utilities/0_bigint.js +1 -0
- package/esm/client/5_composer.d.ts +0 -4
- package/esm/client/5_composer.js +0 -3
- package/esm/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
- package/esm/deps/deno.land/std@0.219.0/path/parse.js +0 -12
- package/script/client/5_composer.d.ts +0 -4
- package/script/client/5_composer.js +0 -7
- package/script/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
package/esm/client/4_client.js
CHANGED
|
@@ -9,51 +9,53 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _Client_instances,
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { as, chatIdToPeerId, functions, getChatIdPeerType, Message_, MessageContainer, name, peerToChatId, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
12
|
+
var _Client_instances, _Client_client, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_parseMode, _Client_publicKeys, _Client_ignoreOutgoing, _Client_storeMessages, _Client_Lauthorize, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_namespaceProxies, _Client_getApiId, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_pingLoopStarted, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
|
|
13
|
+
import { cleanObject, drop, getLogger, getRandomId, mustPrompt, mustPromptOneOf, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
14
|
+
import { as, chatIdToPeerId, functions, getChatIdPeerType, name, peerToChatId, types } from "../2_tl.js";
|
|
16
15
|
import { StorageMemory } from "../3_storage.js";
|
|
17
16
|
import { constructUser } from "../3_types.js";
|
|
18
|
-
import {
|
|
19
|
-
import { AuthKeyUnregistered, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded
|
|
20
|
-
import { ClientAbstract } from "./0_client_abstract.js";
|
|
21
|
-
import { match } from "./0_filters.js";
|
|
22
|
-
import { decryptMessage, encryptMessage, getMessageId } from "./0_message.js";
|
|
17
|
+
import { APP_VERSION, DEVICE_MODEL, LANG_CODE, LANG_PACK, LAYER, MAX_CHANNEL_ID, MAX_CHAT_ID, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL } from "../4_constants.js";
|
|
18
|
+
import { AuthKeyUnregistered, ConnectionNotInited, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded } from "../4_errors.js";
|
|
23
19
|
import { checkPassword } from "./0_password.js";
|
|
24
|
-
import { ConnectionError } from "./0_types.js";
|
|
25
20
|
import { getUsername, resolve } from "./0_utilities.js";
|
|
26
21
|
import { AccountManager } from "./1_account_manager.js";
|
|
27
22
|
import { BotInfoManager } from "./1_bot_info_manager.js";
|
|
28
|
-
import {
|
|
23
|
+
import { ClientEncrypted } from "./1_client_encrypted.js";
|
|
24
|
+
import { ClientPlain } from "./1_client_plain.js";
|
|
25
|
+
import { Composer as Composer_ } from "./1_composer.js";
|
|
29
26
|
import { FileManager } from "./1_file_manager.js";
|
|
30
27
|
import { NetworkStatisticsManager } from "./1_network_statistics_manager.js";
|
|
31
28
|
import { ReactionManager } from "./1_reaction_manager.js";
|
|
32
29
|
import { UpdateManager } from "./1_update_manager.js";
|
|
33
|
-
import { ClientPlain } from "./2_client_plain.js";
|
|
34
30
|
import { MessageManager } from "./2_message_manager.js";
|
|
35
31
|
import { CallbackQueryManager } from "./3_callback_query_manager.js";
|
|
36
32
|
import { ChatListManager } from "./3_chat_list_manager.js";
|
|
37
33
|
import { InlineQueryManager } from "./3_inline_query_manager.js";
|
|
38
34
|
import { StoryManager } from "./3_story_manager.js";
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const functionNamespaces = Object.entries(functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
43
|
-
export function skipInvoke() {
|
|
35
|
+
export class Composer extends Composer_ {
|
|
36
|
+
}
|
|
37
|
+
function skipInvoke() {
|
|
44
38
|
return (_ctx, next) => next();
|
|
45
39
|
}
|
|
46
40
|
export const restartAuth = Symbol("restartAuth");
|
|
47
|
-
export
|
|
41
|
+
export const handleMigrationError = Symbol("handleMigrationError");
|
|
42
|
+
// global Client ID counter for logs
|
|
43
|
+
let id = 0;
|
|
44
|
+
const getEntity = Symbol();
|
|
45
|
+
const functionNamespaces = Object.entries(functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
46
|
+
/**
|
|
47
|
+
* An MTKruto client.
|
|
48
|
+
*/
|
|
49
|
+
export class Client extends Composer {
|
|
48
50
|
/**
|
|
49
51
|
* Constructs the client.
|
|
50
52
|
*
|
|
51
|
-
* @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the string
|
|
53
|
+
* @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the auth string.
|
|
52
54
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
53
55
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
54
56
|
*/
|
|
55
57
|
constructor(storage, apiId = 0, apiHash = "", params) {
|
|
56
|
-
super(
|
|
58
|
+
super();
|
|
57
59
|
_Client_instances.add(this);
|
|
58
60
|
Object.defineProperty(this, "apiId", {
|
|
59
61
|
enumerable: true,
|
|
@@ -67,11 +69,7 @@ export class Client extends ClientAbstract {
|
|
|
67
69
|
writable: true,
|
|
68
70
|
value: apiHash
|
|
69
71
|
});
|
|
70
|
-
|
|
71
|
-
_Client_sessionId.set(this, getRandomBigInt(8, true, false));
|
|
72
|
-
_Client_state.set(this, { salt: 0n, seqNo: 0 });
|
|
73
|
-
_Client_promises.set(this, new Map());
|
|
74
|
-
_Client_toAcknowledge.set(this, new Set());
|
|
72
|
+
_Client_client.set(this, void 0);
|
|
75
73
|
_Client_guaranteeUpdateDelivery.set(this, void 0);
|
|
76
74
|
_Client_updateManager.set(this, void 0);
|
|
77
75
|
_Client_networkStatisticsManager.set(this, void 0);
|
|
@@ -134,16 +132,10 @@ export class Client extends ClientAbstract {
|
|
|
134
132
|
value: void 0
|
|
135
133
|
});
|
|
136
134
|
_Client_publicKeys.set(this, void 0);
|
|
137
|
-
_Client_autoStart.set(this, void 0);
|
|
138
135
|
_Client_ignoreOutgoing.set(this, void 0);
|
|
139
|
-
_Client_prefixes.set(this, void 0);
|
|
140
136
|
_Client_storeMessages.set(this, void 0);
|
|
141
|
-
_Client_id.set(this, void 0);
|
|
142
|
-
_Client_L.set(this, void 0);
|
|
143
137
|
_Client_Lauthorize.set(this, void 0);
|
|
144
|
-
_Client_LreceiveLoop.set(this, void 0);
|
|
145
138
|
_Client_LpingLoop.set(this, void 0);
|
|
146
|
-
_Client_Linvoke.set(this, void 0);
|
|
147
139
|
_Client_LhandleMigrationError.set(this, void 0);
|
|
148
140
|
_Client_L$initConncetion.set(this, void 0);
|
|
149
141
|
_Client_namespaceProxies.set(this, (() => {
|
|
@@ -285,6 +277,11 @@ export class Client extends ClientAbstract {
|
|
|
285
277
|
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
286
278
|
return this.sendDocument(chatId, document, { ...params, replyToMessageId });
|
|
287
279
|
},
|
|
280
|
+
replySticker: (sticker, params) => {
|
|
281
|
+
const { chatId, messageId } = mustGetMsg();
|
|
282
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
283
|
+
return this.sendSticker(chatId, sticker, { ...params, replyToMessageId });
|
|
284
|
+
},
|
|
288
285
|
replyContact: (firstName, number, params) => {
|
|
289
286
|
const { chatId, messageId } = mustGetMsg();
|
|
290
287
|
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
@@ -395,6 +392,10 @@ export class Client extends ClientAbstract {
|
|
|
395
392
|
const inlineMessageId = mustGetInlineMsgId();
|
|
396
393
|
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
397
394
|
},
|
|
395
|
+
editInlineMessageLiveLocation: (latitude, longitude, params) => {
|
|
396
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
397
|
+
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
398
|
+
},
|
|
398
399
|
editInlineMessageReplyMarkup: (params) => {
|
|
399
400
|
const inlineMessageId = mustGetInlineMsgId();
|
|
400
401
|
return this.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
@@ -403,6 +404,10 @@ export class Client extends ClientAbstract {
|
|
|
403
404
|
const { chatId } = mustGetMsg();
|
|
404
405
|
return this.editMessageText(chatId, messageId, text, params);
|
|
405
406
|
},
|
|
407
|
+
editMessageLiveLocation: (messageId, latitude, longitude, params) => {
|
|
408
|
+
const { chatId } = mustGetMsg();
|
|
409
|
+
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
410
|
+
},
|
|
406
411
|
editMessageReplyMarkup: (messageId, params) => {
|
|
407
412
|
const { chatId } = mustGetMsg();
|
|
408
413
|
return this.editMessageReplyMarkup(chatId, messageId, params);
|
|
@@ -513,39 +518,35 @@ export class Client extends ClientAbstract {
|
|
|
513
518
|
unblock: () => {
|
|
514
519
|
return this.unblockUser(mustGetUserId());
|
|
515
520
|
},
|
|
521
|
+
getChatMember: (userId) => {
|
|
522
|
+
const { chatId } = mustGetMsg();
|
|
523
|
+
return this.getChatMember(chatId, userId);
|
|
524
|
+
},
|
|
525
|
+
setChatStickerSet: (setName) => {
|
|
526
|
+
const { chatId } = mustGetMsg();
|
|
527
|
+
return this.setChatStickerSet(chatId, setName);
|
|
528
|
+
},
|
|
529
|
+
deleteChatStickerSet: () => {
|
|
530
|
+
const { chatId } = mustGetMsg();
|
|
531
|
+
return this.deleteChatStickerSet(chatId);
|
|
532
|
+
},
|
|
516
533
|
};
|
|
517
534
|
return cleanObject(context);
|
|
518
535
|
});
|
|
519
536
|
_Client_lastPropagatedConnectionState.set(this, null);
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
try {
|
|
527
|
-
const connectionState = connected ? "ready" : "notConnected";
|
|
528
|
-
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
529
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
finally {
|
|
533
|
-
unlock();
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
}).bind(this)
|
|
537
|
-
});
|
|
537
|
+
_Client_stateChangeHandler.set(this, ((connected) => {
|
|
538
|
+
const connectionState = connected ? "ready" : "notConnected";
|
|
539
|
+
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
540
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
541
|
+
}
|
|
542
|
+
}).bind(this));
|
|
538
543
|
_Client_storageInited.set(this, false);
|
|
539
|
-
_Client_connectMutex.set(this, new Mutex());
|
|
540
544
|
_Client_connectionInited.set(this, false);
|
|
541
545
|
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
542
|
-
|
|
546
|
+
_Client_pingLoopStarted.set(this, false);
|
|
543
547
|
_Client_pingLoopAbortController.set(this, null);
|
|
544
548
|
_Client_pingInterval.set(this, 60 * 1000); // 60 seconds
|
|
545
549
|
_Client_lastUpdates.set(this, new Date());
|
|
546
|
-
_Client_pingLoopStarted.set(this, false);
|
|
547
|
-
_Client_autoStarted.set(this, false);
|
|
548
|
-
_Client_lastMsgId.set(this, 0n);
|
|
549
550
|
_Client_handleInvokeError.set(this, skipInvoke());
|
|
550
551
|
/**
|
|
551
552
|
* Invokes a function waiting and returning its reply if the second parameter is not `true`. Requires the client
|
|
@@ -573,8 +574,38 @@ export class Client extends ClientAbstract {
|
|
|
573
574
|
})
|
|
574
575
|
});
|
|
575
576
|
_Client_lastGetMe.set(this, null);
|
|
576
|
-
|
|
577
|
-
|
|
577
|
+
__classPrivateFieldSet(this, _Client_client, new ClientEncrypted(params), "f");
|
|
578
|
+
__classPrivateFieldGet(this, _Client_client, "f").stateChangeHandler = __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").bind(this);
|
|
579
|
+
__classPrivateFieldGet(this, _Client_client, "f").handlers = {
|
|
580
|
+
serverSaltReassigned: async (newServerSalt) => {
|
|
581
|
+
await this.storage.setServerSalt(newServerSalt);
|
|
582
|
+
},
|
|
583
|
+
updates: (updates, call, callback) => {
|
|
584
|
+
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(updates, true, call, callback);
|
|
585
|
+
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
586
|
+
},
|
|
587
|
+
result: async (result, callback) => {
|
|
588
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
589
|
+
callback();
|
|
590
|
+
},
|
|
591
|
+
error: async (_err, source) => {
|
|
592
|
+
switch (source) {
|
|
593
|
+
case "deserialization":
|
|
594
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
595
|
+
break;
|
|
596
|
+
case "decryption":
|
|
597
|
+
try {
|
|
598
|
+
await this.disconnect();
|
|
599
|
+
}
|
|
600
|
+
catch {
|
|
601
|
+
//
|
|
602
|
+
}
|
|
603
|
+
await this.connect();
|
|
604
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
};
|
|
578
609
|
this.storage = typeof storage === "string" ? new StorageMemory(storage) : storage ?? new StorageMemory();
|
|
579
610
|
__classPrivateFieldSet(this, _Client_storeMessages, params?.storeMessages ?? false, "f");
|
|
580
611
|
if (!__classPrivateFieldGet(this, _Client_storeMessages, "f")) {
|
|
@@ -591,16 +622,14 @@ export class Client extends ClientAbstract {
|
|
|
591
622
|
this.systemLangCode = params?.systemLangCode ?? SYSTEM_LANG_CODE;
|
|
592
623
|
this.systemVersion = params?.systemVersion ?? SYSTEM_VERSION;
|
|
593
624
|
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
594
|
-
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
595
625
|
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
596
|
-
|
|
626
|
+
if (params?.prefixes) {
|
|
627
|
+
this.prefixes = params?.prefixes;
|
|
628
|
+
}
|
|
597
629
|
__classPrivateFieldSet(this, _Client_guaranteeUpdateDelivery, params?.guaranteeUpdateDelivery ?? false, "f");
|
|
598
|
-
|
|
599
|
-
const L = __classPrivateFieldSet(this, _Client_L, getLogger("Client").client(__classPrivateFieldGet(this, _Client_id, "f")), "f");
|
|
630
|
+
const L = getLogger("Client").client(id++);
|
|
600
631
|
__classPrivateFieldSet(this, _Client_Lauthorize, L.branch("authorize"), "f");
|
|
601
|
-
__classPrivateFieldSet(this, _Client_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
602
632
|
__classPrivateFieldSet(this, _Client_LpingLoop, L.branch("pingLoop"), "f");
|
|
603
|
-
__classPrivateFieldSet(this, _Client_Linvoke, L.branch("invoke"), "f");
|
|
604
633
|
__classPrivateFieldSet(this, _Client_LhandleMigrationError, L.branch("[handleMigrationError]"), "f");
|
|
605
634
|
__classPrivateFieldSet(this, _Client_L$initConncetion, L.branch("#initConnection"), "f");
|
|
606
635
|
const c = {
|
|
@@ -610,7 +639,7 @@ export class Client extends ClientAbstract {
|
|
|
610
639
|
messageStorage: this.messageStorage,
|
|
611
640
|
guaranteeUpdateDelivery: __classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f"),
|
|
612
641
|
setConnectionState: __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).bind(this),
|
|
613
|
-
resetConnectionState: () => this.
|
|
642
|
+
resetConnectionState: () => __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").call(this, this.connected),
|
|
614
643
|
getSelfId: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).bind(this),
|
|
615
644
|
getInputPeer: this.getInputPeer.bind(this),
|
|
616
645
|
getInputChannel: this.getInputChannel.bind(this),
|
|
@@ -619,8 +648,8 @@ export class Client extends ClientAbstract {
|
|
|
619
648
|
handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
|
|
620
649
|
parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
|
|
621
650
|
apiFactory: (dcId) => {
|
|
622
|
-
const client = new Client((!dcId || dcId == this.dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
623
|
-
transportProvider: this.transportProvider,
|
|
651
|
+
const client = new Client((!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
652
|
+
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
624
653
|
appVersion: this.appVersion,
|
|
625
654
|
deviceModel: this.deviceModel,
|
|
626
655
|
langCode: this.langCode,
|
|
@@ -629,7 +658,7 @@ export class Client extends ClientAbstract {
|
|
|
629
658
|
systemVersion: this.systemVersion,
|
|
630
659
|
cdn: true,
|
|
631
660
|
});
|
|
632
|
-
__classPrivateFieldGet(client,
|
|
661
|
+
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
633
662
|
client.invoke.use(async (ctx, next) => {
|
|
634
663
|
if (ctx.error instanceof AuthKeyUnregistered && dcId) {
|
|
635
664
|
try {
|
|
@@ -649,14 +678,13 @@ export class Client extends ClientAbstract {
|
|
|
649
678
|
api: client.api,
|
|
650
679
|
connect: async () => {
|
|
651
680
|
await client.connect();
|
|
652
|
-
if (dcId && dcId != this.dcId) {
|
|
681
|
+
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
653
682
|
let dc = String(dcId);
|
|
654
|
-
if (this.dcId < 0) {
|
|
683
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
655
684
|
dc += "-test";
|
|
656
685
|
}
|
|
657
686
|
await client.setDc(dc);
|
|
658
687
|
}
|
|
659
|
-
await __classPrivateFieldGet(client, _Client_instances, "m", _Client_initConnection).call(client);
|
|
660
688
|
},
|
|
661
689
|
disconnect: client.disconnect.bind(client),
|
|
662
690
|
};
|
|
@@ -677,8 +705,8 @@ export class Client extends ClientAbstract {
|
|
|
677
705
|
__classPrivateFieldSet(this, _Client_chatListManager, new ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
678
706
|
__classPrivateFieldSet(this, _Client_accountManager, new AccountManager(c), "f");
|
|
679
707
|
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
680
|
-
const transportProvider = this.transportProvider;
|
|
681
|
-
this.transportProvider = (params) => {
|
|
708
|
+
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
709
|
+
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
682
710
|
const transport = transportProvider(params);
|
|
683
711
|
transport.connection.callback = __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getTransportReadWriteCallback();
|
|
684
712
|
return transport;
|
|
@@ -687,7 +715,7 @@ export class Client extends ClientAbstract {
|
|
|
687
715
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
688
716
|
drop((async () => {
|
|
689
717
|
if (connectionState == "notConnected") {
|
|
690
|
-
if (
|
|
718
|
+
if (this.disconnected) {
|
|
691
719
|
L.debug("not reconnecting");
|
|
692
720
|
return;
|
|
693
721
|
}
|
|
@@ -724,6 +752,13 @@ export class Client extends ClientAbstract {
|
|
|
724
752
|
});
|
|
725
753
|
}
|
|
726
754
|
}
|
|
755
|
+
// direct ClientEncrypted property proxies
|
|
756
|
+
get connected() {
|
|
757
|
+
return __classPrivateFieldGet(this, _Client_client, "f").connected;
|
|
758
|
+
}
|
|
759
|
+
get disconnected() {
|
|
760
|
+
return __classPrivateFieldGet(this, _Client_client, "f").disconnected;
|
|
761
|
+
}
|
|
727
762
|
/**
|
|
728
763
|
* Sets the DC and resets the auth key stored in the session provider
|
|
729
764
|
* if the stored DC was not the same as the `dc` parameter.
|
|
@@ -737,7 +772,7 @@ export class Client extends ClientAbstract {
|
|
|
737
772
|
await this.storage.setAuthKey(null);
|
|
738
773
|
await this.storage.getAuthKey();
|
|
739
774
|
}
|
|
740
|
-
|
|
775
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
741
776
|
}
|
|
742
777
|
/**
|
|
743
778
|
* Loads the session if `setDc` was not called, initializes and connnects
|
|
@@ -745,58 +780,43 @@ export class Client extends ClientAbstract {
|
|
|
745
780
|
* Before establishing the connection, the session is saved.
|
|
746
781
|
*/
|
|
747
782
|
async connect() {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
if (authKey == null) {
|
|
756
|
-
const plain = new ClientPlain({ initialDc: this.initialDc, transportProvider: this.transportProvider, cdn: this.cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
|
|
757
|
-
const dc = await this.storage.getDc();
|
|
758
|
-
if (dc != null) {
|
|
759
|
-
plain.setDc(dc);
|
|
760
|
-
}
|
|
761
|
-
await plain.connect();
|
|
762
|
-
const [authKey, salt] = await plain.createAuthKey();
|
|
763
|
-
await plain.disconnect();
|
|
764
|
-
await this.storage.setAuthKey(authKey);
|
|
765
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
|
|
766
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = salt;
|
|
767
|
-
await this.storage.setServerSalt(salt);
|
|
768
|
-
}
|
|
769
|
-
else {
|
|
770
|
-
if (__classPrivateFieldGet(this, _Client_state, "f").salt == 0n) {
|
|
771
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = await this.storage.getServerSalt() ?? 0n;
|
|
772
|
-
}
|
|
773
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
|
|
783
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
784
|
+
const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
|
|
785
|
+
if (authKey != null && dc != null) {
|
|
786
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
787
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setDc(dc); // TODO: remove await
|
|
788
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").serverSalt == 0n) {
|
|
789
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = await this.storage.getServerSalt() ?? 0n;
|
|
774
790
|
}
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
const plain = new ClientPlain({ initialDc: __classPrivateFieldGet(this, _Client_client, "f").initialDc, transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider, cdn: __classPrivateFieldGet(this, _Client_client, "f").cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
|
|
775
794
|
const dc = await this.storage.getDc();
|
|
776
795
|
if (dc != null) {
|
|
777
|
-
|
|
796
|
+
plain.setDc(dc);
|
|
797
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
778
798
|
}
|
|
779
|
-
await
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
__classPrivateFieldGet(this,
|
|
784
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_receiveLoop).call(this));
|
|
785
|
-
if (__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
|
|
786
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
finally {
|
|
790
|
-
unlock();
|
|
799
|
+
await plain.connect();
|
|
800
|
+
const [authKey, serverSalt] = await plain.createAuthKey();
|
|
801
|
+
drop(plain.disconnect());
|
|
802
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
803
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = serverSalt;
|
|
791
804
|
}
|
|
805
|
+
await __classPrivateFieldGet(this, _Client_client, "f").connect();
|
|
806
|
+
await Promise.all([this.storage.setAuthKey(__classPrivateFieldGet(this, _Client_client, "f").authKey), this.storage.setDc(__classPrivateFieldGet(this, _Client_client, "f").dc), this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_client, "f").serverSalt)]);
|
|
792
807
|
}
|
|
793
|
-
async
|
|
808
|
+
async reconnect(dc) {
|
|
809
|
+
await __classPrivateFieldGet(this, _Client_client, "f").reconnect(dc);
|
|
810
|
+
}
|
|
811
|
+
async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(), _Client_updateManager = new WeakMap(), _Client_networkStatisticsManager = new WeakMap(), _Client_botInfoManager = new WeakMap(), _Client_fileManager = new WeakMap(), _Client_reactionManager = new WeakMap(), _Client_messageManager = new WeakMap(), _Client_storyManager = new WeakMap(), _Client_callbackQueryManager = new WeakMap(), _Client_inlineQueryManager = new WeakMap(), _Client_chatListManager = new WeakMap(), _Client_accountManager = new WeakMap(), _Client_parseMode = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_storeMessages = new WeakMap(), _Client_Lauthorize = new WeakMap(), _Client_LpingLoop = new WeakMap(), _Client_LhandleMigrationError = new WeakMap(), _Client_L$initConncetion = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_stateChangeHandler = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_pingLoopAbortController = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_instances = new WeakSet(), _Client_getApiId = async function _Client_getApiId() {
|
|
812
|
+
const apiId = this.apiId || await this.storage.getApiId();
|
|
813
|
+
if (!apiId) {
|
|
814
|
+
throw new Error("apiId not set");
|
|
815
|
+
}
|
|
816
|
+
return apiId;
|
|
817
|
+
}, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
794
818
|
__classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
|
|
795
819
|
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
796
|
-
}, _Client_setAuth = async function _Client_setAuth(key) {
|
|
797
|
-
const hash = await sha1(key);
|
|
798
|
-
const id = bigIntFromBuffer(hash.slice(-8), true, false);
|
|
799
|
-
__classPrivateFieldSet(this, _Client_auth, { key, id }, "f");
|
|
800
820
|
}, _Client_initStorage = async function _Client_initStorage() {
|
|
801
821
|
if (!__classPrivateFieldGet(this, _Client_storageInited, "f")) {
|
|
802
822
|
await this.storage.initialize();
|
|
@@ -807,7 +827,7 @@ export class Client extends ClientAbstract {
|
|
|
807
827
|
}
|
|
808
828
|
}, handleMigrationError)](err) {
|
|
809
829
|
let newDc = String(err.dc);
|
|
810
|
-
if (Math.abs(this.dcId) >= 10000) {
|
|
830
|
+
if (Math.abs(__classPrivateFieldGet(this, _Client_client, "f").dcId) >= 10000) {
|
|
811
831
|
newDc += "-test";
|
|
812
832
|
}
|
|
813
833
|
await this.reconnect(newDc);
|
|
@@ -815,7 +835,7 @@ export class Client extends ClientAbstract {
|
|
|
815
835
|
}
|
|
816
836
|
async disconnect() {
|
|
817
837
|
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
818
|
-
await
|
|
838
|
+
await __classPrivateFieldGet(this, _Client_client, "f").disconnect();
|
|
819
839
|
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
|
|
820
840
|
}
|
|
821
841
|
/**
|
|
@@ -836,13 +856,6 @@ export class Client extends ClientAbstract {
|
|
|
836
856
|
* [2]: https://core.telegram.org/method/updates.getState
|
|
837
857
|
*/
|
|
838
858
|
async authorize(params) {
|
|
839
|
-
if (!this.apiId) {
|
|
840
|
-
throw new Error("apiId not set");
|
|
841
|
-
}
|
|
842
|
-
if (!this.apiHash) {
|
|
843
|
-
throw new Error("apiHash not set");
|
|
844
|
-
}
|
|
845
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
846
859
|
try {
|
|
847
860
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
|
|
848
861
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -855,6 +868,10 @@ export class Client extends ClientAbstract {
|
|
|
855
868
|
throw err;
|
|
856
869
|
}
|
|
857
870
|
}
|
|
871
|
+
const apiId = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this);
|
|
872
|
+
if (!this.apiHash) {
|
|
873
|
+
throw new Error("apiHash not set");
|
|
874
|
+
}
|
|
858
875
|
if (typeof params === "undefined") {
|
|
859
876
|
const loginType = mustPromptOneOf("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
860
877
|
if (loginType == "b") {
|
|
@@ -868,15 +885,14 @@ export class Client extends ClientAbstract {
|
|
|
868
885
|
if (typeof params === "string") {
|
|
869
886
|
while (true) {
|
|
870
887
|
try {
|
|
871
|
-
const auth = await this.api.auth.importBotAuthorization({ api_id:
|
|
872
|
-
|
|
888
|
+
const auth = await this.api.auth.importBotAuthorization({ api_id: apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 });
|
|
889
|
+
await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id));
|
|
873
890
|
await this.storage.setAccountType("bot");
|
|
874
891
|
break;
|
|
875
892
|
}
|
|
876
893
|
catch (err) {
|
|
877
894
|
if (err instanceof Migrate) {
|
|
878
895
|
await this[handleMigrationError](err);
|
|
879
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
880
896
|
continue;
|
|
881
897
|
}
|
|
882
898
|
else {
|
|
@@ -913,7 +929,6 @@ export class Client extends ClientAbstract {
|
|
|
913
929
|
catch (err) {
|
|
914
930
|
if (err instanceof Migrate) {
|
|
915
931
|
await this[handleMigrationError](err);
|
|
916
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
917
932
|
sentCode = await sendCode();
|
|
918
933
|
}
|
|
919
934
|
else {
|
|
@@ -941,7 +956,7 @@ export class Client extends ClientAbstract {
|
|
|
941
956
|
phone_code: code,
|
|
942
957
|
phone_code_hash: sentCode.phone_code_hash,
|
|
943
958
|
});
|
|
944
|
-
|
|
959
|
+
await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id));
|
|
945
960
|
await this.storage.setAccountType("user");
|
|
946
961
|
__classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
|
|
947
962
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -970,7 +985,7 @@ export class Client extends ClientAbstract {
|
|
|
970
985
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
971
986
|
const input = await checkPassword(password, ap);
|
|
972
987
|
const auth = await this.api.auth.checkPassword({ password: input });
|
|
973
|
-
|
|
988
|
+
await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id));
|
|
974
989
|
await this.storage.setAccountType("user");
|
|
975
990
|
__classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
|
|
976
991
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -1011,14 +1026,19 @@ export class Client extends ClientAbstract {
|
|
|
1011
1026
|
return this.invoke(function_, true);
|
|
1012
1027
|
}
|
|
1013
1028
|
exportAuthString() {
|
|
1014
|
-
return this.storage.exportAuthString();
|
|
1029
|
+
return this.storage.exportAuthString(this.apiId);
|
|
1015
1030
|
}
|
|
1016
1031
|
async importAuthString(authString) {
|
|
1017
1032
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
1018
1033
|
await this.storage.importAuthString(authString);
|
|
1019
1034
|
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
1037
|
+
*
|
|
1038
|
+
* @param id The identifier of the chat.
|
|
1039
|
+
*/
|
|
1020
1040
|
async getInputPeer(id) {
|
|
1021
|
-
if (id === "me") {
|
|
1041
|
+
if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
|
|
1022
1042
|
return new types.InputPeerSelf();
|
|
1023
1043
|
}
|
|
1024
1044
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
@@ -1032,6 +1052,11 @@ export class Client extends ClientAbstract {
|
|
|
1032
1052
|
}
|
|
1033
1053
|
return inputPeer;
|
|
1034
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
|
|
1057
|
+
*
|
|
1058
|
+
* @param id The identifier of the channel or the supergroup.
|
|
1059
|
+
*/
|
|
1035
1060
|
async getInputChannel(id) {
|
|
1036
1061
|
const inputPeer = await this.getInputPeer(id);
|
|
1037
1062
|
if (!(inputPeer instanceof types.InputPeerChannel)) {
|
|
@@ -1039,6 +1064,11 @@ export class Client extends ClientAbstract {
|
|
|
1039
1064
|
}
|
|
1040
1065
|
return new types.InputChannel(inputPeer);
|
|
1041
1066
|
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Get a user's inputUser. Useful when calling API functions directly.
|
|
1069
|
+
*
|
|
1070
|
+
* @param id The identifier of the user.
|
|
1071
|
+
*/
|
|
1042
1072
|
async getInputUser(id) {
|
|
1043
1073
|
const inputPeer = await this.getInputPeer(id);
|
|
1044
1074
|
if (!(inputPeer instanceof types.InputPeerUser)) {
|
|
@@ -1046,152 +1076,19 @@ export class Client extends ClientAbstract {
|
|
|
1046
1076
|
}
|
|
1047
1077
|
return new types.InputUser(inputPeer);
|
|
1048
1078
|
}
|
|
1049
|
-
async [(
|
|
1050
|
-
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
1051
|
-
await this.api.initConnection({
|
|
1052
|
-
api_id: this.apiId,
|
|
1053
|
-
app_version: this.appVersion,
|
|
1054
|
-
device_model: this.deviceModel,
|
|
1055
|
-
lang_code: this.langCode,
|
|
1056
|
-
lang_pack: this.langPack,
|
|
1057
|
-
query: new functions.invokeWithLayer({
|
|
1058
|
-
layer: LAYER,
|
|
1059
|
-
query: new functions.help.getConfig(),
|
|
1060
|
-
}),
|
|
1061
|
-
system_lang_code: this.systemLangCode,
|
|
1062
|
-
system_version: this.systemVersion,
|
|
1063
|
-
});
|
|
1064
|
-
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
1065
|
-
__classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
|
|
1066
|
-
}
|
|
1067
|
-
}, _Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1079
|
+
async [(_Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1068
1080
|
if (__classPrivateFieldGet(this, _Client_lastPropagatedAuthorizationState, "f") != authorized) {
|
|
1069
|
-
await
|
|
1081
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { authorizationState: { authorized } }), resolve);
|
|
1070
1082
|
__classPrivateFieldSet(this, _Client_lastPropagatedAuthorizationState, authorized, "f");
|
|
1071
1083
|
}
|
|
1072
1084
|
}, _Client_getSelfId = async function _Client_getSelfId() {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
return __classPrivateFieldGet(this, _Client_selfId, "f");
|
|
1077
|
-
}, _Client_receiveLoop = async function _Client_receiveLoop() {
|
|
1078
|
-
if (!__classPrivateFieldGet(this, _Client_auth, "f") || !this.transport) {
|
|
1079
|
-
throw new ConnectionError("Not connected");
|
|
1080
|
-
}
|
|
1081
|
-
while (this.connected) {
|
|
1082
|
-
try {
|
|
1083
|
-
if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= ACK_THRESHOLD) {
|
|
1084
|
-
await this.send(new types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
|
|
1085
|
-
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
|
|
1086
|
-
}
|
|
1087
|
-
const buffer = await this.transport.transport.receive();
|
|
1088
|
-
__classPrivateFieldGet(this, _Client_L, "f").inBin(buffer);
|
|
1089
|
-
let decrypted;
|
|
1090
|
-
try {
|
|
1091
|
-
decrypted = await (decryptMessage(buffer, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_sessionId, "f")));
|
|
1092
|
-
__classPrivateFieldGet(this, _Client_L, "f").in(decrypted);
|
|
1093
|
-
}
|
|
1094
|
-
catch (err) {
|
|
1095
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to decrypt message:", err);
|
|
1096
|
-
drop((async () => {
|
|
1097
|
-
try {
|
|
1098
|
-
await this.disconnect();
|
|
1099
|
-
}
|
|
1100
|
-
catch {
|
|
1101
|
-
//
|
|
1102
|
-
}
|
|
1103
|
-
await this.connect();
|
|
1104
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("decryption");
|
|
1105
|
-
})());
|
|
1106
|
-
continue;
|
|
1107
|
-
}
|
|
1108
|
-
const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted];
|
|
1109
|
-
for (const message of messages) {
|
|
1110
|
-
let body = message.body;
|
|
1111
|
-
if (body instanceof types.Gzip_packed) {
|
|
1112
|
-
body = new TLReader(gunzip(body.packed_data)).readObject();
|
|
1113
|
-
}
|
|
1114
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("received", (typeof body === "object" && name in body) ? body[name] : body.constructor.name);
|
|
1115
|
-
if (body instanceof types._Updates || body instanceof types._Update) {
|
|
1116
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(body, true);
|
|
1117
|
-
}
|
|
1118
|
-
else if (body instanceof types.New_session_created) {
|
|
1119
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
|
|
1120
|
-
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
1121
|
-
}
|
|
1122
|
-
else if (message.body instanceof RPCResult) {
|
|
1123
|
-
let result = message.body.result;
|
|
1124
|
-
if (result instanceof types.Gzip_packed) {
|
|
1125
|
-
result = new TLReader(gunzip(result.packed_data)).readObject();
|
|
1126
|
-
}
|
|
1127
|
-
if (result instanceof types.Rpc_error) {
|
|
1128
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
|
|
1129
|
-
}
|
|
1130
|
-
else {
|
|
1131
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && name in result) ? result[name] : result.constructor.name);
|
|
1132
|
-
}
|
|
1133
|
-
const messageId = message.body.messageId;
|
|
1134
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
|
|
1135
|
-
const resolvePromise = () => {
|
|
1136
|
-
if (promise) {
|
|
1137
|
-
if (result instanceof types.Rpc_error) {
|
|
1138
|
-
promise.reject(upgradeInstance(result, promise.call));
|
|
1139
|
-
}
|
|
1140
|
-
else {
|
|
1141
|
-
promise.resolve(result);
|
|
1142
|
-
}
|
|
1143
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
|
-
if (result instanceof types._Updates || result instanceof types._Update) {
|
|
1147
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(result, true, promise?.call, resolvePromise);
|
|
1148
|
-
}
|
|
1149
|
-
else {
|
|
1150
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
1151
|
-
resolvePromise();
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
else if (message.body instanceof types.Pong) {
|
|
1155
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
|
|
1156
|
-
if (promise) {
|
|
1157
|
-
promise.resolve(message.body);
|
|
1158
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
else if (message.body instanceof types.Bad_server_salt) {
|
|
1162
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("server salt reassigned");
|
|
1163
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
|
|
1164
|
-
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
1165
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
|
|
1166
|
-
if (promise) {
|
|
1167
|
-
promise.resolve(message.body);
|
|
1168
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
catch (err) {
|
|
1175
|
-
if (!this.connected) {
|
|
1176
|
-
break;
|
|
1177
|
-
}
|
|
1178
|
-
else if (err instanceof TLError) {
|
|
1179
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to deserialize:", err);
|
|
1180
|
-
drop(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("deserialize"));
|
|
1181
|
-
}
|
|
1182
|
-
else {
|
|
1183
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("unexpected error:", err);
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
if (!this.connected) {
|
|
1188
|
-
for (const { reject } of __classPrivateFieldGet(this, _Client_promises, "f").values()) {
|
|
1189
|
-
reject(new ConnectionError("Connection was closed"));
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
else {
|
|
1193
|
-
UNREACHABLE();
|
|
1085
|
+
const id = await this.storage.getAccountId();
|
|
1086
|
+
if (id == null) {
|
|
1087
|
+
throw new Error("Unauthorized");
|
|
1194
1088
|
}
|
|
1089
|
+
return id;
|
|
1090
|
+
}, _Client_startPingLoop = function _Client_startPingLoop() {
|
|
1091
|
+
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1195
1092
|
}, _Client_pingLoop = async function _Client_pingLoop() {
|
|
1196
1093
|
__classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
|
|
1197
1094
|
while (this.connected) {
|
|
@@ -1223,72 +1120,46 @@ export class Client extends ClientAbstract {
|
|
|
1223
1120
|
let n = 1;
|
|
1224
1121
|
while (true) {
|
|
1225
1122
|
try {
|
|
1226
|
-
if (!__classPrivateFieldGet(this,
|
|
1227
|
-
|
|
1228
|
-
await this.
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
const message = new Message_(messageId, seqNo, function_);
|
|
1244
|
-
const payload = await encryptMessage(message, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_state, "f").salt, __classPrivateFieldGet(this, _Client_sessionId, "f"));
|
|
1245
|
-
await this.transport.transport.send(payload);
|
|
1246
|
-
__classPrivateFieldGet(this, _Client_L, "f").out(message);
|
|
1247
|
-
__classPrivateFieldGet(this, _Client_L, "f").outBin(payload);
|
|
1248
|
-
__classPrivateFieldGet(this, _Client_Linvoke, "f").debug("invoked", function_[name]);
|
|
1249
|
-
if (noWait) {
|
|
1250
|
-
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
|
|
1251
|
-
resolve: (result) => {
|
|
1252
|
-
if (result instanceof types.Bad_server_salt) {
|
|
1253
|
-
drop(this.invoke(function_, true));
|
|
1254
|
-
}
|
|
1255
|
-
},
|
|
1256
|
-
reject: () => { },
|
|
1257
|
-
call: function_,
|
|
1258
|
-
});
|
|
1259
|
-
return;
|
|
1260
|
-
}
|
|
1261
|
-
let result;
|
|
1262
|
-
try {
|
|
1263
|
-
result = await new Promise((resolve, reject) => {
|
|
1264
|
-
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, { resolve, reject, call: function_ });
|
|
1265
|
-
});
|
|
1266
|
-
}
|
|
1267
|
-
catch (err) {
|
|
1268
|
-
if (err instanceof AuthKeyUnregistered) {
|
|
1269
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, false);
|
|
1270
|
-
}
|
|
1271
|
-
throw err;
|
|
1272
|
-
}
|
|
1273
|
-
if (result instanceof types.Bad_server_salt) {
|
|
1274
|
-
return await this.invoke(function_);
|
|
1123
|
+
if (function_ instanceof functions.Function && !__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
1124
|
+
const result = await __classPrivateFieldGet(this, _Client_client, "f").invoke(new functions.initConnection({
|
|
1125
|
+
api_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this),
|
|
1126
|
+
app_version: this.appVersion,
|
|
1127
|
+
device_model: this.deviceModel,
|
|
1128
|
+
lang_code: this.langCode,
|
|
1129
|
+
lang_pack: this.langPack,
|
|
1130
|
+
query: new functions.invokeWithLayer({
|
|
1131
|
+
layer: LAYER,
|
|
1132
|
+
query: function_,
|
|
1133
|
+
}),
|
|
1134
|
+
system_lang_code: this.systemLangCode,
|
|
1135
|
+
system_version: this.systemVersion,
|
|
1136
|
+
}), noWait);
|
|
1137
|
+
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
1138
|
+
__classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
|
|
1139
|
+
return result;
|
|
1275
1140
|
}
|
|
1276
1141
|
else {
|
|
1277
|
-
|
|
1278
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1279
|
-
__classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
|
|
1280
|
-
}
|
|
1281
|
-
return result;
|
|
1142
|
+
return await __classPrivateFieldGet(this, _Client_client, "f").invoke(function_, noWait);
|
|
1282
1143
|
}
|
|
1283
1144
|
}
|
|
1284
1145
|
catch (err) {
|
|
1285
|
-
if (
|
|
1146
|
+
if (err instanceof ConnectionNotInited) {
|
|
1147
|
+
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1150
|
+
else if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
|
|
1286
1151
|
continue;
|
|
1287
1152
|
}
|
|
1288
1153
|
else {
|
|
1289
1154
|
throw err;
|
|
1290
1155
|
}
|
|
1291
1156
|
}
|
|
1157
|
+
finally {
|
|
1158
|
+
if (!__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
|
|
1159
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_startPingLoop).call(this);
|
|
1160
|
+
__classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1292
1163
|
}
|
|
1293
1164
|
}, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
|
|
1294
1165
|
const users = await this.api.users.getUsers({ id: [new types.InputUser({ user_id: userId, access_hash: 0n })] });
|
|
@@ -1369,77 +1240,6 @@ export class Client extends ClientAbstract {
|
|
|
1369
1240
|
}
|
|
1370
1241
|
return await this.messageStorage.getEntity(id);
|
|
1371
1242
|
}
|
|
1372
|
-
use(...middleware) {
|
|
1373
|
-
const composer = new Composer(...middleware);
|
|
1374
|
-
__classPrivateFieldSet(this, _Client_handle, concat(__classPrivateFieldGet(this, _Client_handle, "f"), flatten(composer)), "f");
|
|
1375
|
-
return composer;
|
|
1376
|
-
}
|
|
1377
|
-
branch(predicate, trueHandler_, falseHandler_) {
|
|
1378
|
-
const trueHandler = flatten(trueHandler_);
|
|
1379
|
-
const falseHandler = flatten(falseHandler_);
|
|
1380
|
-
return this.use(async (upd, next) => {
|
|
1381
|
-
if (await predicate(upd)) {
|
|
1382
|
-
await trueHandler(upd, next);
|
|
1383
|
-
}
|
|
1384
|
-
else {
|
|
1385
|
-
await falseHandler(upd, next);
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
filter(predicate, ...middleware) {
|
|
1390
|
-
const composer = new Composer(...middleware);
|
|
1391
|
-
this.branch(predicate, composer, skip);
|
|
1392
|
-
return composer;
|
|
1393
|
-
}
|
|
1394
|
-
on(filter, ...middleware) {
|
|
1395
|
-
return this.filter((ctx) => {
|
|
1396
|
-
return match(filter, ctx);
|
|
1397
|
-
}, ...middleware);
|
|
1398
|
-
}
|
|
1399
|
-
command(commands, ...middleware) {
|
|
1400
|
-
const commands__ = typeof commands === "object" && "names" in commands ? commands.names : commands;
|
|
1401
|
-
const commands_ = Array.isArray(commands__) ? commands__ : [commands__];
|
|
1402
|
-
const prefixes_ = typeof commands === "object" && "prefixes" in commands ? commands.prefixes : (__classPrivateFieldGet(this, _Client_prefixes, "f") ?? []);
|
|
1403
|
-
const prefixes = Array.isArray(prefixes_) ? prefixes_ : [prefixes_];
|
|
1404
|
-
for (const left of prefixes) {
|
|
1405
|
-
for (const right of prefixes) {
|
|
1406
|
-
if (left == right) {
|
|
1407
|
-
continue;
|
|
1408
|
-
}
|
|
1409
|
-
if (left.startsWith(right) || right.startsWith(left)) {
|
|
1410
|
-
throw new Error("Intersecting prefixes");
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
return this.on("message:text").filter((ctx) => {
|
|
1415
|
-
const prefixes_ = prefixes.length == 0 ? [!ctx.me?.isBot ? "\\" : "/"] : prefixes;
|
|
1416
|
-
if (prefixes_.length == 0) {
|
|
1417
|
-
return false;
|
|
1418
|
-
}
|
|
1419
|
-
const cmd = ctx.message.text.split(/\s/, 1)[0];
|
|
1420
|
-
const prefix = prefixes_.find((v) => cmd.startsWith(v));
|
|
1421
|
-
if (prefix === undefined) {
|
|
1422
|
-
return false;
|
|
1423
|
-
}
|
|
1424
|
-
if (cmd.includes("@")) {
|
|
1425
|
-
const username = cmd.split("@", 2)[1];
|
|
1426
|
-
if (username.toLowerCase() !== ctx.me.username?.toLowerCase()) {
|
|
1427
|
-
return false;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
const command_ = cmd.split("@", 1)[0].split(prefix, 2)[1].toLowerCase();
|
|
1431
|
-
for (const command of commands_) {
|
|
1432
|
-
if (typeof command === "string" && (command.toLowerCase() == command_)) {
|
|
1433
|
-
return true;
|
|
1434
|
-
}
|
|
1435
|
-
else if (command instanceof RegExp && command.test(command_)) {
|
|
1436
|
-
return true;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
return false;
|
|
1440
|
-
}, ...middleware);
|
|
1441
|
-
}
|
|
1442
|
-
//#endregion
|
|
1443
1243
|
/**
|
|
1444
1244
|
* Send a text message.
|
|
1445
1245
|
*
|
|
@@ -1455,7 +1255,7 @@ export class Client extends ClientAbstract {
|
|
|
1455
1255
|
* Edit a message's text.
|
|
1456
1256
|
*
|
|
1457
1257
|
* @method ms
|
|
1458
|
-
* @param chatId The identifier of the chat that contains the
|
|
1258
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1459
1259
|
* @param messageId The message's identifier.
|
|
1460
1260
|
* @param text The new text of the message.
|
|
1461
1261
|
* @returns The edited text message.
|
|
@@ -1464,7 +1264,7 @@ export class Client extends ClientAbstract {
|
|
|
1464
1264
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1465
1265
|
}
|
|
1466
1266
|
/**
|
|
1467
|
-
* Edit an inline message's text.
|
|
1267
|
+
* Edit an inline message's text. Bot-only.
|
|
1468
1268
|
*
|
|
1469
1269
|
* @method ms
|
|
1470
1270
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1477,7 +1277,7 @@ export class Client extends ClientAbstract {
|
|
|
1477
1277
|
* Edit a message's reply markup.
|
|
1478
1278
|
*
|
|
1479
1279
|
* @method ms
|
|
1480
|
-
* @param chatId The identifier of the chat that contains the
|
|
1280
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1481
1281
|
* @param messageId The message's identifier.
|
|
1482
1282
|
* @returns The edited message.
|
|
1483
1283
|
*/
|
|
@@ -1485,7 +1285,7 @@ export class Client extends ClientAbstract {
|
|
|
1485
1285
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageReplyMarkup(chatId, messageId, params);
|
|
1486
1286
|
}
|
|
1487
1287
|
/**
|
|
1488
|
-
* Edit an inline message's reply markup.
|
|
1288
|
+
* Edit an inline message's reply markup. Bot-only.
|
|
1489
1289
|
*
|
|
1490
1290
|
* @method ms
|
|
1491
1291
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1493,6 +1293,31 @@ export class Client extends ClientAbstract {
|
|
|
1493
1293
|
async editInlineMessageReplyMarkup(inlineMessageId, params) {
|
|
1494
1294
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
1495
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Edit a message's live location.
|
|
1298
|
+
*
|
|
1299
|
+
* @method ms
|
|
1300
|
+
* @param chatId The identifier of the chat that contains the messages.
|
|
1301
|
+
* @param messageId The message's identifier.
|
|
1302
|
+
* @param latitude The new latitude.
|
|
1303
|
+
* @param longitude The new longitude.
|
|
1304
|
+
* @returns The edited location message.
|
|
1305
|
+
*/
|
|
1306
|
+
async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
|
|
1307
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Edit an inline message's live location. Bot-only.
|
|
1311
|
+
*
|
|
1312
|
+
* @method ms
|
|
1313
|
+
* @param inlineMessageId The inline message's identifier.
|
|
1314
|
+
* @param latitude The new latitude.
|
|
1315
|
+
* @param longitude The new longitude.
|
|
1316
|
+
* @returns The edited location message.
|
|
1317
|
+
*/
|
|
1318
|
+
async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
|
|
1319
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
1320
|
+
}
|
|
1496
1321
|
/**
|
|
1497
1322
|
* Retrieve multiple messages.
|
|
1498
1323
|
*
|
|
@@ -1568,11 +1393,13 @@ export class Client extends ClientAbstract {
|
|
|
1568
1393
|
* @method ac
|
|
1569
1394
|
*/
|
|
1570
1395
|
async getMe() {
|
|
1571
|
-
|
|
1572
|
-
if (
|
|
1573
|
-
|
|
1396
|
+
let user_ = await this[getEntity](new types.PeerUser({ user_id: BigInt(await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) }));
|
|
1397
|
+
if (user_ == null) {
|
|
1398
|
+
const users = await this.api.users.getUsers({ id: [new types.InputUserSelf()] });
|
|
1399
|
+
user_ = users[0][as](types.User);
|
|
1400
|
+
await this.messageStorage.setEntity(user_);
|
|
1574
1401
|
}
|
|
1575
|
-
const user = constructUser(
|
|
1402
|
+
const user = constructUser(user_);
|
|
1576
1403
|
__classPrivateFieldSet(this, _Client_lastGetMe, user, "f");
|
|
1577
1404
|
return user;
|
|
1578
1405
|
}
|
|
@@ -1597,6 +1424,17 @@ export class Client extends ClientAbstract {
|
|
|
1597
1424
|
async sendPoll(chatId, question, options, params) {
|
|
1598
1425
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendPoll(chatId, question, options, params);
|
|
1599
1426
|
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Stop a poll.
|
|
1429
|
+
*
|
|
1430
|
+
* @method ms
|
|
1431
|
+
* @param chatId The chat that includes the poll.
|
|
1432
|
+
* @param messageId The idenfifier of the poll's message.
|
|
1433
|
+
* @returns The new state of the poll.
|
|
1434
|
+
*/
|
|
1435
|
+
async stopPoll(chatId, messageId, params) {
|
|
1436
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").stopPoll(chatId, messageId, params);
|
|
1437
|
+
}
|
|
1600
1438
|
/**
|
|
1601
1439
|
* Send a chat action.
|
|
1602
1440
|
*
|
|
@@ -1740,6 +1578,17 @@ export class Client extends ClientAbstract {
|
|
|
1740
1578
|
async sendDocument(chatId, document, params) {
|
|
1741
1579
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendDocument(chatId, document, params);
|
|
1742
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Send a sticker.
|
|
1583
|
+
*
|
|
1584
|
+
* @method ms
|
|
1585
|
+
* @param chatId The chat to send the sticker to.
|
|
1586
|
+
* @param document The sticker to send.
|
|
1587
|
+
* @returns The sent sticker.
|
|
1588
|
+
*/
|
|
1589
|
+
async sendSticker(chatId, sticker, params) {
|
|
1590
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendSticker(chatId, sticker, params);
|
|
1591
|
+
}
|
|
1743
1592
|
/**
|
|
1744
1593
|
* Send a video.
|
|
1745
1594
|
*
|
|
@@ -1887,7 +1736,7 @@ export class Client extends ClientAbstract {
|
|
|
1887
1736
|
return await __classPrivateFieldGet(this, _Client_fileManager, "f").getCustomEmojiStickers(id);
|
|
1888
1737
|
}
|
|
1889
1738
|
/**
|
|
1890
|
-
* Set a chat's available reactions.
|
|
1739
|
+
* Set a chat's available reactions. User-only.
|
|
1891
1740
|
*
|
|
1892
1741
|
* @method ch
|
|
1893
1742
|
* @param chatId The identifier of the chat.
|
|
@@ -1949,7 +1798,7 @@ export class Client extends ClientAbstract {
|
|
|
1949
1798
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatPhoto(chatId);
|
|
1950
1799
|
}
|
|
1951
1800
|
/**
|
|
1952
|
-
* Delete all messages sent by a specific member of a chat.
|
|
1801
|
+
* Delete all messages sent by a specific member of a chat. User-only.
|
|
1953
1802
|
*
|
|
1954
1803
|
* @method ms
|
|
1955
1804
|
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
@@ -2200,7 +2049,7 @@ export class Client extends ClientAbstract {
|
|
|
2200
2049
|
return await __classPrivateFieldGet(this, _Client_accountManager, "f").getInactiveChats();
|
|
2201
2050
|
}
|
|
2202
2051
|
/**
|
|
2203
|
-
* Search the messages of a chat.
|
|
2052
|
+
* Search the messages of a chat. User-only.
|
|
2204
2053
|
*
|
|
2205
2054
|
* @method ms
|
|
2206
2055
|
* @param chatId The identifier of the chat to search the messages in.
|
|
@@ -2210,7 +2059,7 @@ export class Client extends ClientAbstract {
|
|
|
2210
2059
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").searchMessages(chatId, query, params);
|
|
2211
2060
|
}
|
|
2212
2061
|
/**
|
|
2213
|
-
* Set the number of boosts required to circument a chat's default restrictions.
|
|
2062
|
+
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
2214
2063
|
*
|
|
2215
2064
|
* @method ch
|
|
2216
2065
|
* @param chatId The identifier of the chat.
|
|
@@ -2306,7 +2155,7 @@ export class Client extends ClientAbstract {
|
|
|
2306
2155
|
}
|
|
2307
2156
|
}
|
|
2308
2157
|
_Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2309
|
-
await
|
|
2158
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), resolve);
|
|
2310
2159
|
}, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
|
|
2311
2160
|
__classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(UpdateManager.MAIN_BOX_ID).add(async () => {
|
|
2312
2161
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update);
|