Ë
    ��hŠ  ã                   óX  — d Z ddlZddlZddlZddlmZmZ ddlmZ ddl	m
Z
mZmZmZmZ ddlmZmZmZmZmZmZ ddlmZ g d¢Z ej2                  d	«      Zg d
¢Z ed„ «      Z G d„ de«      Z G d„ de¬«      Z  G d„ de «      Z! G d„ de"«      Z# G d„ d«      Z$ e$«       Z% G d„ de&«      Z' G d„ d«      Z(d„ Z) G d„ d«      Z* e*«       Z+d„ Z, G d„ d «      Z- G d!„ d"e«      Z. G d#„ d$e«      Z/ G d%„ d&e e/¬«      Z0 G d'„ d(«      Z1 G d)„ d*e0«      Z2d+„ Z3 G d,„ d-e/«      Z4 G d.„ d/e0e4¬«      Z5y)0z´
    pygments.lexer
    ~~~~~~~~~~~~~~

    Base lexer classes.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Úapply_filtersÚFilter)Úget_filter_by_name)ÚErrorÚTextÚOtherÚ
WhitespaceÚ
_TokenType)Úget_bool_optÚget_int_optÚget_list_optÚmake_analysatorÚFutureÚguess_decode)Ú	regex_opt)ÚLexerÚ
RegexLexerÚExtendedRegexLexerÚDelegatingLexerÚLexerContextÚincludeÚinheritÚbygroupsÚusingÚthisÚdefaultÚwordsÚline_rez.*?
))s   ï»¿zutf-8)s   ÿþ  zutf-32)s     þÿzutf-32be)s   ÿþzutf-16)s   þÿzutf-16bec                  ó   — y)Nç        © )Úxs    úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexer.pyú<lambda>r$   "   ó   � ó    c                   ó   — e Zd ZdZd„ Zy)Ú	LexerMetaz‚
    This metaclass automagically converts ``analyse_text`` methods into
    static methods which always return float values.
    c                 ó\   — d|v rt        |d   «      |d<   t        j                  | |||«      S )NÚanalyse_text)r   ÚtypeÚ__new__)ÚmcsÚnameÚbasesÚds       r#   r,   zLexerMeta.__new__+   s3   € Ø˜QÑÜ /°°.Ñ0AÓ BˆAˆnÑÜ�|‰|˜C  u¨aÓ0Ð0r&   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r,   r!   r&   r#   r(   r(   %   s   „ ñó
