@mtkruto/node 0.1.125 → 0.1.127
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 +4 -4
- package/esm/3_types.d.ts +2 -1
- package/esm/3_types.js +2 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/3_types.d.ts +23 -2
- package/esm/client/3_types.js +11 -1
- package/esm/client/5_client.d.ts +15 -2
- package/esm/client/5_client.js +323 -20
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/_diff.d.ts +6 -5
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +5 -6
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
- package/esm/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
- package/esm/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_false.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.js +48 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
- package/esm/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
- package/esm/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
- package/esm/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
- package/esm/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
- package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
- package/esm/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
- package/esm/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/content_type.js +1 -6
- package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +24 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/esm/storage/0_storage.d.ts +25 -2
- package/esm/storage/0_storage.js +65 -5
- package/esm/storage/0_utilities.d.ts +2 -0
- package/esm/storage/0_utilities.js +33 -0
- package/esm/storage/1_storage_indexed_db.d.ts +5 -2
- package/esm/storage/1_storage_indexed_db.js +26 -4
- package/esm/storage/1_storage_local_storage.d.ts +5 -2
- package/esm/storage/1_storage_local_storage.js +20 -6
- package/esm/storage/1_storage_memory.d.ts +6 -2
- package/esm/storage/1_storage_memory.js +34 -6
- package/esm/storage/1_storage_session_storage.d.ts +5 -2
- package/esm/storage/1_storage_session_storage.js +20 -6
- package/esm/tl/0_tl_raw_writer.d.ts +1 -0
- package/esm/tl/0_tl_raw_writer.js +6 -0
- package/esm/tl/1_tl_object.js +6 -1
- package/esm/tl/3_deserialize.js +1 -1
- package/esm/types/{1_chat.d.ts → 1_chat_p.d.ts} +5 -5
- package/esm/types/{1_chat.js → 1_chat_p.js} +1 -1
- package/esm/types/3_message.d.ts +8 -7
- package/esm/types/3_message.js +15 -19
- package/esm/types/4_chat.d.ts +33 -0
- package/esm/types/4_chat.js +117 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +4 -4
- package/script/3_types.d.ts +2 -1
- package/script/3_types.js +2 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/3_types.d.ts +23 -2
- package/script/client/3_types.js +13 -0
- package/script/client/5_client.d.ts +15 -2
- package/script/client/5_client.js +322 -19
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/_diff.d.ts +6 -5
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +23 -24
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert.js +11 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
- package/script/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
- package/script/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_false.js +11 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_is_error.js +24 -5
- package/script/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
- package/script/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
- package/script/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
- package/script/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assertion_error.js +13 -7
- package/script/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
- package/script/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
- package/script/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/content_type.js +2 -7
- package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
- package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +28 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/script/storage/0_storage.d.ts +25 -2
- package/script/storage/0_storage.js +65 -5
- package/script/storage/0_utilities.d.ts +2 -0
- package/script/storage/0_utilities.js +36 -1
- package/script/storage/1_storage_indexed_db.d.ts +5 -2
- package/script/storage/1_storage_indexed_db.js +25 -3
- package/script/storage/1_storage_local_storage.d.ts +5 -2
- package/script/storage/1_storage_local_storage.js +19 -5
- package/script/storage/1_storage_memory.d.ts +6 -2
- package/script/storage/1_storage_memory.js +33 -5
- package/script/storage/1_storage_session_storage.d.ts +5 -2
- package/script/storage/1_storage_session_storage.js +19 -5
- package/script/tl/0_tl_raw_writer.d.ts +1 -0
- package/script/tl/0_tl_raw_writer.js +6 -0
- package/script/tl/1_tl_object.js +6 -1
- package/script/tl/3_deserialize.js +1 -1
- package/script/types/{1_chat.d.ts → 1_chat_p.d.ts} +5 -5
- package/script/types/{1_chat.js → 1_chat_p.js} +3 -3
- package/script/types/3_message.d.ts +8 -7
- package/script/types/3_message.js +15 -19
- package/script/types/4_chat.d.ts +33 -0
- package/script/types/4_chat.js +124 -0
- package/esm/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/esm/deps/deno.land/std@0.208.0/assert/assert.js +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
- package/esm/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
- package/esm/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/assert_false.js +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
- package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.js +0 -29
- package/esm/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
- package/esm/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.js +0 -12
- package/esm/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
- package/esm/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
- package/esm/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
- package/script/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
- package/script/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
- package/script/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
- package/script/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
- package/script/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
- package/script/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Storage } from "./0_storage.js";
|
|
2
|
-
import { fixKey, getPrefixKeyRange } from "./0_utilities.js";
|
|
2
|
+
import { fixKey, getPrefixKeyRange, restoreKey } from "./0_utilities.js";
|
|
3
3
|
const VERSION = 1;
|
|
4
4
|
const KV_OBJECT_STORE = "kv";
|
|
5
5
|
export class StorageIndexedDB extends Storage {
|
|
@@ -72,17 +72,39 @@ export class StorageIndexedDB extends Storage {
|
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
async *getMany(
|
|
75
|
+
async *getMany(filter, params, tx_) {
|
|
76
76
|
if (!this.database) {
|
|
77
77
|
throw new Error("Not initialized");
|
|
78
78
|
}
|
|
79
|
+
if (params?.limit !== undefined && params.limit <= 0) {
|
|
80
|
+
params.limit = 1;
|
|
81
|
+
}
|
|
82
|
+
let keyRange;
|
|
83
|
+
if ("prefix" in filter) {
|
|
84
|
+
keyRange = getPrefixKeyRange(fixKey(filter.prefix));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
keyRange = IDBKeyRange.bound(fixKey(filter.start), fixKey(filter.end), true, true);
|
|
88
|
+
}
|
|
79
89
|
const keys = await new Promise((res, rej) => {
|
|
90
|
+
const items = new Array();
|
|
80
91
|
const tx = (tx_ ?? this.database.transaction(KV_OBJECT_STORE, "readonly"))
|
|
81
92
|
.objectStore(KV_OBJECT_STORE)
|
|
82
|
-
.
|
|
93
|
+
.openKeyCursor(keyRange, params?.reverse ? "prev" : undefined);
|
|
83
94
|
tx.onerror = rej;
|
|
84
95
|
tx.onsuccess = () => {
|
|
85
|
-
|
|
96
|
+
const cursor = tx.result;
|
|
97
|
+
if (!cursor) {
|
|
98
|
+
res(items);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
items.push(restoreKey(cursor.key));
|
|
102
|
+
if (params?.limit !== undefined && items.length >= params.limit) {
|
|
103
|
+
res(items);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
cursor.continue();
|
|
107
|
+
}
|
|
86
108
|
};
|
|
87
109
|
});
|
|
88
110
|
for (const key of keys) {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Storage, StorageKeyPart } from "./0_storage.js";
|
|
1
|
+
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
2
2
|
export declare class StorageLocalStorage extends Storage implements Storage {
|
|
3
3
|
private readonly prefix;
|
|
4
4
|
constructor(prefix: string);
|
|
5
5
|
init(): void;
|
|
6
6
|
get<T>(key_: readonly StorageKeyPart[]): T | null;
|
|
7
|
-
getMany<T>(
|
|
7
|
+
getMany<T>(filter: GetManyFilter, params?: {
|
|
8
|
+
limit?: number;
|
|
9
|
+
reverse?: boolean;
|
|
10
|
+
}): Generator<[readonly StorageKeyPart[], T], void, unknown>;
|
|
8
11
|
set(key_: readonly StorageKeyPart[], value: unknown): void;
|
|
9
12
|
incr(key: readonly StorageKeyPart[], by: number): void;
|
|
10
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Storage } from "./0_storage.js";
|
|
2
|
-
import { fromString, toString } from "./0_utilities.js";
|
|
2
|
+
import { fromString, isInRange, toString } from "./0_utilities.js";
|
|
3
3
|
export class StorageLocalStorage extends Storage {
|
|
4
4
|
constructor(prefix) {
|
|
5
5
|
if (typeof localStorage === "undefined") {
|
|
@@ -31,19 +31,33 @@ export class StorageLocalStorage extends Storage {
|
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
*getMany(
|
|
35
|
-
|
|
34
|
+
*getMany(filter, params) {
|
|
35
|
+
let entries = Object.entries(localStorage).sort(([a], [b]) => a.localeCompare(b));
|
|
36
|
+
if (params?.reverse) {
|
|
37
|
+
entries.reverse();
|
|
38
|
+
}
|
|
39
|
+
if (params?.limit !== undefined) {
|
|
40
|
+
entries = entries.slice(0, params.limit <= 0 ? 1 : params.limit);
|
|
41
|
+
}
|
|
42
|
+
for (let [key, value] of entries) {
|
|
36
43
|
if (key.startsWith(this.prefix)) {
|
|
37
44
|
key = key.slice(this.prefix.length);
|
|
38
45
|
}
|
|
39
46
|
const parts = fromString(key);
|
|
40
47
|
if (Array.isArray(parts)) {
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
if ("prefix" in filter) {
|
|
49
|
+
for (const [i, p] of filter.prefix.entries()) {
|
|
50
|
+
if (toString(p) != toString(parts[i])) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (!isInRange(parts, filter.start, filter.end)) {
|
|
43
57
|
continue;
|
|
44
58
|
}
|
|
45
|
-
yield [parts, fromString(value)];
|
|
46
59
|
}
|
|
60
|
+
yield [parts, fromString(value)];
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
|
-
import { Storage, StorageKeyPart } from "./0_storage.js";
|
|
2
|
+
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
3
3
|
export declare class StorageMemory extends Storage implements Storage {
|
|
4
|
+
#private;
|
|
4
5
|
protected map: Map<string, unknown>;
|
|
5
6
|
init(): void;
|
|
6
7
|
get<T>(key: readonly StorageKeyPart[]): NonNullable<T> | null;
|
|
7
|
-
getMany<T>(
|
|
8
|
+
getMany<T>(filter: GetManyFilter, params?: {
|
|
9
|
+
limit?: number;
|
|
10
|
+
reverse?: boolean;
|
|
11
|
+
}): Generator<[readonly StorageKeyPart[], T], void, unknown>;
|
|
8
12
|
set(key_: readonly StorageKeyPart[], value: unknown): MaybePromise<void>;
|
|
9
13
|
incr(key: readonly StorageKeyPart[], by: number): void;
|
|
10
14
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _StorageMemory_instances, _StorageMemory_getEntries;
|
|
1
7
|
import { Storage } from "./0_storage.js";
|
|
2
|
-
import { fromString, toString } from "./0_utilities.js";
|
|
8
|
+
import { fromString, isInRange, toString } from "./0_utilities.js";
|
|
3
9
|
export class StorageMemory extends Storage {
|
|
4
10
|
constructor() {
|
|
5
11
|
super(...arguments);
|
|
12
|
+
_StorageMemory_instances.add(this);
|
|
6
13
|
Object.defineProperty(this, "map", {
|
|
7
14
|
enumerable: true,
|
|
8
15
|
configurable: true,
|
|
@@ -15,16 +22,30 @@ export class StorageMemory extends Storage {
|
|
|
15
22
|
get(key) {
|
|
16
23
|
return this.map.get(toString(key)) ?? null;
|
|
17
24
|
}
|
|
18
|
-
*getMany(
|
|
19
|
-
|
|
25
|
+
*getMany(filter, params) {
|
|
26
|
+
let entries = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_getEntries).call(this);
|
|
27
|
+
if (params?.reverse) {
|
|
28
|
+
entries.reverse();
|
|
29
|
+
}
|
|
30
|
+
if (params?.limit !== undefined) {
|
|
31
|
+
entries = entries.slice(0, params.limit <= 0 ? 1 : params.limit);
|
|
32
|
+
}
|
|
33
|
+
for (const [key, value] of entries) {
|
|
20
34
|
const parts = fromString(key);
|
|
21
35
|
if (Array.isArray(parts)) {
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
if ("prefix" in filter) {
|
|
37
|
+
for (const [i, p] of filter.prefix.entries()) {
|
|
38
|
+
if (toString(p) != toString(parts[i])) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
if (!isInRange(parts, filter.start, filter.end)) {
|
|
24
45
|
continue;
|
|
25
46
|
}
|
|
26
|
-
yield [parts, value];
|
|
27
47
|
}
|
|
48
|
+
yield [parts, value];
|
|
28
49
|
}
|
|
29
50
|
}
|
|
30
51
|
}
|
|
@@ -41,3 +62,10 @@ export class StorageMemory extends Storage {
|
|
|
41
62
|
this.set(key, (this.get(key) || 0) + by);
|
|
42
63
|
}
|
|
43
64
|
}
|
|
65
|
+
_StorageMemory_instances = new WeakSet(), _StorageMemory_getEntries = function _StorageMemory_getEntries() {
|
|
66
|
+
const entries = new Array();
|
|
67
|
+
for (const entry of this.map.entries()) {
|
|
68
|
+
entries.push(entry);
|
|
69
|
+
}
|
|
70
|
+
return entries;
|
|
71
|
+
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
|
-
import { Storage, StorageKeyPart } from "./0_storage.js";
|
|
2
|
+
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
3
3
|
export declare class StorageSessionStorage extends Storage implements Storage {
|
|
4
4
|
private readonly prefix;
|
|
5
5
|
constructor(prefix: string);
|
|
6
6
|
init(): void;
|
|
7
7
|
get<T>(key_: readonly StorageKeyPart[]): T | null;
|
|
8
|
-
getMany<T>(
|
|
8
|
+
getMany<T>(filter: GetManyFilter, params?: {
|
|
9
|
+
limit?: number;
|
|
10
|
+
reverse?: boolean;
|
|
11
|
+
}): Generator<[readonly StorageKeyPart[], T], void, unknown>;
|
|
9
12
|
set(key_: readonly StorageKeyPart[], value: unknown): MaybePromise<void>;
|
|
10
13
|
incr(key: readonly StorageKeyPart[], by: number): void;
|
|
11
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Storage } from "./0_storage.js";
|
|
2
|
-
import { fromString, toString } from "./0_utilities.js";
|
|
2
|
+
import { fromString, isInRange, toString } from "./0_utilities.js";
|
|
3
3
|
export class StorageSessionStorage extends Storage {
|
|
4
4
|
constructor(prefix) {
|
|
5
5
|
if (typeof sessionStorage === "undefined") {
|
|
@@ -31,19 +31,33 @@ export class StorageSessionStorage extends Storage {
|
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
*getMany(
|
|
35
|
-
|
|
34
|
+
*getMany(filter, params) {
|
|
35
|
+
let entries = Object.entries(sessionStorage).sort(([a], [b]) => a.localeCompare(b));
|
|
36
|
+
if (params?.reverse) {
|
|
37
|
+
entries.reverse();
|
|
38
|
+
}
|
|
39
|
+
if (params?.limit !== undefined) {
|
|
40
|
+
entries = entries.slice(0, params.limit <= 0 ? 1 : params.limit);
|
|
41
|
+
}
|
|
42
|
+
for (let [key, value] of entries) {
|
|
36
43
|
if (key.startsWith(this.prefix)) {
|
|
37
44
|
key = key.slice(this.prefix.length);
|
|
38
45
|
}
|
|
39
46
|
const parts = fromString(key);
|
|
40
47
|
if (Array.isArray(parts)) {
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
if ("prefix" in filter) {
|
|
49
|
+
for (const [i, p] of filter.prefix.entries()) {
|
|
50
|
+
if (toString(p) != toString(parts[i])) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (!isInRange(parts, filter.start, filter.end)) {
|
|
43
57
|
continue;
|
|
44
58
|
}
|
|
45
|
-
yield [parts, fromString(value)];
|
|
46
59
|
}
|
|
60
|
+
yield [parts, fromString(value)];
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
}
|
|
@@ -6,6 +6,7 @@ export declare class TLRawWriter {
|
|
|
6
6
|
writeInt24(int: number, signed?: boolean): this;
|
|
7
7
|
writeInt32(int: number, signed?: boolean): this;
|
|
8
8
|
writeInt64(int: bigint, signed?: boolean): this;
|
|
9
|
+
writeDouble(double: number): this;
|
|
9
10
|
writeInt128(int: bigint, signed?: boolean): this;
|
|
10
11
|
writeInt256(int: bigint, signed?: boolean): this;
|
|
11
12
|
writeBytes(bytes: Uint8Array): this;
|
|
@@ -27,6 +27,12 @@ export class TLRawWriter {
|
|
|
27
27
|
this.write(bufferFromBigInt(int, 64 / 8, true, signed));
|
|
28
28
|
return this;
|
|
29
29
|
}
|
|
30
|
+
writeDouble(double) {
|
|
31
|
+
const buf = new Uint8Array(8);
|
|
32
|
+
new DataView(buf.buffer).setFloat64(0, double, true);
|
|
33
|
+
this.write(buf);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
30
36
|
writeInt128(int, signed = true) {
|
|
31
37
|
this.write(bufferFromBigInt(int, 128 / 8, true, signed));
|
|
32
38
|
return this;
|
package/esm/tl/1_tl_object.js
CHANGED
|
@@ -78,7 +78,12 @@ function serializeSingleParam(writer, value, type, ntype, debugInfo) {
|
|
|
78
78
|
}
|
|
79
79
|
//
|
|
80
80
|
if (typeof value === "number") {
|
|
81
|
-
|
|
81
|
+
if (ntype == "double") {
|
|
82
|
+
writer.writeDouble(value);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
writer.writeInt32(value);
|
|
86
|
+
}
|
|
82
87
|
}
|
|
83
88
|
else {
|
|
84
89
|
throw new TypeError(`Expected number but received ${valueRepr} ${debugInfo}`);
|
package/esm/tl/3_deserialize.js
CHANGED
|
@@ -6,7 +6,7 @@ function deserializeSingleParam(reader, type, ntype) {
|
|
|
6
6
|
const cid = reader.readInt32(false);
|
|
7
7
|
const constructor = map.get(cid);
|
|
8
8
|
if (!constructor) {
|
|
9
|
-
throw new Error(`Constructor with ID ${cid} not found`);
|
|
9
|
+
throw new Error(`Constructor with ID ${cid.toString(16)} not found`);
|
|
10
10
|
}
|
|
11
11
|
return deserialize(reader, constructor[paramDesc], constructor);
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { RestrictionReason } from "./0_restriction_reason.js";
|
|
3
3
|
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
4
|
-
export declare namespace
|
|
4
|
+
export declare namespace ChatP {
|
|
5
5
|
interface Base {
|
|
6
6
|
/** The identifier of the chat. */
|
|
7
7
|
id: number;
|
|
@@ -66,7 +66,7 @@ export declare namespace Chat {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
/** This object represents a chat. */
|
|
69
|
-
export type
|
|
70
|
-
export declare function
|
|
71
|
-
export declare function
|
|
72
|
-
export declare function
|
|
69
|
+
export type ChatP = ChatP.Private | ChatP.Group | ChatP.Supergroup | ChatP.Channel;
|
|
70
|
+
export declare function constructChatP(chat: types.User): ChatP.Private;
|
|
71
|
+
export declare function constructChatP(chat: types.Chat): ChatP.Group;
|
|
72
|
+
export declare function constructChatP(chat: types.Channel): ChatP.Supergroup | ChatP.Channel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cleanObject, getColorFromPeerId, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
3
|
import { constructRestrictionReason } from "./0_restriction_reason.js";
|
|
4
|
-
export function
|
|
4
|
+
export function constructChatP(chat) {
|
|
5
5
|
if (chat instanceof types.User) {
|
|
6
6
|
const id = Number(chat.id);
|
|
7
7
|
const chat_ = {
|
package/esm/types/3_message.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Venue } from "./0_venue.js";
|
|
|
11
11
|
import { Voice } from "./0_voice.js";
|
|
12
12
|
import { EntityGetter } from "./1__getters.js";
|
|
13
13
|
import { Animation } from "./1_animation.js";
|
|
14
|
-
import {
|
|
14
|
+
import { ChatP } from "./1_chat_p.js";
|
|
15
15
|
import { Document } from "./1_document.js";
|
|
16
16
|
import { Photo } from "./1_photo.js";
|
|
17
17
|
import { Poll } from "./1_poll.js";
|
|
@@ -33,17 +33,17 @@ export interface Message {
|
|
|
33
33
|
/** Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
34
34
|
from?: User;
|
|
35
35
|
/** Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
36
|
-
senderChat?:
|
|
36
|
+
senderChat?: ChatP;
|
|
37
37
|
/** Date the message was sent in Unix time */
|
|
38
|
-
date
|
|
38
|
+
date: Date;
|
|
39
39
|
/** Conversation the message belongs to */
|
|
40
|
-
chat:
|
|
40
|
+
chat: ChatP;
|
|
41
41
|
/** A link to the message */
|
|
42
42
|
link?: string;
|
|
43
43
|
/** For forwarded messages, sender of the original message */
|
|
44
44
|
forwardFrom?: User;
|
|
45
45
|
/** For messages forwarded from channels or from anonymous administrators, information about the original sender chat */
|
|
46
|
-
forwardFromChat?:
|
|
46
|
+
forwardFromChat?: ChatP;
|
|
47
47
|
/** For messages forwarded from channels, identifier of the original message in the channel */
|
|
48
48
|
forwardId?: number;
|
|
49
49
|
/** For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present */
|
|
@@ -58,6 +58,7 @@ export interface Message {
|
|
|
58
58
|
isAutomaticForward?: boolean;
|
|
59
59
|
/** For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */
|
|
60
60
|
replyToMessage?: Omit<Message, "replyToMessage">;
|
|
61
|
+
replyToMessageId?: number;
|
|
61
62
|
/** Bot through which the message was sent */
|
|
62
63
|
viaBot?: User;
|
|
63
64
|
/** Date the message was last edited in Unix time */
|
|
@@ -172,8 +173,8 @@ export interface Message {
|
|
|
172
173
|
};
|
|
173
174
|
}
|
|
174
175
|
export interface MessageGetter<O extends keyof Message | null = null> {
|
|
175
|
-
(chatId: number, messageId: number): MaybePromise<(O extends
|
|
176
|
+
(chatId: number, messageId: number): MaybePromise<(O extends keyof Message ? Omit<Message, O> : Message) | null>;
|
|
176
177
|
}
|
|
177
178
|
type Message_MessageGetter = MessageGetter<"replyToMessage"> | null;
|
|
178
|
-
export declare function constructMessage(message_: enums.Message, getEntity: EntityGetter, getMessage: Message_MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<Message>;
|
|
179
|
+
export declare function constructMessage(message_: enums.Message, getEntity: EntityGetter, getMessage: Message_MessageGetter, getStickerSetName: StickerSetNameGetter, getReply_?: boolean): Promise<Message>;
|
|
179
180
|
export {};
|
package/esm/types/3_message.js
CHANGED
|
@@ -12,7 +12,7 @@ import { constructReplyKeyboardRemove } from "./0_reply_keyboard_remove.js";
|
|
|
12
12
|
import { constructVenue } from "./0_venue.js";
|
|
13
13
|
import { constructVoice } from "./0_voice.js";
|
|
14
14
|
import { constructAnimation } from "./1_animation.js";
|
|
15
|
-
import {
|
|
15
|
+
import { constructChatP } from "./1_chat_p.js";
|
|
16
16
|
import { constructDocument } from "./1_document.js";
|
|
17
17
|
import { constructPhoto } from "./1_photo.js";
|
|
18
18
|
import { constructPoll } from "./1_poll.js";
|
|
@@ -37,7 +37,7 @@ async function getSender(message_, getEntity) {
|
|
|
37
37
|
else if (message_.from_id instanceof types.PeerChannel) {
|
|
38
38
|
const entity = await getEntity(message_.from_id);
|
|
39
39
|
if (entity) {
|
|
40
|
-
return { senderChat:
|
|
40
|
+
return { senderChat: constructChatP(entity) };
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
43
|
UNREACHABLE();
|
|
@@ -181,7 +181,7 @@ async function constructServiceMessage(message_, chat, getEntity, getMessage) {
|
|
|
181
181
|
}
|
|
182
182
|
return cleanObject(message);
|
|
183
183
|
}
|
|
184
|
-
export async function constructMessage(message_, getEntity, getMessage, getStickerSetName) {
|
|
184
|
+
export async function constructMessage(message_, getEntity, getMessage, getStickerSetName, getReply_ = true) {
|
|
185
185
|
if (!(message_ instanceof types.Message) && !(message_ instanceof types.MessageService)) {
|
|
186
186
|
UNREACHABLE();
|
|
187
187
|
}
|
|
@@ -190,7 +190,7 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
|
|
|
190
190
|
if (message_.peer_id instanceof types.PeerUser) {
|
|
191
191
|
const entity = await getEntity(message_.peer_id);
|
|
192
192
|
if (entity) {
|
|
193
|
-
chat_ =
|
|
193
|
+
chat_ = constructChatP(entity);
|
|
194
194
|
}
|
|
195
195
|
else {
|
|
196
196
|
UNREACHABLE();
|
|
@@ -199,7 +199,7 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
|
|
|
199
199
|
else if (message_.peer_id instanceof types.PeerChat) {
|
|
200
200
|
const entity = await getEntity(message_.peer_id);
|
|
201
201
|
if (entity) {
|
|
202
|
-
chat_ =
|
|
202
|
+
chat_ = constructChatP(entity);
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
205
|
UNREACHABLE();
|
|
@@ -209,7 +209,7 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
|
|
|
209
209
|
link = `https://t.me/c/${message_.peer_id.channel_id}/${message_.id}`;
|
|
210
210
|
const entity = await getEntity(message_.peer_id);
|
|
211
211
|
if (entity) {
|
|
212
|
-
chat_ =
|
|
212
|
+
chat_ = constructChatP(entity);
|
|
213
213
|
}
|
|
214
214
|
else {
|
|
215
215
|
UNREACHABLE();
|
|
@@ -231,7 +231,12 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
|
|
|
231
231
|
isTopicMessage: false,
|
|
232
232
|
hasProtectedContent: message_.noforwards || false,
|
|
233
233
|
};
|
|
234
|
-
|
|
234
|
+
if (message_.reply_to instanceof types.MessageReplyHeader && message_.reply_to.reply_to_msg_id) {
|
|
235
|
+
message.replyToMessageId = message_.reply_to.reply_to_msg_id;
|
|
236
|
+
}
|
|
237
|
+
if (getReply_) {
|
|
238
|
+
Object.assign(message, await getReply(message_, chat_, getMessage));
|
|
239
|
+
}
|
|
235
240
|
Object.assign(message, await getSender(message_, getEntity));
|
|
236
241
|
if (message_.media instanceof types.MessageMediaPhoto || message_.media instanceof types.MessageMediaDocument) {
|
|
237
242
|
message.hasMediaSpoiler = message_.media.spoiler || false;
|
|
@@ -292,32 +297,23 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
|
|
|
292
297
|
message.forwardSenderName = message_.fwd_from.from_name;
|
|
293
298
|
message.forwardId = message_.fwd_from.channel_post;
|
|
294
299
|
message.forwardSignature = message_.fwd_from.post_author;
|
|
295
|
-
message.forwardDate = new Date(message_.date * 1000);
|
|
300
|
+
message.forwardDate = new Date(message_.fwd_from.date * 1000);
|
|
296
301
|
if (message_.fwd_from.from_id instanceof types.PeerUser) {
|
|
297
302
|
const entity = await getEntity(message_.fwd_from.from_id);
|
|
298
303
|
if (entity) {
|
|
299
304
|
message.forwardFrom = constructUser(entity);
|
|
300
305
|
}
|
|
301
|
-
else {
|
|
302
|
-
UNREACHABLE();
|
|
303
|
-
}
|
|
304
306
|
}
|
|
305
307
|
else if (message_.fwd_from.from_id instanceof types.PeerChat) {
|
|
306
308
|
const entity = await getEntity(message_.fwd_from.from_id);
|
|
307
309
|
if (entity) {
|
|
308
|
-
message.forwardFromChat =
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
UNREACHABLE();
|
|
310
|
+
message.forwardFromChat = constructChatP(entity);
|
|
312
311
|
}
|
|
313
312
|
}
|
|
314
313
|
else if (message_.fwd_from.from_id instanceof types.PeerChannel) {
|
|
315
314
|
const entity = await getEntity(message_.fwd_from.from_id);
|
|
316
315
|
if (entity) {
|
|
317
|
-
message.forwardFromChat =
|
|
318
|
-
}
|
|
319
|
-
else {
|
|
320
|
-
UNREACHABLE();
|
|
316
|
+
message.forwardFromChat = constructChatP(entity);
|
|
321
317
|
}
|
|
322
318
|
}
|
|
323
319
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { enums, types } from "../2_tl.js";
|
|
2
|
+
import { ChatP } from "./1_chat_p.js";
|
|
3
|
+
import { ChatPhoto } from "./0_chat_photo.js";
|
|
4
|
+
import { Message, MessageGetter } from "./3_message.js";
|
|
5
|
+
import { StickerSetNameGetter } from "./1_sticker.js";
|
|
6
|
+
import { EntityGetter } from "./1__getters.js";
|
|
7
|
+
export declare namespace Chat {
|
|
8
|
+
interface Base {
|
|
9
|
+
order: string;
|
|
10
|
+
lastMessage?: Message;
|
|
11
|
+
pinned: number;
|
|
12
|
+
}
|
|
13
|
+
interface Channel extends Base, ChatP.Channel {
|
|
14
|
+
also?: string[];
|
|
15
|
+
photo?: ChatPhoto.Chat;
|
|
16
|
+
}
|
|
17
|
+
interface Supergroup extends Base, ChatP.Supergroup {
|
|
18
|
+
also?: string[];
|
|
19
|
+
photo?: ChatPhoto.Chat;
|
|
20
|
+
}
|
|
21
|
+
interface Group extends Base, ChatP.Group {
|
|
22
|
+
photo?: ChatPhoto.Chat;
|
|
23
|
+
}
|
|
24
|
+
interface Private extends Base, ChatP.Private {
|
|
25
|
+
also?: string[];
|
|
26
|
+
photo?: ChatPhoto.User;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export type Chat = Chat.Channel | Chat.Supergroup | Chat.Group | Chat.Private;
|
|
30
|
+
export declare function getChatOrder(lastMessage: Message | undefined, pinned: number): string;
|
|
31
|
+
export declare function constructChat(dialog: enums.Dialog, dialogs: types.messages.Dialogs | types.messages.DialogsSlice, pinnedChats: number[], getEntity: EntityGetter, getMessage: MessageGetter<"replyToMessage">, getStickerSetName: StickerSetNameGetter): Promise<Chat>;
|
|
32
|
+
export declare function constructChat2(chatId: number, pinned: number, lastMessage: Message | undefined, getEntity: EntityGetter): Promise<Chat | null>;
|
|
33
|
+
export declare function constructChat3(chatId: number, pinned: number, lastMessageId: number, getEntity: EntityGetter, getMessage: MessageGetter<"replyToMessage">): Promise<Chat | null>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { cleanObject, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
2
|
+
import { peerToChatId, types } from "../2_tl.js";
|
|
3
|
+
import { constructChatP } from "./1_chat_p.js";
|
|
4
|
+
import { constructChatPhoto } from "./0_chat_photo.js";
|
|
5
|
+
import { constructMessage } from "./3_message.js";
|
|
6
|
+
function getChatPAlsoPhoto(entity) {
|
|
7
|
+
let chatP;
|
|
8
|
+
let also = undefined;
|
|
9
|
+
if (entity instanceof types.User) {
|
|
10
|
+
chatP = constructChatP(entity);
|
|
11
|
+
also = "usernames" in entity ? entity.usernames?.map((v) => v.username).filter((v) => v != ("username" in chatP ? chatP.username : "")) : undefined;
|
|
12
|
+
}
|
|
13
|
+
else if (entity instanceof types.Chat) {
|
|
14
|
+
chatP = constructChatP(entity);
|
|
15
|
+
}
|
|
16
|
+
else if (entity instanceof types.Channel) {
|
|
17
|
+
chatP = constructChatP(entity);
|
|
18
|
+
also = "usernames" in entity ? entity.usernames?.map((v) => v.username).filter((v) => v != ("username" in chatP ? chatP.username : "")) : undefined;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
UNREACHABLE();
|
|
22
|
+
}
|
|
23
|
+
let photo = undefined;
|
|
24
|
+
if (entity.photo instanceof types.UserProfilePhoto) {
|
|
25
|
+
photo = constructChatPhoto(entity.photo, chatP.id, "access_hash" in entity ? entity.access_hash ?? 0n : 0n);
|
|
26
|
+
}
|
|
27
|
+
else if (entity.photo instanceof types.ChatPhoto) {
|
|
28
|
+
photo = constructChatPhoto(entity.photo, chatP.id, "access_hash" in entity ? entity.access_hash ?? 0n : 0n);
|
|
29
|
+
}
|
|
30
|
+
return { chatP, also, photo };
|
|
31
|
+
}
|
|
32
|
+
export function getChatOrder(lastMessage, pinned) {
|
|
33
|
+
const p = pinned == -1 ? "" : `P${100 - pinned}`;
|
|
34
|
+
if (!lastMessage) {
|
|
35
|
+
return p + "0";
|
|
36
|
+
}
|
|
37
|
+
return p + String((BigInt(Math.floor(lastMessage.date.getTime())) << 32n) + BigInt(lastMessage.id));
|
|
38
|
+
}
|
|
39
|
+
export async function constructChat(dialog, dialogs, pinnedChats, getEntity, getMessage, getStickerSetName) {
|
|
40
|
+
const topMessage_ = dialogs.messages.find((v) => "id" in v && v.id == dialog.top_message);
|
|
41
|
+
if (!topMessage_) {
|
|
42
|
+
UNREACHABLE();
|
|
43
|
+
}
|
|
44
|
+
const pinned = pinnedChats.indexOf(peerToChatId(dialog.peer));
|
|
45
|
+
const lastMessage = await constructMessage(topMessage_, getEntity, getMessage, getStickerSetName, false);
|
|
46
|
+
const order = getChatOrder(lastMessage, pinned);
|
|
47
|
+
const userId = "user_id" in dialog.peer ? dialog.peer.user_id : null;
|
|
48
|
+
const chatId = "chat_id" in dialog.peer ? dialog.peer.chat_id : null;
|
|
49
|
+
const channelId = "channel_id" in dialog.peer ? dialog.peer.channel_id : null;
|
|
50
|
+
const chat__ = chatId != null ? dialogs.chats.find((v) => v instanceof types.Chat && v.id == chatId) : channelId != null ? dialogs.chats.find((v) => v instanceof types.Channel && v.id == channelId) : userId != null ? dialogs.users.find((v) => v instanceof types.User && v.id == userId) : UNREACHABLE();
|
|
51
|
+
if (!chat__) {
|
|
52
|
+
UNREACHABLE();
|
|
53
|
+
}
|
|
54
|
+
const chat_ = chat__;
|
|
55
|
+
const { chatP, also, photo } = getChatPAlsoPhoto(chat_);
|
|
56
|
+
if (chatP.type == "group") {
|
|
57
|
+
return cleanObject({ ...chatP, order, lastMessage, photo, pinned });
|
|
58
|
+
}
|
|
59
|
+
else if (chatP.type == "supergroup") {
|
|
60
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo, pinned });
|
|
61
|
+
}
|
|
62
|
+
else if (chatP.type == "channel") {
|
|
63
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo, pinned });
|
|
64
|
+
}
|
|
65
|
+
else if (chatP.type == "private") {
|
|
66
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo: photo, pinned });
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
UNREACHABLE();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export async function constructChat2(chatId, pinned, lastMessage, getEntity) {
|
|
73
|
+
let chatPAlsoPhoto = null;
|
|
74
|
+
if (chatId < ZERO_CHANNEL_ID) {
|
|
75
|
+
const entity = await getEntity(new types.PeerChannel({ channel_id: BigInt(Math.abs(chatId - ZERO_CHANNEL_ID)) }));
|
|
76
|
+
if (entity != null) {
|
|
77
|
+
chatPAlsoPhoto = getChatPAlsoPhoto(entity);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (chatId < 0) {
|
|
81
|
+
const entity = await getEntity(new types.PeerChat({ chat_id: BigInt(Math.abs(chatId)) }));
|
|
82
|
+
if (entity != null) {
|
|
83
|
+
chatPAlsoPhoto = getChatPAlsoPhoto(entity);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
const entity = await getEntity(new types.PeerUser({ user_id: BigInt(chatId) }));
|
|
88
|
+
if (entity != null) {
|
|
89
|
+
chatPAlsoPhoto = getChatPAlsoPhoto(entity);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (chatPAlsoPhoto == null) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const order = getChatOrder(lastMessage, pinned);
|
|
96
|
+
const { also, photo, chatP } = chatPAlsoPhoto;
|
|
97
|
+
if (chatP.type == "group") {
|
|
98
|
+
return cleanObject({ ...chatP, order, lastMessage, photo, pinned });
|
|
99
|
+
}
|
|
100
|
+
else if (chatP.type == "supergroup") {
|
|
101
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo, pinned });
|
|
102
|
+
}
|
|
103
|
+
else if (chatP.type == "channel") {
|
|
104
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo, pinned });
|
|
105
|
+
}
|
|
106
|
+
else if (chatP.type == "private") {
|
|
107
|
+
return cleanObject({ ...chatP, order, lastMessage, also, photo: photo, pinned });
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
UNREACHABLE();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export async function constructChat3(chatId, pinned, lastMessageId, getEntity, getMessage) {
|
|
114
|
+
const lastMessage_ = lastMessageId > 0 ? await getMessage(chatId, lastMessageId) : null;
|
|
115
|
+
const lastMessage = lastMessage_ == null ? undefined : lastMessage_;
|
|
116
|
+
return await constructChat2(chatId, pinned, lastMessage, getEntity);
|
|
117
|
+
}
|