@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
|
@@ -10,54 +10,56 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _Client_instances,
|
|
13
|
+
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;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.Client = exports.
|
|
16
|
-
const _0_deps_js_1 = require("../0_deps.js");
|
|
15
|
+
exports.Client = exports.handleMigrationError = exports.restartAuth = exports.Composer = void 0;
|
|
17
16
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
18
17
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
19
18
|
const _3_storage_js_1 = require("../3_storage.js");
|
|
20
19
|
const _3_types_js_1 = require("../3_types.js");
|
|
21
20
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
22
21
|
const _4_errors_js_1 = require("../4_errors.js");
|
|
23
|
-
const _0_client_abstract_js_1 = require("./0_client_abstract.js");
|
|
24
|
-
const _0_filters_js_1 = require("./0_filters.js");
|
|
25
|
-
const _0_message_js_1 = require("./0_message.js");
|
|
26
22
|
const _0_password_js_1 = require("./0_password.js");
|
|
27
|
-
const _0_types_js_1 = require("./0_types.js");
|
|
28
23
|
const _0_utilities_js_1 = require("./0_utilities.js");
|
|
29
24
|
const _1_account_manager_js_1 = require("./1_account_manager.js");
|
|
30
25
|
const _1_bot_info_manager_js_1 = require("./1_bot_info_manager.js");
|
|
26
|
+
const _1_client_encrypted_js_1 = require("./1_client_encrypted.js");
|
|
27
|
+
const _1_client_plain_js_1 = require("./1_client_plain.js");
|
|
31
28
|
const _1_composer_js_1 = require("./1_composer.js");
|
|
32
29
|
const _1_file_manager_js_1 = require("./1_file_manager.js");
|
|
33
30
|
const _1_network_statistics_manager_js_1 = require("./1_network_statistics_manager.js");
|
|
34
31
|
const _1_reaction_manager_js_1 = require("./1_reaction_manager.js");
|
|
35
32
|
const _1_update_manager_js_1 = require("./1_update_manager.js");
|
|
36
|
-
const _2_client_plain_js_1 = require("./2_client_plain.js");
|
|
37
33
|
const _2_message_manager_js_1 = require("./2_message_manager.js");
|
|
38
34
|
const _3_callback_query_manager_js_1 = require("./3_callback_query_manager.js");
|
|
39
35
|
const _3_chat_list_manager_js_1 = require("./3_chat_list_manager.js");
|
|
40
36
|
const _3_inline_query_manager_js_1 = require("./3_inline_query_manager.js");
|
|
41
37
|
const _3_story_manager_js_1 = require("./3_story_manager.js");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
exports.
|
|
45
|
-
const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
38
|
+
class Composer extends _1_composer_js_1.Composer {
|
|
39
|
+
}
|
|
40
|
+
exports.Composer = Composer;
|
|
46
41
|
function skipInvoke() {
|
|
47
42
|
return (_ctx, next) => next();
|
|
48
43
|
}
|
|
49
|
-
exports.skipInvoke = skipInvoke;
|
|
50
44
|
exports.restartAuth = Symbol("restartAuth");
|
|
51
|
-
|
|
45
|
+
exports.handleMigrationError = Symbol("handleMigrationError");
|
|
46
|
+
// global Client ID counter for logs
|
|
47
|
+
let id = 0;
|
|
48
|
+
const getEntity = Symbol();
|
|
49
|
+
const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
50
|
+
/**
|
|
51
|
+
* An MTKruto client.
|
|
52
|
+
*/
|
|
53
|
+
class Client extends Composer {
|
|
52
54
|
/**
|
|
53
55
|
* Constructs the client.
|
|
54
56
|
*
|
|
55
|
-
* @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the string
|
|
57
|
+
* @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.
|
|
56
58
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
57
59
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
58
60
|
*/
|
|
59
61
|
constructor(storage, apiId = 0, apiHash = "", params) {
|
|
60
|
-
super(
|
|
62
|
+
super();
|
|
61
63
|
_Client_instances.add(this);
|
|
62
64
|
Object.defineProperty(this, "apiId", {
|
|
63
65
|
enumerable: true,
|
|
@@ -71,11 +73,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
71
73
|
writable: true,
|
|
72
74
|
value: apiHash
|
|
73
75
|
});
|
|
74
|
-
|
|
75
|
-
_Client_sessionId.set(this, (0, _1_utilities_js_1.getRandomBigInt)(8, true, false));
|
|
76
|
-
_Client_state.set(this, { salt: 0n, seqNo: 0 });
|
|
77
|
-
_Client_promises.set(this, new Map());
|
|
78
|
-
_Client_toAcknowledge.set(this, new Set());
|
|
76
|
+
_Client_client.set(this, void 0);
|
|
79
77
|
_Client_guaranteeUpdateDelivery.set(this, void 0);
|
|
80
78
|
_Client_updateManager.set(this, void 0);
|
|
81
79
|
_Client_networkStatisticsManager.set(this, void 0);
|
|
@@ -138,16 +136,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
138
136
|
value: void 0
|
|
139
137
|
});
|
|
140
138
|
_Client_publicKeys.set(this, void 0);
|
|
141
|
-
_Client_autoStart.set(this, void 0);
|
|
142
139
|
_Client_ignoreOutgoing.set(this, void 0);
|
|
143
|
-
_Client_prefixes.set(this, void 0);
|
|
144
140
|
_Client_storeMessages.set(this, void 0);
|
|
145
|
-
_Client_id.set(this, void 0);
|
|
146
|
-
_Client_L.set(this, void 0);
|
|
147
141
|
_Client_Lauthorize.set(this, void 0);
|
|
148
|
-
_Client_LreceiveLoop.set(this, void 0);
|
|
149
142
|
_Client_LpingLoop.set(this, void 0);
|
|
150
|
-
_Client_Linvoke.set(this, void 0);
|
|
151
143
|
_Client_LhandleMigrationError.set(this, void 0);
|
|
152
144
|
_Client_L$initConncetion.set(this, void 0);
|
|
153
145
|
_Client_namespaceProxies.set(this, (() => {
|
|
@@ -289,6 +281,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
289
281
|
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
290
282
|
return this.sendDocument(chatId, document, { ...params, replyToMessageId });
|
|
291
283
|
},
|
|
284
|
+
replySticker: (sticker, params) => {
|
|
285
|
+
const { chatId, messageId } = mustGetMsg();
|
|
286
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
287
|
+
return this.sendSticker(chatId, sticker, { ...params, replyToMessageId });
|
|
288
|
+
},
|
|
292
289
|
replyContact: (firstName, number, params) => {
|
|
293
290
|
const { chatId, messageId } = mustGetMsg();
|
|
294
291
|
const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
|
|
@@ -399,6 +396,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
399
396
|
const inlineMessageId = mustGetInlineMsgId();
|
|
400
397
|
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
401
398
|
},
|
|
399
|
+
editInlineMessageLiveLocation: (latitude, longitude, params) => {
|
|
400
|
+
const inlineMessageId = mustGetInlineMsgId();
|
|
401
|
+
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
402
|
+
},
|
|
402
403
|
editInlineMessageReplyMarkup: (params) => {
|
|
403
404
|
const inlineMessageId = mustGetInlineMsgId();
|
|
404
405
|
return this.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
@@ -407,6 +408,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
407
408
|
const { chatId } = mustGetMsg();
|
|
408
409
|
return this.editMessageText(chatId, messageId, text, params);
|
|
409
410
|
},
|
|
411
|
+
editMessageLiveLocation: (messageId, latitude, longitude, params) => {
|
|
412
|
+
const { chatId } = mustGetMsg();
|
|
413
|
+
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
414
|
+
},
|
|
410
415
|
editMessageReplyMarkup: (messageId, params) => {
|
|
411
416
|
const { chatId } = mustGetMsg();
|
|
412
417
|
return this.editMessageReplyMarkup(chatId, messageId, params);
|
|
@@ -517,39 +522,35 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
517
522
|
unblock: () => {
|
|
518
523
|
return this.unblockUser(mustGetUserId());
|
|
519
524
|
},
|
|
525
|
+
getChatMember: (userId) => {
|
|
526
|
+
const { chatId } = mustGetMsg();
|
|
527
|
+
return this.getChatMember(chatId, userId);
|
|
528
|
+
},
|
|
529
|
+
setChatStickerSet: (setName) => {
|
|
530
|
+
const { chatId } = mustGetMsg();
|
|
531
|
+
return this.setChatStickerSet(chatId, setName);
|
|
532
|
+
},
|
|
533
|
+
deleteChatStickerSet: () => {
|
|
534
|
+
const { chatId } = mustGetMsg();
|
|
535
|
+
return this.deleteChatStickerSet(chatId);
|
|
536
|
+
},
|
|
520
537
|
};
|
|
521
538
|
return (0, _1_utilities_js_1.cleanObject)(context);
|
|
522
539
|
});
|
|
523
540
|
_Client_lastPropagatedConnectionState.set(this, null);
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
try {
|
|
531
|
-
const connectionState = connected ? "ready" : "notConnected";
|
|
532
|
-
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
533
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
finally {
|
|
537
|
-
unlock();
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
}).bind(this)
|
|
541
|
-
});
|
|
541
|
+
_Client_stateChangeHandler.set(this, ((connected) => {
|
|
542
|
+
const connectionState = connected ? "ready" : "notConnected";
|
|
543
|
+
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
544
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
545
|
+
}
|
|
546
|
+
}).bind(this));
|
|
542
547
|
_Client_storageInited.set(this, false);
|
|
543
|
-
_Client_connectMutex.set(this, new _1_utilities_js_1.Mutex());
|
|
544
548
|
_Client_connectionInited.set(this, false);
|
|
545
549
|
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
546
|
-
|
|
550
|
+
_Client_pingLoopStarted.set(this, false);
|
|
547
551
|
_Client_pingLoopAbortController.set(this, null);
|
|
548
552
|
_Client_pingInterval.set(this, 60 * 1000); // 60 seconds
|
|
549
553
|
_Client_lastUpdates.set(this, new Date());
|
|
550
|
-
_Client_pingLoopStarted.set(this, false);
|
|
551
|
-
_Client_autoStarted.set(this, false);
|
|
552
|
-
_Client_lastMsgId.set(this, 0n);
|
|
553
554
|
_Client_handleInvokeError.set(this, skipInvoke());
|
|
554
555
|
/**
|
|
555
556
|
* Invokes a function waiting and returning its reply if the second parameter is not `true`. Requires the client
|
|
@@ -577,8 +578,38 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
577
578
|
})
|
|
578
579
|
});
|
|
579
580
|
_Client_lastGetMe.set(this, null);
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
__classPrivateFieldSet(this, _Client_client, new _1_client_encrypted_js_1.ClientEncrypted(params), "f");
|
|
582
|
+
__classPrivateFieldGet(this, _Client_client, "f").stateChangeHandler = __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").bind(this);
|
|
583
|
+
__classPrivateFieldGet(this, _Client_client, "f").handlers = {
|
|
584
|
+
serverSaltReassigned: async (newServerSalt) => {
|
|
585
|
+
await this.storage.setServerSalt(newServerSalt);
|
|
586
|
+
},
|
|
587
|
+
updates: (updates, call, callback) => {
|
|
588
|
+
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(updates, true, call, callback);
|
|
589
|
+
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
590
|
+
},
|
|
591
|
+
result: async (result, callback) => {
|
|
592
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
593
|
+
callback();
|
|
594
|
+
},
|
|
595
|
+
error: async (_err, source) => {
|
|
596
|
+
switch (source) {
|
|
597
|
+
case "deserialization":
|
|
598
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
599
|
+
break;
|
|
600
|
+
case "decryption":
|
|
601
|
+
try {
|
|
602
|
+
await this.disconnect();
|
|
603
|
+
}
|
|
604
|
+
catch {
|
|
605
|
+
//
|
|
606
|
+
}
|
|
607
|
+
await this.connect();
|
|
608
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
};
|
|
582
613
|
this.storage = typeof storage === "string" ? new _3_storage_js_1.StorageMemory(storage) : storage ?? new _3_storage_js_1.StorageMemory();
|
|
583
614
|
__classPrivateFieldSet(this, _Client_storeMessages, params?.storeMessages ?? false, "f");
|
|
584
615
|
if (!__classPrivateFieldGet(this, _Client_storeMessages, "f")) {
|
|
@@ -595,16 +626,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
595
626
|
this.systemLangCode = params?.systemLangCode ?? _4_constants_js_1.SYSTEM_LANG_CODE;
|
|
596
627
|
this.systemVersion = params?.systemVersion ?? _4_constants_js_1.SYSTEM_VERSION;
|
|
597
628
|
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
598
|
-
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
599
629
|
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
600
|
-
|
|
630
|
+
if (params?.prefixes) {
|
|
631
|
+
this.prefixes = params?.prefixes;
|
|
632
|
+
}
|
|
601
633
|
__classPrivateFieldSet(this, _Client_guaranteeUpdateDelivery, params?.guaranteeUpdateDelivery ?? false, "f");
|
|
602
|
-
|
|
603
|
-
const L = __classPrivateFieldSet(this, _Client_L, (0, _1_utilities_js_1.getLogger)("Client").client(__classPrivateFieldGet(this, _Client_id, "f")), "f");
|
|
634
|
+
const L = (0, _1_utilities_js_1.getLogger)("Client").client(id++);
|
|
604
635
|
__classPrivateFieldSet(this, _Client_Lauthorize, L.branch("authorize"), "f");
|
|
605
|
-
__classPrivateFieldSet(this, _Client_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
606
636
|
__classPrivateFieldSet(this, _Client_LpingLoop, L.branch("pingLoop"), "f");
|
|
607
|
-
__classPrivateFieldSet(this, _Client_Linvoke, L.branch("invoke"), "f");
|
|
608
637
|
__classPrivateFieldSet(this, _Client_LhandleMigrationError, L.branch("[handleMigrationError]"), "f");
|
|
609
638
|
__classPrivateFieldSet(this, _Client_L$initConncetion, L.branch("#initConnection"), "f");
|
|
610
639
|
const c = {
|
|
@@ -614,7 +643,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
614
643
|
messageStorage: this.messageStorage,
|
|
615
644
|
guaranteeUpdateDelivery: __classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f"),
|
|
616
645
|
setConnectionState: __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).bind(this),
|
|
617
|
-
resetConnectionState: () => this.
|
|
646
|
+
resetConnectionState: () => __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").call(this, this.connected),
|
|
618
647
|
getSelfId: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).bind(this),
|
|
619
648
|
getInputPeer: this.getInputPeer.bind(this),
|
|
620
649
|
getInputChannel: this.getInputChannel.bind(this),
|
|
@@ -623,8 +652,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
623
652
|
handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
|
|
624
653
|
parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
|
|
625
654
|
apiFactory: (dcId) => {
|
|
626
|
-
const client = new Client((!dcId || dcId == this.dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
627
|
-
transportProvider: this.transportProvider,
|
|
655
|
+
const client = new Client((!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
656
|
+
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
628
657
|
appVersion: this.appVersion,
|
|
629
658
|
deviceModel: this.deviceModel,
|
|
630
659
|
langCode: this.langCode,
|
|
@@ -633,7 +662,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
633
662
|
systemVersion: this.systemVersion,
|
|
634
663
|
cdn: true,
|
|
635
664
|
});
|
|
636
|
-
__classPrivateFieldGet(client,
|
|
665
|
+
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
637
666
|
client.invoke.use(async (ctx, next) => {
|
|
638
667
|
if (ctx.error instanceof _4_errors_js_1.AuthKeyUnregistered && dcId) {
|
|
639
668
|
try {
|
|
@@ -653,14 +682,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
653
682
|
api: client.api,
|
|
654
683
|
connect: async () => {
|
|
655
684
|
await client.connect();
|
|
656
|
-
if (dcId && dcId != this.dcId) {
|
|
685
|
+
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
657
686
|
let dc = String(dcId);
|
|
658
|
-
if (this.dcId < 0) {
|
|
687
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
659
688
|
dc += "-test";
|
|
660
689
|
}
|
|
661
690
|
await client.setDc(dc);
|
|
662
691
|
}
|
|
663
|
-
await __classPrivateFieldGet(client, _Client_instances, "m", _Client_initConnection).call(client);
|
|
664
692
|
},
|
|
665
693
|
disconnect: client.disconnect.bind(client),
|
|
666
694
|
};
|
|
@@ -681,8 +709,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
681
709
|
__classPrivateFieldSet(this, _Client_chatListManager, new _3_chat_list_manager_js_1.ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
682
710
|
__classPrivateFieldSet(this, _Client_accountManager, new _1_account_manager_js_1.AccountManager(c), "f");
|
|
683
711
|
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
684
|
-
const transportProvider = this.transportProvider;
|
|
685
|
-
this.transportProvider = (params) => {
|
|
712
|
+
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
713
|
+
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
686
714
|
const transport = transportProvider(params);
|
|
687
715
|
transport.connection.callback = __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getTransportReadWriteCallback();
|
|
688
716
|
return transport;
|
|
@@ -691,7 +719,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
691
719
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
692
720
|
(0, _1_utilities_js_1.drop)((async () => {
|
|
693
721
|
if (connectionState == "notConnected") {
|
|
694
|
-
if (
|
|
722
|
+
if (this.disconnected) {
|
|
695
723
|
L.debug("not reconnecting");
|
|
696
724
|
return;
|
|
697
725
|
}
|
|
@@ -728,6 +756,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
728
756
|
});
|
|
729
757
|
}
|
|
730
758
|
}
|
|
759
|
+
// direct ClientEncrypted property proxies
|
|
760
|
+
get connected() {
|
|
761
|
+
return __classPrivateFieldGet(this, _Client_client, "f").connected;
|
|
762
|
+
}
|
|
763
|
+
get disconnected() {
|
|
764
|
+
return __classPrivateFieldGet(this, _Client_client, "f").disconnected;
|
|
765
|
+
}
|
|
731
766
|
/**
|
|
732
767
|
* Sets the DC and resets the auth key stored in the session provider
|
|
733
768
|
* if the stored DC was not the same as the `dc` parameter.
|
|
@@ -741,7 +776,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
741
776
|
await this.storage.setAuthKey(null);
|
|
742
777
|
await this.storage.getAuthKey();
|
|
743
778
|
}
|
|
744
|
-
|
|
779
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
745
780
|
}
|
|
746
781
|
/**
|
|
747
782
|
* Loads the session if `setDc` was not called, initializes and connnects
|
|
@@ -749,58 +784,43 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
749
784
|
* Before establishing the connection, the session is saved.
|
|
750
785
|
*/
|
|
751
786
|
async connect() {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
if (authKey == null) {
|
|
760
|
-
const plain = new _2_client_plain_js_1.ClientPlain({ initialDc: this.initialDc, transportProvider: this.transportProvider, cdn: this.cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
|
|
761
|
-
const dc = await this.storage.getDc();
|
|
762
|
-
if (dc != null) {
|
|
763
|
-
plain.setDc(dc);
|
|
764
|
-
}
|
|
765
|
-
await plain.connect();
|
|
766
|
-
const [authKey, salt] = await plain.createAuthKey();
|
|
767
|
-
await plain.disconnect();
|
|
768
|
-
await this.storage.setAuthKey(authKey);
|
|
769
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
|
|
770
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = salt;
|
|
771
|
-
await this.storage.setServerSalt(salt);
|
|
772
|
-
}
|
|
773
|
-
else {
|
|
774
|
-
if (__classPrivateFieldGet(this, _Client_state, "f").salt == 0n) {
|
|
775
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = await this.storage.getServerSalt() ?? 0n;
|
|
776
|
-
}
|
|
777
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
|
|
787
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
788
|
+
const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
|
|
789
|
+
if (authKey != null && dc != null) {
|
|
790
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
791
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setDc(dc); // TODO: remove await
|
|
792
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").serverSalt == 0n) {
|
|
793
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = await this.storage.getServerSalt() ?? 0n;
|
|
778
794
|
}
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
const plain = new _1_client_plain_js_1.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") });
|
|
779
798
|
const dc = await this.storage.getDc();
|
|
780
799
|
if (dc != null) {
|
|
781
|
-
|
|
800
|
+
plain.setDc(dc);
|
|
801
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
782
802
|
}
|
|
783
|
-
await
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
__classPrivateFieldGet(this,
|
|
788
|
-
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_receiveLoop).call(this));
|
|
789
|
-
if (__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
|
|
790
|
-
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
finally {
|
|
794
|
-
unlock();
|
|
803
|
+
await plain.connect();
|
|
804
|
+
const [authKey, serverSalt] = await plain.createAuthKey();
|
|
805
|
+
(0, _1_utilities_js_1.drop)(plain.disconnect());
|
|
806
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
807
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = serverSalt;
|
|
795
808
|
}
|
|
809
|
+
await __classPrivateFieldGet(this, _Client_client, "f").connect();
|
|
810
|
+
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)]);
|
|
796
811
|
}
|
|
797
|
-
async
|
|
812
|
+
async reconnect(dc) {
|
|
813
|
+
await __classPrivateFieldGet(this, _Client_client, "f").reconnect(dc);
|
|
814
|
+
}
|
|
815
|
+
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() {
|
|
816
|
+
const apiId = this.apiId || await this.storage.getApiId();
|
|
817
|
+
if (!apiId) {
|
|
818
|
+
throw new Error("apiId not set");
|
|
819
|
+
}
|
|
820
|
+
return apiId;
|
|
821
|
+
}, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
798
822
|
__classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
|
|
799
823
|
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
800
|
-
}, _Client_setAuth = async function _Client_setAuth(key) {
|
|
801
|
-
const hash = await (0, _1_utilities_js_1.sha1)(key);
|
|
802
|
-
const id = (0, _1_utilities_js_1.bigIntFromBuffer)(hash.slice(-8), true, false);
|
|
803
|
-
__classPrivateFieldSet(this, _Client_auth, { key, id }, "f");
|
|
804
824
|
}, _Client_initStorage = async function _Client_initStorage() {
|
|
805
825
|
if (!__classPrivateFieldGet(this, _Client_storageInited, "f")) {
|
|
806
826
|
await this.storage.initialize();
|
|
@@ -811,7 +831,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
811
831
|
}
|
|
812
832
|
}, exports.handleMigrationError)](err) {
|
|
813
833
|
let newDc = String(err.dc);
|
|
814
|
-
if (Math.abs(this.dcId) >= 10000) {
|
|
834
|
+
if (Math.abs(__classPrivateFieldGet(this, _Client_client, "f").dcId) >= 10000) {
|
|
815
835
|
newDc += "-test";
|
|
816
836
|
}
|
|
817
837
|
await this.reconnect(newDc);
|
|
@@ -819,7 +839,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
819
839
|
}
|
|
820
840
|
async disconnect() {
|
|
821
841
|
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
822
|
-
await
|
|
842
|
+
await __classPrivateFieldGet(this, _Client_client, "f").disconnect();
|
|
823
843
|
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
|
|
824
844
|
}
|
|
825
845
|
/**
|
|
@@ -840,13 +860,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
840
860
|
* [2]: https://core.telegram.org/method/updates.getState
|
|
841
861
|
*/
|
|
842
862
|
async authorize(params) {
|
|
843
|
-
if (!this.apiId) {
|
|
844
|
-
throw new Error("apiId not set");
|
|
845
|
-
}
|
|
846
|
-
if (!this.apiHash) {
|
|
847
|
-
throw new Error("apiHash not set");
|
|
848
|
-
}
|
|
849
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
850
863
|
try {
|
|
851
864
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
|
|
852
865
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -859,6 +872,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
859
872
|
throw err;
|
|
860
873
|
}
|
|
861
874
|
}
|
|
875
|
+
const apiId = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this);
|
|
876
|
+
if (!this.apiHash) {
|
|
877
|
+
throw new Error("apiHash not set");
|
|
878
|
+
}
|
|
862
879
|
if (typeof params === "undefined") {
|
|
863
880
|
const loginType = (0, _1_utilities_js_1.mustPromptOneOf)("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
864
881
|
if (loginType == "b") {
|
|
@@ -872,15 +889,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
872
889
|
if (typeof params === "string") {
|
|
873
890
|
while (true) {
|
|
874
891
|
try {
|
|
875
|
-
const auth = await this.api.auth.importBotAuthorization({ api_id:
|
|
876
|
-
|
|
892
|
+
const auth = await this.api.auth.importBotAuthorization({ api_id: apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 });
|
|
893
|
+
await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
|
|
877
894
|
await this.storage.setAccountType("bot");
|
|
878
895
|
break;
|
|
879
896
|
}
|
|
880
897
|
catch (err) {
|
|
881
898
|
if (err instanceof _4_errors_js_1.Migrate) {
|
|
882
899
|
await this[exports.handleMigrationError](err);
|
|
883
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
884
900
|
continue;
|
|
885
901
|
}
|
|
886
902
|
else {
|
|
@@ -917,7 +933,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
917
933
|
catch (err) {
|
|
918
934
|
if (err instanceof _4_errors_js_1.Migrate) {
|
|
919
935
|
await this[exports.handleMigrationError](err);
|
|
920
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
921
936
|
sentCode = await sendCode();
|
|
922
937
|
}
|
|
923
938
|
else {
|
|
@@ -945,7 +960,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
945
960
|
phone_code: code,
|
|
946
961
|
phone_code_hash: sentCode.phone_code_hash,
|
|
947
962
|
});
|
|
948
|
-
|
|
963
|
+
await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
|
|
949
964
|
await this.storage.setAccountType("user");
|
|
950
965
|
__classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
|
|
951
966
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -974,7 +989,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
974
989
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
975
990
|
const input = await (0, _0_password_js_1.checkPassword)(password, ap);
|
|
976
991
|
const auth = await this.api.auth.checkPassword({ password: input });
|
|
977
|
-
|
|
992
|
+
await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
|
|
978
993
|
await this.storage.setAccountType("user");
|
|
979
994
|
__classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
|
|
980
995
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -1015,14 +1030,19 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1015
1030
|
return this.invoke(function_, true);
|
|
1016
1031
|
}
|
|
1017
1032
|
exportAuthString() {
|
|
1018
|
-
return this.storage.exportAuthString();
|
|
1033
|
+
return this.storage.exportAuthString(this.apiId);
|
|
1019
1034
|
}
|
|
1020
1035
|
async importAuthString(authString) {
|
|
1021
1036
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
1022
1037
|
await this.storage.importAuthString(authString);
|
|
1023
1038
|
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
1041
|
+
*
|
|
1042
|
+
* @param id The identifier of the chat.
|
|
1043
|
+
*/
|
|
1024
1044
|
async getInputPeer(id) {
|
|
1025
|
-
if (id === "me") {
|
|
1045
|
+
if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
|
|
1026
1046
|
return new _2_tl_js_1.types.InputPeerSelf();
|
|
1027
1047
|
}
|
|
1028
1048
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
@@ -1036,6 +1056,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1036
1056
|
}
|
|
1037
1057
|
return inputPeer;
|
|
1038
1058
|
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
|
|
1061
|
+
*
|
|
1062
|
+
* @param id The identifier of the channel or the supergroup.
|
|
1063
|
+
*/
|
|
1039
1064
|
async getInputChannel(id) {
|
|
1040
1065
|
const inputPeer = await this.getInputPeer(id);
|
|
1041
1066
|
if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerChannel)) {
|
|
@@ -1043,6 +1068,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1043
1068
|
}
|
|
1044
1069
|
return new _2_tl_js_1.types.InputChannel(inputPeer);
|
|
1045
1070
|
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Get a user's inputUser. Useful when calling API functions directly.
|
|
1073
|
+
*
|
|
1074
|
+
* @param id The identifier of the user.
|
|
1075
|
+
*/
|
|
1046
1076
|
async getInputUser(id) {
|
|
1047
1077
|
const inputPeer = await this.getInputPeer(id);
|
|
1048
1078
|
if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerUser)) {
|
|
@@ -1050,152 +1080,19 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1050
1080
|
}
|
|
1051
1081
|
return new _2_tl_js_1.types.InputUser(inputPeer);
|
|
1052
1082
|
}
|
|
1053
|
-
async [(
|
|
1054
|
-
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
1055
|
-
await this.api.initConnection({
|
|
1056
|
-
api_id: this.apiId,
|
|
1057
|
-
app_version: this.appVersion,
|
|
1058
|
-
device_model: this.deviceModel,
|
|
1059
|
-
lang_code: this.langCode,
|
|
1060
|
-
lang_pack: this.langPack,
|
|
1061
|
-
query: new _2_tl_js_1.functions.invokeWithLayer({
|
|
1062
|
-
layer: _4_constants_js_1.LAYER,
|
|
1063
|
-
query: new _2_tl_js_1.functions.help.getConfig(),
|
|
1064
|
-
}),
|
|
1065
|
-
system_lang_code: this.systemLangCode,
|
|
1066
|
-
system_version: this.systemVersion,
|
|
1067
|
-
});
|
|
1068
|
-
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
1069
|
-
__classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
|
|
1070
|
-
}
|
|
1071
|
-
}, _Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1083
|
+
async [(_Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1072
1084
|
if (__classPrivateFieldGet(this, _Client_lastPropagatedAuthorizationState, "f") != authorized) {
|
|
1073
|
-
await
|
|
1085
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { authorizationState: { authorized } }), _0_utilities_js_1.resolve);
|
|
1074
1086
|
__classPrivateFieldSet(this, _Client_lastPropagatedAuthorizationState, authorized, "f");
|
|
1075
1087
|
}
|
|
1076
1088
|
}, _Client_getSelfId = async function _Client_getSelfId() {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
return __classPrivateFieldGet(this, _Client_selfId, "f");
|
|
1081
|
-
}, _Client_receiveLoop = async function _Client_receiveLoop() {
|
|
1082
|
-
if (!__classPrivateFieldGet(this, _Client_auth, "f") || !this.transport) {
|
|
1083
|
-
throw new _0_types_js_1.ConnectionError("Not connected");
|
|
1084
|
-
}
|
|
1085
|
-
while (this.connected) {
|
|
1086
|
-
try {
|
|
1087
|
-
if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= _4_constants_js_1.ACK_THRESHOLD) {
|
|
1088
|
-
await this.send(new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
|
|
1089
|
-
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
|
|
1090
|
-
}
|
|
1091
|
-
const buffer = await this.transport.transport.receive();
|
|
1092
|
-
__classPrivateFieldGet(this, _Client_L, "f").inBin(buffer);
|
|
1093
|
-
let decrypted;
|
|
1094
|
-
try {
|
|
1095
|
-
decrypted = await ((0, _0_message_js_1.decryptMessage)(buffer, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_sessionId, "f")));
|
|
1096
|
-
__classPrivateFieldGet(this, _Client_L, "f").in(decrypted);
|
|
1097
|
-
}
|
|
1098
|
-
catch (err) {
|
|
1099
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to decrypt message:", err);
|
|
1100
|
-
(0, _1_utilities_js_1.drop)((async () => {
|
|
1101
|
-
try {
|
|
1102
|
-
await this.disconnect();
|
|
1103
|
-
}
|
|
1104
|
-
catch {
|
|
1105
|
-
//
|
|
1106
|
-
}
|
|
1107
|
-
await this.connect();
|
|
1108
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("decryption");
|
|
1109
|
-
})());
|
|
1110
|
-
continue;
|
|
1111
|
-
}
|
|
1112
|
-
const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
|
|
1113
|
-
for (const message of messages) {
|
|
1114
|
-
let body = message.body;
|
|
1115
|
-
if (body instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
1116
|
-
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
|
|
1117
|
-
}
|
|
1118
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("received", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
|
|
1119
|
-
if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
|
|
1120
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(body, true);
|
|
1121
|
-
}
|
|
1122
|
-
else if (body instanceof _2_tl_js_1.types.New_session_created) {
|
|
1123
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
|
|
1124
|
-
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
1125
|
-
}
|
|
1126
|
-
else if (message.body instanceof _2_tl_js_1.RPCResult) {
|
|
1127
|
-
let result = message.body.result;
|
|
1128
|
-
if (result instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
1129
|
-
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
|
|
1130
|
-
}
|
|
1131
|
-
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
1132
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
|
|
1133
|
-
}
|
|
1134
|
-
else {
|
|
1135
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
|
|
1136
|
-
}
|
|
1137
|
-
const messageId = message.body.messageId;
|
|
1138
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
|
|
1139
|
-
const resolvePromise = () => {
|
|
1140
|
-
if (promise) {
|
|
1141
|
-
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
1142
|
-
promise.reject((0, _4_errors_js_1.upgradeInstance)(result, promise.call));
|
|
1143
|
-
}
|
|
1144
|
-
else {
|
|
1145
|
-
promise.resolve(result);
|
|
1146
|
-
}
|
|
1147
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
|
|
1148
|
-
}
|
|
1149
|
-
};
|
|
1150
|
-
if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
|
|
1151
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(result, true, promise?.call, resolvePromise);
|
|
1152
|
-
}
|
|
1153
|
-
else {
|
|
1154
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
1155
|
-
resolvePromise();
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
else if (message.body instanceof _2_tl_js_1.types.Pong) {
|
|
1159
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
|
|
1160
|
-
if (promise) {
|
|
1161
|
-
promise.resolve(message.body);
|
|
1162
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
1166
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("server salt reassigned");
|
|
1167
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
|
|
1168
|
-
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
1169
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
|
|
1170
|
-
if (promise) {
|
|
1171
|
-
promise.resolve(message.body);
|
|
1172
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
catch (err) {
|
|
1179
|
-
if (!this.connected) {
|
|
1180
|
-
break;
|
|
1181
|
-
}
|
|
1182
|
-
else if (err instanceof _2_tl_js_1.TLError) {
|
|
1183
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to deserialize:", err);
|
|
1184
|
-
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("deserialize"));
|
|
1185
|
-
}
|
|
1186
|
-
else {
|
|
1187
|
-
__classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("unexpected error:", err);
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
if (!this.connected) {
|
|
1192
|
-
for (const { reject } of __classPrivateFieldGet(this, _Client_promises, "f").values()) {
|
|
1193
|
-
reject(new _0_types_js_1.ConnectionError("Connection was closed"));
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
else {
|
|
1197
|
-
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1089
|
+
const id = await this.storage.getAccountId();
|
|
1090
|
+
if (id == null) {
|
|
1091
|
+
throw new Error("Unauthorized");
|
|
1198
1092
|
}
|
|
1093
|
+
return id;
|
|
1094
|
+
}, _Client_startPingLoop = function _Client_startPingLoop() {
|
|
1095
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1199
1096
|
}, _Client_pingLoop = async function _Client_pingLoop() {
|
|
1200
1097
|
__classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
|
|
1201
1098
|
while (this.connected) {
|
|
@@ -1227,72 +1124,46 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1227
1124
|
let n = 1;
|
|
1228
1125
|
while (true) {
|
|
1229
1126
|
try {
|
|
1230
|
-
if (!__classPrivateFieldGet(this,
|
|
1231
|
-
|
|
1232
|
-
await this.
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
const message = new _2_tl_js_1.Message_(messageId, seqNo, function_);
|
|
1248
|
-
const payload = await (0, _0_message_js_1.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"));
|
|
1249
|
-
await this.transport.transport.send(payload);
|
|
1250
|
-
__classPrivateFieldGet(this, _Client_L, "f").out(message);
|
|
1251
|
-
__classPrivateFieldGet(this, _Client_L, "f").outBin(payload);
|
|
1252
|
-
__classPrivateFieldGet(this, _Client_Linvoke, "f").debug("invoked", function_[_2_tl_js_1.name]);
|
|
1253
|
-
if (noWait) {
|
|
1254
|
-
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
|
|
1255
|
-
resolve: (result) => {
|
|
1256
|
-
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
1257
|
-
(0, _1_utilities_js_1.drop)(this.invoke(function_, true));
|
|
1258
|
-
}
|
|
1259
|
-
},
|
|
1260
|
-
reject: () => { },
|
|
1261
|
-
call: function_,
|
|
1262
|
-
});
|
|
1263
|
-
return;
|
|
1264
|
-
}
|
|
1265
|
-
let result;
|
|
1266
|
-
try {
|
|
1267
|
-
result = await new Promise((resolve, reject) => {
|
|
1268
|
-
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, { resolve, reject, call: function_ });
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
catch (err) {
|
|
1272
|
-
if (err instanceof _4_errors_js_1.AuthKeyUnregistered) {
|
|
1273
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, false);
|
|
1274
|
-
}
|
|
1275
|
-
throw err;
|
|
1276
|
-
}
|
|
1277
|
-
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
1278
|
-
return await this.invoke(function_);
|
|
1127
|
+
if (function_ instanceof _2_tl_js_1.functions.Function && !__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
1128
|
+
const result = await __classPrivateFieldGet(this, _Client_client, "f").invoke(new _2_tl_js_1.functions.initConnection({
|
|
1129
|
+
api_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this),
|
|
1130
|
+
app_version: this.appVersion,
|
|
1131
|
+
device_model: this.deviceModel,
|
|
1132
|
+
lang_code: this.langCode,
|
|
1133
|
+
lang_pack: this.langPack,
|
|
1134
|
+
query: new _2_tl_js_1.functions.invokeWithLayer({
|
|
1135
|
+
layer: _4_constants_js_1.LAYER,
|
|
1136
|
+
query: function_,
|
|
1137
|
+
}),
|
|
1138
|
+
system_lang_code: this.systemLangCode,
|
|
1139
|
+
system_version: this.systemVersion,
|
|
1140
|
+
}), noWait);
|
|
1141
|
+
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
1142
|
+
__classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
|
|
1143
|
+
return result;
|
|
1279
1144
|
}
|
|
1280
1145
|
else {
|
|
1281
|
-
|
|
1282
|
-
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1283
|
-
__classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
|
|
1284
|
-
}
|
|
1285
|
-
return result;
|
|
1146
|
+
return await __classPrivateFieldGet(this, _Client_client, "f").invoke(function_, noWait);
|
|
1286
1147
|
}
|
|
1287
1148
|
}
|
|
1288
1149
|
catch (err) {
|
|
1289
|
-
if (
|
|
1150
|
+
if (err instanceof _4_errors_js_1.ConnectionNotInited) {
|
|
1151
|
+
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
1152
|
+
continue;
|
|
1153
|
+
}
|
|
1154
|
+
else if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
|
|
1290
1155
|
continue;
|
|
1291
1156
|
}
|
|
1292
1157
|
else {
|
|
1293
1158
|
throw err;
|
|
1294
1159
|
}
|
|
1295
1160
|
}
|
|
1161
|
+
finally {
|
|
1162
|
+
if (!__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
|
|
1163
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_startPingLoop).call(this);
|
|
1164
|
+
__classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1296
1167
|
}
|
|
1297
1168
|
}, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
|
|
1298
1169
|
const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUser({ user_id: userId, access_hash: 0n })] });
|
|
@@ -1373,77 +1244,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1373
1244
|
}
|
|
1374
1245
|
return await this.messageStorage.getEntity(id);
|
|
1375
1246
|
}
|
|
1376
|
-
use(...middleware) {
|
|
1377
|
-
const composer = new _1_composer_js_1.Composer(...middleware);
|
|
1378
|
-
__classPrivateFieldSet(this, _Client_handle, (0, _1_composer_js_1.concat)(__classPrivateFieldGet(this, _Client_handle, "f"), (0, _1_composer_js_1.flatten)(composer)), "f");
|
|
1379
|
-
return composer;
|
|
1380
|
-
}
|
|
1381
|
-
branch(predicate, trueHandler_, falseHandler_) {
|
|
1382
|
-
const trueHandler = (0, _1_composer_js_1.flatten)(trueHandler_);
|
|
1383
|
-
const falseHandler = (0, _1_composer_js_1.flatten)(falseHandler_);
|
|
1384
|
-
return this.use(async (upd, next) => {
|
|
1385
|
-
if (await predicate(upd)) {
|
|
1386
|
-
await trueHandler(upd, next);
|
|
1387
|
-
}
|
|
1388
|
-
else {
|
|
1389
|
-
await falseHandler(upd, next);
|
|
1390
|
-
}
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
filter(predicate, ...middleware) {
|
|
1394
|
-
const composer = new _1_composer_js_1.Composer(...middleware);
|
|
1395
|
-
this.branch(predicate, composer, _1_composer_js_1.skip);
|
|
1396
|
-
return composer;
|
|
1397
|
-
}
|
|
1398
|
-
on(filter, ...middleware) {
|
|
1399
|
-
return this.filter((ctx) => {
|
|
1400
|
-
return (0, _0_filters_js_1.match)(filter, ctx);
|
|
1401
|
-
}, ...middleware);
|
|
1402
|
-
}
|
|
1403
|
-
command(commands, ...middleware) {
|
|
1404
|
-
const commands__ = typeof commands === "object" && "names" in commands ? commands.names : commands;
|
|
1405
|
-
const commands_ = Array.isArray(commands__) ? commands__ : [commands__];
|
|
1406
|
-
const prefixes_ = typeof commands === "object" && "prefixes" in commands ? commands.prefixes : (__classPrivateFieldGet(this, _Client_prefixes, "f") ?? []);
|
|
1407
|
-
const prefixes = Array.isArray(prefixes_) ? prefixes_ : [prefixes_];
|
|
1408
|
-
for (const left of prefixes) {
|
|
1409
|
-
for (const right of prefixes) {
|
|
1410
|
-
if (left == right) {
|
|
1411
|
-
continue;
|
|
1412
|
-
}
|
|
1413
|
-
if (left.startsWith(right) || right.startsWith(left)) {
|
|
1414
|
-
throw new Error("Intersecting prefixes");
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
return this.on("message:text").filter((ctx) => {
|
|
1419
|
-
const prefixes_ = prefixes.length == 0 ? [!ctx.me?.isBot ? "\\" : "/"] : prefixes;
|
|
1420
|
-
if (prefixes_.length == 0) {
|
|
1421
|
-
return false;
|
|
1422
|
-
}
|
|
1423
|
-
const cmd = ctx.message.text.split(/\s/, 1)[0];
|
|
1424
|
-
const prefix = prefixes_.find((v) => cmd.startsWith(v));
|
|
1425
|
-
if (prefix === undefined) {
|
|
1426
|
-
return false;
|
|
1427
|
-
}
|
|
1428
|
-
if (cmd.includes("@")) {
|
|
1429
|
-
const username = cmd.split("@", 2)[1];
|
|
1430
|
-
if (username.toLowerCase() !== ctx.me.username?.toLowerCase()) {
|
|
1431
|
-
return false;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
const command_ = cmd.split("@", 1)[0].split(prefix, 2)[1].toLowerCase();
|
|
1435
|
-
for (const command of commands_) {
|
|
1436
|
-
if (typeof command === "string" && (command.toLowerCase() == command_)) {
|
|
1437
|
-
return true;
|
|
1438
|
-
}
|
|
1439
|
-
else if (command instanceof RegExp && command.test(command_)) {
|
|
1440
|
-
return true;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
return false;
|
|
1444
|
-
}, ...middleware);
|
|
1445
|
-
}
|
|
1446
|
-
//#endregion
|
|
1447
1247
|
/**
|
|
1448
1248
|
* Send a text message.
|
|
1449
1249
|
*
|
|
@@ -1459,7 +1259,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1459
1259
|
* Edit a message's text.
|
|
1460
1260
|
*
|
|
1461
1261
|
* @method ms
|
|
1462
|
-
* @param chatId The identifier of the chat that contains the
|
|
1262
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1463
1263
|
* @param messageId The message's identifier.
|
|
1464
1264
|
* @param text The new text of the message.
|
|
1465
1265
|
* @returns The edited text message.
|
|
@@ -1468,7 +1268,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1468
1268
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1469
1269
|
}
|
|
1470
1270
|
/**
|
|
1471
|
-
* Edit an inline message's text.
|
|
1271
|
+
* Edit an inline message's text. Bot-only.
|
|
1472
1272
|
*
|
|
1473
1273
|
* @method ms
|
|
1474
1274
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1481,7 +1281,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1481
1281
|
* Edit a message's reply markup.
|
|
1482
1282
|
*
|
|
1483
1283
|
* @method ms
|
|
1484
|
-
* @param chatId The identifier of the chat that contains the
|
|
1284
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1485
1285
|
* @param messageId The message's identifier.
|
|
1486
1286
|
* @returns The edited message.
|
|
1487
1287
|
*/
|
|
@@ -1489,7 +1289,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1489
1289
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageReplyMarkup(chatId, messageId, params);
|
|
1490
1290
|
}
|
|
1491
1291
|
/**
|
|
1492
|
-
* Edit an inline message's reply markup.
|
|
1292
|
+
* Edit an inline message's reply markup. Bot-only.
|
|
1493
1293
|
*
|
|
1494
1294
|
* @method ms
|
|
1495
1295
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1497,6 +1297,31 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1497
1297
|
async editInlineMessageReplyMarkup(inlineMessageId, params) {
|
|
1498
1298
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
1499
1299
|
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Edit a message's live location.
|
|
1302
|
+
*
|
|
1303
|
+
* @method ms
|
|
1304
|
+
* @param chatId The identifier of the chat that contains the messages.
|
|
1305
|
+
* @param messageId The message's identifier.
|
|
1306
|
+
* @param latitude The new latitude.
|
|
1307
|
+
* @param longitude The new longitude.
|
|
1308
|
+
* @returns The edited location message.
|
|
1309
|
+
*/
|
|
1310
|
+
async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
|
|
1311
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Edit an inline message's live location. Bot-only.
|
|
1315
|
+
*
|
|
1316
|
+
* @method ms
|
|
1317
|
+
* @param inlineMessageId The inline message's identifier.
|
|
1318
|
+
* @param latitude The new latitude.
|
|
1319
|
+
* @param longitude The new longitude.
|
|
1320
|
+
* @returns The edited location message.
|
|
1321
|
+
*/
|
|
1322
|
+
async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
|
|
1323
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
1324
|
+
}
|
|
1500
1325
|
/**
|
|
1501
1326
|
* Retrieve multiple messages.
|
|
1502
1327
|
*
|
|
@@ -1572,11 +1397,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1572
1397
|
* @method ac
|
|
1573
1398
|
*/
|
|
1574
1399
|
async getMe() {
|
|
1575
|
-
|
|
1576
|
-
if (
|
|
1577
|
-
(
|
|
1400
|
+
let user_ = await this[getEntity](new _2_tl_js_1.types.PeerUser({ user_id: BigInt(await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) }));
|
|
1401
|
+
if (user_ == null) {
|
|
1402
|
+
const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUserSelf()] });
|
|
1403
|
+
user_ = users[0][_2_tl_js_1.as](_2_tl_js_1.types.User);
|
|
1404
|
+
await this.messageStorage.setEntity(user_);
|
|
1578
1405
|
}
|
|
1579
|
-
const user = (0, _3_types_js_1.constructUser)(
|
|
1406
|
+
const user = (0, _3_types_js_1.constructUser)(user_);
|
|
1580
1407
|
__classPrivateFieldSet(this, _Client_lastGetMe, user, "f");
|
|
1581
1408
|
return user;
|
|
1582
1409
|
}
|
|
@@ -1601,6 +1428,17 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1601
1428
|
async sendPoll(chatId, question, options, params) {
|
|
1602
1429
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendPoll(chatId, question, options, params);
|
|
1603
1430
|
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Stop a poll.
|
|
1433
|
+
*
|
|
1434
|
+
* @method ms
|
|
1435
|
+
* @param chatId The chat that includes the poll.
|
|
1436
|
+
* @param messageId The idenfifier of the poll's message.
|
|
1437
|
+
* @returns The new state of the poll.
|
|
1438
|
+
*/
|
|
1439
|
+
async stopPoll(chatId, messageId, params) {
|
|
1440
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").stopPoll(chatId, messageId, params);
|
|
1441
|
+
}
|
|
1604
1442
|
/**
|
|
1605
1443
|
* Send a chat action.
|
|
1606
1444
|
*
|
|
@@ -1744,6 +1582,17 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1744
1582
|
async sendDocument(chatId, document, params) {
|
|
1745
1583
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendDocument(chatId, document, params);
|
|
1746
1584
|
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Send a sticker.
|
|
1587
|
+
*
|
|
1588
|
+
* @method ms
|
|
1589
|
+
* @param chatId The chat to send the sticker to.
|
|
1590
|
+
* @param document The sticker to send.
|
|
1591
|
+
* @returns The sent sticker.
|
|
1592
|
+
*/
|
|
1593
|
+
async sendSticker(chatId, sticker, params) {
|
|
1594
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendSticker(chatId, sticker, params);
|
|
1595
|
+
}
|
|
1747
1596
|
/**
|
|
1748
1597
|
* Send a video.
|
|
1749
1598
|
*
|
|
@@ -1891,7 +1740,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1891
1740
|
return await __classPrivateFieldGet(this, _Client_fileManager, "f").getCustomEmojiStickers(id);
|
|
1892
1741
|
}
|
|
1893
1742
|
/**
|
|
1894
|
-
* Set a chat's available reactions.
|
|
1743
|
+
* Set a chat's available reactions. User-only.
|
|
1895
1744
|
*
|
|
1896
1745
|
* @method ch
|
|
1897
1746
|
* @param chatId The identifier of the chat.
|
|
@@ -1953,7 +1802,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1953
1802
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatPhoto(chatId);
|
|
1954
1803
|
}
|
|
1955
1804
|
/**
|
|
1956
|
-
* Delete all messages sent by a specific member of a chat.
|
|
1805
|
+
* Delete all messages sent by a specific member of a chat. User-only.
|
|
1957
1806
|
*
|
|
1958
1807
|
* @method ms
|
|
1959
1808
|
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
@@ -2204,7 +2053,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2204
2053
|
return await __classPrivateFieldGet(this, _Client_accountManager, "f").getInactiveChats();
|
|
2205
2054
|
}
|
|
2206
2055
|
/**
|
|
2207
|
-
* Search the messages of a chat.
|
|
2056
|
+
* Search the messages of a chat. User-only.
|
|
2208
2057
|
*
|
|
2209
2058
|
* @method ms
|
|
2210
2059
|
* @param chatId The identifier of the chat to search the messages in.
|
|
@@ -2214,7 +2063,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2214
2063
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").searchMessages(chatId, query, params);
|
|
2215
2064
|
}
|
|
2216
2065
|
/**
|
|
2217
|
-
* Set the number of boosts required to circument a chat's default restrictions.
|
|
2066
|
+
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
2218
2067
|
*
|
|
2219
2068
|
* @method ch
|
|
2220
2069
|
* @param chatId The identifier of the chat.
|
|
@@ -2311,7 +2160,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2311
2160
|
}
|
|
2312
2161
|
exports.Client = Client;
|
|
2313
2162
|
_Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2314
|
-
await
|
|
2163
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), _0_utilities_js_1.resolve);
|
|
2315
2164
|
}, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
|
|
2316
2165
|
__classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(_1_update_manager_js_1.UpdateManager.MAIN_BOX_ID).add(async () => {
|
|
2317
2166
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update);
|