1r&   r(   c                   ó`   — e Zd ZdZdZg Zg Zg Zg ZdZ	dZ
dZdZd„ Zd„ Zd„ Zd„ Zd„ Zdd	„Zd
„ Zy)r   a"  
    Lexer for a specific language.

    See also :doc:`lexerdevelopment`, a high-level guide to writing
    lexers.

    Lexer classes have attributes used for choosing the most appropriate
    lexer based on various criteria.

    .. autoattribute:: name
       :no-value:
    .. autoattribute:: aliases
       :no-value:
    .. autoattribute:: filenames
       :no-value:
    .. autoattribute:: alias_filenames
    .. autoattribute:: mimetypes
       :no-value:
    .. autoattribute:: priority

    Lexers included in Pygments should have two additional attributes:

    .. autoattribute:: url
       :no-value:
    .. autoattribute:: version_added
       :no-value:

    Lexers included in Pygments may have additional attributes:

    .. autoattribute:: _example
       :no-value:

    You can pass options to the constructor. The basic options recognized
    by all lexers and processed by the base `Lexer` class are:

    ``stripnl``
        Strip leading and trailing newlines from the input (default: True).
    ``stripall``
        Strip all leading and trailing whitespace from the input
        (default: False).
    ``ensurenl``
        Make sure that the input ends with a newline (default: True).  This
        is required for some lexers that consume input linewise.

        .. versionadded:: 1.3

    ``tabsize``
        If given and greater than 0, expand tabs in the input (default: 0).
    ``encoding``
        If given, must be an encoding name. This encoding will be used to
        convert the input string to Unicode, if it is not already a Unicode
        string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
        Latin1 detection.  Can also be ``'chardet'`` to use the chardet
        library, if it is installed.
    ``inencoding``
        Overrides the ``encoding`` if given.
    Nr   c                 ól  — || _         t        |dd«      | _        t        |dd«      | _        t        |dd«      | _        t        |dd«      | _        |j                  dd	«      | _        |j                  d
«      xs | j                  | _        g | _	        t        |dd«      D ]  }| j                  |«       Œ y)a‘  
        This constructor takes arbitrary options as keyword arguments.
        Every subclass must first process its own options and then call
        the `Lexer` constructor, since it processes the basic
        options like `stripnl`.

        An example looks like this:

        .. sourcecode:: python

           def __init__(self, **options):
               self.compress = options.get('compress', '')
               Lexer.__init__(self, **options)

        As these options must all be specifiable as strings (due to the
        command line usage), there are various utility functions
        available to help with that, see `Utilities`_.
        ÚstripnlTÚstripallFÚensurenlÚtabsizer   ÚencodingÚguessÚ
inencodingÚfiltersr!   N)Úoptionsr   r7   r8   r9   r   r:   Úgetr;   r>   r   Ú
add_filter)Úselfr?   Úfilter_s      r#   Ú__init__zLexer.__init__‘   s¡   € ð& ˆŒÜ# G¨Y¸Ó=ˆŒÜ$ W¨j¸%Ó@ˆŒÜ$ W¨j¸$Ó?ˆŒÜ" 7¨I°qÓ9ˆŒØŸ™ J°Ó8ˆŒØŸ™ LÓ1ÒB°T·]±]ˆŒØˆŒÜ# G¨Y¸Ó;ò 	%ˆGØ�O‰O˜GÕ$ñ	%r&   c                 óœ   — | j                   r'd| j                  j                  › d| j                   ›d�S d| j                  j                  › d�S )Nz<pygments.lexers.z with ú>)r?   Ú	__class__r1   ©rB   s    r#   Ú__repr__zLexer.__repr__¯   sI   € Ø�<Š<Ø& t§~¡~×'>Ñ'>Ð&?¸vÀdÇlÁlÐEUÐUVÐWÐWà& t§~¡~×'>Ñ'>Ð&?¸qÐAÐAr&   c                 ór   — t        |t        «      st        |fi |¤Ž}| j                  j	                  |«       y)z8
        Add a new stream filter to this lexer.
        N)Ú
isinstancer   r   r>   Úappend)rB   rC   r?   s      r#   rA   zLexer.add_filterµ   s/   € ô ˜'¤6Ô*Ü(¨Ñ<°GÑ<ˆGØ�‰×Ñ˜GÕ$r&   c                  ó   — y)aÁ  
        A static method which is called for lexer guessing.

        It should analyse the text and return a float in the range
        from ``0.0`` to ``1.0``.  If it returns ``0.0``, the lexer
        will not be selected as the most probable one, if it returns
        ``1.0``, it will be selected immediately.  This is used by
        `guess_lexer`.

        The `LexerMeta` metaclass automatically wraps this function so
        that it works like a static method (no ``self`` or ``cls``
        parameter) and the return value is automatically converted to
        `float`. If the return value is an object that is boolean `False`
        it's the same as if the return values was ``0.0``.
        Nr!   )Útexts    r#   r*   zLexer.analyse_text½   r%   r&   c                 óÚ  — t        |t        «      st| j                  dk(  rt        |«      \  }}nu| j                  dk(  r	 t	        d«      ‚|j                  | j                  «      }|j                  d«      r.|t        d«      d }n|j                  d«      r|t        d«      d }|j                  dd«      }|j                  d	d«      }| j                  r|j                  «       }n| j                  r|j                  d«      }| j                   d
kD  r|j#                  | j                   «      }| j$                  r|j'                  d«      s|dz  }|S # t        $ r}t	        d«      |‚d}~ww xY w)zVApply preprocessing such as decoding the input, removing BOM and normalizing newlines.r<   Úchardetzchardet is not vendored by pipzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/Nu   ï»¿z
ú
úr   )rK   Ústrr;   r   ÚImportErrorÚ_encoding_mapÚ
startswithÚlenÚdecoderP   Údetectr@   Úreplacer8   Ústripr7   r:   Ú
expandtabsr9   Úendswith)rB   rN   Ú_ÚeÚdecodedÚbomr;   Úencs           r#   Ú_preprocess_lexer_inputzLexer._preprocess_lexer_inputÎ   sH  € ô ˜$¤Ô$Ø�}‰} Ò'Ü& tÓ,‘�‘aØ—‘ )Ò+ðTô &Ð&FÓGÐGð$ —{‘{ 4§=¡=Ó1�Ø—?‘? 8Ô,Ø¤ H£ Ð/‘Dà�‰˜xÔ(ØœC ›M˜NÐ+�ð �|‰|˜F DÓ)ˆØ�|‰|˜D $Ó'ˆØ�=Š=Ø—:‘:“<‰DØ�\Š\Ø—:‘:˜dÓ#ˆDØ�<‰<˜!ÒØ—?‘? 4§<¡<Ó0ˆDØ�=Š= §¡¨tÔ!4Ø�D‰LˆDàˆøôI #ò TÜ%ð 'Ló MàRSðTûðTús   ¿E Å	E*ÅE%Å%E*c                 óx   ‡ ‡— ‰ j                  ‰«      Šˆ ˆfd„} |«       }|st        |‰ j                  ‰ «      }|S )ae  
        This method is the basic interface of a lexer. It is called by
        the `highlight()` function. It must process the text and return an
        iterable of ``(tokentype, value)`` pairs from `text`.

        Normally, you don't need to override this method. The default
        implementation processes the options recognized by all lexers
        (`stripnl`, `stripall` and so on), and then yields all tokens
        from `get_tokens_unprocessed()`, with the ``index`` dropped.

        If `unfiltered` is set to `True`, the filtering mechanism is
        bypassed even if filters are defined.
        c               3   óN   •K  — ‰j                  ‰«      D ]  \  } }}||f–— Œ y ­w©N)Úget_tokens_unprocessed)r^   ÚtÚvrB   rN   s      €€r#   Ústreamerz"Lexer.get_tokens.<locals>.streamer  s0   øè ø€ Ø×6Ñ6°tÓ<ò ‘��1�aØ˜�d“
ñùs   ƒ"%)rc   r   r>   )rB   rN   Ú
unfilteredrj   Ústreams   ``   r#   Ú
get_tokenszLexer.get_tokensÿ   s=   ù€ ð ×+Ñ+¨DÓ1ˆõ	ñ “ˆÙÜ" 6¨4¯<©<¸Ó>ˆFØˆr&   c                 ó   — t         ‚)aS  
        This method should process the text and return an iterable of
        ``(index, tokentype, value)`` tuples where ``index`` is the starting
        position of the token within the input text.

        It must be overridden by subclasses. It is recommended to
        implement it as a generator to maximize effectiveness.
        )ÚNotImplementedError)rB   rN   s     r#   rg   zLexer.get_tokens_unprocessed  s
   € ô "Ð!r&   )F)r1   r2   r3   r4   r.   ÚaliasesÚ	filenamesÚalias_filenamesÚ	mimetypesÚpriorityÚurlÚversion_addedÚ_examplerD   rI   rA   r*   rc   rm   rg   r!   r&   r#   r   r   1   sl   „ ñ8ðv €Dð €Gð
 €Ið €Oð €Ið €Hð €Cð €Mð €Hò%ò<Bò%òò"/óbó0	"r&   r   )Ú	metaclassc                   ó    — e Zd ZdZefd„Zd„ Zy)r   a   
    This lexer takes two lexer as arguments. A root lexer and
    a language lexer. First everything is scanned using the language
    lexer, afterwards all ``Other`` tokens are lexed using the root
    lexer.

    The lexers from the ``template`` lexer package use this base lexer.
    c                 ór   —  |di |¤Ž| _          |di |¤Ž| _        || _        t        j                  | fi |¤Ž y ©Nr!   )Ú
root_lexerÚlanguage_lexerÚneedler   rD   )rB   Ú_root_lexerÚ_language_lexerÚ_needler?   s        r#   rD   zDelegatingLexer.__init__-  s9   € Ù%Ñ0¨Ñ0ˆŒÙ-Ñ8°Ñ8ˆÔØˆŒÜ�‰�tÑ'˜wÓ'r&   c                 ól  — d}g }g }| j                   j                  |«      D ]N  \  }}}|| j                  u r&|r|j                  t	        |«      |f«       g }||z  }Œ;|j                  |||f«       ŒP |r|j                  t	        |«      |f«       t        || j                  j                  |«      «      S )NÚ )r}   rg   r~   rL   rW   Údo_insertionsr|   )rB   rN   ÚbufferedÚ
insertionsÚ
lng_bufferÚirh   ri   s           r#   rg   z&DelegatingLexer.get_tokens_unprocessed3  s¾   € ØˆØˆ
Øˆ
Ø×*Ñ*×AÑAÀ$ÓGò 	-‰GˆAˆq�!Ø�D—K‘KÑÙØ×%Ñ%¤s¨8£}°jÐ&AÔBØ!#�JØ˜A‘‘à×!Ñ! 1 a¨ )Õ,ð	-ñ Ø×Ñœs 8›}¨jÐ9Ô:Ü˜ZØ!Ÿ_™_×CÑCÀHÓMóOð 	Or&   N)r1   r2   r3   r4   r   rD   rg   r!   r&   r#   r   r   #  s   „ ñð >Có (óOr&   r   c                   ó   — e Zd ZdZy)r   zI
    Indicates that a state should include rules from another state.
    N©r1   r2   r3   r4   r!   r&   r#   r   r   J  s   „ ñð 	r&   r   c                   ó   — e Zd ZdZd„ Zy)Ú_inheritzC
    Indicates the a state should inherit from its superclass.
    c                  ó   — y)Nr   r!   rH   s    r#   rI   z_inherit.__repr__U  s   € Ør&   N)r1   r2   r3   r4   rI   r!   r&   r#   rŒ   rŒ   Q  s   „ ñór&   rŒ   c                   ó   — e Zd ZdZd„ Zd„ Zy)Úcombinedz:
    Indicates a state combined from multiple states.
    c                 ó.   — t         j                  | |«      S rf   )Útupler,   )ÚclsÚargss     r#   r,   zcombined.__new__`  s   € Ü�}‰}˜S $Ó'Ð'r&   c                  ó   — y rf   r!   )rB   r“   s     r#   rD   zcombined.__init__c  s   € àr&   N)r1   r2   r3   r4   r,   rD   r!   r&   r#   r�   r�   [  s   „ ñò(ór&   r�   c                   ó:   — e Zd ZdZd„ Zd	d„Zd	d„Zd	d„Zd„ Zd„ Z	y)
