alice-and-bot 1.0.76 → 1.0.78
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/components.js
CHANGED
|
@@ -2107,7 +2107,7 @@ var findCompletedSpinners = ({ spinners, progress, prevActiveIds, now, isLoading
|
|
|
2107
2107
|
...spinners.filter((s) => !s.active && !isStale(s.timestamp) && prevActiveIds.has(s.elementId) && now - s.timestamp > oneMinuteMs),
|
|
2108
2108
|
...progress.filter((p) => p.percentage >= 1 && !isStale(p.timestamp) && prevActiveIds.has(p.elementId) && now - p.timestamp > oneMinuteMs)
|
|
2109
2109
|
];
|
|
2110
|
-
var findNewIncomingMessages = ({ messages, prevCount, userId, sessionStart, isLoading, isInitialLoad }) => isLoading || isInitialLoad || prevCount <= 0 || messages.length <= prevCount ? [] : messages.slice(prevCount).filter((m) => m.authorId !== userId && m.timestamp > sessionStart);
|
|
2110
|
+
var findNewIncomingMessages = ({ messages, prevCount, userId, sessionStart, isLoading, isInitialLoad }) => isLoading || isInitialLoad || prevCount <= 0 || messages.length <= prevCount ? [] : sortKey((m) => m.timestamp)(messages).slice(prevCount).filter((m) => m.authorId !== userId && m.timestamp > sessionStart);
|
|
2111
2111
|
|
|
2112
2112
|
// lit/components/chat-audio-player.ts
|
|
2113
2113
|
var playerStyle = (isDark) => `display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:20px;background:${isDark ? "#ffffff15" : "#00000008"};min-width:200px`;
|
|
@@ -3706,6 +3706,2472 @@ var renderMarkdown = (text, textColor, isDark, primaryColor = defaultPrimary(isD
|
|
|
3706
3706
|
};
|
|
3707
3707
|
var fencedCodeHoverCss = `.fenced-code-wrap:hover [data-testid="copy-code-button"]{opacity:1!important;background:#ffffff1a!important}`;
|
|
3708
3708
|
|
|
3709
|
+
// lit/components/emoji.ts
|
|
3710
|
+
var quickReactionEmojis = [
|
|
3711
|
+
"\u{1F44D}",
|
|
3712
|
+
"\u2764\uFE0F",
|
|
3713
|
+
"\u{1F602}",
|
|
3714
|
+
"\u{1F62E}",
|
|
3715
|
+
"\u{1F64F}"
|
|
3716
|
+
];
|
|
3717
|
+
var emojiCatalog = [
|
|
3718
|
+
{
|
|
3719
|
+
shortcode: "+1",
|
|
3720
|
+
emoji: "\u{1F44D}",
|
|
3721
|
+
aliases: [
|
|
3722
|
+
"thumbsup",
|
|
3723
|
+
"like",
|
|
3724
|
+
"yes"
|
|
3725
|
+
],
|
|
3726
|
+
keywords: [
|
|
3727
|
+
"approve",
|
|
3728
|
+
"ok",
|
|
3729
|
+
"agree",
|
|
3730
|
+
"good"
|
|
3731
|
+
]
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
shortcode: "-1",
|
|
3735
|
+
emoji: "\u{1F44E}",
|
|
3736
|
+
aliases: [
|
|
3737
|
+
"thumbsdown",
|
|
3738
|
+
"dislike",
|
|
3739
|
+
"no"
|
|
3740
|
+
],
|
|
3741
|
+
keywords: [
|
|
3742
|
+
"disapprove",
|
|
3743
|
+
"bad"
|
|
3744
|
+
]
|
|
3745
|
+
},
|
|
3746
|
+
{
|
|
3747
|
+
shortcode: "heart",
|
|
3748
|
+
emoji: "\u2764\uFE0F",
|
|
3749
|
+
aliases: [
|
|
3750
|
+
"red_heart",
|
|
3751
|
+
"love"
|
|
3752
|
+
],
|
|
3753
|
+
keywords: [
|
|
3754
|
+
"like",
|
|
3755
|
+
"affection"
|
|
3756
|
+
]
|
|
3757
|
+
},
|
|
3758
|
+
{
|
|
3759
|
+
shortcode: "joy",
|
|
3760
|
+
emoji: "\u{1F602}",
|
|
3761
|
+
aliases: [
|
|
3762
|
+
"lol",
|
|
3763
|
+
"tears_of_joy"
|
|
3764
|
+
],
|
|
3765
|
+
keywords: [
|
|
3766
|
+
"laugh",
|
|
3767
|
+
"funny",
|
|
3768
|
+
"haha",
|
|
3769
|
+
"cry"
|
|
3770
|
+
]
|
|
3771
|
+
},
|
|
3772
|
+
{
|
|
3773
|
+
shortcode: "fire",
|
|
3774
|
+
emoji: "\u{1F525}",
|
|
3775
|
+
aliases: [
|
|
3776
|
+
"lit",
|
|
3777
|
+
"hot"
|
|
3778
|
+
],
|
|
3779
|
+
keywords: [
|
|
3780
|
+
"flame",
|
|
3781
|
+
"awesome",
|
|
3782
|
+
"burn"
|
|
3783
|
+
]
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
shortcode: "pray",
|
|
3787
|
+
emoji: "\u{1F64F}",
|
|
3788
|
+
aliases: [
|
|
3789
|
+
"thanks",
|
|
3790
|
+
"please",
|
|
3791
|
+
"folded_hands"
|
|
3792
|
+
],
|
|
3793
|
+
keywords: [
|
|
3794
|
+
"thank",
|
|
3795
|
+
"grateful",
|
|
3796
|
+
"hope",
|
|
3797
|
+
"namaste"
|
|
3798
|
+
]
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
shortcode: "tada",
|
|
3802
|
+
emoji: "\u{1F389}",
|
|
3803
|
+
aliases: [
|
|
3804
|
+
"party",
|
|
3805
|
+
"hooray"
|
|
3806
|
+
],
|
|
3807
|
+
keywords: [
|
|
3808
|
+
"celebrate",
|
|
3809
|
+
"congrats",
|
|
3810
|
+
"confetti"
|
|
3811
|
+
]
|
|
3812
|
+
},
|
|
3813
|
+
{
|
|
3814
|
+
shortcode: "rocket",
|
|
3815
|
+
emoji: "\u{1F680}",
|
|
3816
|
+
aliases: [
|
|
3817
|
+
"ship",
|
|
3818
|
+
"launch"
|
|
3819
|
+
],
|
|
3820
|
+
keywords: [
|
|
3821
|
+
"fast",
|
|
3822
|
+
"space",
|
|
3823
|
+
"deploy",
|
|
3824
|
+
"moon"
|
|
3825
|
+
]
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
shortcode: "eyes",
|
|
3829
|
+
emoji: "\u{1F440}",
|
|
3830
|
+
aliases: [
|
|
3831
|
+
"looking",
|
|
3832
|
+
"look"
|
|
3833
|
+
],
|
|
3834
|
+
keywords: [
|
|
3835
|
+
"watch",
|
|
3836
|
+
"see",
|
|
3837
|
+
"review"
|
|
3838
|
+
]
|
|
3839
|
+
},
|
|
3840
|
+
{
|
|
3841
|
+
shortcode: "100",
|
|
3842
|
+
emoji: "\u{1F4AF}",
|
|
3843
|
+
aliases: [
|
|
3844
|
+
"hundred"
|
|
3845
|
+
],
|
|
3846
|
+
keywords: [
|
|
3847
|
+
"perfect",
|
|
3848
|
+
"score",
|
|
3849
|
+
"agree"
|
|
3850
|
+
]
|
|
3851
|
+
},
|
|
3852
|
+
{
|
|
3853
|
+
shortcode: "smile",
|
|
3854
|
+
emoji: "\u{1F604}",
|
|
3855
|
+
aliases: [
|
|
3856
|
+
"happy"
|
|
3857
|
+
],
|
|
3858
|
+
keywords: [
|
|
3859
|
+
"grin",
|
|
3860
|
+
"joy",
|
|
3861
|
+
"glad"
|
|
3862
|
+
]
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
shortcode: "grinning",
|
|
3866
|
+
emoji: "\u{1F600}",
|
|
3867
|
+
aliases: [
|
|
3868
|
+
"grin"
|
|
3869
|
+
],
|
|
3870
|
+
keywords: [
|
|
3871
|
+
"smile",
|
|
3872
|
+
"happy"
|
|
3873
|
+
]
|
|
3874
|
+
},
|
|
3875
|
+
{
|
|
3876
|
+
shortcode: "smiley",
|
|
3877
|
+
emoji: "\u{1F603}",
|
|
3878
|
+
keywords: [
|
|
3879
|
+
"smile",
|
|
3880
|
+
"happy"
|
|
3881
|
+
]
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
shortcode: "slightly_smiling_face",
|
|
3885
|
+
emoji: "\u{1F642}",
|
|
3886
|
+
aliases: [
|
|
3887
|
+
"slightly_smiling",
|
|
3888
|
+
"slight_smile"
|
|
3889
|
+
],
|
|
3890
|
+
keywords: [
|
|
3891
|
+
"smile",
|
|
3892
|
+
"ok"
|
|
3893
|
+
]
|
|
3894
|
+
},
|
|
3895
|
+
{
|
|
3896
|
+
shortcode: "upside_down_face",
|
|
3897
|
+
emoji: "\u{1F643}",
|
|
3898
|
+
aliases: [
|
|
3899
|
+
"upside_down"
|
|
3900
|
+
],
|
|
3901
|
+
keywords: [
|
|
3902
|
+
"sarcasm",
|
|
3903
|
+
"silly"
|
|
3904
|
+
]
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
shortcode: "wink",
|
|
3908
|
+
emoji: "\u{1F609}",
|
|
3909
|
+
keywords: [
|
|
3910
|
+
"flirt",
|
|
3911
|
+
"playful"
|
|
3912
|
+
]
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
shortcode: "blush",
|
|
3916
|
+
emoji: "\u{1F60A}",
|
|
3917
|
+
keywords: [
|
|
3918
|
+
"smile",
|
|
3919
|
+
"warm",
|
|
3920
|
+
"shy"
|
|
3921
|
+
]
|
|
3922
|
+
},
|
|
3923
|
+
{
|
|
3924
|
+
shortcode: "innocent",
|
|
3925
|
+
emoji: "\u{1F607}",
|
|
3926
|
+
aliases: [
|
|
3927
|
+
"angel"
|
|
3928
|
+
],
|
|
3929
|
+
keywords: [
|
|
3930
|
+
"halo",
|
|
3931
|
+
"good"
|
|
3932
|
+
]
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
shortcode: "smiling_face_with_3_hearts",
|
|
3936
|
+
emoji: "\u{1F970}",
|
|
3937
|
+
aliases: [
|
|
3938
|
+
"in_love",
|
|
3939
|
+
"hearts"
|
|
3940
|
+
],
|
|
3941
|
+
keywords: [
|
|
3942
|
+
"love",
|
|
3943
|
+
"adore"
|
|
3944
|
+
]
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
shortcode: "heart_eyes",
|
|
3948
|
+
emoji: "\u{1F60D}",
|
|
3949
|
+
keywords: [
|
|
3950
|
+
"love",
|
|
3951
|
+
"crush",
|
|
3952
|
+
"adore"
|
|
3953
|
+
]
|
|
3954
|
+
},
|
|
3955
|
+
{
|
|
3956
|
+
shortcode: "star_struck",
|
|
3957
|
+
emoji: "\u{1F929}",
|
|
3958
|
+
aliases: [
|
|
3959
|
+
"starstruck"
|
|
3960
|
+
],
|
|
3961
|
+
keywords: [
|
|
3962
|
+
"amazed",
|
|
3963
|
+
"wow",
|
|
3964
|
+
"excited"
|
|
3965
|
+
]
|
|
3966
|
+
},
|
|
3967
|
+
{
|
|
3968
|
+
shortcode: "kissing_heart",
|
|
3969
|
+
emoji: "\u{1F618}",
|
|
3970
|
+
aliases: [
|
|
3971
|
+
"kiss"
|
|
3972
|
+
],
|
|
3973
|
+
keywords: [
|
|
3974
|
+
"love",
|
|
3975
|
+
"flirt"
|
|
3976
|
+
]
|
|
3977
|
+
},
|
|
3978
|
+
{
|
|
3979
|
+
shortcode: "yum",
|
|
3980
|
+
emoji: "\u{1F60B}",
|
|
3981
|
+
keywords: [
|
|
3982
|
+
"delicious",
|
|
3983
|
+
"tasty",
|
|
3984
|
+
"food"
|
|
3985
|
+
]
|
|
3986
|
+
},
|
|
3987
|
+
{
|
|
3988
|
+
shortcode: "stuck_out_tongue",
|
|
3989
|
+
emoji: "\u{1F61B}",
|
|
3990
|
+
aliases: [
|
|
3991
|
+
"tongue"
|
|
3992
|
+
],
|
|
3993
|
+
keywords: [
|
|
3994
|
+
"playful",
|
|
3995
|
+
"silly"
|
|
3996
|
+
]
|
|
3997
|
+
},
|
|
3998
|
+
{
|
|
3999
|
+
shortcode: "stuck_out_tongue_winking_eye",
|
|
4000
|
+
emoji: "\u{1F61C}",
|
|
4001
|
+
keywords: [
|
|
4002
|
+
"crazy",
|
|
4003
|
+
"playful"
|
|
4004
|
+
]
|
|
4005
|
+
},
|
|
4006
|
+
{
|
|
4007
|
+
shortcode: "zany_face",
|
|
4008
|
+
emoji: "\u{1F92A}",
|
|
4009
|
+
aliases: [
|
|
4010
|
+
"zany",
|
|
4011
|
+
"crazy"
|
|
4012
|
+
],
|
|
4013
|
+
keywords: [
|
|
4014
|
+
"goofy",
|
|
4015
|
+
"wild"
|
|
4016
|
+
]
|
|
4017
|
+
},
|
|
4018
|
+
{
|
|
4019
|
+
shortcode: "rofl",
|
|
4020
|
+
emoji: "\u{1F923}",
|
|
4021
|
+
aliases: [
|
|
4022
|
+
"lmao"
|
|
4023
|
+
],
|
|
4024
|
+
keywords: [
|
|
4025
|
+
"laugh",
|
|
4026
|
+
"funny",
|
|
4027
|
+
"haha"
|
|
4028
|
+
]
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
shortcode: "sweat_smile",
|
|
4032
|
+
emoji: "\u{1F605}",
|
|
4033
|
+
aliases: [
|
|
4034
|
+
"phew"
|
|
4035
|
+
],
|
|
4036
|
+
keywords: [
|
|
4037
|
+
"nervous",
|
|
4038
|
+
"relief",
|
|
4039
|
+
"awkward"
|
|
4040
|
+
]
|
|
4041
|
+
},
|
|
4042
|
+
{
|
|
4043
|
+
shortcode: "laughing",
|
|
4044
|
+
emoji: "\u{1F606}",
|
|
4045
|
+
aliases: [
|
|
4046
|
+
"satisfied",
|
|
4047
|
+
"haha"
|
|
4048
|
+
],
|
|
4049
|
+
keywords: [
|
|
4050
|
+
"laugh",
|
|
4051
|
+
"happy"
|
|
4052
|
+
]
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
shortcode: "thinking",
|
|
4056
|
+
emoji: "\u{1F914}",
|
|
4057
|
+
aliases: [
|
|
4058
|
+
"thinking_face",
|
|
4059
|
+
"hmm"
|
|
4060
|
+
],
|
|
4061
|
+
keywords: [
|
|
4062
|
+
"wonder",
|
|
4063
|
+
"curious",
|
|
4064
|
+
"consider"
|
|
4065
|
+
]
|
|
4066
|
+
},
|
|
4067
|
+
{
|
|
4068
|
+
shortcode: "saluting_face",
|
|
4069
|
+
emoji: "\u{1FAE1}",
|
|
4070
|
+
aliases: [
|
|
4071
|
+
"salute"
|
|
4072
|
+
],
|
|
4073
|
+
keywords: [
|
|
4074
|
+
"respect",
|
|
4075
|
+
"roger",
|
|
4076
|
+
"aye"
|
|
4077
|
+
]
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
shortcode: "melting_face",
|
|
4081
|
+
emoji: "\u{1FAE0}",
|
|
4082
|
+
aliases: [
|
|
4083
|
+
"melting",
|
|
4084
|
+
"melt"
|
|
4085
|
+
],
|
|
4086
|
+
keywords: [
|
|
4087
|
+
"hot",
|
|
4088
|
+
"embarrassed",
|
|
4089
|
+
"awkward"
|
|
4090
|
+
]
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
shortcode: "shushing_face",
|
|
4094
|
+
emoji: "\u{1F92B}",
|
|
4095
|
+
aliases: [
|
|
4096
|
+
"shush",
|
|
4097
|
+
"quiet"
|
|
4098
|
+
],
|
|
4099
|
+
keywords: [
|
|
4100
|
+
"secret",
|
|
4101
|
+
"silent"
|
|
4102
|
+
]
|
|
4103
|
+
},
|
|
4104
|
+
{
|
|
4105
|
+
shortcode: "hugging_face",
|
|
4106
|
+
emoji: "\u{1F917}",
|
|
4107
|
+
aliases: [
|
|
4108
|
+
"hug",
|
|
4109
|
+
"hugs"
|
|
4110
|
+
],
|
|
4111
|
+
keywords: [
|
|
4112
|
+
"warm",
|
|
4113
|
+
"care"
|
|
4114
|
+
]
|
|
4115
|
+
},
|
|
4116
|
+
{
|
|
4117
|
+
shortcode: "hand_over_mouth",
|
|
4118
|
+
emoji: "\u{1F92D}",
|
|
4119
|
+
aliases: [
|
|
4120
|
+
"giggle",
|
|
4121
|
+
"oops"
|
|
4122
|
+
],
|
|
4123
|
+
keywords: [
|
|
4124
|
+
"shy",
|
|
4125
|
+
"whoops"
|
|
4126
|
+
]
|
|
4127
|
+
},
|
|
4128
|
+
{
|
|
4129
|
+
shortcode: "zipper_mouth_face",
|
|
4130
|
+
emoji: "\u{1F910}",
|
|
4131
|
+
aliases: [
|
|
4132
|
+
"zipper_mouth",
|
|
4133
|
+
"sealed"
|
|
4134
|
+
],
|
|
4135
|
+
keywords: [
|
|
4136
|
+
"secret",
|
|
4137
|
+
"quiet"
|
|
4138
|
+
]
|
|
4139
|
+
},
|
|
4140
|
+
{
|
|
4141
|
+
shortcode: "raised_eyebrow",
|
|
4142
|
+
emoji: "\u{1F928}",
|
|
4143
|
+
aliases: [
|
|
4144
|
+
"skeptical",
|
|
4145
|
+
"sus"
|
|
4146
|
+
],
|
|
4147
|
+
keywords: [
|
|
4148
|
+
"doubt",
|
|
4149
|
+
"suspicious"
|
|
4150
|
+
]
|
|
4151
|
+
},
|
|
4152
|
+
{
|
|
4153
|
+
shortcode: "neutral_face",
|
|
4154
|
+
emoji: "\u{1F610}",
|
|
4155
|
+
aliases: [
|
|
4156
|
+
"meh"
|
|
4157
|
+
],
|
|
4158
|
+
keywords: [
|
|
4159
|
+
"blank",
|
|
4160
|
+
"indifferent"
|
|
4161
|
+
]
|
|
4162
|
+
},
|
|
4163
|
+
{
|
|
4164
|
+
shortcode: "expressionless",
|
|
4165
|
+
emoji: "\u{1F611}",
|
|
4166
|
+
keywords: [
|
|
4167
|
+
"blank",
|
|
4168
|
+
"unimpressed"
|
|
4169
|
+
]
|
|
4170
|
+
},
|
|
4171
|
+
{
|
|
4172
|
+
shortcode: "smirk",
|
|
4173
|
+
emoji: "\u{1F60F}",
|
|
4174
|
+
keywords: [
|
|
4175
|
+
"smug",
|
|
4176
|
+
"sly"
|
|
4177
|
+
]
|
|
4178
|
+
},
|
|
4179
|
+
{
|
|
4180
|
+
shortcode: "unamused",
|
|
4181
|
+
emoji: "\u{1F612}",
|
|
4182
|
+
keywords: [
|
|
4183
|
+
"annoyed",
|
|
4184
|
+
"meh"
|
|
4185
|
+
]
|
|
4186
|
+
},
|
|
4187
|
+
{
|
|
4188
|
+
shortcode: "roll_eyes",
|
|
4189
|
+
emoji: "\u{1F644}",
|
|
4190
|
+
aliases: [
|
|
4191
|
+
"rolling_eyes"
|
|
4192
|
+
],
|
|
4193
|
+
keywords: [
|
|
4194
|
+
"whatever",
|
|
4195
|
+
"annoyed"
|
|
4196
|
+
]
|
|
4197
|
+
},
|
|
4198
|
+
{
|
|
4199
|
+
shortcode: "grimacing",
|
|
4200
|
+
emoji: "\u{1F62C}",
|
|
4201
|
+
aliases: [
|
|
4202
|
+
"grimace",
|
|
4203
|
+
"awkward"
|
|
4204
|
+
],
|
|
4205
|
+
keywords: [
|
|
4206
|
+
"yikes",
|
|
4207
|
+
"nervous"
|
|
4208
|
+
]
|
|
4209
|
+
},
|
|
4210
|
+
{
|
|
4211
|
+
shortcode: "relieved",
|
|
4212
|
+
emoji: "\u{1F60C}",
|
|
4213
|
+
keywords: [
|
|
4214
|
+
"calm",
|
|
4215
|
+
"peaceful"
|
|
4216
|
+
]
|
|
4217
|
+
},
|
|
4218
|
+
{
|
|
4219
|
+
shortcode: "pensive",
|
|
4220
|
+
emoji: "\u{1F614}",
|
|
4221
|
+
keywords: [
|
|
4222
|
+
"sad",
|
|
4223
|
+
"thoughtful"
|
|
4224
|
+
]
|
|
4225
|
+
},
|
|
4226
|
+
{
|
|
4227
|
+
shortcode: "sleepy",
|
|
4228
|
+
emoji: "\u{1F62A}",
|
|
4229
|
+
keywords: [
|
|
4230
|
+
"tired",
|
|
4231
|
+
"sleep"
|
|
4232
|
+
]
|
|
4233
|
+
},
|
|
4234
|
+
{
|
|
4235
|
+
shortcode: "sleeping",
|
|
4236
|
+
emoji: "\u{1F634}",
|
|
4237
|
+
aliases: [
|
|
4238
|
+
"zzz"
|
|
4239
|
+
],
|
|
4240
|
+
keywords: [
|
|
4241
|
+
"tired",
|
|
4242
|
+
"nap",
|
|
4243
|
+
"bed"
|
|
4244
|
+
]
|
|
4245
|
+
},
|
|
4246
|
+
{
|
|
4247
|
+
shortcode: "yawning_face",
|
|
4248
|
+
emoji: "\u{1F971}",
|
|
4249
|
+
aliases: [
|
|
4250
|
+
"yawn"
|
|
4251
|
+
],
|
|
4252
|
+
keywords: [
|
|
4253
|
+
"bored",
|
|
4254
|
+
"tired"
|
|
4255
|
+
]
|
|
4256
|
+
},
|
|
4257
|
+
{
|
|
4258
|
+
shortcode: "sunglasses",
|
|
4259
|
+
emoji: "\u{1F60E}",
|
|
4260
|
+
aliases: [
|
|
4261
|
+
"cool"
|
|
4262
|
+
],
|
|
4263
|
+
keywords: [
|
|
4264
|
+
"awesome",
|
|
4265
|
+
"chill"
|
|
4266
|
+
]
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
shortcode: "nerd_face",
|
|
4270
|
+
emoji: "\u{1F913}",
|
|
4271
|
+
aliases: [
|
|
4272
|
+
"nerd",
|
|
4273
|
+
"geek"
|
|
4274
|
+
],
|
|
4275
|
+
keywords: [
|
|
4276
|
+
"glasses",
|
|
4277
|
+
"smart"
|
|
4278
|
+
]
|
|
4279
|
+
},
|
|
4280
|
+
{
|
|
4281
|
+
shortcode: "monocle_face",
|
|
4282
|
+
emoji: "\u{1F9D0}",
|
|
4283
|
+
aliases: [
|
|
4284
|
+
"monocle",
|
|
4285
|
+
"inspect"
|
|
4286
|
+
],
|
|
4287
|
+
keywords: [
|
|
4288
|
+
"curious",
|
|
4289
|
+
"investigate"
|
|
4290
|
+
]
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
shortcode: "confused",
|
|
4294
|
+
emoji: "\u{1F615}",
|
|
4295
|
+
keywords: [
|
|
4296
|
+
"unsure",
|
|
4297
|
+
"puzzled"
|
|
4298
|
+
]
|
|
4299
|
+
},
|
|
4300
|
+
{
|
|
4301
|
+
shortcode: "worried",
|
|
4302
|
+
emoji: "\u{1F61F}",
|
|
4303
|
+
keywords: [
|
|
4304
|
+
"concerned",
|
|
4305
|
+
"anxious"
|
|
4306
|
+
]
|
|
4307
|
+
},
|
|
4308
|
+
{
|
|
4309
|
+
shortcode: "slightly_frowning_face",
|
|
4310
|
+
emoji: "\u{1F641}",
|
|
4311
|
+
aliases: [
|
|
4312
|
+
"frown",
|
|
4313
|
+
"sad"
|
|
4314
|
+
],
|
|
4315
|
+
keywords: [
|
|
4316
|
+
"unhappy"
|
|
4317
|
+
]
|
|
4318
|
+
},
|
|
4319
|
+
{
|
|
4320
|
+
shortcode: "open_mouth",
|
|
4321
|
+
emoji: "\u{1F62E}",
|
|
4322
|
+
aliases: [
|
|
4323
|
+
"wow",
|
|
4324
|
+
"surprised"
|
|
4325
|
+
],
|
|
4326
|
+
keywords: [
|
|
4327
|
+
"shock",
|
|
4328
|
+
"gasp"
|
|
4329
|
+
]
|
|
4330
|
+
},
|
|
4331
|
+
{
|
|
4332
|
+
shortcode: "hushed",
|
|
4333
|
+
emoji: "\u{1F62F}",
|
|
4334
|
+
keywords: [
|
|
4335
|
+
"surprised",
|
|
4336
|
+
"stunned"
|
|
4337
|
+
]
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
shortcode: "astonished",
|
|
4341
|
+
emoji: "\u{1F632}",
|
|
4342
|
+
keywords: [
|
|
4343
|
+
"amazed",
|
|
4344
|
+
"shocked"
|
|
4345
|
+
]
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
shortcode: "flushed",
|
|
4349
|
+
emoji: "\u{1F633}",
|
|
4350
|
+
aliases: [
|
|
4351
|
+
"embarrassed"
|
|
4352
|
+
],
|
|
4353
|
+
keywords: [
|
|
4354
|
+
"blush",
|
|
4355
|
+
"shocked"
|
|
4356
|
+
]
|
|
4357
|
+
},
|
|
4358
|
+
{
|
|
4359
|
+
shortcode: "pleading_face",
|
|
4360
|
+
emoji: "\u{1F97A}",
|
|
4361
|
+
aliases: [
|
|
4362
|
+
"pleading",
|
|
4363
|
+
"puppy_eyes"
|
|
4364
|
+
],
|
|
4365
|
+
keywords: [
|
|
4366
|
+
"please",
|
|
4367
|
+
"cute",
|
|
4368
|
+
"sad"
|
|
4369
|
+
]
|
|
4370
|
+
},
|
|
4371
|
+
{
|
|
4372
|
+
shortcode: "cry",
|
|
4373
|
+
emoji: "\u{1F622}",
|
|
4374
|
+
keywords: [
|
|
4375
|
+
"sad",
|
|
4376
|
+
"tear"
|
|
4377
|
+
]
|
|
4378
|
+
},
|
|
4379
|
+
{
|
|
4380
|
+
shortcode: "sob",
|
|
4381
|
+
emoji: "\u{1F62D}",
|
|
4382
|
+
aliases: [
|
|
4383
|
+
"crying"
|
|
4384
|
+
],
|
|
4385
|
+
keywords: [
|
|
4386
|
+
"sad",
|
|
4387
|
+
"tears",
|
|
4388
|
+
"bawling"
|
|
4389
|
+
]
|
|
4390
|
+
},
|
|
4391
|
+
{
|
|
4392
|
+
shortcode: "scream",
|
|
4393
|
+
emoji: "\u{1F631}",
|
|
4394
|
+
aliases: [
|
|
4395
|
+
"omg"
|
|
4396
|
+
],
|
|
4397
|
+
keywords: [
|
|
4398
|
+
"shock",
|
|
4399
|
+
"scared",
|
|
4400
|
+
"fear"
|
|
4401
|
+
]
|
|
4402
|
+
},
|
|
4403
|
+
{
|
|
4404
|
+
shortcode: "disappointed",
|
|
4405
|
+
emoji: "\u{1F61E}",
|
|
4406
|
+
keywords: [
|
|
4407
|
+
"sad",
|
|
4408
|
+
"letdown"
|
|
4409
|
+
]
|
|
4410
|
+
},
|
|
4411
|
+
{
|
|
4412
|
+
shortcode: "sweat",
|
|
4413
|
+
emoji: "\u{1F613}",
|
|
4414
|
+
keywords: [
|
|
4415
|
+
"stressed",
|
|
4416
|
+
"hard_work"
|
|
4417
|
+
]
|
|
4418
|
+
},
|
|
4419
|
+
{
|
|
4420
|
+
shortcode: "tired_face",
|
|
4421
|
+
emoji: "\u{1F62B}",
|
|
4422
|
+
aliases: [
|
|
4423
|
+
"tired",
|
|
4424
|
+
"exhausted"
|
|
4425
|
+
],
|
|
4426
|
+
keywords: [
|
|
4427
|
+
"weary"
|
|
4428
|
+
]
|
|
4429
|
+
},
|
|
4430
|
+
{
|
|
4431
|
+
shortcode: "triumph",
|
|
4432
|
+
emoji: "\u{1F624}",
|
|
4433
|
+
aliases: [
|
|
4434
|
+
"huff"
|
|
4435
|
+
],
|
|
4436
|
+
keywords: [
|
|
4437
|
+
"frustrated",
|
|
4438
|
+
"proud"
|
|
4439
|
+
]
|
|
4440
|
+
},
|
|
4441
|
+
{
|
|
4442
|
+
shortcode: "angry",
|
|
4443
|
+
emoji: "\u{1F620}",
|
|
4444
|
+
aliases: [
|
|
4445
|
+
"mad"
|
|
4446
|
+
],
|
|
4447
|
+
keywords: [
|
|
4448
|
+
"annoyed",
|
|
4449
|
+
"grumpy"
|
|
4450
|
+
]
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
shortcode: "rage",
|
|
4454
|
+
emoji: "\u{1F621}",
|
|
4455
|
+
aliases: [
|
|
4456
|
+
"furious"
|
|
4457
|
+
],
|
|
4458
|
+
keywords: [
|
|
4459
|
+
"angry",
|
|
4460
|
+
"mad"
|
|
4461
|
+
]
|
|
4462
|
+
},
|
|
4463
|
+
{
|
|
4464
|
+
shortcode: "cursing_face",
|
|
4465
|
+
emoji: "\u{1F92C}",
|
|
4466
|
+
aliases: [
|
|
4467
|
+
"swearing"
|
|
4468
|
+
],
|
|
4469
|
+
keywords: [
|
|
4470
|
+
"angry",
|
|
4471
|
+
"mad"
|
|
4472
|
+
]
|
|
4473
|
+
},
|
|
4474
|
+
{
|
|
4475
|
+
shortcode: "exploding_head",
|
|
4476
|
+
emoji: "\u{1F92F}",
|
|
4477
|
+
aliases: [
|
|
4478
|
+
"mind_blown",
|
|
4479
|
+
"mindblown"
|
|
4480
|
+
],
|
|
4481
|
+
keywords: [
|
|
4482
|
+
"shocked",
|
|
4483
|
+
"amazed",
|
|
4484
|
+
"boom"
|
|
4485
|
+
]
|
|
4486
|
+
},
|
|
4487
|
+
{
|
|
4488
|
+
shortcode: "partying_face",
|
|
4489
|
+
emoji: "\u{1F973}",
|
|
4490
|
+
aliases: [
|
|
4491
|
+
"celebrate"
|
|
4492
|
+
],
|
|
4493
|
+
keywords: [
|
|
4494
|
+
"party",
|
|
4495
|
+
"birthday",
|
|
4496
|
+
"woohoo"
|
|
4497
|
+
]
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
shortcode: "smiling_face_with_tear",
|
|
4501
|
+
emoji: "\u{1F972}",
|
|
4502
|
+
aliases: [
|
|
4503
|
+
"happy_cry"
|
|
4504
|
+
],
|
|
4505
|
+
keywords: [
|
|
4506
|
+
"touched",
|
|
4507
|
+
"bittersweet"
|
|
4508
|
+
]
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
shortcode: "hot_face",
|
|
4512
|
+
emoji: "\u{1F975}",
|
|
4513
|
+
keywords: [
|
|
4514
|
+
"heat",
|
|
4515
|
+
"sweating"
|
|
4516
|
+
]
|
|
4517
|
+
},
|
|
4518
|
+
{
|
|
4519
|
+
shortcode: "cold_face",
|
|
4520
|
+
emoji: "\u{1F976}",
|
|
4521
|
+
aliases: [
|
|
4522
|
+
"freezing"
|
|
4523
|
+
],
|
|
4524
|
+
keywords: [
|
|
4525
|
+
"cold",
|
|
4526
|
+
"ice"
|
|
4527
|
+
]
|
|
4528
|
+
},
|
|
4529
|
+
{
|
|
4530
|
+
shortcode: "nauseated_face",
|
|
4531
|
+
emoji: "\u{1F922}",
|
|
4532
|
+
aliases: [
|
|
4533
|
+
"sick"
|
|
4534
|
+
],
|
|
4535
|
+
keywords: [
|
|
4536
|
+
"gross",
|
|
4537
|
+
"ill"
|
|
4538
|
+
]
|
|
4539
|
+
},
|
|
4540
|
+
{
|
|
4541
|
+
shortcode: "mask",
|
|
4542
|
+
emoji: "\u{1F637}",
|
|
4543
|
+
keywords: [
|
|
4544
|
+
"sick",
|
|
4545
|
+
"doctor"
|
|
4546
|
+
]
|
|
4547
|
+
},
|
|
4548
|
+
{
|
|
4549
|
+
shortcode: "clown_face",
|
|
4550
|
+
emoji: "\u{1F921}",
|
|
4551
|
+
aliases: [
|
|
4552
|
+
"clown"
|
|
4553
|
+
],
|
|
4554
|
+
keywords: [
|
|
4555
|
+
"silly",
|
|
4556
|
+
"joke"
|
|
4557
|
+
]
|
|
4558
|
+
},
|
|
4559
|
+
{
|
|
4560
|
+
shortcode: "smiling_imp",
|
|
4561
|
+
emoji: "\u{1F608}",
|
|
4562
|
+
aliases: [
|
|
4563
|
+
"devil"
|
|
4564
|
+
],
|
|
4565
|
+
keywords: [
|
|
4566
|
+
"evil",
|
|
4567
|
+
"mischief"
|
|
4568
|
+
]
|
|
4569
|
+
},
|
|
4570
|
+
{
|
|
4571
|
+
shortcode: "skull",
|
|
4572
|
+
emoji: "\u{1F480}",
|
|
4573
|
+
aliases: [
|
|
4574
|
+
"dead"
|
|
4575
|
+
],
|
|
4576
|
+
keywords: [
|
|
4577
|
+
"rip",
|
|
4578
|
+
"laugh",
|
|
4579
|
+
"skeleton"
|
|
4580
|
+
]
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
shortcode: "poop",
|
|
4584
|
+
emoji: "\u{1F4A9}",
|
|
4585
|
+
aliases: [
|
|
4586
|
+
"hankey",
|
|
4587
|
+
"shit"
|
|
4588
|
+
],
|
|
4589
|
+
keywords: [
|
|
4590
|
+
"crap",
|
|
4591
|
+
"funny"
|
|
4592
|
+
]
|
|
4593
|
+
},
|
|
4594
|
+
{
|
|
4595
|
+
shortcode: "ghost",
|
|
4596
|
+
emoji: "\u{1F47B}",
|
|
4597
|
+
keywords: [
|
|
4598
|
+
"spooky",
|
|
4599
|
+
"halloween"
|
|
4600
|
+
]
|
|
4601
|
+
},
|
|
4602
|
+
{
|
|
4603
|
+
shortcode: "robot",
|
|
4604
|
+
emoji: "\u{1F916}",
|
|
4605
|
+
aliases: [
|
|
4606
|
+
"bot",
|
|
4607
|
+
"ai"
|
|
4608
|
+
],
|
|
4609
|
+
keywords: [
|
|
4610
|
+
"agent",
|
|
4611
|
+
"machine"
|
|
4612
|
+
]
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
shortcode: "alien",
|
|
4616
|
+
emoji: "\u{1F47D}",
|
|
4617
|
+
keywords: [
|
|
4618
|
+
"space",
|
|
4619
|
+
"ufo"
|
|
4620
|
+
]
|
|
4621
|
+
},
|
|
4622
|
+
{
|
|
4623
|
+
shortcode: "see_no_evil",
|
|
4624
|
+
emoji: "\u{1F648}",
|
|
4625
|
+
keywords: [
|
|
4626
|
+
"monkey",
|
|
4627
|
+
"oops",
|
|
4628
|
+
"shy"
|
|
4629
|
+
]
|
|
4630
|
+
},
|
|
4631
|
+
{
|
|
4632
|
+
shortcode: "hear_no_evil",
|
|
4633
|
+
emoji: "\u{1F649}",
|
|
4634
|
+
keywords: [
|
|
4635
|
+
"monkey"
|
|
4636
|
+
]
|
|
4637
|
+
},
|
|
4638
|
+
{
|
|
4639
|
+
shortcode: "speak_no_evil",
|
|
4640
|
+
emoji: "\u{1F64A}",
|
|
4641
|
+
keywords: [
|
|
4642
|
+
"monkey",
|
|
4643
|
+
"oops"
|
|
4644
|
+
]
|
|
4645
|
+
},
|
|
4646
|
+
{
|
|
4647
|
+
shortcode: "wave",
|
|
4648
|
+
emoji: "\u{1F44B}",
|
|
4649
|
+
aliases: [
|
|
4650
|
+
"hi",
|
|
4651
|
+
"hello",
|
|
4652
|
+
"bye"
|
|
4653
|
+
],
|
|
4654
|
+
keywords: [
|
|
4655
|
+
"greet",
|
|
4656
|
+
"hand"
|
|
4657
|
+
]
|
|
4658
|
+
},
|
|
4659
|
+
{
|
|
4660
|
+
shortcode: "clap",
|
|
4661
|
+
emoji: "\u{1F44F}",
|
|
4662
|
+
aliases: [
|
|
4663
|
+
"applause",
|
|
4664
|
+
"bravo"
|
|
4665
|
+
],
|
|
4666
|
+
keywords: [
|
|
4667
|
+
"congrats",
|
|
4668
|
+
"praise"
|
|
4669
|
+
]
|
|
4670
|
+
},
|
|
4671
|
+
{
|
|
4672
|
+
shortcode: "raised_hands",
|
|
4673
|
+
emoji: "\u{1F64C}",
|
|
4674
|
+
aliases: [
|
|
4675
|
+
"hooray",
|
|
4676
|
+
"yay"
|
|
4677
|
+
],
|
|
4678
|
+
keywords: [
|
|
4679
|
+
"celebrate",
|
|
4680
|
+
"praise"
|
|
4681
|
+
]
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
shortcode: "ok_hand",
|
|
4685
|
+
emoji: "\u{1F44C}",
|
|
4686
|
+
aliases: [
|
|
4687
|
+
"ok",
|
|
4688
|
+
"nice"
|
|
4689
|
+
],
|
|
4690
|
+
keywords: [
|
|
4691
|
+
"perfect",
|
|
4692
|
+
"good"
|
|
4693
|
+
]
|
|
4694
|
+
},
|
|
4695
|
+
{
|
|
4696
|
+
shortcode: "pinched_fingers",
|
|
4697
|
+
emoji: "\u{1F90C}",
|
|
4698
|
+
aliases: [
|
|
4699
|
+
"chefs_kiss"
|
|
4700
|
+
],
|
|
4701
|
+
keywords: [
|
|
4702
|
+
"italian",
|
|
4703
|
+
"perfect"
|
|
4704
|
+
]
|
|
4705
|
+
},
|
|
4706
|
+
{
|
|
4707
|
+
shortcode: "v",
|
|
4708
|
+
emoji: "\u270C\uFE0F",
|
|
4709
|
+
aliases: [
|
|
4710
|
+
"peace",
|
|
4711
|
+
"victory"
|
|
4712
|
+
],
|
|
4713
|
+
keywords: [
|
|
4714
|
+
"hand"
|
|
4715
|
+
]
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
shortcode: "crossed_fingers",
|
|
4719
|
+
emoji: "\u{1F91E}",
|
|
4720
|
+
aliases: [
|
|
4721
|
+
"fingers_crossed",
|
|
4722
|
+
"luck"
|
|
4723
|
+
],
|
|
4724
|
+
keywords: [
|
|
4725
|
+
"hope"
|
|
4726
|
+
]
|
|
4727
|
+
},
|
|
4728
|
+
{
|
|
4729
|
+
shortcode: "handshake",
|
|
4730
|
+
emoji: "\u{1F91D}",
|
|
4731
|
+
aliases: [
|
|
4732
|
+
"deal"
|
|
4733
|
+
],
|
|
4734
|
+
keywords: [
|
|
4735
|
+
"agree",
|
|
4736
|
+
"partner"
|
|
4737
|
+
]
|
|
4738
|
+
},
|
|
4739
|
+
{
|
|
4740
|
+
shortcode: "muscle",
|
|
4741
|
+
emoji: "\u{1F4AA}",
|
|
4742
|
+
aliases: [
|
|
4743
|
+
"strong",
|
|
4744
|
+
"flex"
|
|
4745
|
+
],
|
|
4746
|
+
keywords: [
|
|
4747
|
+
"power",
|
|
4748
|
+
"gym",
|
|
4749
|
+
"got_this"
|
|
4750
|
+
]
|
|
4751
|
+
},
|
|
4752
|
+
{
|
|
4753
|
+
shortcode: "fist",
|
|
4754
|
+
emoji: "\u270A",
|
|
4755
|
+
keywords: [
|
|
4756
|
+
"power",
|
|
4757
|
+
"solidarity"
|
|
4758
|
+
]
|
|
4759
|
+
},
|
|
4760
|
+
{
|
|
4761
|
+
shortcode: "punch",
|
|
4762
|
+
emoji: "\u{1F44A}",
|
|
4763
|
+
aliases: [
|
|
4764
|
+
"fist_bump",
|
|
4765
|
+
"brofist"
|
|
4766
|
+
],
|
|
4767
|
+
keywords: [
|
|
4768
|
+
"bump"
|
|
4769
|
+
]
|
|
4770
|
+
},
|
|
4771
|
+
{
|
|
4772
|
+
shortcode: "raised_hand",
|
|
4773
|
+
emoji: "\u270B",
|
|
4774
|
+
aliases: [
|
|
4775
|
+
"hand",
|
|
4776
|
+
"stop"
|
|
4777
|
+
],
|
|
4778
|
+
keywords: [
|
|
4779
|
+
"high_five"
|
|
4780
|
+
]
|
|
4781
|
+
},
|
|
4782
|
+
{
|
|
4783
|
+
shortcode: "point_up",
|
|
4784
|
+
emoji: "\u261D\uFE0F",
|
|
4785
|
+
keywords: [
|
|
4786
|
+
"this",
|
|
4787
|
+
"actually"
|
|
4788
|
+
]
|
|
4789
|
+
},
|
|
4790
|
+
{
|
|
4791
|
+
shortcode: "point_right",
|
|
4792
|
+
emoji: "\u{1F449}",
|
|
4793
|
+
keywords: [
|
|
4794
|
+
"arrow",
|
|
4795
|
+
"direction"
|
|
4796
|
+
]
|
|
4797
|
+
},
|
|
4798
|
+
{
|
|
4799
|
+
shortcode: "point_left",
|
|
4800
|
+
emoji: "\u{1F448}",
|
|
4801
|
+
keywords: [
|
|
4802
|
+
"arrow",
|
|
4803
|
+
"direction"
|
|
4804
|
+
]
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
shortcode: "point_down",
|
|
4808
|
+
emoji: "\u{1F447}",
|
|
4809
|
+
keywords: [
|
|
4810
|
+
"below",
|
|
4811
|
+
"direction"
|
|
4812
|
+
]
|
|
4813
|
+
},
|
|
4814
|
+
{
|
|
4815
|
+
shortcode: "metal",
|
|
4816
|
+
emoji: "\u{1F918}",
|
|
4817
|
+
aliases: [
|
|
4818
|
+
"rock_on"
|
|
4819
|
+
],
|
|
4820
|
+
keywords: [
|
|
4821
|
+
"rock",
|
|
4822
|
+
"music"
|
|
4823
|
+
]
|
|
4824
|
+
},
|
|
4825
|
+
{
|
|
4826
|
+
shortcode: "call_me_hand",
|
|
4827
|
+
emoji: "\u{1F919}",
|
|
4828
|
+
aliases: [
|
|
4829
|
+
"call_me",
|
|
4830
|
+
"shaka"
|
|
4831
|
+
],
|
|
4832
|
+
keywords: [
|
|
4833
|
+
"chill",
|
|
4834
|
+
"hang_loose"
|
|
4835
|
+
]
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
shortcode: "writing_hand",
|
|
4839
|
+
emoji: "\u270D\uFE0F",
|
|
4840
|
+
aliases: [
|
|
4841
|
+
"write"
|
|
4842
|
+
],
|
|
4843
|
+
keywords: [
|
|
4844
|
+
"note",
|
|
4845
|
+
"sign"
|
|
4846
|
+
]
|
|
4847
|
+
},
|
|
4848
|
+
{
|
|
4849
|
+
shortcode: "shrug",
|
|
4850
|
+
emoji: "\u{1F937}",
|
|
4851
|
+
aliases: [
|
|
4852
|
+
"dunno",
|
|
4853
|
+
"idk"
|
|
4854
|
+
],
|
|
4855
|
+
keywords: [
|
|
4856
|
+
"whatever"
|
|
4857
|
+
]
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
shortcode: "facepalm",
|
|
4861
|
+
emoji: "\u{1F926}",
|
|
4862
|
+
aliases: [
|
|
4863
|
+
"doh"
|
|
4864
|
+
],
|
|
4865
|
+
keywords: [
|
|
4866
|
+
"smh",
|
|
4867
|
+
"oops"
|
|
4868
|
+
]
|
|
4869
|
+
},
|
|
4870
|
+
{
|
|
4871
|
+
shortcode: "brain",
|
|
4872
|
+
emoji: "\u{1F9E0}",
|
|
4873
|
+
aliases: [
|
|
4874
|
+
"smart"
|
|
4875
|
+
],
|
|
4876
|
+
keywords: [
|
|
4877
|
+
"think",
|
|
4878
|
+
"idea",
|
|
4879
|
+
"mind"
|
|
4880
|
+
]
|
|
4881
|
+
},
|
|
4882
|
+
{
|
|
4883
|
+
shortcode: "broken_heart",
|
|
4884
|
+
emoji: "\u{1F494}",
|
|
4885
|
+
keywords: [
|
|
4886
|
+
"sad",
|
|
4887
|
+
"heartbreak"
|
|
4888
|
+
]
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
shortcode: "sparkling_heart",
|
|
4892
|
+
emoji: "\u{1F496}",
|
|
4893
|
+
keywords: [
|
|
4894
|
+
"love",
|
|
4895
|
+
"sparkle"
|
|
4896
|
+
]
|
|
4897
|
+
},
|
|
4898
|
+
{
|
|
4899
|
+
shortcode: "orange_heart",
|
|
4900
|
+
emoji: "\u{1F9E1}",
|
|
4901
|
+
keywords: [
|
|
4902
|
+
"love"
|
|
4903
|
+
]
|
|
4904
|
+
},
|
|
4905
|
+
{
|
|
4906
|
+
shortcode: "yellow_heart",
|
|
4907
|
+
emoji: "\u{1F49B}",
|
|
4908
|
+
keywords: [
|
|
4909
|
+
"love"
|
|
4910
|
+
]
|
|
4911
|
+
},
|
|
4912
|
+
{
|
|
4913
|
+
shortcode: "green_heart",
|
|
4914
|
+
emoji: "\u{1F49A}",
|
|
4915
|
+
keywords: [
|
|
4916
|
+
"love"
|
|
4917
|
+
]
|
|
4918
|
+
},
|
|
4919
|
+
{
|
|
4920
|
+
shortcode: "blue_heart",
|
|
4921
|
+
emoji: "\u{1F499}",
|
|
4922
|
+
keywords: [
|
|
4923
|
+
"love"
|
|
4924
|
+
]
|
|
4925
|
+
},
|
|
4926
|
+
{
|
|
4927
|
+
shortcode: "purple_heart",
|
|
4928
|
+
emoji: "\u{1F49C}",
|
|
4929
|
+
keywords: [
|
|
4930
|
+
"love"
|
|
4931
|
+
]
|
|
4932
|
+
},
|
|
4933
|
+
{
|
|
4934
|
+
shortcode: "black_heart",
|
|
4935
|
+
emoji: "\u{1F5A4}",
|
|
4936
|
+
keywords: [
|
|
4937
|
+
"love"
|
|
4938
|
+
]
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
shortcode: "white_heart",
|
|
4942
|
+
emoji: "\u{1F90D}",
|
|
4943
|
+
keywords: [
|
|
4944
|
+
"love"
|
|
4945
|
+
]
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
shortcode: "white_check_mark",
|
|
4949
|
+
emoji: "\u2705",
|
|
4950
|
+
aliases: [
|
|
4951
|
+
"check",
|
|
4952
|
+
"done",
|
|
4953
|
+
"checkmark"
|
|
4954
|
+
],
|
|
4955
|
+
keywords: [
|
|
4956
|
+
"yes",
|
|
4957
|
+
"complete",
|
|
4958
|
+
"pass",
|
|
4959
|
+
"ok"
|
|
4960
|
+
]
|
|
4961
|
+
},
|
|
4962
|
+
{
|
|
4963
|
+
shortcode: "heavy_check_mark",
|
|
4964
|
+
emoji: "\u2714\uFE0F",
|
|
4965
|
+
keywords: [
|
|
4966
|
+
"done",
|
|
4967
|
+
"check",
|
|
4968
|
+
"yes"
|
|
4969
|
+
]
|
|
4970
|
+
},
|
|
4971
|
+
{
|
|
4972
|
+
shortcode: "x",
|
|
4973
|
+
emoji: "\u274C",
|
|
4974
|
+
aliases: [
|
|
4975
|
+
"cross",
|
|
4976
|
+
"cancel",
|
|
4977
|
+
"fail"
|
|
4978
|
+
],
|
|
4979
|
+
keywords: [
|
|
4980
|
+
"no",
|
|
4981
|
+
"wrong",
|
|
4982
|
+
"delete"
|
|
4983
|
+
]
|
|
4984
|
+
},
|
|
4985
|
+
{
|
|
4986
|
+
shortcode: "warning",
|
|
4987
|
+
emoji: "\u26A0\uFE0F",
|
|
4988
|
+
aliases: [
|
|
4989
|
+
"warn",
|
|
4990
|
+
"alert"
|
|
4991
|
+
],
|
|
4992
|
+
keywords: [
|
|
4993
|
+
"caution",
|
|
4994
|
+
"danger"
|
|
4995
|
+
]
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
shortcode: "question",
|
|
4999
|
+
emoji: "\u2753",
|
|
5000
|
+
keywords: [
|
|
5001
|
+
"ask",
|
|
5002
|
+
"help",
|
|
5003
|
+
"huh"
|
|
5004
|
+
]
|
|
5005
|
+
},
|
|
5006
|
+
{
|
|
5007
|
+
shortcode: "exclamation",
|
|
5008
|
+
emoji: "\u2757",
|
|
5009
|
+
aliases: [
|
|
5010
|
+
"bang",
|
|
5011
|
+
"important"
|
|
5012
|
+
],
|
|
5013
|
+
keywords: [
|
|
5014
|
+
"alert",
|
|
5015
|
+
"attention"
|
|
5016
|
+
]
|
|
5017
|
+
},
|
|
5018
|
+
{
|
|
5019
|
+
shortcode: "no_entry",
|
|
5020
|
+
emoji: "\u26D4",
|
|
5021
|
+
aliases: [
|
|
5022
|
+
"blocked"
|
|
5023
|
+
],
|
|
5024
|
+
keywords: [
|
|
5025
|
+
"stop",
|
|
5026
|
+
"forbidden"
|
|
5027
|
+
]
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
shortcode: "stop_sign",
|
|
5031
|
+
emoji: "\u{1F6D1}",
|
|
5032
|
+
keywords: [
|
|
5033
|
+
"halt",
|
|
5034
|
+
"wait"
|
|
5035
|
+
]
|
|
5036
|
+
},
|
|
5037
|
+
{
|
|
5038
|
+
shortcode: "sparkles",
|
|
5039
|
+
emoji: "\u2728",
|
|
5040
|
+
aliases: [
|
|
5041
|
+
"magic",
|
|
5042
|
+
"shiny"
|
|
5043
|
+
],
|
|
5044
|
+
keywords: [
|
|
5045
|
+
"clean",
|
|
5046
|
+
"new",
|
|
5047
|
+
"glitter"
|
|
5048
|
+
]
|
|
5049
|
+
},
|
|
5050
|
+
{
|
|
5051
|
+
shortcode: "star",
|
|
5052
|
+
emoji: "\u2B50",
|
|
5053
|
+
keywords: [
|
|
5054
|
+
"favorite",
|
|
5055
|
+
"gold",
|
|
5056
|
+
"rating"
|
|
5057
|
+
]
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
shortcode: "star2",
|
|
5061
|
+
emoji: "\u{1F31F}",
|
|
5062
|
+
aliases: [
|
|
5063
|
+
"glowing_star"
|
|
5064
|
+
],
|
|
5065
|
+
keywords: [
|
|
5066
|
+
"bright",
|
|
5067
|
+
"awesome"
|
|
5068
|
+
]
|
|
5069
|
+
},
|
|
5070
|
+
{
|
|
5071
|
+
shortcode: "zap",
|
|
5072
|
+
emoji: "\u26A1",
|
|
5073
|
+
aliases: [
|
|
5074
|
+
"lightning",
|
|
5075
|
+
"fast"
|
|
5076
|
+
],
|
|
5077
|
+
keywords: [
|
|
5078
|
+
"electric",
|
|
5079
|
+
"bolt",
|
|
5080
|
+
"quick"
|
|
5081
|
+
]
|
|
5082
|
+
},
|
|
5083
|
+
{
|
|
5084
|
+
shortcode: "boom",
|
|
5085
|
+
emoji: "\u{1F4A5}",
|
|
5086
|
+
aliases: [
|
|
5087
|
+
"collision",
|
|
5088
|
+
"explosion"
|
|
5089
|
+
],
|
|
5090
|
+
keywords: [
|
|
5091
|
+
"bang",
|
|
5092
|
+
"impact"
|
|
5093
|
+
]
|
|
5094
|
+
},
|
|
5095
|
+
{
|
|
5096
|
+
shortcode: "bulb",
|
|
5097
|
+
emoji: "\u{1F4A1}",
|
|
5098
|
+
aliases: [
|
|
5099
|
+
"idea",
|
|
5100
|
+
"lightbulb"
|
|
5101
|
+
],
|
|
5102
|
+
keywords: [
|
|
5103
|
+
"tip",
|
|
5104
|
+
"thought"
|
|
5105
|
+
]
|
|
5106
|
+
},
|
|
5107
|
+
{
|
|
5108
|
+
shortcode: "trophy",
|
|
5109
|
+
emoji: "\u{1F3C6}",
|
|
5110
|
+
aliases: [
|
|
5111
|
+
"win",
|
|
5112
|
+
"winner"
|
|
5113
|
+
],
|
|
5114
|
+
keywords: [
|
|
5115
|
+
"award",
|
|
5116
|
+
"prize",
|
|
5117
|
+
"champion"
|
|
5118
|
+
]
|
|
5119
|
+
},
|
|
5120
|
+
{
|
|
5121
|
+
shortcode: "medal",
|
|
5122
|
+
emoji: "\u{1F3C5}",
|
|
5123
|
+
keywords: [
|
|
5124
|
+
"award",
|
|
5125
|
+
"win"
|
|
5126
|
+
]
|
|
5127
|
+
},
|
|
5128
|
+
{
|
|
5129
|
+
shortcode: "crown",
|
|
5130
|
+
emoji: "\u{1F451}",
|
|
5131
|
+
aliases: [
|
|
5132
|
+
"king",
|
|
5133
|
+
"queen"
|
|
5134
|
+
],
|
|
5135
|
+
keywords: [
|
|
5136
|
+
"royal",
|
|
5137
|
+
"best"
|
|
5138
|
+
]
|
|
5139
|
+
},
|
|
5140
|
+
{
|
|
5141
|
+
shortcode: "gem",
|
|
5142
|
+
emoji: "\u{1F48E}",
|
|
5143
|
+
aliases: [
|
|
5144
|
+
"diamond"
|
|
5145
|
+
],
|
|
5146
|
+
keywords: [
|
|
5147
|
+
"precious",
|
|
5148
|
+
"rare"
|
|
5149
|
+
]
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
shortcode: "dart",
|
|
5153
|
+
emoji: "\u{1F3AF}",
|
|
5154
|
+
aliases: [
|
|
5155
|
+
"bullseye",
|
|
5156
|
+
"target"
|
|
5157
|
+
],
|
|
5158
|
+
keywords: [
|
|
5159
|
+
"goal",
|
|
5160
|
+
"hit",
|
|
5161
|
+
"exact"
|
|
5162
|
+
]
|
|
5163
|
+
},
|
|
5164
|
+
{
|
|
5165
|
+
shortcode: "gift",
|
|
5166
|
+
emoji: "\u{1F381}",
|
|
5167
|
+
aliases: [
|
|
5168
|
+
"present"
|
|
5169
|
+
],
|
|
5170
|
+
keywords: [
|
|
5171
|
+
"birthday",
|
|
5172
|
+
"box"
|
|
5173
|
+
]
|
|
5174
|
+
},
|
|
5175
|
+
{
|
|
5176
|
+
shortcode: "balloon",
|
|
5177
|
+
emoji: "\u{1F388}",
|
|
5178
|
+
keywords: [
|
|
5179
|
+
"party",
|
|
5180
|
+
"birthday"
|
|
5181
|
+
]
|
|
5182
|
+
},
|
|
5183
|
+
{
|
|
5184
|
+
shortcode: "confetti_ball",
|
|
5185
|
+
emoji: "\u{1F38A}",
|
|
5186
|
+
keywords: [
|
|
5187
|
+
"party",
|
|
5188
|
+
"celebrate"
|
|
5189
|
+
]
|
|
5190
|
+
},
|
|
5191
|
+
{
|
|
5192
|
+
shortcode: "moneybag",
|
|
5193
|
+
emoji: "\u{1F4B0}",
|
|
5194
|
+
aliases: [
|
|
5195
|
+
"money"
|
|
5196
|
+
],
|
|
5197
|
+
keywords: [
|
|
5198
|
+
"cash",
|
|
5199
|
+
"rich",
|
|
5200
|
+
"dollar"
|
|
5201
|
+
]
|
|
5202
|
+
},
|
|
5203
|
+
{
|
|
5204
|
+
shortcode: "chart_with_upwards_trend",
|
|
5205
|
+
emoji: "\u{1F4C8}",
|
|
5206
|
+
aliases: [
|
|
5207
|
+
"stonks",
|
|
5208
|
+
"chart_up"
|
|
5209
|
+
],
|
|
5210
|
+
keywords: [
|
|
5211
|
+
"growth",
|
|
5212
|
+
"profit",
|
|
5213
|
+
"up"
|
|
5214
|
+
]
|
|
5215
|
+
},
|
|
5216
|
+
{
|
|
5217
|
+
shortcode: "chart_with_downwards_trend",
|
|
5218
|
+
emoji: "\u{1F4C9}",
|
|
5219
|
+
aliases: [
|
|
5220
|
+
"chart_down"
|
|
5221
|
+
],
|
|
5222
|
+
keywords: [
|
|
5223
|
+
"loss",
|
|
5224
|
+
"down"
|
|
5225
|
+
]
|
|
5226
|
+
},
|
|
5227
|
+
{
|
|
5228
|
+
shortcode: "bug",
|
|
5229
|
+
emoji: "\u{1F41B}",
|
|
5230
|
+
keywords: [
|
|
5231
|
+
"issue",
|
|
5232
|
+
"defect",
|
|
5233
|
+
"insect"
|
|
5234
|
+
]
|
|
5235
|
+
},
|
|
5236
|
+
{
|
|
5237
|
+
shortcode: "wrench",
|
|
5238
|
+
emoji: "\u{1F527}",
|
|
5239
|
+
aliases: [
|
|
5240
|
+
"fix",
|
|
5241
|
+
"tool"
|
|
5242
|
+
],
|
|
5243
|
+
keywords: [
|
|
5244
|
+
"repair",
|
|
5245
|
+
"config"
|
|
5246
|
+
]
|
|
5247
|
+
},
|
|
5248
|
+
{
|
|
5249
|
+
shortcode: "hammer",
|
|
5250
|
+
emoji: "\u{1F528}",
|
|
5251
|
+
aliases: [
|
|
5252
|
+
"build"
|
|
5253
|
+
],
|
|
5254
|
+
keywords: [
|
|
5255
|
+
"tool",
|
|
5256
|
+
"work"
|
|
5257
|
+
]
|
|
5258
|
+
},
|
|
5259
|
+
{
|
|
5260
|
+
shortcode: "gear",
|
|
5261
|
+
emoji: "\u2699\uFE0F",
|
|
5262
|
+
aliases: [
|
|
5263
|
+
"settings"
|
|
5264
|
+
],
|
|
5265
|
+
keywords: [
|
|
5266
|
+
"config",
|
|
5267
|
+
"cog"
|
|
5268
|
+
]
|
|
5269
|
+
},
|
|
5270
|
+
{
|
|
5271
|
+
shortcode: "lock",
|
|
5272
|
+
emoji: "\u{1F512}",
|
|
5273
|
+
aliases: [
|
|
5274
|
+
"secure",
|
|
5275
|
+
"private"
|
|
5276
|
+
],
|
|
5277
|
+
keywords: [
|
|
5278
|
+
"encrypted",
|
|
5279
|
+
"security"
|
|
5280
|
+
]
|
|
5281
|
+
},
|
|
5282
|
+
{
|
|
5283
|
+
shortcode: "unlock",
|
|
5284
|
+
emoji: "\u{1F513}",
|
|
5285
|
+
keywords: [
|
|
5286
|
+
"open"
|
|
5287
|
+
]
|
|
5288
|
+
},
|
|
5289
|
+
{
|
|
5290
|
+
shortcode: "key",
|
|
5291
|
+
emoji: "\u{1F511}",
|
|
5292
|
+
keywords: [
|
|
5293
|
+
"password",
|
|
5294
|
+
"access",
|
|
5295
|
+
"secret"
|
|
5296
|
+
]
|
|
5297
|
+
},
|
|
5298
|
+
{
|
|
5299
|
+
shortcode: "shield",
|
|
5300
|
+
emoji: "\u{1F6E1}\uFE0F",
|
|
5301
|
+
keywords: [
|
|
5302
|
+
"security",
|
|
5303
|
+
"protect"
|
|
5304
|
+
]
|
|
5305
|
+
},
|
|
5306
|
+
{
|
|
5307
|
+
shortcode: "mag",
|
|
5308
|
+
emoji: "\u{1F50D}",
|
|
5309
|
+
aliases: [
|
|
5310
|
+
"search"
|
|
5311
|
+
],
|
|
5312
|
+
keywords: [
|
|
5313
|
+
"find",
|
|
5314
|
+
"inspect",
|
|
5315
|
+
"zoom"
|
|
5316
|
+
]
|
|
5317
|
+
},
|
|
5318
|
+
{
|
|
5319
|
+
shortcode: "link",
|
|
5320
|
+
emoji: "\u{1F517}",
|
|
5321
|
+
keywords: [
|
|
5322
|
+
"url",
|
|
5323
|
+
"chain",
|
|
5324
|
+
"connect"
|
|
5325
|
+
]
|
|
5326
|
+
},
|
|
5327
|
+
{
|
|
5328
|
+
shortcode: "pushpin",
|
|
5329
|
+
emoji: "\u{1F4CC}",
|
|
5330
|
+
aliases: [
|
|
5331
|
+
"pin"
|
|
5332
|
+
],
|
|
5333
|
+
keywords: [
|
|
5334
|
+
"important",
|
|
5335
|
+
"save"
|
|
5336
|
+
]
|
|
5337
|
+
},
|
|
5338
|
+
{
|
|
5339
|
+
shortcode: "memo",
|
|
5340
|
+
emoji: "\u{1F4DD}",
|
|
5341
|
+
aliases: [
|
|
5342
|
+
"note",
|
|
5343
|
+
"notes"
|
|
5344
|
+
],
|
|
5345
|
+
keywords: [
|
|
5346
|
+
"write",
|
|
5347
|
+
"doc",
|
|
5348
|
+
"edit"
|
|
5349
|
+
]
|
|
5350
|
+
},
|
|
5351
|
+
{
|
|
5352
|
+
shortcode: "clipboard",
|
|
5353
|
+
emoji: "\u{1F4CB}",
|
|
5354
|
+
keywords: [
|
|
5355
|
+
"copy",
|
|
5356
|
+
"paste",
|
|
5357
|
+
"list"
|
|
5358
|
+
]
|
|
5359
|
+
},
|
|
5360
|
+
{
|
|
5361
|
+
shortcode: "package",
|
|
5362
|
+
emoji: "\u{1F4E6}",
|
|
5363
|
+
aliases: [
|
|
5364
|
+
"box",
|
|
5365
|
+
"release"
|
|
5366
|
+
],
|
|
5367
|
+
keywords: [
|
|
5368
|
+
"ship",
|
|
5369
|
+
"npm",
|
|
5370
|
+
"deliver"
|
|
5371
|
+
]
|
|
5372
|
+
},
|
|
5373
|
+
{
|
|
5374
|
+
shortcode: "envelope",
|
|
5375
|
+
emoji: "\u2709\uFE0F",
|
|
5376
|
+
aliases: [
|
|
5377
|
+
"email",
|
|
5378
|
+
"mail"
|
|
5379
|
+
],
|
|
5380
|
+
keywords: [
|
|
5381
|
+
"message",
|
|
5382
|
+
"letter"
|
|
5383
|
+
]
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
shortcode: "bell",
|
|
5387
|
+
emoji: "\u{1F514}",
|
|
5388
|
+
aliases: [
|
|
5389
|
+
"notification",
|
|
5390
|
+
"ping"
|
|
5391
|
+
],
|
|
5392
|
+
keywords: [
|
|
5393
|
+
"alert",
|
|
5394
|
+
"ring"
|
|
5395
|
+
]
|
|
5396
|
+
},
|
|
5397
|
+
{
|
|
5398
|
+
shortcode: "mega",
|
|
5399
|
+
emoji: "\u{1F4E3}",
|
|
5400
|
+
aliases: [
|
|
5401
|
+
"announce",
|
|
5402
|
+
"megaphone"
|
|
5403
|
+
],
|
|
5404
|
+
keywords: [
|
|
5405
|
+
"news",
|
|
5406
|
+
"shout"
|
|
5407
|
+
]
|
|
5408
|
+
},
|
|
5409
|
+
{
|
|
5410
|
+
shortcode: "speech_balloon",
|
|
5411
|
+
emoji: "\u{1F4AC}",
|
|
5412
|
+
aliases: [
|
|
5413
|
+
"chat",
|
|
5414
|
+
"comment"
|
|
5415
|
+
],
|
|
5416
|
+
keywords: [
|
|
5417
|
+
"talk",
|
|
5418
|
+
"message"
|
|
5419
|
+
]
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
shortcode: "calendar",
|
|
5423
|
+
emoji: "\u{1F4C5}",
|
|
5424
|
+
aliases: [
|
|
5425
|
+
"date",
|
|
5426
|
+
"schedule"
|
|
5427
|
+
],
|
|
5428
|
+
keywords: [
|
|
5429
|
+
"event",
|
|
5430
|
+
"meeting"
|
|
5431
|
+
]
|
|
5432
|
+
},
|
|
5433
|
+
{
|
|
5434
|
+
shortcode: "clock",
|
|
5435
|
+
emoji: "\u{1F550}",
|
|
5436
|
+
aliases: [
|
|
5437
|
+
"time"
|
|
5438
|
+
],
|
|
5439
|
+
keywords: [
|
|
5440
|
+
"schedule",
|
|
5441
|
+
"wait"
|
|
5442
|
+
]
|
|
5443
|
+
},
|
|
5444
|
+
{
|
|
5445
|
+
shortcode: "hourglass",
|
|
5446
|
+
emoji: "\u23F3",
|
|
5447
|
+
aliases: [
|
|
5448
|
+
"waiting",
|
|
5449
|
+
"loading"
|
|
5450
|
+
],
|
|
5451
|
+
keywords: [
|
|
5452
|
+
"time",
|
|
5453
|
+
"soon"
|
|
5454
|
+
]
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
shortcode: "alarm_clock",
|
|
5458
|
+
emoji: "\u23F0",
|
|
5459
|
+
aliases: [
|
|
5460
|
+
"alarm"
|
|
5461
|
+
],
|
|
5462
|
+
keywords: [
|
|
5463
|
+
"wake",
|
|
5464
|
+
"deadline",
|
|
5465
|
+
"reminder"
|
|
5466
|
+
]
|
|
5467
|
+
},
|
|
5468
|
+
{
|
|
5469
|
+
shortcode: "stopwatch",
|
|
5470
|
+
emoji: "\u23F1\uFE0F",
|
|
5471
|
+
aliases: [
|
|
5472
|
+
"timer"
|
|
5473
|
+
],
|
|
5474
|
+
keywords: [
|
|
5475
|
+
"fast",
|
|
5476
|
+
"benchmark"
|
|
5477
|
+
]
|
|
5478
|
+
},
|
|
5479
|
+
{
|
|
5480
|
+
shortcode: "laptop",
|
|
5481
|
+
emoji: "\u{1F4BB}",
|
|
5482
|
+
aliases: [
|
|
5483
|
+
"computer",
|
|
5484
|
+
"code"
|
|
5485
|
+
],
|
|
5486
|
+
keywords: [
|
|
5487
|
+
"dev",
|
|
5488
|
+
"work",
|
|
5489
|
+
"mac"
|
|
5490
|
+
]
|
|
5491
|
+
},
|
|
5492
|
+
{
|
|
5493
|
+
shortcode: "keyboard",
|
|
5494
|
+
emoji: "\u2328\uFE0F",
|
|
5495
|
+
keywords: [
|
|
5496
|
+
"type",
|
|
5497
|
+
"shortcut"
|
|
5498
|
+
]
|
|
5499
|
+
},
|
|
5500
|
+
{
|
|
5501
|
+
shortcode: "phone",
|
|
5502
|
+
emoji: "\u{1F4F1}",
|
|
5503
|
+
aliases: [
|
|
5504
|
+
"mobile"
|
|
5505
|
+
],
|
|
5506
|
+
keywords: [
|
|
5507
|
+
"iphone",
|
|
5508
|
+
"call"
|
|
5509
|
+
]
|
|
5510
|
+
},
|
|
5511
|
+
{
|
|
5512
|
+
shortcode: "camera",
|
|
5513
|
+
emoji: "\u{1F4F7}",
|
|
5514
|
+
aliases: [
|
|
5515
|
+
"photo"
|
|
5516
|
+
],
|
|
5517
|
+
keywords: [
|
|
5518
|
+
"picture",
|
|
5519
|
+
"snap"
|
|
5520
|
+
]
|
|
5521
|
+
},
|
|
5522
|
+
{
|
|
5523
|
+
shortcode: "headphones",
|
|
5524
|
+
emoji: "\u{1F3A7}",
|
|
5525
|
+
keywords: [
|
|
5526
|
+
"music",
|
|
5527
|
+
"audio",
|
|
5528
|
+
"listen"
|
|
5529
|
+
]
|
|
5530
|
+
},
|
|
5531
|
+
{
|
|
5532
|
+
shortcode: "microphone",
|
|
5533
|
+
emoji: "\u{1F3A4}",
|
|
5534
|
+
aliases: [
|
|
5535
|
+
"mic"
|
|
5536
|
+
],
|
|
5537
|
+
keywords: [
|
|
5538
|
+
"voice",
|
|
5539
|
+
"sing",
|
|
5540
|
+
"record"
|
|
5541
|
+
]
|
|
5542
|
+
},
|
|
5543
|
+
{
|
|
5544
|
+
shortcode: "musical_note",
|
|
5545
|
+
emoji: "\u{1F3B5}",
|
|
5546
|
+
aliases: [
|
|
5547
|
+
"music"
|
|
5548
|
+
],
|
|
5549
|
+
keywords: [
|
|
5550
|
+
"song",
|
|
5551
|
+
"melody"
|
|
5552
|
+
]
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
shortcode: "video_game",
|
|
5556
|
+
emoji: "\u{1F3AE}",
|
|
5557
|
+
aliases: [
|
|
5558
|
+
"game",
|
|
5559
|
+
"gaming"
|
|
5560
|
+
],
|
|
5561
|
+
keywords: [
|
|
5562
|
+
"play",
|
|
5563
|
+
"controller"
|
|
5564
|
+
]
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
shortcode: "art",
|
|
5568
|
+
emoji: "\u{1F3A8}",
|
|
5569
|
+
aliases: [
|
|
5570
|
+
"design"
|
|
5571
|
+
],
|
|
5572
|
+
keywords: [
|
|
5573
|
+
"paint",
|
|
5574
|
+
"creative"
|
|
5575
|
+
]
|
|
5576
|
+
},
|
|
5577
|
+
{
|
|
5578
|
+
shortcode: "book",
|
|
5579
|
+
emoji: "\u{1F4D6}",
|
|
5580
|
+
aliases: [
|
|
5581
|
+
"read",
|
|
5582
|
+
"docs"
|
|
5583
|
+
],
|
|
5584
|
+
keywords: [
|
|
5585
|
+
"study",
|
|
5586
|
+
"learn"
|
|
5587
|
+
]
|
|
5588
|
+
},
|
|
5589
|
+
{
|
|
5590
|
+
shortcode: "books",
|
|
5591
|
+
emoji: "\u{1F4DA}",
|
|
5592
|
+
aliases: [
|
|
5593
|
+
"library"
|
|
5594
|
+
],
|
|
5595
|
+
keywords: [
|
|
5596
|
+
"read",
|
|
5597
|
+
"study"
|
|
5598
|
+
]
|
|
5599
|
+
},
|
|
5600
|
+
{
|
|
5601
|
+
shortcode: "coffee",
|
|
5602
|
+
emoji: "\u2615",
|
|
5603
|
+
aliases: [
|
|
5604
|
+
"cafe"
|
|
5605
|
+
],
|
|
5606
|
+
keywords: [
|
|
5607
|
+
"morning",
|
|
5608
|
+
"drink",
|
|
5609
|
+
"tea"
|
|
5610
|
+
]
|
|
5611
|
+
},
|
|
5612
|
+
{
|
|
5613
|
+
shortcode: "beer",
|
|
5614
|
+
emoji: "\u{1F37A}",
|
|
5615
|
+
aliases: [
|
|
5616
|
+
"cheers"
|
|
5617
|
+
],
|
|
5618
|
+
keywords: [
|
|
5619
|
+
"drink",
|
|
5620
|
+
"pub"
|
|
5621
|
+
]
|
|
5622
|
+
},
|
|
5623
|
+
{
|
|
5624
|
+
shortcode: "wine_glass",
|
|
5625
|
+
emoji: "\u{1F377}",
|
|
5626
|
+
aliases: [
|
|
5627
|
+
"wine"
|
|
5628
|
+
],
|
|
5629
|
+
keywords: [
|
|
5630
|
+
"drink"
|
|
5631
|
+
]
|
|
5632
|
+
},
|
|
5633
|
+
{
|
|
5634
|
+
shortcode: "champagne",
|
|
5635
|
+
emoji: "\u{1F37E}",
|
|
5636
|
+
keywords: [
|
|
5637
|
+
"celebrate",
|
|
5638
|
+
"party",
|
|
5639
|
+
"cheers"
|
|
5640
|
+
]
|
|
5641
|
+
},
|
|
5642
|
+
{
|
|
5643
|
+
shortcode: "clinking_glasses",
|
|
5644
|
+
emoji: "\u{1F942}",
|
|
5645
|
+
aliases: [
|
|
5646
|
+
"toast"
|
|
5647
|
+
],
|
|
5648
|
+
keywords: [
|
|
5649
|
+
"cheers",
|
|
5650
|
+
"celebrate"
|
|
5651
|
+
]
|
|
5652
|
+
},
|
|
5653
|
+
{
|
|
5654
|
+
shortcode: "pizza",
|
|
5655
|
+
emoji: "\u{1F355}",
|
|
5656
|
+
keywords: [
|
|
5657
|
+
"food",
|
|
5658
|
+
"dinner",
|
|
5659
|
+
"lunch"
|
|
5660
|
+
]
|
|
5661
|
+
},
|
|
5662
|
+
{
|
|
5663
|
+
shortcode: "hamburger",
|
|
5664
|
+
emoji: "\u{1F354}",
|
|
5665
|
+
aliases: [
|
|
5666
|
+
"burger"
|
|
5667
|
+
],
|
|
5668
|
+
keywords: [
|
|
5669
|
+
"food",
|
|
5670
|
+
"lunch"
|
|
5671
|
+
]
|
|
5672
|
+
},
|
|
5673
|
+
{
|
|
5674
|
+
shortcode: "taco",
|
|
5675
|
+
emoji: "\u{1F32E}",
|
|
5676
|
+
keywords: [
|
|
5677
|
+
"food",
|
|
5678
|
+
"mexican"
|
|
5679
|
+
]
|
|
5680
|
+
},
|
|
5681
|
+
{
|
|
5682
|
+
shortcode: "sushi",
|
|
5683
|
+
emoji: "\u{1F363}",
|
|
5684
|
+
keywords: [
|
|
5685
|
+
"food",
|
|
5686
|
+
"japanese"
|
|
5687
|
+
]
|
|
5688
|
+
},
|
|
5689
|
+
{
|
|
5690
|
+
shortcode: "ramen",
|
|
5691
|
+
emoji: "\u{1F35C}",
|
|
5692
|
+
keywords: [
|
|
5693
|
+
"food",
|
|
5694
|
+
"noodles"
|
|
5695
|
+
]
|
|
5696
|
+
},
|
|
5697
|
+
{
|
|
5698
|
+
shortcode: "cake",
|
|
5699
|
+
emoji: "\u{1F382}",
|
|
5700
|
+
aliases: [
|
|
5701
|
+
"birthday"
|
|
5702
|
+
],
|
|
5703
|
+
keywords: [
|
|
5704
|
+
"dessert",
|
|
5705
|
+
"party"
|
|
5706
|
+
]
|
|
5707
|
+
},
|
|
5708
|
+
{
|
|
5709
|
+
shortcode: "cookie",
|
|
5710
|
+
emoji: "\u{1F36A}",
|
|
5711
|
+
keywords: [
|
|
5712
|
+
"snack",
|
|
5713
|
+
"sweet"
|
|
5714
|
+
]
|
|
5715
|
+
},
|
|
5716
|
+
{
|
|
5717
|
+
shortcode: "popcorn",
|
|
5718
|
+
emoji: "\u{1F37F}",
|
|
5719
|
+
keywords: [
|
|
5720
|
+
"movie",
|
|
5721
|
+
"drama",
|
|
5722
|
+
"watch"
|
|
5723
|
+
]
|
|
5724
|
+
},
|
|
5725
|
+
{
|
|
5726
|
+
shortcode: "sunny",
|
|
5727
|
+
emoji: "\u2600\uFE0F",
|
|
5728
|
+
aliases: [
|
|
5729
|
+
"sun"
|
|
5730
|
+
],
|
|
5731
|
+
keywords: [
|
|
5732
|
+
"weather",
|
|
5733
|
+
"bright",
|
|
5734
|
+
"morning"
|
|
5735
|
+
]
|
|
5736
|
+
},
|
|
5737
|
+
{
|
|
5738
|
+
shortcode: "crescent_moon",
|
|
5739
|
+
emoji: "\u{1F319}",
|
|
5740
|
+
aliases: [
|
|
5741
|
+
"moon"
|
|
5742
|
+
],
|
|
5743
|
+
keywords: [
|
|
5744
|
+
"night",
|
|
5745
|
+
"dark",
|
|
5746
|
+
"sleep"
|
|
5747
|
+
]
|
|
5748
|
+
},
|
|
5749
|
+
{
|
|
5750
|
+
shortcode: "rainbow",
|
|
5751
|
+
emoji: "\u{1F308}",
|
|
5752
|
+
keywords: [
|
|
5753
|
+
"pride",
|
|
5754
|
+
"colors",
|
|
5755
|
+
"weather"
|
|
5756
|
+
]
|
|
5757
|
+
},
|
|
5758
|
+
{
|
|
5759
|
+
shortcode: "cloud",
|
|
5760
|
+
emoji: "\u2601\uFE0F",
|
|
5761
|
+
keywords: [
|
|
5762
|
+
"weather",
|
|
5763
|
+
"sky"
|
|
5764
|
+
]
|
|
5765
|
+
},
|
|
5766
|
+
{
|
|
5767
|
+
shortcode: "snowflake",
|
|
5768
|
+
emoji: "\u2744\uFE0F",
|
|
5769
|
+
aliases: [
|
|
5770
|
+
"snow",
|
|
5771
|
+
"cold"
|
|
5772
|
+
],
|
|
5773
|
+
keywords: [
|
|
5774
|
+
"winter",
|
|
5775
|
+
"ice"
|
|
5776
|
+
]
|
|
5777
|
+
},
|
|
5778
|
+
{
|
|
5779
|
+
shortcode: "ocean",
|
|
5780
|
+
emoji: "\u{1F30A}",
|
|
5781
|
+
aliases: [
|
|
5782
|
+
"water"
|
|
5783
|
+
],
|
|
5784
|
+
keywords: [
|
|
5785
|
+
"sea",
|
|
5786
|
+
"surf",
|
|
5787
|
+
"beach"
|
|
5788
|
+
]
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
shortcode: "earth_americas",
|
|
5792
|
+
emoji: "\u{1F30E}",
|
|
5793
|
+
aliases: [
|
|
5794
|
+
"globe",
|
|
5795
|
+
"world",
|
|
5796
|
+
"earth"
|
|
5797
|
+
],
|
|
5798
|
+
keywords: [
|
|
5799
|
+
"planet",
|
|
5800
|
+
"global"
|
|
5801
|
+
]
|
|
5802
|
+
},
|
|
5803
|
+
{
|
|
5804
|
+
shortcode: "seedling",
|
|
5805
|
+
emoji: "\u{1F331}",
|
|
5806
|
+
aliases: [
|
|
5807
|
+
"plant",
|
|
5808
|
+
"grow"
|
|
5809
|
+
],
|
|
5810
|
+
keywords: [
|
|
5811
|
+
"nature",
|
|
5812
|
+
"spring",
|
|
5813
|
+
"new"
|
|
5814
|
+
]
|
|
5815
|
+
},
|
|
5816
|
+
{
|
|
5817
|
+
shortcode: "rose",
|
|
5818
|
+
emoji: "\u{1F339}",
|
|
5819
|
+
aliases: [
|
|
5820
|
+
"flower"
|
|
5821
|
+
],
|
|
5822
|
+
keywords: [
|
|
5823
|
+
"love",
|
|
5824
|
+
"romance"
|
|
5825
|
+
]
|
|
5826
|
+
},
|
|
5827
|
+
{
|
|
5828
|
+
shortcode: "four_leaf_clover",
|
|
5829
|
+
emoji: "\u{1F340}",
|
|
5830
|
+
aliases: [
|
|
5831
|
+
"clover",
|
|
5832
|
+
"lucky"
|
|
5833
|
+
],
|
|
5834
|
+
keywords: [
|
|
5835
|
+
"luck",
|
|
5836
|
+
"green"
|
|
5837
|
+
]
|
|
5838
|
+
},
|
|
5839
|
+
{
|
|
5840
|
+
shortcode: "cat",
|
|
5841
|
+
emoji: "\u{1F431}",
|
|
5842
|
+
aliases: [
|
|
5843
|
+
"kitty"
|
|
5844
|
+
],
|
|
5845
|
+
keywords: [
|
|
5846
|
+
"pet",
|
|
5847
|
+
"animal"
|
|
5848
|
+
]
|
|
5849
|
+
},
|
|
5850
|
+
{
|
|
5851
|
+
shortcode: "dog",
|
|
5852
|
+
emoji: "\u{1F436}",
|
|
5853
|
+
aliases: [
|
|
5854
|
+
"puppy"
|
|
5855
|
+
],
|
|
5856
|
+
keywords: [
|
|
5857
|
+
"pet",
|
|
5858
|
+
"animal"
|
|
5859
|
+
]
|
|
5860
|
+
},
|
|
5861
|
+
{
|
|
5862
|
+
shortcode: "unicorn",
|
|
5863
|
+
emoji: "\u{1F984}",
|
|
5864
|
+
keywords: [
|
|
5865
|
+
"magic",
|
|
5866
|
+
"rare",
|
|
5867
|
+
"startup"
|
|
5868
|
+
]
|
|
5869
|
+
},
|
|
5870
|
+
{
|
|
5871
|
+
shortcode: "bee",
|
|
5872
|
+
emoji: "\u{1F41D}",
|
|
5873
|
+
keywords: [
|
|
5874
|
+
"busy",
|
|
5875
|
+
"buzz"
|
|
5876
|
+
]
|
|
5877
|
+
},
|
|
5878
|
+
{
|
|
5879
|
+
shortcode: "butterfly",
|
|
5880
|
+
emoji: "\u{1F98B}",
|
|
5881
|
+
keywords: [
|
|
5882
|
+
"nature",
|
|
5883
|
+
"pretty"
|
|
5884
|
+
]
|
|
5885
|
+
},
|
|
5886
|
+
{
|
|
5887
|
+
shortcode: "turtle",
|
|
5888
|
+
emoji: "\u{1F422}",
|
|
5889
|
+
aliases: [
|
|
5890
|
+
"slow"
|
|
5891
|
+
],
|
|
5892
|
+
keywords: [
|
|
5893
|
+
"animal"
|
|
5894
|
+
]
|
|
5895
|
+
},
|
|
5896
|
+
{
|
|
5897
|
+
shortcode: "penguin",
|
|
5898
|
+
emoji: "\u{1F427}",
|
|
5899
|
+
aliases: [
|
|
5900
|
+
"linux"
|
|
5901
|
+
],
|
|
5902
|
+
keywords: [
|
|
5903
|
+
"bird",
|
|
5904
|
+
"cold"
|
|
5905
|
+
]
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
shortcode: "owl",
|
|
5909
|
+
emoji: "\u{1F989}",
|
|
5910
|
+
keywords: [
|
|
5911
|
+
"night",
|
|
5912
|
+
"wise"
|
|
5913
|
+
]
|
|
5914
|
+
},
|
|
5915
|
+
{
|
|
5916
|
+
shortcode: "car",
|
|
5917
|
+
emoji: "\u{1F697}",
|
|
5918
|
+
keywords: [
|
|
5919
|
+
"drive",
|
|
5920
|
+
"travel"
|
|
5921
|
+
]
|
|
5922
|
+
},
|
|
5923
|
+
{
|
|
5924
|
+
shortcode: "airplane",
|
|
5925
|
+
emoji: "\u2708\uFE0F",
|
|
5926
|
+
aliases: [
|
|
5927
|
+
"flight",
|
|
5928
|
+
"plane"
|
|
5929
|
+
],
|
|
5930
|
+
keywords: [
|
|
5931
|
+
"travel",
|
|
5932
|
+
"trip"
|
|
5933
|
+
]
|
|
5934
|
+
},
|
|
5935
|
+
{
|
|
5936
|
+
shortcode: "house",
|
|
5937
|
+
emoji: "\u{1F3E0}",
|
|
5938
|
+
aliases: [
|
|
5939
|
+
"home"
|
|
5940
|
+
],
|
|
5941
|
+
keywords: [
|
|
5942
|
+
"wfh",
|
|
5943
|
+
"building"
|
|
5944
|
+
]
|
|
5945
|
+
},
|
|
5946
|
+
{
|
|
5947
|
+
shortcode: "checkered_flag",
|
|
5948
|
+
emoji: "\u{1F3C1}",
|
|
5949
|
+
aliases: [
|
|
5950
|
+
"finish"
|
|
5951
|
+
],
|
|
5952
|
+
keywords: [
|
|
5953
|
+
"done",
|
|
5954
|
+
"race"
|
|
5955
|
+
]
|
|
5956
|
+
},
|
|
5957
|
+
{
|
|
5958
|
+
shortcode: "red_circle",
|
|
5959
|
+
emoji: "\u{1F534}",
|
|
5960
|
+
keywords: [
|
|
5961
|
+
"dot",
|
|
5962
|
+
"status",
|
|
5963
|
+
"live"
|
|
5964
|
+
]
|
|
5965
|
+
},
|
|
5966
|
+
{
|
|
5967
|
+
shortcode: "green_circle",
|
|
5968
|
+
emoji: "\u{1F7E2}",
|
|
5969
|
+
keywords: [
|
|
5970
|
+
"dot",
|
|
5971
|
+
"status",
|
|
5972
|
+
"online"
|
|
5973
|
+
]
|
|
5974
|
+
},
|
|
5975
|
+
{
|
|
5976
|
+
shortcode: "yellow_circle",
|
|
5977
|
+
emoji: "\u{1F7E1}",
|
|
5978
|
+
keywords: [
|
|
5979
|
+
"dot",
|
|
5980
|
+
"status",
|
|
5981
|
+
"away"
|
|
5982
|
+
]
|
|
5983
|
+
},
|
|
5984
|
+
{
|
|
5985
|
+
shortcode: "blue_circle",
|
|
5986
|
+
emoji: "\u{1F535}",
|
|
5987
|
+
keywords: [
|
|
5988
|
+
"dot",
|
|
5989
|
+
"status"
|
|
5990
|
+
]
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
shortcode: "recycle",
|
|
5994
|
+
emoji: "\u267B\uFE0F",
|
|
5995
|
+
keywords: [
|
|
5996
|
+
"refactor",
|
|
5997
|
+
"reuse"
|
|
5998
|
+
]
|
|
5999
|
+
},
|
|
6000
|
+
{
|
|
6001
|
+
shortcode: "arrows_counterclockwise",
|
|
6002
|
+
emoji: "\u{1F504}",
|
|
6003
|
+
aliases: [
|
|
6004
|
+
"refresh",
|
|
6005
|
+
"sync"
|
|
6006
|
+
],
|
|
6007
|
+
keywords: [
|
|
6008
|
+
"reload",
|
|
6009
|
+
"repeat"
|
|
6010
|
+
]
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
shortcode: "arrow_up",
|
|
6014
|
+
emoji: "\u2B06\uFE0F",
|
|
6015
|
+
keywords: [
|
|
6016
|
+
"up"
|
|
6017
|
+
]
|
|
6018
|
+
},
|
|
6019
|
+
{
|
|
6020
|
+
shortcode: "arrow_down",
|
|
6021
|
+
emoji: "\u2B07\uFE0F",
|
|
6022
|
+
keywords: [
|
|
6023
|
+
"down"
|
|
6024
|
+
]
|
|
6025
|
+
},
|
|
6026
|
+
{
|
|
6027
|
+
shortcode: "arrow_left",
|
|
6028
|
+
emoji: "\u2B05\uFE0F",
|
|
6029
|
+
keywords: [
|
|
6030
|
+
"left"
|
|
6031
|
+
]
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
shortcode: "arrow_right",
|
|
6035
|
+
emoji: "\u27A1\uFE0F",
|
|
6036
|
+
keywords: [
|
|
6037
|
+
"right"
|
|
6038
|
+
]
|
|
6039
|
+
},
|
|
6040
|
+
{
|
|
6041
|
+
shortcode: "heavy_plus_sign",
|
|
6042
|
+
emoji: "\u2795",
|
|
6043
|
+
aliases: [
|
|
6044
|
+
"plus"
|
|
6045
|
+
],
|
|
6046
|
+
keywords: [
|
|
6047
|
+
"add"
|
|
6048
|
+
]
|
|
6049
|
+
},
|
|
6050
|
+
{
|
|
6051
|
+
shortcode: "heavy_minus_sign",
|
|
6052
|
+
emoji: "\u2796",
|
|
6053
|
+
aliases: [
|
|
6054
|
+
"minus"
|
|
6055
|
+
],
|
|
6056
|
+
keywords: [
|
|
6057
|
+
"subtract"
|
|
6058
|
+
]
|
|
6059
|
+
}
|
|
6060
|
+
];
|
|
6061
|
+
var emojiLookupMap = new Map(emojiCatalog.flatMap((entry) => [
|
|
6062
|
+
[
|
|
6063
|
+
entry.shortcode.toLowerCase(),
|
|
6064
|
+
entry.emoji
|
|
6065
|
+
],
|
|
6066
|
+
...(entry.aliases ?? []).map((alias) => [
|
|
6067
|
+
alias.toLowerCase(),
|
|
6068
|
+
entry.emoji
|
|
6069
|
+
])
|
|
6070
|
+
]));
|
|
6071
|
+
var lookupEmoji = (shortcode) => emojiLookupMap.get(shortcode.toLowerCase());
|
|
6072
|
+
var scoreEmojiEntry = (query) => (entry) => {
|
|
6073
|
+
const code = entry.shortcode.toLowerCase();
|
|
6074
|
+
const aliases = (entry.aliases ?? []).map((a) => a.toLowerCase());
|
|
6075
|
+
const keywords = (entry.keywords ?? []).map((k) => k.toLowerCase());
|
|
6076
|
+
if (code === query) return 0;
|
|
6077
|
+
if (aliases.includes(query)) return 1;
|
|
6078
|
+
if (code.startsWith(query)) return 2;
|
|
6079
|
+
if (aliases.some((a) => a.startsWith(query))) return 3;
|
|
6080
|
+
if (keywords.some((k) => k.startsWith(query))) return 4;
|
|
6081
|
+
if (code.includes(query) || aliases.some((a) => a.includes(query))) return 5;
|
|
6082
|
+
if (keywords.some((k) => k.includes(query))) return 6;
|
|
6083
|
+
return -1;
|
|
6084
|
+
};
|
|
6085
|
+
var searchEmojis = (filter2, limit = 8) => {
|
|
6086
|
+
const query = filter2.trim().toLowerCase();
|
|
6087
|
+
if (!query) return emojiCatalog.slice(0, limit);
|
|
6088
|
+
return emojiCatalog.map((entry, index) => ({
|
|
6089
|
+
entry,
|
|
6090
|
+
score: scoreEmojiEntry(query)(entry),
|
|
6091
|
+
index
|
|
6092
|
+
})).filter(({ score }) => score >= 0).sort((a, b) => a.score - b.score || a.index - b.index).slice(0, limit).map(({ entry }) => entry);
|
|
6093
|
+
};
|
|
6094
|
+
var shortcodeTokenPattern = /^[a-z0-9_+-]+$/i;
|
|
6095
|
+
var reactionPrefixMode = (textBeforeCursor, colonIndex) => {
|
|
6096
|
+
if (colonIndex !== 1) return null;
|
|
6097
|
+
if (textBeforeCursor[0] === "+") return "add";
|
|
6098
|
+
if (textBeforeCursor[0] === "-") return "remove";
|
|
6099
|
+
return null;
|
|
6100
|
+
};
|
|
6101
|
+
var hasValidColonBoundary = (textBeforeCursor, colonIndex) => colonIndex === 0 || /\s/.test(textBeforeCursor[colonIndex - 1]) || reactionPrefixMode(textBeforeCursor, colonIndex) !== null;
|
|
6102
|
+
var getEmojiAutocompleteState = (text, cursorIndex) => {
|
|
6103
|
+
const textBeforeCursor = text.slice(0, cursorIndex);
|
|
6104
|
+
const colonIndex = textBeforeCursor.lastIndexOf(":");
|
|
6105
|
+
if (colonIndex === -1) return null;
|
|
6106
|
+
if (!hasValidColonBoundary(textBeforeCursor, colonIndex)) return null;
|
|
6107
|
+
const filter2 = textBeforeCursor.slice(colonIndex + 1);
|
|
6108
|
+
const reactionMode = reactionPrefixMode(textBeforeCursor, colonIndex);
|
|
6109
|
+
if (filter2.length === 0) {
|
|
6110
|
+
return reactionMode ? {
|
|
6111
|
+
triggerIndex: colonIndex,
|
|
6112
|
+
filter: filter2,
|
|
6113
|
+
reactionMode
|
|
6114
|
+
} : null;
|
|
6115
|
+
}
|
|
6116
|
+
if (!shortcodeTokenPattern.test(filter2)) return null;
|
|
6117
|
+
return {
|
|
6118
|
+
triggerIndex: colonIndex,
|
|
6119
|
+
filter: filter2,
|
|
6120
|
+
reactionMode
|
|
6121
|
+
};
|
|
6122
|
+
};
|
|
6123
|
+
var insertEmoji = (text, triggerIndex, cursorIndex, emoji, reactionMode) => {
|
|
6124
|
+
const insertion = reactionMode ? emoji : `${emoji} `;
|
|
6125
|
+
return {
|
|
6126
|
+
newText: text.slice(0, triggerIndex) + insertion + text.slice(cursorIndex),
|
|
6127
|
+
newCursorIndex: triggerIndex + insertion.length
|
|
6128
|
+
};
|
|
6129
|
+
};
|
|
6130
|
+
var convertCompletedShortcodeAtCursor = (text, cursorIndex) => {
|
|
6131
|
+
if (cursorIndex < 3) return null;
|
|
6132
|
+
const textBeforeCursor = text.slice(0, cursorIndex);
|
|
6133
|
+
if (!textBeforeCursor.endsWith(":")) return null;
|
|
6134
|
+
const startIndex = textBeforeCursor.lastIndexOf(":", textBeforeCursor.length - 2);
|
|
6135
|
+
if (startIndex === -1) return null;
|
|
6136
|
+
if (!hasValidColonBoundary(textBeforeCursor, startIndex)) return null;
|
|
6137
|
+
const shortcode = textBeforeCursor.slice(startIndex + 1, -1);
|
|
6138
|
+
if (!shortcode || !shortcodeTokenPattern.test(shortcode)) return null;
|
|
6139
|
+
const emoji = lookupEmoji(shortcode);
|
|
6140
|
+
if (!emoji) return null;
|
|
6141
|
+
return {
|
|
6142
|
+
text: text.slice(0, startIndex) + emoji + text.slice(cursorIndex),
|
|
6143
|
+
cursorIndex: startIndex + emoji.length
|
|
6144
|
+
};
|
|
6145
|
+
};
|
|
6146
|
+
var replaceShortcodesInPlainSegment = (segment) => segment.replace(/(^|[\s]|[+-](?=:))(:([a-z0-9_+-]+):)/gi, (full, prefix, token, code, offset) => {
|
|
6147
|
+
if ((prefix === "+" || prefix === "-") && offset !== 0) return full;
|
|
6148
|
+
const emoji = lookupEmoji(code);
|
|
6149
|
+
return emoji ? `${prefix}${emoji}` : `${prefix}${token}`;
|
|
6150
|
+
});
|
|
6151
|
+
var replaceEmojiShortcodes = (text) => text.split(/(```[\s\S]*?```|`[^`\n]+`)/g).map((part, index) => index % 2 === 1 ? part : replaceShortcodesInPlainSegment(part)).join("");
|
|
6152
|
+
var singleEmojiPattern = /^(?:(?:\p{Extended_Pictographic}(?:\uFE0F|\p{Emoji_Modifier})*(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\p{Emoji_Modifier})*)*)|(?:[\u{1F1E6}-\u{1F1FF}]{2})|(?:[0-9#*]\uFE0F?\u20E3))$/u;
|
|
6153
|
+
var parseReactionCommand = (text) => {
|
|
6154
|
+
const trimmed = text.trim();
|
|
6155
|
+
if (trimmed.length < 2) return null;
|
|
6156
|
+
const prefix = trimmed[0];
|
|
6157
|
+
if (prefix !== "+" && prefix !== "-") return null;
|
|
6158
|
+
const remove2 = prefix === "-";
|
|
6159
|
+
const body = trimmed.slice(1).trim();
|
|
6160
|
+
if (!body) return null;
|
|
6161
|
+
const shortcodeMatch = body.match(/^:([a-z0-9_+-]+):?$/i);
|
|
6162
|
+
if (shortcodeMatch) {
|
|
6163
|
+
const emoji = lookupEmoji(shortcodeMatch[1]);
|
|
6164
|
+
return emoji ? {
|
|
6165
|
+
emoji,
|
|
6166
|
+
remove: remove2
|
|
6167
|
+
} : null;
|
|
6168
|
+
}
|
|
6169
|
+
return singleEmojiPattern.test(body) ? {
|
|
6170
|
+
emoji: body,
|
|
6171
|
+
remove: remove2
|
|
6172
|
+
} : null;
|
|
6173
|
+
};
|
|
6174
|
+
|
|
3709
6175
|
// lit/components/chat-message.ts
|
|
3710
6176
|
var clearSelection = () => globalThis.getSelection?.()?.removeAllRanges();
|
|
3711
6177
|
var kebabHoverCss = `.msg-bubble .msg-kebab{opacity:0;transition:opacity .15s}.msg-bubble:hover .msg-kebab,.msg-kebab[data-open]{opacity:.7}`;
|
|
@@ -3720,13 +6186,10 @@ var historyCloseButtonStyle = (isDark) => `margin-top:8px;padding:6px 12px;backg
|
|
|
3720
6186
|
var editTextareaStyle = "width:100%;padding:6px;border-radius:8px;border:none;font-size:14px;resize:vertical;min-height:40px";
|
|
3721
6187
|
var saveButtonStyle = (isDark) => `padding:4px 8px;border-radius:6px;border:none;background:${isDark ? "#2a2a2a" : "#e5e7eb"};cursor:pointer;font-size:12px`;
|
|
3722
6188
|
var cancelButtonStyle = "padding:4px 8px;border-radius:6px;border:none;background:transparent;cursor:pointer;font-size:12px;opacity:0.7";
|
|
3723
|
-
var quickEmojis =
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
"\u{1F62E}",
|
|
3728
|
-
"\u{1F64F}"
|
|
3729
|
-
];
|
|
6189
|
+
var quickEmojis = quickReactionEmojis;
|
|
6190
|
+
var keyboardSelectedRowStyle = (isDark) => `;border-radius:14px;padding:4px 6px;margin:-4px -6px;background:${isDark ? "rgba(125,162,207,0.12)" : "rgba(57,88,127,0.08)"};outline:1.5px solid ${isDark ? "rgba(125,162,207,0.45)" : "rgba(57,88,127,0.38)"};outline-offset:1px;transition:background 0.15s,outline-color 0.15s`;
|
|
6191
|
+
var keyboardHintBarStyle = (isDark) => `display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:2px 8px;border-radius:999px;font-size:11px;background:${isDark ? "#1e1d1a" : "#f3f1ea"};border:1px solid ${isDark ? "#2e2d28" : "#dcd8cc"};color:${isDark ? "#b8b2a6" : "#5a564f"};user-select:none`;
|
|
6192
|
+
var keyboardHintKeyStyle = (isDark) => `font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;padding:0 4px;border-radius:4px;background:${isDark ? "#2c2b26" : "#e5e1d6"};color:${isDark ? "#f3f1ea" : "#181715"}`;
|
|
3730
6193
|
var longPressHighlightCss = `@keyframes msg-highlight{0%{transform:scale(1);box-shadow:none}100%{transform:scale(1.02);box-shadow:0 0 16px rgba(57,88,127,0.22)}}`;
|
|
3731
6194
|
var msgEntranceCss = `@keyframes msg-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}`;
|
|
3732
6195
|
var liveCursorCss = `@keyframes msg-live-cursor{0%,100%{opacity:.35;transform:scaleY(.9)}50%{opacity:1;transform:scaleY(1)}}`;
|
|
@@ -3941,6 +6404,9 @@ var ChatMessage = class extends LitElement6 {
|
|
|
3941
6404
|
hideQuickReplies: {
|
|
3942
6405
|
type: Boolean
|
|
3943
6406
|
},
|
|
6407
|
+
isKeyboardSelected: {
|
|
6408
|
+
type: Boolean
|
|
6409
|
+
},
|
|
3944
6410
|
_isEditing: {
|
|
3945
6411
|
state: true
|
|
3946
6412
|
},
|
|
@@ -3993,6 +6459,7 @@ var ChatMessage = class extends LitElement6 {
|
|
|
3993
6459
|
this.isGroupChat = false;
|
|
3994
6460
|
this.streamActive = false;
|
|
3995
6461
|
this.hideQuickReplies = false;
|
|
6462
|
+
this.isKeyboardSelected = false;
|
|
3996
6463
|
this.userId = "";
|
|
3997
6464
|
this._isEditing = false;
|
|
3998
6465
|
this._editText = "";
|
|
@@ -4119,21 +6586,95 @@ var ChatMessage = class extends LitElement6 {
|
|
|
4119
6586
|
this._removeOutsideClick();
|
|
4120
6587
|
}
|
|
4121
6588
|
};
|
|
6589
|
+
startEdit = () => {
|
|
6590
|
+
if (!this.isOwn || !this.onEdit || Date.now() - this.msg.timestamp >= editWindowMs) {
|
|
6591
|
+
return false;
|
|
6592
|
+
}
|
|
6593
|
+
this._startEdit();
|
|
6594
|
+
return true;
|
|
6595
|
+
};
|
|
6596
|
+
openReactionPicker = () => {
|
|
6597
|
+
if (!this.onReact) return false;
|
|
6598
|
+
this._showQuickEmojis = false;
|
|
6599
|
+
this._showEmojiPicker = true;
|
|
6600
|
+
return true;
|
|
6601
|
+
};
|
|
6602
|
+
toggleReaction = (emoji) => {
|
|
6603
|
+
this._toggleReaction(emoji);
|
|
6604
|
+
};
|
|
6605
|
+
dismissActivePopup = () => {
|
|
6606
|
+
if (this._showEmojiPicker) {
|
|
6607
|
+
this._showEmojiPicker = false;
|
|
6608
|
+
return true;
|
|
6609
|
+
}
|
|
6610
|
+
if (this._showQuickEmojis) {
|
|
6611
|
+
this._showQuickEmojis = false;
|
|
6612
|
+
document.removeEventListener("mousedown", this._dismissQuickEmojis);
|
|
6613
|
+
return true;
|
|
6614
|
+
}
|
|
6615
|
+
if (this._showHistory) {
|
|
6616
|
+
this._showHistory = false;
|
|
6617
|
+
return true;
|
|
6618
|
+
}
|
|
6619
|
+
if (this._isEditing) {
|
|
6620
|
+
this._cancelEdit();
|
|
6621
|
+
return true;
|
|
6622
|
+
}
|
|
6623
|
+
if (this._menuOpen) {
|
|
6624
|
+
this._menuOpen = false;
|
|
6625
|
+
this._removeOutsideClick();
|
|
6626
|
+
return true;
|
|
6627
|
+
}
|
|
6628
|
+
if (this._showMobileContext) {
|
|
6629
|
+
this._closeMobileContext();
|
|
6630
|
+
return true;
|
|
6631
|
+
}
|
|
6632
|
+
return false;
|
|
6633
|
+
};
|
|
6634
|
+
_dispatchEditFinished() {
|
|
6635
|
+
this.dispatchEvent(new CustomEvent("edit-finished", {
|
|
6636
|
+
bubbles: true,
|
|
6637
|
+
composed: true
|
|
6638
|
+
}));
|
|
6639
|
+
}
|
|
4122
6640
|
_startEdit = () => {
|
|
4123
6641
|
this._menuOpen = false;
|
|
4124
6642
|
this._removeOutsideClick();
|
|
4125
6643
|
this._editText = this.msg.text;
|
|
4126
6644
|
this._isEditing = true;
|
|
6645
|
+
this.updateComplete.then(() => {
|
|
6646
|
+
const textarea = this.querySelector('[data-testid="edit-message-input"]');
|
|
6647
|
+
if (textarea) {
|
|
6648
|
+
textarea.focus();
|
|
6649
|
+
textarea.selectionStart = textarea.value.length;
|
|
6650
|
+
textarea.selectionEnd = textarea.value.length;
|
|
6651
|
+
}
|
|
6652
|
+
}).catch(() => {
|
|
6653
|
+
});
|
|
4127
6654
|
};
|
|
4128
6655
|
_cancelEdit = () => {
|
|
4129
6656
|
this._isEditing = false;
|
|
4130
6657
|
this._editText = this.msg.text;
|
|
6658
|
+
this._dispatchEditFinished();
|
|
4131
6659
|
};
|
|
4132
6660
|
_submitEdit = () => {
|
|
4133
6661
|
if (this._editText.trim() && this._editText !== this.msg.text && this.onEdit) {
|
|
4134
6662
|
this.onEdit(this._editText);
|
|
4135
6663
|
}
|
|
4136
6664
|
this._isEditing = false;
|
|
6665
|
+
this._dispatchEditFinished();
|
|
6666
|
+
};
|
|
6667
|
+
_onEditKeydown = (e) => {
|
|
6668
|
+
e.stopPropagation();
|
|
6669
|
+
if (e.key === "Escape") {
|
|
6670
|
+
e.preventDefault();
|
|
6671
|
+
this._cancelEdit();
|
|
6672
|
+
return;
|
|
6673
|
+
}
|
|
6674
|
+
if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !this.isMobile) {
|
|
6675
|
+
e.preventDefault();
|
|
6676
|
+
this._submitEdit();
|
|
6677
|
+
}
|
|
4137
6678
|
};
|
|
4138
6679
|
_hoverIn = (e) => {
|
|
4139
6680
|
const bg = this.isDark ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.05)";
|
|
@@ -4252,7 +6793,9 @@ var ChatMessage = class extends LitElement6 {
|
|
|
4252
6793
|
</style>
|
|
4253
6794
|
<div
|
|
4254
6795
|
data-testid="message"
|
|
4255
|
-
|
|
6796
|
+
data-message-id="${this.msg.id}"
|
|
6797
|
+
?data-keyboard-selected="${this.isKeyboardSelected}"
|
|
6798
|
+
style="display:flex;gap:6px;align-items:flex-start;flex-direction:${isOwn ? "row-reverse" : "row"};min-width:0${isLiveNew ? ";animation:msg-enter .22s cubic-bezier(0.16, 1, 0.3, 1)" : ""}${this.isKeyboardSelected ? keyboardSelectedRowStyle(isDark) : ""}"
|
|
4256
6799
|
>
|
|
4257
6800
|
${showAvatar ? html7`
|
|
4258
6801
|
<chat-avatar
|
|
@@ -4294,11 +6837,12 @@ var ChatMessage = class extends LitElement6 {
|
|
|
4294
6837
|
` : nothing3}${this.msg.replyTo ? renderQuotedMessage(this.msg.replyTo, isDark, customColors, textColor) : nothing3}${this._isEditing ? html7`
|
|
4295
6838
|
<div style="margin-top:4px">
|
|
4296
6839
|
<textarea
|
|
6840
|
+
data-testid="edit-message-input"
|
|
4297
6841
|
.value="${this._editText}"
|
|
4298
6842
|
@input="${(e) => {
|
|
4299
6843
|
this._editText = e.target.value;
|
|
4300
6844
|
}}"
|
|
4301
|
-
@keydown="${
|
|
6845
|
+
@keydown="${this._onEditKeydown}"
|
|
4302
6846
|
style="${editTextareaStyle}"
|
|
4303
6847
|
></textarea>
|
|
4304
6848
|
<div style="display:flex;gap:4px;margin-top:4px">
|
|
@@ -4450,7 +6994,22 @@ var ChatMessage = class extends LitElement6 {
|
|
|
4450
6994
|
+
|
|
4451
6995
|
</button>
|
|
4452
6996
|
</div>
|
|
4453
|
-
` : nothing3} ${!empty(this.msg.reactions ?? []) ? renderReactionPills(groupReactions(this.userId)(this.msg.reactions), isDark, (emoji) => this._toggleReaction(emoji)) : nothing3}
|
|
6997
|
+
` : nothing3} ${!empty(this.msg.reactions ?? []) ? renderReactionPills(groupReactions(this.userId)(this.msg.reactions), isDark, (emoji) => this._toggleReaction(emoji)) : nothing3} ${this.isKeyboardSelected && !this.isMobile && !this._isEditing ? html7`
|
|
6998
|
+
<div
|
|
6999
|
+
data-testid="message-keyboard-hint"
|
|
7000
|
+
style="${keyboardHintBarStyle(isDark)}"
|
|
7001
|
+
>
|
|
7002
|
+
${this.onReact ? html7`
|
|
7003
|
+
<span><kbd style="${keyboardHintKeyStyle(isDark)}">1–5</kbd> react</span>
|
|
7004
|
+
<span><kbd style="${keyboardHintKeyStyle(isDark)}">+</kbd> emoji</span>
|
|
7005
|
+
` : nothing3} ${this.onReply ? html7`
|
|
7006
|
+
<span><kbd style="${keyboardHintKeyStyle(isDark)}">r</kbd> reply</span>
|
|
7007
|
+
` : nothing3} ${canEdit ? html7`
|
|
7008
|
+
<span><kbd style="${keyboardHintKeyStyle(isDark)}">e</kbd> edit</span>
|
|
7009
|
+
` : nothing3}
|
|
7010
|
+
<span><kbd style="${keyboardHintKeyStyle(isDark)}">Esc</kbd> back</span>
|
|
7011
|
+
</div>
|
|
7012
|
+
` : nothing3}
|
|
4454
7013
|
</div>
|
|
4455
7014
|
${this._showMobileContext ? html7`
|
|
4456
7015
|
<div style="${mobileContextOverlayStyle}" @click="${this._closeMobileContext}">
|
|
@@ -4612,6 +7171,84 @@ if (!customElements.get("chat-typing-indicator")) {
|
|
|
4612
7171
|
customElements.define("chat-typing-indicator", ChatTypingIndicator);
|
|
4613
7172
|
}
|
|
4614
7173
|
|
|
7174
|
+
// lit/components/shortcuts.ts
|
|
7175
|
+
var isTextInputTarget = (target) => {
|
|
7176
|
+
if (!target || typeof target !== "object") return false;
|
|
7177
|
+
if ("isContentEditable" in target && target.isContentEditable === true) {
|
|
7178
|
+
return true;
|
|
7179
|
+
}
|
|
7180
|
+
const tagName = "tagName" in target && typeof target.tagName === "string" ? target.tagName.toUpperCase() : "";
|
|
7181
|
+
return tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT";
|
|
7182
|
+
};
|
|
7183
|
+
var isGlobalChord = (e) => {
|
|
7184
|
+
const key = e.key.toLowerCase();
|
|
7185
|
+
const hasMod = e.ctrlKey || e.metaKey;
|
|
7186
|
+
if (e.altKey && !hasMod && !e.shiftKey && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
7187
|
+
return true;
|
|
7188
|
+
}
|
|
7189
|
+
if (hasMod && !e.altKey && !e.shiftKey && key === "k") return true;
|
|
7190
|
+
if (hasMod && !e.altKey && key === "/") return true;
|
|
7191
|
+
return false;
|
|
7192
|
+
};
|
|
7193
|
+
var classifyGlobalShortcut = (e) => {
|
|
7194
|
+
const key = e.key.toLowerCase();
|
|
7195
|
+
const hasMod = e.ctrlKey || e.metaKey;
|
|
7196
|
+
if (e.altKey && !hasMod && !e.shiftKey) {
|
|
7197
|
+
if (e.key === "ArrowUp") return {
|
|
7198
|
+
type: "prev-thread"
|
|
7199
|
+
};
|
|
7200
|
+
if (e.key === "ArrowDown") return {
|
|
7201
|
+
type: "next-thread"
|
|
7202
|
+
};
|
|
7203
|
+
}
|
|
7204
|
+
if (hasMod && !e.altKey && !e.shiftKey && key === "k") {
|
|
7205
|
+
return {
|
|
7206
|
+
type: "focus-search"
|
|
7207
|
+
};
|
|
7208
|
+
}
|
|
7209
|
+
if (hasMod && !e.altKey && key === "/") {
|
|
7210
|
+
return {
|
|
7211
|
+
type: "toggle-shortcuts-help"
|
|
7212
|
+
};
|
|
7213
|
+
}
|
|
7214
|
+
if (e.key === "?" && !hasMod && !e.altKey && !isTextInputTarget(e.target ?? null)) {
|
|
7215
|
+
return {
|
|
7216
|
+
type: "toggle-shortcuts-help"
|
|
7217
|
+
};
|
|
7218
|
+
}
|
|
7219
|
+
return null;
|
|
7220
|
+
};
|
|
7221
|
+
var nextThreadId = (ids, currentId, direction) => {
|
|
7222
|
+
if (ids.length === 0) return null;
|
|
7223
|
+
const currentIndex = currentId ? ids.indexOf(currentId) : -1;
|
|
7224
|
+
if (currentIndex === -1) {
|
|
7225
|
+
return direction === "next" ? ids[0] : ids[ids.length - 1];
|
|
7226
|
+
}
|
|
7227
|
+
const delta = direction === "next" ? 1 : -1;
|
|
7228
|
+
return ids[(currentIndex + delta + ids.length) % ids.length];
|
|
7229
|
+
};
|
|
7230
|
+
var chronological = (messages) => sortKey((m) => m.timestamp)([
|
|
7231
|
+
...messages
|
|
7232
|
+
]);
|
|
7233
|
+
var findLatestMessage = (messages) => {
|
|
7234
|
+
const ordered = chronological(messages);
|
|
7235
|
+
return ordered.length > 0 ? ordered[ordered.length - 1] : null;
|
|
7236
|
+
};
|
|
7237
|
+
var findLastEditableMessageId = (messages, userId, now) => chronological(messages).reverse().find((m) => m.authorId === userId && now - m.timestamp < editWindowMs)?.id ?? null;
|
|
7238
|
+
var stepSelectedMessageId = (messages, selectedId, direction) => {
|
|
7239
|
+
const ordered = chronological(messages);
|
|
7240
|
+
if (ordered.length === 0) return null;
|
|
7241
|
+
if (!selectedId) {
|
|
7242
|
+
return direction === "prev" ? ordered[ordered.length - 1].id : null;
|
|
7243
|
+
}
|
|
7244
|
+
const idx = ordered.findIndex((m) => m.id === selectedId);
|
|
7245
|
+
if (idx === -1) return ordered[ordered.length - 1].id;
|
|
7246
|
+
if (direction === "prev") {
|
|
7247
|
+
return ordered[Math.max(0, idx - 1)].id;
|
|
7248
|
+
}
|
|
7249
|
+
return idx >= ordered.length - 1 ? null : ordered[idx + 1].id;
|
|
7250
|
+
};
|
|
7251
|
+
|
|
4615
7252
|
// lit/components/chat-box.ts
|
|
4616
7253
|
var indicatorColor = (isDark, color, stale) => stale ? isDark ? "#f87171" : "#b91c1c" : color ?? (isDark ? "#cbd5e1" : "#475569");
|
|
4617
7254
|
var indicatorTextStyle = (isDark, color, stale, isRtl) => `padding:${isRtl ? "6px 44px 6px 12px" : "6px 12px 6px 44px"};color:${indicatorColor(isDark, color, stale)};font-size:14px;text-align:start`;
|
|
@@ -4735,6 +7372,31 @@ var renderReplyBar = (reply, isDark, onClear, custom) => {
|
|
|
4735
7372
|
</div>
|
|
4736
7373
|
`;
|
|
4737
7374
|
};
|
|
7375
|
+
var reactionPreviewKeyStyle = (isDark, custom) => `font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;padding:2px 6px;border-radius:6px;flex-shrink:0;background:${inputSurfaceIsLight(isDark, custom) ? "rgba(24,23,21,0.08)" : "rgba(255,255,255,0.1)"};color:${inputSurfaceIsLight(isDark, custom) ? "#374151" : "#d1d5db"}`;
|
|
7376
|
+
var renderReactionPreviewBar = ({ emoji, remove: remove2, target, isDark, custom }) => {
|
|
7377
|
+
const lightSurface = inputSurfaceIsLight(isDark, custom);
|
|
7378
|
+
return html9`
|
|
7379
|
+
<div
|
|
7380
|
+
data-testid="reaction-command-preview"
|
|
7381
|
+
style="${replyBarStyle(isDark, custom)}"
|
|
7382
|
+
>
|
|
7383
|
+
<span style="font-size:18px;line-height:1;flex-shrink:0">${emoji}</span>
|
|
7384
|
+
<div style="${replyBarQuoteStyle(isDark, custom)}">
|
|
7385
|
+
<div
|
|
7386
|
+
style="font-weight:600;color:${quoteBarColor(isDark, custom)};white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
7387
|
+
>
|
|
7388
|
+
${remove2 ? "Remove reaction from" : "React to"} ${target.authorName || "previous message"}
|
|
7389
|
+
</div>
|
|
7390
|
+
<div
|
|
7391
|
+
style="color:${lightSurface ? "#6b7280" : "#9ca3af"};white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
7392
|
+
>
|
|
7393
|
+
${target.text || "Attachment"}
|
|
7394
|
+
</div>
|
|
7395
|
+
</div>
|
|
7396
|
+
<kbd style="${reactionPreviewKeyStyle(isDark, custom)}">Enter</kbd>
|
|
7397
|
+
</div>
|
|
7398
|
+
`;
|
|
7399
|
+
};
|
|
4738
7400
|
var headerButtonStyle = "background:transparent;border:none;cursor:pointer;color:inherit;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;padding:0;font-size:16px;line-height:1;flex-shrink:0";
|
|
4739
7401
|
var inlineTitleInputStyle = (headerIsLight) => `width:100%;max-width:240px;box-sizing:border-box;padding:1px 8px;margin:0;border-radius:6px;border:1px solid ${headerIsLight ? "rgba(24,23,21,0.22)" : "rgba(255,255,255,0.22)"};background:${headerIsLight ? "rgba(24,23,21,0.05)" : "rgba(255,255,255,0.08)"};color:inherit;font:inherit;letter-spacing:inherit;text-align:center;outline:none;line-height:1.35`;
|
|
4740
7402
|
var messageContainerStyle = (isDark, custom) => `flex-grow:1;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;min-height:0;scrollbar-color:${custom?.scrollbarColor ?? (isDark ? "#2a2a2a #111" : "#cbd5e1 #e2e8f0")};scrollbar-width:thin`;
|
|
@@ -4754,6 +7416,8 @@ var autocompleteDropdownStyle = (isDark, custom) => `position:absolute;bottom:ca
|
|
|
4754
7416
|
var autocompleteItemStyle = (isSelected, isDark, custom) => `display:flex;align-items:center;gap:12px;padding:8px 16px;cursor:pointer;background:${isSelected ? inputSurfaceIsLight(isDark, custom) ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.08)" : "transparent"};transition:background 0.1s ease`;
|
|
4755
7417
|
var autocompleteItemNameStyle = (isDark, custom) => `font-size:14px;font-weight:500;color:${inputSurfaceIsLight(isDark, custom) ? "#1e293b" : "#f3f4f6"}`;
|
|
4756
7418
|
var autocompleteItemKeyStyle = (isDark, custom) => `font-size:11px;font-family:monospace;color:${inputSurfaceIsLight(isDark, custom) ? "#64748b" : "#9ca3af"}`;
|
|
7419
|
+
var autocompleteHeaderStyle = (isDark, custom) => `padding:6px 16px;font-size:11px;font-weight:600;color:${inputSurfaceIsLight(isDark, custom) ? "#64748b" : "#9ca3af"};border-bottom:1px solid ${inputBorderColor(isDark, custom)}`;
|
|
7420
|
+
var emojiAutocompleteGlyphStyle = "font-size:18px;line-height:1;width:24px;text-align:center;flex-shrink:0";
|
|
4757
7421
|
var textareaStyle = (isDark, custom, enableAttachments, height = minTextareaHeight, overflow = "hidden") => {
|
|
4758
7422
|
const transparent = isTransparentInput(custom);
|
|
4759
7423
|
const border = transparent ? "none" : `1px solid ${inputBorderColor(isDark, custom)}`;
|
|
@@ -4960,6 +7624,9 @@ var ChatBox = class extends LitElement8 {
|
|
|
4960
7624
|
_autocompleteState: {
|
|
4961
7625
|
state: true
|
|
4962
7626
|
},
|
|
7627
|
+
_selectedMessageId: {
|
|
7628
|
+
state: true
|
|
7629
|
+
},
|
|
4963
7630
|
_showScrollDownButton: {
|
|
4964
7631
|
state: true
|
|
4965
7632
|
},
|
|
@@ -5016,6 +7683,7 @@ var ChatBox = class extends LitElement8 {
|
|
|
5016
7683
|
this._inputAreaHeight = 72;
|
|
5017
7684
|
this._replyingTo = null;
|
|
5018
7685
|
this._autocompleteState = null;
|
|
7686
|
+
this._selectedMessageId = null;
|
|
5019
7687
|
this._showScrollDownButton = false;
|
|
5020
7688
|
this._isEditingTitle = false;
|
|
5021
7689
|
this._titleDraft = "";
|
|
@@ -5039,15 +7707,26 @@ var ChatBox = class extends LitElement8 {
|
|
|
5039
7707
|
_touchStart = null;
|
|
5040
7708
|
_prevActiveSpinnerIds = /* @__PURE__ */ new Set();
|
|
5041
7709
|
_prevMessageCount = 0;
|
|
7710
|
+
_pendingEditLastOwn = false;
|
|
5042
7711
|
_stuckToBottom = true;
|
|
5043
7712
|
_loadingMore = false;
|
|
5044
7713
|
_prevScrollHeight = 0;
|
|
5045
7714
|
_resizeObserver = null;
|
|
5046
7715
|
_inputResizeObserver = null;
|
|
5047
7716
|
_inputAreaEl = null;
|
|
5048
|
-
_escHandler = null;
|
|
5049
7717
|
_attachOutsideHandler = null;
|
|
5050
7718
|
_isMobile = false;
|
|
7719
|
+
focusInput = () => {
|
|
7720
|
+
if (!shouldAutoFocusInput({
|
|
7721
|
+
isMobile: this._isMobile || isMobileCheck(),
|
|
7722
|
+
disableAutoFocus: this.disableAutoFocus,
|
|
7723
|
+
isTouchDevice: isTouchOnlyDevice()
|
|
7724
|
+
})) {
|
|
7725
|
+
return;
|
|
7726
|
+
}
|
|
7727
|
+
this.updateComplete.then(() => this._inputEl?.focus()).catch(() => {
|
|
7728
|
+
});
|
|
7729
|
+
};
|
|
5051
7730
|
createRenderRoot() {
|
|
5052
7731
|
return this;
|
|
5053
7732
|
}
|
|
@@ -5060,20 +7739,12 @@ var ChatBox = class extends LitElement8 {
|
|
|
5060
7739
|
this.style.minWidth = "0";
|
|
5061
7740
|
this.style.maxWidth = "100%";
|
|
5062
7741
|
this._isMobile = isMobileCheck();
|
|
5063
|
-
|
|
5064
|
-
this._escHandler = (e) => {
|
|
5065
|
-
if (e.key === "Escape") (this.onClose ?? this.onBack)?.();
|
|
5066
|
-
};
|
|
5067
|
-
globalThis.addEventListener("keydown", this._escHandler);
|
|
5068
|
-
}
|
|
7742
|
+
globalThis.addEventListener("keydown", this._globalKeydownHandler);
|
|
5069
7743
|
globalThis.addEventListener("click", this._outsideClickHandler);
|
|
5070
7744
|
}
|
|
5071
7745
|
disconnectedCallback() {
|
|
5072
7746
|
super.disconnectedCallback();
|
|
5073
|
-
|
|
5074
|
-
globalThis.removeEventListener("keydown", this._escHandler);
|
|
5075
|
-
this._escHandler = null;
|
|
5076
|
-
}
|
|
7747
|
+
globalThis.removeEventListener("keydown", this._globalKeydownHandler);
|
|
5077
7748
|
globalThis.removeEventListener("click", this._outsideClickHandler);
|
|
5078
7749
|
if (this._resizeObserver) {
|
|
5079
7750
|
this._resizeObserver.disconnect();
|
|
@@ -5086,6 +7757,156 @@ var ChatBox = class extends LitElement8 {
|
|
|
5086
7757
|
this._removeAttachOutside();
|
|
5087
7758
|
if (this._recordingInterval) clearInterval(this._recordingInterval);
|
|
5088
7759
|
}
|
|
7760
|
+
_messageComponents() {
|
|
7761
|
+
return Array.from(this.querySelectorAll("chat-message")).filter((el) => el instanceof ChatMessage);
|
|
7762
|
+
}
|
|
7763
|
+
_findMessageComponent(messageId) {
|
|
7764
|
+
return this._messageComponents().find((el) => el.msg?.id === messageId) ?? null;
|
|
7765
|
+
}
|
|
7766
|
+
_scrollMessageIntoView(messageId) {
|
|
7767
|
+
this.updateComplete.then(() => {
|
|
7768
|
+
const target = this._findMessageComponent(messageId);
|
|
7769
|
+
target?.scrollIntoView({
|
|
7770
|
+
block: "nearest"
|
|
7771
|
+
});
|
|
7772
|
+
}).catch(() => {
|
|
7773
|
+
});
|
|
7774
|
+
}
|
|
7775
|
+
_enterMessageSelection() {
|
|
7776
|
+
const nextId = stepSelectedMessageId(this.messages, this._selectedMessageId, "prev");
|
|
7777
|
+
if (!nextId) return;
|
|
7778
|
+
this._selectedMessageId = nextId;
|
|
7779
|
+
this._inputEl?.blur();
|
|
7780
|
+
this._scrollMessageIntoView(nextId);
|
|
7781
|
+
}
|
|
7782
|
+
_stepMessageSelection(direction) {
|
|
7783
|
+
const nextId = stepSelectedMessageId(this.messages, this._selectedMessageId, direction);
|
|
7784
|
+
this._selectedMessageId = nextId;
|
|
7785
|
+
if (nextId) {
|
|
7786
|
+
this._scrollMessageIntoView(nextId);
|
|
7787
|
+
} else {
|
|
7788
|
+
this.focusInput();
|
|
7789
|
+
}
|
|
7790
|
+
}
|
|
7791
|
+
_handleEditFinished = () => {
|
|
7792
|
+
this.focusInput();
|
|
7793
|
+
};
|
|
7794
|
+
_dismissAnyMessagePopup() {
|
|
7795
|
+
return this._messageComponents().some((el) => el.dismissActivePopup());
|
|
7796
|
+
}
|
|
7797
|
+
_handleSelectedMessageKeydown(e) {
|
|
7798
|
+
if (!this._selectedMessageId) return false;
|
|
7799
|
+
if (isTextInputTarget(e.target)) return false;
|
|
7800
|
+
if (e.altKey || e.ctrlKey || e.metaKey) return false;
|
|
7801
|
+
const selectedId = this._selectedMessageId;
|
|
7802
|
+
const key = e.key.toLowerCase();
|
|
7803
|
+
if (e.key === "Escape") {
|
|
7804
|
+
e.preventDefault();
|
|
7805
|
+
if (this._dismissAnyMessagePopup()) return true;
|
|
7806
|
+
this._selectedMessageId = null;
|
|
7807
|
+
this.focusInput();
|
|
7808
|
+
return true;
|
|
7809
|
+
}
|
|
7810
|
+
if (e.key === "Enter") {
|
|
7811
|
+
e.preventDefault();
|
|
7812
|
+
this._selectedMessageId = null;
|
|
7813
|
+
this.focusInput();
|
|
7814
|
+
return true;
|
|
7815
|
+
}
|
|
7816
|
+
if (e.key === "ArrowUp" || key === "k") {
|
|
7817
|
+
e.preventDefault();
|
|
7818
|
+
this._stepMessageSelection("prev");
|
|
7819
|
+
return true;
|
|
7820
|
+
}
|
|
7821
|
+
if (e.key === "ArrowDown" || key === "j") {
|
|
7822
|
+
e.preventDefault();
|
|
7823
|
+
this._stepMessageSelection("next");
|
|
7824
|
+
return true;
|
|
7825
|
+
}
|
|
7826
|
+
if (/^[1-5]$/.test(e.key) && this.onReact) {
|
|
7827
|
+
e.preventDefault();
|
|
7828
|
+
const emoji = quickReactionEmojis[Number(e.key) - 1];
|
|
7829
|
+
this._findMessageComponent(selectedId)?.toggleReaction(emoji);
|
|
7830
|
+
this._selectedMessageId = null;
|
|
7831
|
+
this.focusInput();
|
|
7832
|
+
return true;
|
|
7833
|
+
}
|
|
7834
|
+
if ((e.key === "+" || e.key === ":" || key === "a") && this.onReact) {
|
|
7835
|
+
e.preventDefault();
|
|
7836
|
+
this._findMessageComponent(selectedId)?.openReactionPicker();
|
|
7837
|
+
return true;
|
|
7838
|
+
}
|
|
7839
|
+
if (key === "r") {
|
|
7840
|
+
e.preventDefault();
|
|
7841
|
+
this._selectedMessageId = null;
|
|
7842
|
+
this._handleReply(selectedId);
|
|
7843
|
+
return true;
|
|
7844
|
+
}
|
|
7845
|
+
if (key === "e") {
|
|
7846
|
+
const started = this._findMessageComponent(selectedId)?.startEdit();
|
|
7847
|
+
if (started) {
|
|
7848
|
+
e.preventDefault();
|
|
7849
|
+
this._selectedMessageId = null;
|
|
7850
|
+
return true;
|
|
7851
|
+
}
|
|
7852
|
+
return false;
|
|
7853
|
+
}
|
|
7854
|
+
if (key === "c") {
|
|
7855
|
+
const msg = this.messages.find((m) => m.id === selectedId);
|
|
7856
|
+
if (msg) {
|
|
7857
|
+
e.preventDefault();
|
|
7858
|
+
copyToClipboard(msg.text);
|
|
7859
|
+
this._selectedMessageId = null;
|
|
7860
|
+
this.focusInput();
|
|
7861
|
+
return true;
|
|
7862
|
+
}
|
|
7863
|
+
}
|
|
7864
|
+
return false;
|
|
7865
|
+
}
|
|
7866
|
+
_globalKeydownHandler = (e) => {
|
|
7867
|
+
if (e.defaultPrevented) return;
|
|
7868
|
+
if (e.key === "ArrowUp" && e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey) {
|
|
7869
|
+
if (this.messages.length > 0) {
|
|
7870
|
+
e.preventDefault();
|
|
7871
|
+
this._enterMessageSelection();
|
|
7872
|
+
}
|
|
7873
|
+
return;
|
|
7874
|
+
}
|
|
7875
|
+
if (this._handleSelectedMessageKeydown(e)) return;
|
|
7876
|
+
if (e.key === "Escape") {
|
|
7877
|
+
if (this._dismissAnyMessagePopup()) {
|
|
7878
|
+
e.preventDefault();
|
|
7879
|
+
return;
|
|
7880
|
+
}
|
|
7881
|
+
if (this._showMenu) {
|
|
7882
|
+
this._showMenu = false;
|
|
7883
|
+
e.preventDefault();
|
|
7884
|
+
return;
|
|
7885
|
+
}
|
|
7886
|
+
if (this._showAttachMenu) {
|
|
7887
|
+
this._showAttachMenu = false;
|
|
7888
|
+
this._removeAttachOutside();
|
|
7889
|
+
e.preventDefault();
|
|
7890
|
+
return;
|
|
7891
|
+
}
|
|
7892
|
+
if (this._autocompleteState) {
|
|
7893
|
+
this._autocompleteState = null;
|
|
7894
|
+
e.preventDefault();
|
|
7895
|
+
return;
|
|
7896
|
+
}
|
|
7897
|
+
if (this._replyingTo) {
|
|
7898
|
+
this._replyingTo = null;
|
|
7899
|
+
e.preventDefault();
|
|
7900
|
+
return;
|
|
7901
|
+
}
|
|
7902
|
+
if (this._isEditingTitle) {
|
|
7903
|
+
this._cancelEditingTitle();
|
|
7904
|
+
e.preventDefault();
|
|
7905
|
+
return;
|
|
7906
|
+
}
|
|
7907
|
+
(this.onClose ?? this.onBack)?.();
|
|
7908
|
+
}
|
|
7909
|
+
};
|
|
5089
7910
|
_outsideClickHandler = (e) => {
|
|
5090
7911
|
if (this._showMenu) {
|
|
5091
7912
|
const path = e.composedPath();
|
|
@@ -5428,12 +8249,39 @@ var ChatBox = class extends LitElement8 {
|
|
|
5428
8249
|
this._scrollToBottom();
|
|
5429
8250
|
requestAnimationFrame(() => this._scrollToBottom());
|
|
5430
8251
|
};
|
|
8252
|
+
_reactionTargetMessage() {
|
|
8253
|
+
if (this._replyingTo) {
|
|
8254
|
+
const replied = this.messages.find((m) => m.id === this._replyingTo?.id);
|
|
8255
|
+
if (replied) return replied;
|
|
8256
|
+
}
|
|
8257
|
+
return findLatestMessage(this.messages);
|
|
8258
|
+
}
|
|
5431
8259
|
async _handleSend() {
|
|
5432
|
-
const
|
|
8260
|
+
const rawText = this._input.trim();
|
|
5433
8261
|
const files = [
|
|
5434
8262
|
...this._pendingFiles
|
|
5435
8263
|
];
|
|
5436
|
-
if (!
|
|
8264
|
+
if (!rawText && files.length === 0) return;
|
|
8265
|
+
if (files.length === 0 && this.onReact) {
|
|
8266
|
+
const reactionCmd = parseReactionCommand(rawText);
|
|
8267
|
+
const target = reactionCmd ? this._reactionTargetMessage() : null;
|
|
8268
|
+
if (reactionCmd && target) {
|
|
8269
|
+
this._input = "";
|
|
8270
|
+
this._textareaHeight = minTextareaHeight;
|
|
8271
|
+
this._textareaOverflow = "hidden";
|
|
8272
|
+
this._replyingTo = null;
|
|
8273
|
+
this._autocompleteState = null;
|
|
8274
|
+
this.onReact(target.id, reactionCmd.emoji, reactionCmd.remove || void 0);
|
|
8275
|
+
setTimeout(() => {
|
|
8276
|
+
if (this._inputEl) {
|
|
8277
|
+
this._inputEl.style.height = `${minTextareaHeight}px`;
|
|
8278
|
+
this.focusInput();
|
|
8279
|
+
}
|
|
8280
|
+
}, 0);
|
|
8281
|
+
return;
|
|
8282
|
+
}
|
|
8283
|
+
}
|
|
8284
|
+
const text = replaceEmojiShortcodes(rawText);
|
|
5437
8285
|
if (files.length === 0 && estimateSerializedLength(text) > maxTextLength) {
|
|
5438
8286
|
return;
|
|
5439
8287
|
}
|
|
@@ -5443,6 +8291,7 @@ var ChatBox = class extends LitElement8 {
|
|
|
5443
8291
|
this._textareaOverflow = "hidden";
|
|
5444
8292
|
this._pendingFiles = [];
|
|
5445
8293
|
this._replyingTo = null;
|
|
8294
|
+
this._autocompleteState = null;
|
|
5446
8295
|
this.onInputActivity?.();
|
|
5447
8296
|
if (files.length > 0 && this.onSendWithAttachments) {
|
|
5448
8297
|
this._sendingType = files.some((f) => !f.type || f.type.startsWith("image/") || /\.(jpg|jpeg|png|gif|webp|heic|heif)$/i.test(f.name)) ? "image" : "file";
|
|
@@ -5499,6 +8348,20 @@ var ChatBox = class extends LitElement8 {
|
|
|
5499
8348
|
this._autocompleteState = null;
|
|
5500
8349
|
return;
|
|
5501
8350
|
}
|
|
8351
|
+
const emojiMatch = getEmojiAutocompleteState(textarea.value, textarea.selectionStart);
|
|
8352
|
+
if (emojiMatch && (!emojiMatch.reactionMode || Boolean(this.onReact) && Boolean(this._reactionTargetMessage()))) {
|
|
8353
|
+
const items = searchEmojis(emojiMatch.filter);
|
|
8354
|
+
if (nonempty(items)) {
|
|
8355
|
+
const prevIndex2 = this._autocompleteState?.kind === "emoji" && this._autocompleteState.triggerIndex === emojiMatch.triggerIndex ? this._autocompleteState.selectedIndex : 0;
|
|
8356
|
+
this._autocompleteState = {
|
|
8357
|
+
kind: "emoji",
|
|
8358
|
+
...emojiMatch,
|
|
8359
|
+
items,
|
|
8360
|
+
selectedIndex: Math.min(prevIndex2, items.length - 1)
|
|
8361
|
+
};
|
|
8362
|
+
return;
|
|
8363
|
+
}
|
|
8364
|
+
}
|
|
5502
8365
|
const state = getAutocompleteState(textarea.value, textarea.selectionStart);
|
|
5503
8366
|
if (!state) {
|
|
5504
8367
|
this._autocompleteState = null;
|
|
@@ -5509,20 +8372,25 @@ var ChatBox = class extends LitElement8 {
|
|
|
5509
8372
|
this._autocompleteState = null;
|
|
5510
8373
|
return;
|
|
5511
8374
|
}
|
|
8375
|
+
const prevIndex = this._autocompleteState?.kind === "mention" && this._autocompleteState.triggerIndex === state.triggerIndex ? this._autocompleteState.selectedIndex : 0;
|
|
5512
8376
|
this._autocompleteState = {
|
|
8377
|
+
kind: "mention",
|
|
5513
8378
|
...state,
|
|
5514
8379
|
filtered,
|
|
5515
|
-
selectedIndex: Math.min(
|
|
8380
|
+
selectedIndex: Math.min(prevIndex, filtered.length - 1)
|
|
5516
8381
|
};
|
|
5517
8382
|
}
|
|
5518
|
-
|
|
8383
|
+
_onTextareaClick = () => {
|
|
8384
|
+
this._selectedMessageId = null;
|
|
5519
8385
|
this._updateAutocomplete();
|
|
5520
8386
|
};
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
8387
|
+
_onTextareaKeyup = (e) => {
|
|
8388
|
+
if (e.key === "Escape" || e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Enter" || e.key === "Tab") {
|
|
8389
|
+
return;
|
|
8390
|
+
}
|
|
8391
|
+
this._updateAutocomplete();
|
|
8392
|
+
};
|
|
8393
|
+
_applyAutocompleteText(newText, newCursorIndex) {
|
|
5526
8394
|
this._input = newText;
|
|
5527
8395
|
this._autocompleteState = null;
|
|
5528
8396
|
this.updateComplete.then(() => {
|
|
@@ -5535,9 +8403,33 @@ var ChatBox = class extends LitElement8 {
|
|
|
5535
8403
|
}).catch(() => {
|
|
5536
8404
|
});
|
|
5537
8405
|
}
|
|
8406
|
+
_selectAutocompleteItem(participant) {
|
|
8407
|
+
const textarea = this._inputEl;
|
|
8408
|
+
if (!textarea || this._autocompleteState?.kind !== "mention") return;
|
|
8409
|
+
const { newText, newCursorIndex } = insertMention(textarea.value, this._autocompleteState.triggerIndex, textarea.selectionStart, participant.name);
|
|
8410
|
+
this._applyAutocompleteText(newText, newCursorIndex);
|
|
8411
|
+
}
|
|
8412
|
+
_selectEmojiAutocompleteItem(entry) {
|
|
8413
|
+
const textarea = this._inputEl;
|
|
8414
|
+
if (!textarea || this._autocompleteState?.kind !== "emoji") return;
|
|
8415
|
+
const { newText, newCursorIndex } = insertEmoji(textarea.value, this._autocompleteState.triggerIndex, textarea.selectionStart, entry.emoji, this._autocompleteState.reactionMode);
|
|
8416
|
+
this._applyAutocompleteText(newText, newCursorIndex);
|
|
8417
|
+
}
|
|
5538
8418
|
_onTextareaInput = (e) => {
|
|
5539
|
-
|
|
5540
|
-
|
|
8419
|
+
const textarea = e.target;
|
|
8420
|
+
if (!(textarea instanceof HTMLTextAreaElement)) return;
|
|
8421
|
+
const converted = convertCompletedShortcodeAtCursor(textarea.value, textarea.selectionStart);
|
|
8422
|
+
if (converted) {
|
|
8423
|
+
textarea.value = converted.text;
|
|
8424
|
+
textarea.selectionStart = converted.cursorIndex;
|
|
8425
|
+
textarea.selectionEnd = converted.cursorIndex;
|
|
8426
|
+
this._input = converted.text;
|
|
8427
|
+
} else {
|
|
8428
|
+
this._input = textarea.value;
|
|
8429
|
+
}
|
|
8430
|
+
this._selectedMessageId = null;
|
|
8431
|
+
this._pendingEditLastOwn = false;
|
|
8432
|
+
this._resizeTextarea(textarea);
|
|
5541
8433
|
this.onInputActivity?.();
|
|
5542
8434
|
this._updateAutocomplete();
|
|
5543
8435
|
};
|
|
@@ -5553,24 +8445,38 @@ var ChatBox = class extends LitElement8 {
|
|
|
5553
8445
|
];
|
|
5554
8446
|
};
|
|
5555
8447
|
_onTextareaKeydown = (e) => {
|
|
5556
|
-
e
|
|
8448
|
+
if (isGlobalChord(e)) return;
|
|
8449
|
+
if (e.key === "ArrowUp" && e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey) {
|
|
8450
|
+
if (this.messages.length > 0) {
|
|
8451
|
+
e.preventDefault();
|
|
8452
|
+
e.stopPropagation();
|
|
8453
|
+
this._enterMessageSelection();
|
|
8454
|
+
}
|
|
8455
|
+
return;
|
|
8456
|
+
}
|
|
5557
8457
|
if (this._autocompleteState) {
|
|
8458
|
+
e.stopPropagation();
|
|
5558
8459
|
const state = this._autocompleteState;
|
|
8460
|
+
const listLen = state.kind === "mention" ? state.filtered.length : state.items.length;
|
|
5559
8461
|
if (e.key === "ArrowDown") {
|
|
5560
8462
|
e.preventDefault();
|
|
5561
|
-
state.selectedIndex = (state.selectedIndex + 1) %
|
|
8463
|
+
state.selectedIndex = (state.selectedIndex + 1) % listLen;
|
|
5562
8464
|
this.requestUpdate();
|
|
5563
8465
|
return;
|
|
5564
8466
|
}
|
|
5565
8467
|
if (e.key === "ArrowUp") {
|
|
5566
8468
|
e.preventDefault();
|
|
5567
|
-
state.selectedIndex = (state.selectedIndex - 1 +
|
|
8469
|
+
state.selectedIndex = (state.selectedIndex - 1 + listLen) % listLen;
|
|
5568
8470
|
this.requestUpdate();
|
|
5569
8471
|
return;
|
|
5570
8472
|
}
|
|
5571
8473
|
if (e.key === "Enter" || e.key === "Tab") {
|
|
5572
8474
|
e.preventDefault();
|
|
5573
|
-
|
|
8475
|
+
if (state.kind === "mention") {
|
|
8476
|
+
this._selectAutocompleteItem(state.filtered[state.selectedIndex]);
|
|
8477
|
+
} else {
|
|
8478
|
+
this._selectEmojiAutocompleteItem(state.items[state.selectedIndex]);
|
|
8479
|
+
}
|
|
5574
8480
|
return;
|
|
5575
8481
|
}
|
|
5576
8482
|
if (e.key === "Escape") {
|
|
@@ -5579,6 +8485,45 @@ var ChatBox = class extends LitElement8 {
|
|
|
5579
8485
|
return;
|
|
5580
8486
|
}
|
|
5581
8487
|
}
|
|
8488
|
+
if (e.key === "Escape") {
|
|
8489
|
+
this._pendingEditLastOwn = false;
|
|
8490
|
+
if (this._replyingTo) {
|
|
8491
|
+
e.preventDefault();
|
|
8492
|
+
e.stopPropagation();
|
|
8493
|
+
this._replyingTo = null;
|
|
8494
|
+
return;
|
|
8495
|
+
}
|
|
8496
|
+
if (this._selectedMessageId) {
|
|
8497
|
+
e.preventDefault();
|
|
8498
|
+
e.stopPropagation();
|
|
8499
|
+
this._selectedMessageId = null;
|
|
8500
|
+
return;
|
|
8501
|
+
}
|
|
8502
|
+
if (this._input.length > 0) {
|
|
8503
|
+
e.stopPropagation();
|
|
8504
|
+
}
|
|
8505
|
+
return;
|
|
8506
|
+
}
|
|
8507
|
+
e.stopPropagation();
|
|
8508
|
+
if (e.key === "ArrowUp" && (e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && this._input === "" && this.messages.length > 0) {
|
|
8509
|
+
e.preventDefault();
|
|
8510
|
+
this._enterMessageSelection();
|
|
8511
|
+
return;
|
|
8512
|
+
}
|
|
8513
|
+
if (e.key === "ArrowUp" && !e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey && this._input === "") {
|
|
8514
|
+
const pendingOwn = pruneOptimistic(this.messages, this._optimisticMessages, this.userId);
|
|
8515
|
+
if (nonempty(pendingOwn)) {
|
|
8516
|
+
e.preventDefault();
|
|
8517
|
+
this._pendingEditLastOwn = true;
|
|
8518
|
+
return;
|
|
8519
|
+
}
|
|
8520
|
+
const editableId = findLastEditableMessageId(this.messages, this.userId, Date.now());
|
|
8521
|
+
if (editableId) {
|
|
8522
|
+
e.preventDefault();
|
|
8523
|
+
this._findMessageComponent(editableId)?.startEdit();
|
|
8524
|
+
return;
|
|
8525
|
+
}
|
|
8526
|
+
}
|
|
5582
8527
|
if ((e.key === "PageUp" || e.key === "PageDown") && e.target) {
|
|
5583
8528
|
const ta = e.target;
|
|
5584
8529
|
const canScrollUp = ta.scrollTop > 0;
|
|
@@ -5692,6 +8637,11 @@ var ChatBox = class extends LitElement8 {
|
|
|
5692
8637
|
const prevTitle = changed.get("title");
|
|
5693
8638
|
if (changed.has("title") && prevTitle !== void 0) {
|
|
5694
8639
|
this._isEditingTitle = false;
|
|
8640
|
+
this._selectedMessageId = null;
|
|
8641
|
+
this._pendingEditLastOwn = false;
|
|
8642
|
+
}
|
|
8643
|
+
if (this._selectedMessageId && !this.messages.some((m) => m.id === this._selectedMessageId)) {
|
|
8644
|
+
this._selectedMessageId = null;
|
|
5695
8645
|
}
|
|
5696
8646
|
if (changed.has("title") && prevTitle !== void 0 && prevTitle !== "Chat" && !empty(this._optimisticMessages)) {
|
|
5697
8647
|
this._optimisticMessages = [];
|
|
@@ -5704,6 +8654,13 @@ var ChatBox = class extends LitElement8 {
|
|
|
5704
8654
|
if (pruned !== this._optimisticMessages) {
|
|
5705
8655
|
this._optimisticMessages = pruned;
|
|
5706
8656
|
}
|
|
8657
|
+
if (this._pendingEditLastOwn && empty(pruned)) {
|
|
8658
|
+
this._pendingEditLastOwn = false;
|
|
8659
|
+
if (this._input === "") {
|
|
8660
|
+
const editableId = findLastEditableMessageId(this.messages, this.userId, Date.now());
|
|
8661
|
+
if (editableId) this._findMessageComponent(editableId)?.startEdit();
|
|
8662
|
+
}
|
|
8663
|
+
}
|
|
5707
8664
|
if (this._isSending) {
|
|
5708
8665
|
const hasNewAudio = this.messages.some((m) => m.timestamp > this._sessionStart && m.attachments?.some((a) => a.type === "audio"));
|
|
5709
8666
|
if (hasNewAudio) {
|
|
@@ -5825,6 +8782,14 @@ var ChatBox = class extends LitElement8 {
|
|
|
5825
8782
|
if (this._isRecording) this._stopRecording(false);
|
|
5826
8783
|
} : void 0;
|
|
5827
8784
|
const iconTransition = (active, reverse2 = false) => `position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform 0.2s ease,opacity 0.2s ease;transform:${active ? "scale(1) rotate(0deg)" : `scale(0) rotate(${reverse2 ? "-" : ""}90deg)`};opacity:${active ? 1 : 0}`;
|
|
8785
|
+
const reactionPreview = this.onReact && empty(this._pendingFiles) ? (() => {
|
|
8786
|
+
const cmd = parseReactionCommand(this._input);
|
|
8787
|
+
const target = cmd ? this._reactionTargetMessage() : null;
|
|
8788
|
+
return cmd && target ? {
|
|
8789
|
+
...cmd,
|
|
8790
|
+
target
|
|
8791
|
+
} : null;
|
|
8792
|
+
})() : null;
|
|
5828
8793
|
const remaining = maxTextLength - estimateSerializedLength(this._input);
|
|
5829
8794
|
return html9`
|
|
5830
8795
|
<style>
|
|
@@ -6076,7 +9041,7 @@ var ChatBox = class extends LitElement8 {
|
|
|
6076
9041
|
}
|
|
6077
9042
|
if (entry.kind === "stream") return entry.stream.elementId;
|
|
6078
9043
|
return "typing";
|
|
6079
|
-
}, (entry) => this._renderTimelineEntry(entry,
|
|
9044
|
+
}, (entry) => this._renderTimelineEntry(entry, customColors, isDark, quickReplyEntryId))} ${this._isSending ? sendingIndicator(sendingStatusText(this._sendingType), customColors?.primary ?? defaultPrimary(isDark), isDark) : nothing4}
|
|
6080
9045
|
`}
|
|
6081
9046
|
</div>
|
|
6082
9047
|
</div>
|
|
@@ -6096,7 +9061,13 @@ var ChatBox = class extends LitElement8 {
|
|
|
6096
9061
|
data-input-area
|
|
6097
9062
|
style="position:absolute;bottom:0;left:0;right:0;z-index:10"
|
|
6098
9063
|
>
|
|
6099
|
-
${
|
|
9064
|
+
${reactionPreview ? renderReactionPreviewBar({
|
|
9065
|
+
emoji: reactionPreview.emoji,
|
|
9066
|
+
remove: reactionPreview.remove,
|
|
9067
|
+
target: reactionPreview.target,
|
|
9068
|
+
isDark,
|
|
9069
|
+
custom: customColors
|
|
9070
|
+
}) : this._replyingTo ? renderReplyBar(this._replyingTo, isDark, () => {
|
|
6100
9071
|
this._replyingTo = null;
|
|
6101
9072
|
}, customColors) : nothing4} ${!empty(this._pendingFiles) ? html9`
|
|
6102
9073
|
<div style="background:${inputBgColor}">
|
|
@@ -6193,8 +9164,12 @@ var ChatBox = class extends LitElement8 {
|
|
|
6193
9164
|
<div
|
|
6194
9165
|
style="position:relative;flex-grow:1;display:flex;align-items:flex-end"
|
|
6195
9166
|
>
|
|
6196
|
-
${this._autocompleteState ? html9`
|
|
6197
|
-
<div
|
|
9167
|
+
${this._autocompleteState?.kind === "mention" ? html9`
|
|
9168
|
+
<div
|
|
9169
|
+
class="autocomplete-dropdown"
|
|
9170
|
+
data-testid="mention-autocomplete"
|
|
9171
|
+
style="${autocompleteDropdownStyle(isDark, customColors)}"
|
|
9172
|
+
>
|
|
6198
9173
|
${repeat(this._autocompleteState.filtered, (p) => p.publicSignKey, (p, index) => {
|
|
6199
9174
|
const isSelected = this._autocompleteState.selectedIndex === index;
|
|
6200
9175
|
return html9`
|
|
@@ -6218,6 +9193,42 @@ var ChatBox = class extends LitElement8 {
|
|
|
6218
9193
|
</div>
|
|
6219
9194
|
</div>
|
|
6220
9195
|
`;
|
|
9196
|
+
})}
|
|
9197
|
+
</div>
|
|
9198
|
+
` : this._autocompleteState?.kind === "emoji" ? html9`
|
|
9199
|
+
<div
|
|
9200
|
+
class="autocomplete-dropdown"
|
|
9201
|
+
data-testid="emoji-autocomplete"
|
|
9202
|
+
style="${autocompleteDropdownStyle(isDark, customColors)}"
|
|
9203
|
+
>
|
|
9204
|
+
${this._autocompleteState.reactionMode ? html9`
|
|
9205
|
+
<div style="${autocompleteHeaderStyle(isDark, customColors)}">
|
|
9206
|
+
${this._autocompleteState.reactionMode === "remove" ? "Remove reaction from" : "React to"} ${this._reactionTargetMessage()?.authorName || "previous message"}
|
|
9207
|
+
</div>
|
|
9208
|
+
` : nothing4} ${repeat(this._autocompleteState.items, (entry) => entry.shortcode, (entry, index) => {
|
|
9209
|
+
const isSelected = this._autocompleteState.selectedIndex === index;
|
|
9210
|
+
return html9`
|
|
9211
|
+
<div
|
|
9212
|
+
data-testid="emoji-autocomplete-item"
|
|
9213
|
+
data-shortcode="${entry.shortcode}"
|
|
9214
|
+
style="${autocompleteItemStyle(isSelected, isDark, customColors)}"
|
|
9215
|
+
@mousedown="${(e) => e.preventDefault()}"
|
|
9216
|
+
@click="${() => this._selectEmojiAutocompleteItem(entry)}"
|
|
9217
|
+
@mouseenter="${() => {
|
|
9218
|
+
this._autocompleteState.selectedIndex = index;
|
|
9219
|
+
this.requestUpdate();
|
|
9220
|
+
}}"
|
|
9221
|
+
>
|
|
9222
|
+
<span style="${emojiAutocompleteGlyphStyle}"
|
|
9223
|
+
>${entry.emoji}</span>
|
|
9224
|
+
<div style="display:flex;align-items:baseline;gap:8px;min-width:0;flex:1">
|
|
9225
|
+
<span style="${autocompleteItemNameStyle(isDark, customColors)}">:${entry.shortcode}:</span>
|
|
9226
|
+
${entry.aliases && entry.aliases.length > 0 ? html9`
|
|
9227
|
+
<span style="${autocompleteItemKeyStyle(isDark, customColors)}">${entry.aliases[0]}</span>
|
|
9228
|
+
` : nothing4}
|
|
9229
|
+
</div>
|
|
9230
|
+
</div>
|
|
9231
|
+
`;
|
|
6221
9232
|
})}
|
|
6222
9233
|
</div>
|
|
6223
9234
|
` : nothing4} ${this.enableAttachments ? html9`
|
|
@@ -6286,8 +9297,8 @@ var ChatBox = class extends LitElement8 {
|
|
|
6286
9297
|
.value="${this._input}"
|
|
6287
9298
|
@input="${this._onTextareaInput}"
|
|
6288
9299
|
@paste="${this._onTextareaPaste}"
|
|
6289
|
-
@click="${this.
|
|
6290
|
-
@keyup="${this.
|
|
9300
|
+
@click="${this._onTextareaClick}"
|
|
9301
|
+
@keyup="${this._onTextareaKeyup}"
|
|
6291
9302
|
@blur="${() => this.onInputActivity?.()}"
|
|
6292
9303
|
@keydown="${this._onTextareaKeydown}"
|
|
6293
9304
|
style="${textareaStyle(isDark, customColors, this.enableAttachments, this._textareaHeight, this._textareaOverflow)}"
|
|
@@ -6344,11 +9355,13 @@ var ChatBox = class extends LitElement8 {
|
|
|
6344
9355
|
.customColors="${customColors}"
|
|
6345
9356
|
.isDark="${isDark}"
|
|
6346
9357
|
.isGroupChat="${this.isGroupChat}"
|
|
9358
|
+
.isKeyboardSelected="${this._selectedMessageId === entry.msg.id}"
|
|
6347
9359
|
@quick-reply="${(e) => this._handleQuickReply(e.detail.text)}"
|
|
9360
|
+
@edit-finished="${this._handleEditFinished}"
|
|
6348
9361
|
></chat-message>
|
|
6349
9362
|
`;
|
|
6350
9363
|
}
|
|
6351
|
-
_renderTimelineEntry(entry,
|
|
9364
|
+
_renderTimelineEntry(entry, customColors, isDark, quickReplyEntryId) {
|
|
6352
9365
|
if (entry.kind === "message") {
|
|
6353
9366
|
return this._renderMessageEntry(entry, quickReplyEntryId);
|
|
6354
9367
|
}
|
|
@@ -6369,11 +9382,10 @@ var ChatBox = class extends LitElement8 {
|
|
|
6369
9382
|
text: entry.stream.text,
|
|
6370
9383
|
timestamp: entry.stream.timestamp
|
|
6371
9384
|
};
|
|
6372
|
-
const prevMsg = allMsgs.filter((message) => message.timestamp <= entry.stream.timestamp).pop();
|
|
6373
9385
|
return html9`
|
|
6374
9386
|
<chat-message
|
|
6375
9387
|
.msg="${streamMsg}"
|
|
6376
|
-
.prev="${prevMsg}"
|
|
9388
|
+
.prev="${entry.prevMsg}"
|
|
6377
9389
|
.isOwn="${streamMsg.authorId === this.userId}"
|
|
6378
9390
|
.streamActive="${entry.stream.active}"
|
|
6379
9391
|
.hideQuickReplies="${entry.stream.elementId !== quickReplyEntryId}"
|
|
@@ -6817,7 +9829,7 @@ var processChatState = ({ messages, details, uiElements, ephemeralStreams, progr
|
|
|
6817
9829
|
const persistedTexts = new Set(withReactions.map((m) => m.text));
|
|
6818
9830
|
const verifiedStreams = allowedParticipantKeys && allowedParticipantKeys.size > 0 ? ephemeralStreams.filter((s) => !s.authorId || allowedParticipantKeys.has(s.authorId)) : ephemeralStreams;
|
|
6819
9831
|
return {
|
|
6820
|
-
chatMessages: withReactions.map(resolveReplyTo(msgMap)),
|
|
9832
|
+
chatMessages: sortKey((m) => m.timestamp)(withReactions.map(resolveReplyTo(msgMap))),
|
|
6821
9833
|
// Canvas events reach every participant but are never part of the chat
|
|
6822
9834
|
// transcript; `chatMessages` above is already narrowed to text and edits.
|
|
6823
9835
|
canvasEvents: verifiedMessages.filter(isCanvasEvent),
|
|
@@ -6950,6 +9962,13 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
6950
9962
|
_typingNotifier = null;
|
|
6951
9963
|
_suppressTypingAuthor = null;
|
|
6952
9964
|
_voiceCall = null;
|
|
9965
|
+
focusInput = () => {
|
|
9966
|
+
this.updateComplete.then(() => {
|
|
9967
|
+
const box = this.querySelector("chat-box");
|
|
9968
|
+
if (box instanceof ChatBox) box.focusInput();
|
|
9969
|
+
}).catch(() => {
|
|
9970
|
+
});
|
|
9971
|
+
};
|
|
6953
9972
|
createRenderRoot() {
|
|
6954
9973
|
return this;
|
|
6955
9974
|
}
|
|
@@ -6963,6 +9982,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
6963
9982
|
this.style.maxWidth = "100%";
|
|
6964
9983
|
this._activeConversationId = this.conversationId;
|
|
6965
9984
|
this.addEventListener("click", this._handleClick);
|
|
9985
|
+
globalThis.addEventListener("keydown", this._handleGlobalKeydown);
|
|
6966
9986
|
if (this.enableChatSwitching) {
|
|
6967
9987
|
this._responsiveUnsub = subscribeIsMobile((m) => {
|
|
6968
9988
|
this._isMobile = m;
|
|
@@ -6974,6 +9994,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
6974
9994
|
disconnectedCallback() {
|
|
6975
9995
|
super.disconnectedCallback();
|
|
6976
9996
|
this.removeEventListener("click", this._handleClick);
|
|
9997
|
+
globalThis.removeEventListener("keydown", this._handleGlobalKeydown);
|
|
6977
9998
|
this._teardown();
|
|
6978
9999
|
}
|
|
6979
10000
|
get _effectiveDark() {
|
|
@@ -7024,6 +10045,9 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
7024
10045
|
const conversationNeedsSetup = Boolean(targetId) && (targetId !== this._subscribedConversationId || !sameCredentials(this._subscribedCredentials, this.credentials));
|
|
7025
10046
|
if (conversationNeedsSetup) {
|
|
7026
10047
|
this._setupConversationSubscriptions();
|
|
10048
|
+
if (!this.disableAutoFocus && !this._isMobile) {
|
|
10049
|
+
this.focusInput();
|
|
10050
|
+
}
|
|
7027
10051
|
} else if (changed.has("initialConversation") && this._participants.length === 0) {
|
|
7028
10052
|
this._applyInitialConversation(targetId);
|
|
7029
10053
|
}
|
|
@@ -7144,6 +10168,9 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
7144
10168
|
}
|
|
7145
10169
|
}));
|
|
7146
10170
|
this.requestUpdate();
|
|
10171
|
+
if (!this.disableAutoFocus && !this._isMobile) {
|
|
10172
|
+
this.focusInput();
|
|
10173
|
+
}
|
|
7147
10174
|
}
|
|
7148
10175
|
_applyInitialConversation(targetId) {
|
|
7149
10176
|
const seed = this.initialConversation;
|
|
@@ -7754,10 +10781,59 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
7754
10781
|
this._profileAuthorId = null;
|
|
7755
10782
|
this.requestUpdate();
|
|
7756
10783
|
};
|
|
10784
|
+
_filteredConversations() {
|
|
10785
|
+
if (!this._conversations) return [];
|
|
10786
|
+
const myKey = this.credentials?.publicSignKey ?? "";
|
|
10787
|
+
const query = this._searchQuery.trim().toLowerCase();
|
|
10788
|
+
return query ? this._conversations.filter((c) => resolveConversationDisplayName(c, myKey, this._nameCache, this._identityDetails).toLowerCase().includes(query)) : this._conversations;
|
|
10789
|
+
}
|
|
10790
|
+
_handleGlobalKeydown = (e) => {
|
|
10791
|
+
if (!this.enableChatSwitching || !this.credentials || e.defaultPrevented) {
|
|
10792
|
+
return;
|
|
10793
|
+
}
|
|
10794
|
+
const action = classifyGlobalShortcut(e);
|
|
10795
|
+
if (!action) return;
|
|
10796
|
+
if (action.type === "prev-thread" || action.type === "next-thread") {
|
|
10797
|
+
const ids = this._filteredConversations().map((c) => c.id);
|
|
10798
|
+
const currentId = this._activeConversationId || this.conversationId || null;
|
|
10799
|
+
const nextId = nextThreadId(ids, currentId, action.type === "prev-thread" ? "prev" : "next");
|
|
10800
|
+
if (nextId) {
|
|
10801
|
+
e.preventDefault();
|
|
10802
|
+
this._selectConversation(nextId);
|
|
10803
|
+
}
|
|
10804
|
+
return;
|
|
10805
|
+
}
|
|
10806
|
+
if (action.type === "focus-search") {
|
|
10807
|
+
const input = this.querySelector('[data-testid="sidebar-search-input"]');
|
|
10808
|
+
if (input) {
|
|
10809
|
+
e.preventDefault();
|
|
10810
|
+
input.focus();
|
|
10811
|
+
input.select();
|
|
10812
|
+
}
|
|
10813
|
+
}
|
|
10814
|
+
};
|
|
7757
10815
|
_handleSearchInput = (e) => {
|
|
7758
10816
|
this._searchQuery = e.target.value;
|
|
7759
10817
|
this.requestUpdate();
|
|
7760
10818
|
};
|
|
10819
|
+
_handleSearchKeydown = (e) => {
|
|
10820
|
+
if (e.key === "Enter") {
|
|
10821
|
+
const first = this._filteredConversations()[0];
|
|
10822
|
+
if (first) {
|
|
10823
|
+
e.preventDefault();
|
|
10824
|
+
this._searchQuery = "";
|
|
10825
|
+
this._selectConversation(first.id);
|
|
10826
|
+
}
|
|
10827
|
+
return;
|
|
10828
|
+
}
|
|
10829
|
+
if (e.key === "Escape") {
|
|
10830
|
+
e.preventDefault();
|
|
10831
|
+
e.stopPropagation();
|
|
10832
|
+
this._searchQuery = "";
|
|
10833
|
+
this.requestUpdate();
|
|
10834
|
+
this.focusInput();
|
|
10835
|
+
}
|
|
10836
|
+
};
|
|
7761
10837
|
_renderConversationList(isDark) {
|
|
7762
10838
|
if (!this._conversations) {
|
|
7763
10839
|
return html11`
|
|
@@ -7767,10 +10843,7 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
7767
10843
|
`;
|
|
7768
10844
|
}
|
|
7769
10845
|
const myKey = this.credentials?.publicSignKey ?? "";
|
|
7770
|
-
const filtered = this.
|
|
7771
|
-
const name = resolveConversationDisplayName(c, myKey, this._nameCache, this._identityDetails);
|
|
7772
|
-
return name.toLowerCase().includes(this._searchQuery.toLowerCase());
|
|
7773
|
-
}) : this._conversations;
|
|
10846
|
+
const filtered = this._filteredConversations();
|
|
7774
10847
|
if (empty(filtered)) {
|
|
7775
10848
|
return html11`
|
|
7776
10849
|
<div style="font-size:12px;color:${isDark ? "#888" : "#999"};padding:16px;text-align:center">
|
|
@@ -8101,9 +11174,11 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
8101
11174
|
<div style="font-size:16px;font-weight:700;color:${this.customColors?.text ?? (isDark ? "#fff" : "#111")}">Chats</div>
|
|
8102
11175
|
<input
|
|
8103
11176
|
type="text"
|
|
11177
|
+
data-testid="sidebar-search-input"
|
|
8104
11178
|
placeholder="Search chats..."
|
|
8105
11179
|
.value="${this._searchQuery}"
|
|
8106
11180
|
@input="${this._handleSearchInput}"
|
|
11181
|
+
@keydown="${this._handleSearchKeydown}"
|
|
8107
11182
|
style="${sidebarSearchInputStyle(isDark, this.customColors)}"
|
|
8108
11183
|
/>
|
|
8109
11184
|
</div>
|
|
@@ -8144,9 +11219,11 @@ var ConnectedChat = class extends LitElement10 {
|
|
|
8144
11219
|
<div style="${sidebarHeaderStyle(isDark)}">
|
|
8145
11220
|
<input
|
|
8146
11221
|
type="text"
|
|
11222
|
+
data-testid="sidebar-search-input"
|
|
8147
11223
|
placeholder="Search chats..."
|
|
8148
11224
|
.value="${this._searchQuery}"
|
|
8149
11225
|
@input="${this._handleSearchInput}"
|
|
11226
|
+
@keydown="${this._handleSearchKeydown}"
|
|
8150
11227
|
style="${sidebarSearchInputStyle(isDark, this.customColors)}"
|
|
8151
11228
|
/>
|
|
8152
11229
|
</div>
|