File: //snap/certbot/5057/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc
�
�F�h? � �� � d dl Z d dlmZmZmZmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ er
dd lmZmZmZ ed
Z G d� de� Z G d
� de� Zedk( r�d dl Z d dlmZ d dlmZ ed�� Z ed� e e
j8 � � D � d�� Zej= e� ee j@ � dkD rejC e j@ d � yyy)� N)�
TYPE_CHECKING�Optional�Union�Literal� )�JupyterMixin)�Segment)�Style)�EMOJI��_emoji_replace)�Console�ConsoleOptions�RenderResult)�emoji�textc � � e Zd ZdZy)�NoEmojizNo emoji by that name.N)�__name__�
__module__�__qualname__�__doc__� � ��/build/snapcraft-certbot-c9aaebe726f8beb59a0eb2d8e1671bc4/parts/certbot/install/lib/python3.12/site-packages/pip/_vendor/rich/emoji.pyr r s � � r r c � � e Zd Zg d�Zddd�Z ddedeeef dee d dfd
�Z
eded efd�� Zd efd
�Z
d efd�Z dd�Zy)�Emoji)�name�style�_char�variantu ︎u ️)r r Nr r r! �returnc �� � || _ || _ || _ t | | _ |�0| xj | j j |d� z
c_ yy# t
$ r t
d|��� �w xY w)z�A single emoji character.
Args:
name (str): Name of emoji.
style (Union[str, Style], optional): Optional style. Defaults to None.
Raises:
NoEmoji: If the emoji doesn't exist.
zNo emoji called N� ) r r r! r r �KeyErrorr �VARIANTS�get)�selfr r r! s r �__init__zEmoji.__init__ sy � � �� ���
���� 7��t��D�J� ���J�J�$�-�-�+�+�G�R�8�8�J� �� � 7��,�T�H�5�6�6� 7�s �A �A0r c � � t |� S )z�Replace emoji markup with corresponding unicode characters.
Args:
text (str): A string with emojis codes, e.g. "Hello :smiley:!"
Returns:
str: A string with emoji codes replaces with actual emoji.
r )�clsr s r �replacez
Emoji.replace4 s � � �d�#�#r c �"