Ú_PseudoMatchz:
    A pseudo match object constructed from a string.
    c                 ó    — || _         || _        y rf   )Ú_textÚ_start)rB   ÚstartrN   s      r#   rD   z_PseudoMatch.__init__m  s   € ØˆŒ
Øˆ�r&   Nc                 ó   — | j                   S rf   )r™   ©rB   Úargs     r#   rš   z_PseudoMatch.startq  s   € Ø�{‰{Ðr&   c                 óF   — | j                   t        | j                  «      z   S rf   )r™   rW   r˜   rœ   s     r#   Úendz_PseudoMatch.endt  s   € Ø�{‰{œS §¡›_Ñ,Ð,r&   c                 ó4   — |rt        d«      ‚| j                  S )NzNo such group)Ú
IndexErrorr˜   rœ   s     r#   Úgroupz_PseudoMatch.groupw  s   € ÙÜ˜_Ó-Ð-Ø�z‰zÐr&   c                 ó   — | j                   fS rf   )r˜   rH   s    r#   Úgroupsz_PseudoMatch.groups|  s   € Ø—
‘
ˆ}Ðr&   c                 ó   — i S rf   r!   rH   s    r#   Ú	groupdictz_PseudoMatch.groupdict  s   € Øˆ	r&   rf   )
r1   r2   r3   r4   rD   rš   rŸ   r¢   r¤   r¦   r!   r&   r#   r–   r–   h  s%   „ ñòóó-óò
ór&   r–   c                  ó   ‡ — dˆ fd„	}|S )zL
    Callback that yields multiple actions for each group in the match.
    c           
   3   ó¶  •K  — t        ‰«      D ]®  \  }}|€Œ	t        |«      t        u r1|j                  |dz   «      }|sŒ1|j	                  |dz   «      ||f–— ŒK|j                  |dz   «      }|€Œb|r|j	                  |dz   «      |_         || t        |j	                  |dz   «      |«      |«      D ]	  }|sŒ|–— Œ Œ° |r|j                  «       |_        y y ­w)Né   )Ú	enumerater+   r
   r¢   rš   Úposr–   rŸ   )ÚlexerÚmatchÚctxrˆ   ÚactionÚdataÚitemr“   s          €r#   Úcallbackzbygroups.<locals>.callback‡  sß   øè ø€ Ü" 4›ò 	'‰IˆAˆvØˆ~ØÜ�f“¤Ñ+Ø—{‘{ 1 q¡5Ó)�ÚØŸ+™+ a¨!¡eÓ,¨f°dÐ:Ó:à—{‘{ 1 q¡5Ó)�ØÑ#ÙØ"'§+¡+¨a°!©eÓ"4˜œÙ & uÜ'3°E·K±KÀÀAÁÓ4FÈÓ'MÈsó!Tò '˜âØ"&›Jñ'ð	'ñ  Ø—i‘i“kˆC�Gð ùs   ƒ<CÁ 0CÁ1ACÂ8!Crf   r!   )r“   r²   s   ` r#   r   r   ƒ  s   ø€ õ"ð& €Or&   c                   ó   — e Zd ZdZy)Ú_ThiszX
    Special singleton used for indicating the caller class.
    Used by ``using``.
    NrŠ   r!   r&   r#   r´   r´   �  s   „ òr&   r´   c                 ó²   ‡ ‡‡— i Šd‰v r4‰j                  d«      }t        |t        t        f«      r|‰d<   nd|f‰d<   ‰ t        u r	dˆˆfd„	}|S dˆ ˆˆfd„	}|S )aÂ  
    Callback that processes the match with a different lexer.

    The keyword arguments are forwarded to the lexer, except `state` which
    is handled separately.

    `state` specifies the state that the new lexer will start in, and can
    be an enumerable such as ('root', 'inline', 'string') or a simple
    string which is assumed to be on top of the root state.

    Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.
    ÚstateÚstackÚrootc              3   ó*  •K  — ‰	r.‰	j                  | j                  «        | j                  di ‰	¤Ž}n| }|j                  «       } |j                  |j                  «       fi ‰¤ŽD ]  \  }}}||z   ||f–— Œ |r|j                  «       |_        y y ­wr{   )Úupdater?   rG   rš   rg   r¢   rŸ   r«   )
