§
    ŒŸj¶  ã                  ój   — d Z ddlmZ ddlmZ ddlmZ erddlmZ ddl	m
Z
 g d¢Zdd„Zdd„Zdd„ZdS )zË
Adaptor for building prompt_toolkit styles, starting from a Pygments style.

Usage::

    from pygments.styles.tango import TangoStyle
    style = style_from_pygments_cls(pygments_style_cls=TangoStyle)
é    )Úannotations)ÚTYPE_CHECKINGé   ©ÚStyle)ÚToken)Ústyle_from_pygments_clsÚstyle_from_pygments_dictÚpygments_token_to_classnameÚpygments_style_clsútype[PygmentsStyle]Úreturnr   c                óZ   — ddl m} t          | |¦  «        sJ ‚t          | j        ¦  «        S )a�  
    Shortcut to create a :class:`.Style` instance from a Pygments style class
    and a style dictionary.

    Example::

        from prompt_toolkit.styles.from_pygments import style_from_pygments_cls
        from pygments.styles import get_style_by_name
        style = style_from_pygments_cls(get_style_by_name('monokai'))

    :param pygments_style_cls: Pygments style class to start from.
    r   r   )Úpygments.styler   Ú
issubclassr
   Ústyles)r   ÚPygmentsStyles     úk/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/prompt_toolkit/styles/pygments.pyr	   r	      s?   € ð 6Ð5Ð5Ð5Ð5Ð5åÐ(¨-Ñ8Ô8Ð8Ð8Ð8å#Ð$6Ô$=Ñ>Ô>Ð>ó    Úpygments_dictúdict[Token, str]c                ó    — g }|                       ¦   «         D ])\  }}|                     t          |¦  «        |f¦  «         Œ*t          |¦  «        S )z�
    Create a :class:`.Style` instance from a Pygments style dictionary.
    (One that maps Token objects to style strings.)
    )ÚitemsÚappendr   r   )r   Úpygments_styleÚtokenÚstyles       r   r
   r
   1   s]   € ð
 €Nà%×+Ò+Ñ-Ô-ð Kð K‰ˆˆuØ×ÒÕ:¸5ÑAÔAÀ5ÐIÑJÔJÐJÐJå�Ñ Ô Ð r   r   r   Ústrc                óZ   — d| z   }d                      |¦  «                             ¦   «         S )zá
    Turn e.g. `Token.Name.Exception` into `'pygments.name.exception'`.

    (Our Pygments lexer will also turn the tokens that pygments produces in a
    prompt_toolkit list of fragments that match these styling rules.)
    )Úpygmentsú.)ÚjoinÚlower)r   Úpartss     r   r   r   >   s*   € ð ˜EÑ!€EØ�8Š8�E‰?Œ?× Ò Ñ"Ô"Ð"r   N)r   r   r   r   )r   r   r   r   )r   r   r   r   )Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   Úpygments.tokenr   Ú__all__r	   r
   r   © r   r   ú<module>r+      sÊ   ððð ð #Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð àð %Ø5Ð5Ð5Ð5Ð5Ð5Ø$Ð$Ð$Ð$Ð$Ð$ðð ð €ð?ð ?ð ?ð ?ð*
!ð 
!ð 
!ð 
!ð#ð #ð #ð #ð #ð #r   