r¬   r­   r®   ÚlxÚsrˆ   rh   ri   Ú	gt_kwargsÚkwargss
           €€r#   r²   zusing.<locals>.callback¼  s‘   øè ø€ ñ à—‘˜eŸm™mÔ,Ø$�U—_‘_Ñ. vÑ.‘à�Ø—‘“ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÑPò "‘��1�aØ˜!‘e˜Q �kÓ!ð"áØŸ)™)›+�•ð ùs   ƒBBc              3   ó  •K  — ‰
j                  | j                  «        ‰di ‰
¤Ž}|j                  «       } |j                  |j	                  «       fi ‰	¤ŽD ]  \  }}}||z   ||f–— Œ |r|j                  «       |_        y y ­wr{   )rº   r?   rš   rg   r¢   rŸ   r«   )r¬   r­   r®   r»   r¼   rˆ   rh   ri   Ú_otherr½   r¾   s           €€€r#   r²   zusing.<locals>.callbackË  s�   øè ø€ à�M‰M˜%Ÿ-™-Ô(ÙÑ!˜&Ñ!ˆBà—‘“ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÑPò "‘��1�aØ˜!‘e˜Q �kÓ!ð"áØŸ)™)›+�•ð ùs   ƒBBrf   )ÚpoprK   Úlistr‘   r   )rÀ   r¾   r¼   r²   r½   s   ``  @r#   r   r   ¦  se   ú€ ð €IØ�&ÑØ�J‰J�wÓˆÜ�aœ$¤˜Ô'Ø!"ˆI�gÒà"(¨! ˆI�gÑà”�~ö	&ð2 €O÷		&ð €Or&   c                   ó   — e Zd ZdZd„ Zy)r   zÑ
    Indicates a state or state action (e.g. #pop) to apply.
    For example default('#pop') is equivalent to ('', Token, '#pop')
    Note that state tuples may be used as well.

    .. versionadded:: 2.0
    c                 ó   — || _         y rf   )r¶   )rB   r¶   s     r#   rD   zdefault.__init__à  s	   € Øˆ�
r&   N)r1   r2   r3   r4   rD   r!   r&   r#   r   r   Ø  s   „ ñór&   r   c                   ó   — e Zd ZdZdd„Zd„ Zy)r   z•
    Indicates a list of literal words that is transformed into an optimized
    regex that matches any of the words.

    .. versionadded:: 2.0
    c                 ó.   — || _         || _        || _        y rf   )r   ÚprefixÚsuffix)rB   r   rÇ   rÈ   s       r#   rD   zwords.__init__ë  s   € ØˆŒ
ØˆŒØˆ�r&   c                 óZ   — t        | j                  | j                  | j                  ¬«      S )N©rÇ   rÈ   )r   r   rÇ   rÈ   rH   s    r#   r@   z	words.getð  s   € Ü˜Ÿ™¨D¯K©KÀÇÁÔLÐLr&   N)rƒ   rƒ   )r1   r2   r3   r4   rD   r@   r!   r&   r#   r   r   ä  s   „ ñóó
Mr&   r   c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd
d„Zd„ Z	d	„ Z
y)ÚRegexLexerMetazw
    Metaclass for RegexLexer, creates the self._tokens attribute from
    self.tokens on the first instantiation.
    c                 ó‚   — t        |t        «      r|j                  «       }t        j                  ||«      j
                  S )zBPreprocess the regular expression component of a token definition.)rK   r   r@   ÚreÚcompiler­   )r’   ÚregexÚrflagsr¶   s       r#   Ú_process_regexzRegexLexerMeta._process_regexú  s.   € ä�eœVÔ$Ø—I‘I“KˆEÜ�z‰z˜% Ó(×.Ñ.Ð.r&   c                 óR   — t        |«      t        u st        |«      s
J d|›�«       ‚|S )z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r+   r
   Úcallable)r’   Útokens     r#   Ú_process_tokenzRegexLexerMeta._process_token   s2   € ä�E‹{œjÑ(¬H°U¬Oð 	IØ>¸u¸iÐHó	IÐ;àˆr&   c                 óä  — t        |t        «      r5|dk(  ry||v r|fS |dk(  r|S |dd dk(  rt        |dd «       S J d|›�«       ‚t        |t        «      rfd| j                  z  }| xj                  d	z  c_        g }|D ]3  }||k7  s
J d
|›�«       ‚|j                  | j                  |||«      «       Œ5 |||<   |fS t        |t        «      r|D ]  }||v rŒ|dv rŒJ d|z   «       ‚ |S J d|›�«       ‚)z=Preprocess the state transition action of a token definition.ú#popéÿÿÿÿú#pushNé   z#pop:zunknown new state z_tmp_%dr©   zcircular state ref )rØ   rÚ   zunknown new state def )rK   rS   Úintr�   Ú_tmpnameÚextendÚ_process_stater‘   )r’   Ú	new_stateÚunprocessedÚ	processedÚ	tmp_stateÚitokensÚistates          r#   Ú_process_new_statez!RegexLexerMeta._process_new_state  sQ  € ä�i¤Ô%à˜FÒ"ØØ˜kÑ)Ø!�|Ð#Ø˜gÒ%Ø Ð Ø˜2˜A� 'Ò)Ü˜I a b˜MÓ*Ð*Ð*à@Ð 2°9°-Ð@Ó@�uÜ˜	¤8Ô,à! C§L¡LÑ0ˆIØ�LŠL˜AÑ�LØˆGØ#ò F�Ø Ò*ÐLÐ.AÀ&ÀÐ,LÓLÐ*Ø—‘˜s×1Ñ1°+Ø2;¸Vó Eõ FðFð $+ˆI�iÑ Ø�<ÐÜ˜	¤5Ô)à#ò 2�Ø +Ò-ØÐ"3Ò3ð2à(¨6Ñ1ó2ð 4ð2ð Ðà@Ð2°9°-Ð@Ó@�5r&   c                 ó~  — t        |t        «      s
J d|›�«       ‚|d   dk7  s
J d|›�«       ‚||v r||   S g x}||<   | j                  }||   D �]?  }t        |t        «      r;||k7  s
J d|›�«       ‚|j	                  | j                  ||t        |«      «      «       ŒOt        |t        «      rŒ`t        |t        «      rO| j                  |j                  ||«      }|j                  t        j                  d«      j                  d|f«       Œ¿t        |«      t        u s
J d|›�«       ‚	 | j!                  |d   ||«      }| j'                  |d   «      }
t)        |«      dk(  rd}n| j                  |d   ||«      }|j                  ||
|f«       �ŒB |S # t"        $ r }	t%        d	|d   ›d
|›d| ›d|	› �«      |	‚d}	~	ww xY w)z%Preprocess a single state definition.zwrong state name r   ú#zinvalid state name zcircular state reference rƒ   Nzwrong rule def zuncompilable regex z
 in state z of z: r©   é   )rK   rS   Úflagsr   rÞ   rß   rŒ   r   ræ   r¶   rL   rÎ   rÏ   r­   r+   r‘   rÒ   Ú	ExceptionÚ
ValueErrorrÖ   rW   )r’   rá   râ   r¶   ÚtokensrÑ   Útdefrà   ÚrexÚerrrÕ   s              r#   rß   zRegexLexerMeta._process_state)  sü  € ä˜%¤Ô%ÐDÐ):¸5¸)Ð'DÓDÐ%Ø�Q‰x˜3ŠÐ?Ð"5°e°YÐ ?Ó?ˆØ�IÑØ˜UÑ#Ð#Ø$&Ð&ˆ�˜5Ñ!Ø—‘ˆØ Ñ&ó  	3ˆDÜ˜$¤Ô(à˜u’}ÐKÐ(AÀ%ÀÐ&KÓK�}Ø—‘˜c×0Ñ0°¸iÜ14°T³ó<ô =àÜ˜$¤Ô)ð Ü˜$¤Ô(Ø×2Ñ2°4·:±:¸{ÈIÓV�	Ø—‘œrŸz™z¨"›~×3Ñ3°T¸9ÐEÔFØä˜“:¤Ñ&ÐB¨/¸$¸Ð(BÓBÐ&ðrØ×(Ñ(¨¨a©°&¸%Ó@�ð ×&Ñ& t¨A¡wÓ/ˆEä�4‹y˜AŠ~Ø ‘	à×2Ñ2°4¸±7Ø3>À	óK�	ð �M‰M˜3  yÐ1Ö2ðA 	3ðB ˆøô ò rÜ Ð#6°t¸A±w°kÀÈEÈ9ÐTXÐY\ÐX_Ð_aÐbeÐafÐ!gÓhÐnqÐqûðrús   Ä)FÆ	F<ÆF7Æ7F<Nc                 ó”   — i x}| j                   |<   |xs | j                  |   }t        |«      D ]  }| j                  |||«       Œ |S )z-Preprocess a dictionary of token definitions.)Ú_all_tokensrí   rÂ   rß   )r’   r.   Ú	tokendefsrâ   r¶   s        r#   Úprocess_tokendefzRegexLexerMeta.process_tokendefT  sS   € à,.Ð.ˆ	�C—O‘O DÑ)ØÒ1 §¡¨DÑ!1ˆ	Ü˜)“_ò 	<ˆEØ×Ñ˜y¨)°UÕ;ð	<àÐr&   c                 ó²  — i }i }| j                   D ]¥  }|j                  j                  di «      }|j                  «       D ]t  \  }}|j                  |«      }|€!|||<   	 |j	                  t
        «      }|||<   Œ:|j                  |d«      }|€ŒO||||dz    	 |j	                  t
        «      }	||	z   ||<   Œv Œ§ |S # t        $ r Y Œ†w xY w# t        $ r Y Œ•w xY w)a  
        Merge tokens from superclasses in MRO order, returning a single tokendef
        dictionary.

        Any state that is not defined by a subclass will be inherited
        automatically.  States that *are* defined by subclasses will, by
        default, override that state in the superclass.  If a subclass wishes to
        inherit definitions from a superclass, it can use the special value
        "inherit", which will cause the superclass' state definition to be
        included at that point in the state.
        rí   Nr©   )Ú__mro__Ú__dict__r@   ÚitemsÚindexr   rì   rÁ   )
r’   rí   ÚinheritableÚcÚtoksr¶   rø   ÚcuritemsÚinherit_ndxÚnew_inh_ndxs
             r#   Úget_tokendefszRegexLexerMeta.get_tokendefs\  s  € ð ˆØˆØ—‘ò 	CˆAØ—:‘:—>‘> (¨BÓ/ˆDà $§
¡
£ò C‘��uØ!Ÿ:™: eÓ,�ØÐ#ð
 %*�F˜5‘Mð!Ø&+§k¡k´'Ó&:˜ð *5�K Ñ&Øà)Ÿo™o¨e°TÓ:�ØÐ&Øð 7<�˜ [°¡]Ð3ðCð #(§+¡+¬gÓ"6�Kð *5°{Ñ)B�K Ò&ñ9Cð	CðB ˆøô) &ò !Ù ð!ûô "ò Ùðús$   ÁB;ÂC
Â;	CÃCÃ
	CÃCc                 óè   — d| j                   vrLi | _        d| _        t        | d«      r| j                  rn%| j                  d| j                  «       «      | _        t        j                  | g|¢­i |¤ŽS )z:Instantiate cls after preprocessing its token definitions.Ú_tokensr   Útoken_variantsrƒ   )
r÷   rò   rÝ   Úhasattrr  rô   r   r  r+   Ú__call__)r’   r“   Úkwdss      r#   r  zRegexLexerMeta.__call__�  sh   € à˜CŸL™LÑ(Ø ˆCŒOØˆCŒLÜ�sÐ,Ô-°#×2DÒ2Dàà!×2Ñ2°2°s×7HÑ7HÓ7JÓK�”ä�}‰}˜SÐ0 4Ò0¨4Ñ0Ð0r&   rf   )r1   r2   r3   r4   rÒ   rÖ   ræ   rß   rô   r   r  r!   r&   r#   rÌ   rÌ   ô  s.   „ ñò
/òò!AòF)óVò/ób1r&   rÌ   c                   ó4   — e Zd ZdZej
                  Zi Zdd„Zy)r   z±
    Base for simple stateful regular expression-based lexers.
    Simplifies the lexing process so that you need only
    provide a list of states and regular expressions.
    c              #   ó:  K  — d}| j                   }t        |«      }||d      }	 |D �]&  \  }}}	 |||«      }
|
sŒ|�8t        |«      t        u r|||
j	                  «       f–— n || |
«      E d{  –—†  |
j                  «       }|	�Çt        |	t        «      rX|	D ]R  }|dk(  r t        |«      dkD  sŒ|j                  «        Œ(|dk(  r|j                  |d   «       ŒB|j                  |«       ŒT nWt        |	t        «      r#t        |	«      t        |«      k\  r|dd…= n*||	d…= n$|	dk(  r|j                  |d   «       n
J d|	›�«       ‚||d      } n7 	 ||   dk(  rd	g}|d	   }|t        df–— |dz  }�ŒP|t        ||   f–— |dz  }�Œd7 �Œ# t        $ r Y yw xY w­w)
z~
        Split ``text`` into (tokentype, text) pairs.

        ``stack`` is the initial stack (default: ``['root']``)
        r   rÙ   r©   NrØ   rÚ   úwrong state def: rQ   r¸   )r  rÂ   r+   r
   r¢   rŸ   rK   r‘   rW   rÁ   rL   rÜ   Úabsr	   r   r¡   )rB   rN   r·   r«   ró   Ú
statestackÚstatetokensÚrexmatchr¯   rà   Úmr¶   s               r#   rg   z!RegexLexer.get_tokens_unprocessed¾  sÜ  è ø€ ð ˆØ—L‘Lˆ	Ü˜%“[ˆ
Ø 
¨2¡Ñ/ˆØØ/:ó 0Ñ+�˜& )Ù˜T 3Ó'�ÚØÐ)Ü ›<¬:Ñ5Ø"% v¨q¯w©w«yÐ"8Ó8á'-¨d°A£×6Ð6ØŸ%™%›'�CØ Ð,ä% i´Ô7Ø)2ò = Ø#(¨F¢?Ü'*¨:£¸Ó':Ø(2¯©Õ(8Ø%*¨gÒ%5Ø$.×$5Ñ$5°jÀ±nÕ$Eà$.×$5Ñ$5°eÕ$<ñ=ô (¨	´3Ô7ô  # 9›~´°Z³Ò@Ø$.¨q©r¡Nà$.¨y©zÑ$:Ø&¨'Ò1Ø&×-Ñ-¨j¸©nÕ=àKÐ,=¸i¸]Ð*KÓK 5Ø&/°
¸2±Ñ&?˜ÙðC0ðJØ˜C‘y DÒ(à&, X˜
Ø&/°Ñ&7˜Ø!¤:¨tÐ3Ò3Ø˜q™˜Ù Øœu d¨3¡iÐ/Ò/Ø˜1‘H�Cñ_ ð 7úôP "ò ÙðüsM   ‚8F»5FÁ0F	Á1>FÂ0B!FÅ F Å2FÅ4F ÆFÆ	FÆFÆFÆFN©)r¸   )	r1   r2   r3   r4   rÎ   Ú	MULTILINErê   rí   rg   r!   r&   r#   r   r   ›  s   „ ñð �L‰L€Eð0 €Fô;r&   r   c                   ó   — e Zd ZdZdd„Zd„ Zy)r   z9
    A helper object that holds lexer position data.
    Nc                 ó`   — || _         || _        |xs t        |«      | _        |xs dg| _        y )Nr¸   )rN   r«   rW   rŸ   r·   )rB   rN   r«   r·   rŸ   s        r#   rD   zLexerContext.__init__  s.   € ØˆŒ	ØˆŒØÒ#œ#˜d›)ˆŒØÒ&˜v˜hˆ�
r&   c                 óV   — d| j                   ›d| j                  ›d| j                  ›d�S )NzLexerContext(z, ú))rN   r«   r·   rH   s    r#   rI   zLexerContext.__repr__  s)   € Ø˜tŸy™y˜m¨2¨d¯h©h¨\¸¸D¿J¹J¸>ÈÐKÐKr&   ©NN)r1   r2   r3   r4   rD   rI   r!   r&   r#   r   r   ü  s   „ ñó'óLr&   r   c                   ó   — e Zd ZdZdd„Zy)r   zE
    A RegexLexer that uses a context object to store its state.
    Nc              #   ó–  K  — | j                   }|st        |d«      }|d   }n |}||j                  d      }|j                  }	 |D �]Î  \  }}} |||j                  |j
                  «      }	|	sŒ)|�lt        |«      t        u r5|j                  ||	j                  «       f–— |	j                  «       |_        n& || |	|«      E d{  –—†  |s||j                  d      }|��5t        |t        «      rŠ|D ]„  }
|
dk(  r4t        |j                  «      dkD  sŒ!|j                  j                  «        Œ<|
dk(  r)|j                  j                  |j                  d   «       Œj|j                  j                  |
«       Œ† n‰t        |t        «      rAt        |«      t        |j                  «      k\  r|j                  dd…= nH|j                  |d…= n8|dk(  r)|j                  j                  |j                  d   «       n
J d|›�«       ‚||j                  d      } nž 	 |j                  |j
                  k\  ry||j                     d	k(  r9dg|_        |d   }|j                  t         d	f–— |xj                  dz  c_        �Œ;|j                  t"        ||j                     f–— |xj                  dz  c_        �Œs7 �Œó# t$        $ r Y yw xY w­w)
z
        Split ``text`` into (tokentype, text) pairs.
        If ``context`` is given, use this lexer context instead.
        r   r¸   rÙ   r©   NrØ   rÚ   r	  rQ   )r  r   r·   rN   r«   rŸ   r+   r
   r¢   rK   r‘   rW   rÁ   rL   rÜ   r
  r   r   r¡   )rB   rN   Úcontextró   r®   r  r  r¯   rà   r  r¶   s              r#   rg   z)ExtendedRegexLexer.get_tokens_unprocessed  sw  è ø€ ð
 —L‘Lˆ	ÙÜ˜t QÓ'ˆCØ# FÑ+‰KàˆCØ# C§I¡I¨b¡MÑ2ˆKØ—8‘8ˆDØØ/:ó 2Ñ+�˜& )Ù˜T 3§7¡7¨C¯G©GÓ4�ÚØÐ)Ü ›<¬:Ñ5Ø"%§'¡'¨6°1·7±7³9Ð"<Ò<Ø&'§e¡e£g˜C�Gá'-¨d°A°sÓ';×;Ð;Ù#,à.7¸¿	¹	À"¹Ñ.F à Ñ,ä% i´Ô7Ø)2ò < Ø#(¨F¢?Ü'*¨3¯9©9£~¸Ó'9Ø(+¯	©	¯©­Ø%*¨gÒ%5Ø$'§I¡I×$4Ñ$4°S·Y±Y¸r±]Õ$Cà$'§I¡I×$4Ñ$4°UÕ$;ñ<ô (¨	´3Ô7ä" 9›~´°S·Y±Y³Ò?Ø$'§I¡I¨a©b¡Mà$'§I¡I¨i©jÑ$9Ø&¨'Ò1ØŸI™I×,Ñ,¨S¯Y©Y°r©]Õ;àKÐ,=¸i¸]Ð*KÓK 5Ø&/°·	±	¸"±Ñ&>˜ÙðG2ðJØ—w‘w #§'¡'Ò)ØØ˜CŸG™G‘}¨Ò,à%+ H˜œ	Ø&/°Ñ&7˜Ø!Ÿg™g¤t¨TÐ1Ò1ØŸš 1™�Ù ØŸ'™'¤5¨$¨s¯w©w©-Ð7Ò7Ø—G’G˜q‘L•Gñc ð <úôR "ò Ùðüs^   ‚A,K	Á/AK	ÃJ7ÃAK	ÄDK	ÈJ: È2K	È3A	J: É<K	É>7J: Ê5K	Ê:	KËK	ËKËK	r  )r1   r2   r3   r4   rg   r!   r&   r#   r   r     s   „ ñô@r&   r   c              #   ó   K  — t        | «      } 	 t        | «      \  }}d}d}|D ]°  \  }}}|€|}d}	|rx|t        |«      z   |k\  rg||	||z
   }
|
r|||
f–— |t        |
«      z  }|D ]  \  }}}|||f–— |t        |«      z  }Œ ||z
  }		 t        | «      \  }}|r|t        |«      z   |k\  rŒg|	t        |«      k  sŒ–||||	d f–— |t        |«      |	z
  z  }Œ² |r9|xs d}|D ]  \  }}}|||f–— |t        |«      z  }Œ 	 t        | «      \  }}|rŒ8yy# t        $ r |E d{  –—†7   Y yw xY w# t        $ r d}Y Œ�w xY w# t        $ r d}Y yw xY w­w)ag  
    Helper for lexers which must combine the results of several
    sublexers.

    ``insertions`` is a list of ``(index, itokens)`` pairs.
    Each ``itokens`` iterable should be inserted at position
    ``index`` into the token stream given by the ``tokens``
    argument.

    The result is a combined token stream.

    TODO: clean up the code here.
    NTr   F)ÚiterÚnextÚStopIterationrW   )r†   rí   rù   rä   ÚrealposÚinsleftrˆ   rh   ri   ÚoldiÚtmpvalÚit_indexÚit_tokenÚit_valueÚps                  r#   r„   r„   S  sÎ  è ø€ ô �jÓ!€JðÜ˜jÓ)‰ˆˆwð €GØ€Gð ò %‰ˆˆ1ˆaàˆ?ØˆGØˆÙ˜!œc !›f™*¨Ò-Ø�t˜E A™IÐ&ˆFÙØ˜q &Ð(Ò(Øœ3˜v›;Ñ&�Ø07ò )Ñ,�˜( HØ˜x¨Ð1Ò1Øœ3˜x›=Ñ(‘ð)ð ˜1‘9ˆDðÜ!% jÓ!1‘��wñ ˜!œc !›f™*¨Ó-ð ”#�a“&‹=Ø˜1˜a  ˜hÐ&Ò&Ø”s˜1“v ‘}Ñ$‰Gð+%ñ0 à’,˜QˆØò 	‰GˆAˆq�!Ø˜1˜a�-ÒØ”s˜1“vÑ‰Gð	ð	Ü! *Ó-‰NˆE�7ô øôE ò à×ÑÙðûô4 !ò Ø�Ùðûô  ò 	ØˆGÙð	üs�   ‚E�D �A*EÂD,ÂEÂ*EÂ9AEÃ?D= ÄEÄEÄD)Ä D#Ä!D)Ä&EÄ(D)Ä)EÄ,D:Ä7EÄ9D:Ä:EÄ=EÅEÅ
EÅEc                   ó   — e Zd ZdZd„ Zy)ÚProfilingRegexLexerMetaz>Metaclass for ProfilingRegexLexer, collects regex timing info.c                 óè   ‡ ‡‡‡— t        |t        «      r-t        |j                  |j                  |j                  ¬«      Šn|Št        j                  ‰|«      Št        j                  fˆ ˆˆˆfd„	}|S )NrÊ   c                 óþ   •— ‰j                   d   j                  ‰
‰	fddg«      }t        j                  «       }‰j                  | ||«      }t        j                  «       }|dxx   dz  cc<   |dxx   ||z
  z  cc<   |S )NrÙ   r   r    r©   )Ú
_prof_dataÚ
setdefaultÚtimer­   )rN   r«   ÚendposÚinfoÚt0ÚresÚt1r’   Úcompiledrï   r¶   s          €€€€r#   Ú
match_funcz:ProfilingRegexLexerMeta._process_regex.<locals>.match_funcž  sr   ø€ Ø—>‘> "Ñ%×0Ñ0°%¸°ÀÀ3¸xÓHˆDÜ—‘“ˆBØ—.‘.  s¨FÓ3ˆCÜ—‘“ˆBØ�‹G�q‰L‹GØ�‹G�r˜B‘wÑ‹GØˆJr&   )	rK   r   r   rÇ   rÈ   rÎ   rÏ   ÚsysÚmaxsize)r’   rÐ   rÑ   r¶   r2  r1  rï   s   `  ` @@r#   rÒ   z&ProfilingRegexLexerMeta._process_regex–  sZ   û€ Ü�eœUÔ#Ü˜EŸK™K°·±Ø#(§<¡<ô1‰Cð ˆCÜ—:‘:˜c 6Ó*ˆä),¯©÷ 	ð 	ð Ðr&   N)r1   r2   r3   r4   rÒ   r!   r&   r#   r&  r&  “  s
   „ ÙHór&   r&  c                   ó    — e Zd ZdZg ZdZdd„Zy)ÚProfilingRegexLexerzFDrop-in replacement for RegexLexer that does profiling of its regexes.é   c              #   óJ  ‡ K  — ‰ j                   j                  j                  i «       t        j	                  ‰ ||«      E d {  –—†  ‰ j                   j                  j                  «       }t        d„ |j                  «       D «       ˆ fd„d¬«      }t        d„ |D «       «      }t        «        t        d‰ j                   j                  t        |«      |fz  «       t        d«       t        dd	z  «       t        d
«       |D ]  }t        d|z  «       Œ t        d«       y 7 ŒÝ­w)Nc              3   ó¤   K  — | ]H  \  \  }}\  }}|t        |«      j                  d «      j                  dd«      dd |d|z  d|z  |z  f–— ŒJ y­w)zu'z\\ú\NéA   iè  )Úreprr[   rZ   )Ú.0r¼   ÚrÚnrh   s        r#   ú	<genexpr>z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>´  sa   è ø€ ò @á+™F˜Q ¡F Q¨ð œ4 ›7Ÿ=™=¨Ó/×7Ñ7¸ÀÓEÀcÀrÐJØ˜4 !™8 T¨A¡X°¡\ô3ñ @ùs   ‚AAc                 ó"   •— | ‰j                      S rf   )Ú_prof_sort_index)r"   rB   s    €r#   r$   z<ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<lambda>·  s   ø€  A d×&;Ñ&;Ñ$<€ r&   T)ÚkeyÚreversec              3   ó&   K  — | ]	  }|d    –— Œ y­w)é   Nr!   )r=  r"   s     r#   r@  z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>¹  s   è ø€ Ò+ ˜˜!�Ñ+ùs   ‚z2Profiling result for %s lexing %d chars in %.3f mszn==============================================================================================================z$%-20s %-64s ncalls  tottime  percall)r¶   rÐ   zn--------------------------------------------------------------------------------------------------------------z%-20s %-65s %5d %8.4f %8.4f)rG   r)  rL   r   rg   rÁ   Úsortedrø   ÚsumÚprintr1   rW   )rB   rN   r·   Úrawdatar°   Ú	sum_totalr0   s   `      r#   rg   z*ProfilingRegexLexer.get_tokens_unprocessed¯  sÿ   øè ø€ à�‰×!Ñ!×(Ñ(¨Ô,Ü×4Ñ4°T¸4ÀÓG×GÐGØ—.‘.×+Ñ+×/Ñ/Ó1ˆÜñ @à/6¯}©}«ô@ó =Ø"ô	$ˆô
 Ñ+ dÔ+Ó+ˆ	äŒÜÐBØ�~‰~×&Ñ&¬¨D«	°9Ð=ñ>ô 	?äˆiÔÜÐ4Ð7IÑIÔJÜˆiÔØò 	5ˆAÜÐ/°!Ñ3Õ4ð	5äˆiÕð# 	Hús   ƒA D#ÁD!ÁCD#Nr  )r1   r2   r3   r4   r)  rB  rg   r!   r&   r#   r6  r6  ©  s   „ ÙPà€JØÐôr&   r6  )6r4   rÎ   r3  r+  Úpip._vendor.pygments.filterr   r   Úpip._vendor.pygments.filtersr   Úpip._vendor.pygments.tokenr   r   r   r	   r
   Úpip._vendor.pygments.utilr   r   r   r   r   r   Úpip._vendor.pygments.regexoptr   Ú__all__rÏ   r   rU   ÚstaticmethodÚ_default_analyser+   r(   r   r   rS   r   rŒ   r   r‘   r�   r–   r   r´   r   r   r   r   rÌ   r   r   r   r„   r&  r6  r!   r&   r#   ú<module>rT     sL  ðñó 
Û 
Û ç =Ý ;ß QÕ Q÷*÷ *å 3ò*€ð ˆ"�*‰*�WÓ
€ò,€ñ  ¡Ó.Ð ô	1�ô 	1ôo"�iõ o"ôdO�eô OôN	ˆcô 	÷ñ ñ ‹*€ô
ˆuô 
÷ñ ò6÷4ñ ñ ƒw€ò/÷d	ñ 	ôMˆFô Mô d1�Yô d1ôN^� .õ ^÷BLñ LôE˜ô EòP=ô@˜nô ô,˜*Ð0Gö r&   