HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991111/root/usr/lib/python3/dist-packages/jinja2/__pycache__/
Upload File :
Current File : //proc/1991111/root/usr/lib/python3/dist-packages/jinja2/__pycache__/utils.cpython-311.pyc
�

��g�]�
��UddlZddlZddlZddlZddlZddlmZ	ddlm	Z	n#e
$r	ddlm	Z	YnwxYwddlmZddlm
Z
ddlmZddlmZddlmZddlZejrddlZejd	ejd
ejf���Zedd
dd�i����Zejed<e��Z ej!eed<dj"Z#dedefd�Z$dedefd�Z%dedefd�Z&Gd�dej'��Z(dedefd�Z)dejde*fd�Z+dej,ejddfd�Z-dPd�Z.dQd!e/d"e*dejfd#�Z0dRd%e/d&e/dej1ej2fd'�Z3dejde/fd(�Z4dejde/fd)�Z5ej6d*ej7ej8z��Z9ej6d+��Z:				dSd,e/d-ej1e;d.ej1e/d/ej1e/d0ej1ej,e/de/fd1�Z<	dTd6e;d7e*d8e;d9e;de/f
d:�Z=dUdejd<e/d=e*de/fd>�Z>ej?j@Gd?�d@����ZA				dVdBejBe/dCejBe/dDe*dEe*dejej1e/ge*ff
dF�ZC	dWdejdGej1ejd
e/fdHejdejDfdI�ZEGdJ�dK��ZFGdL�dM��ZGGdN�dO��ZHdS)X�N)�abc)�deque)�choice)�	randrange)�Lock)�CodeType)�quote_from_bytes�F.)�bound�MissingType��__repr__c��dS)N�missingr
��xs �./usr/lib/python3/dist-packages/jinja2/utils.py�<lambda>rs��	��r�
internal_code��f�returnc�(�tj|_|S)a�Pass the :class:`~jinja2.runtime.Context` as the first argument
    to the decorated function when called while rendering a template.

    Can be used on functions, filters, and tests.

    If only ``Context.eval_context`` is needed, use
    :func:`pass_eval_context`. If only ``Context.environment`` is
    needed, use :func:`pass_environment`.

    .. versionadded:: 3.0.0
        Replaces ``contextfunction`` and ``contextfilter``.
    )�_PassArg�context�jinja_pass_arg�rs r�pass_contextr s�� �'�A���Hrc�(�tj|_|S)a�Pass the :class:`~jinja2.nodes.EvalContext` as the first argument
    to the decorated function when called while rendering a template.
    See :ref:`eval-context`.

    Can be used on functions, filters, and tests.

    If only ``EvalContext.environment`` is needed, use
    :func:`pass_environment`.

    .. versionadded:: 3.0.0
        Replaces ``evalcontextfunction`` and ``evalcontextfilter``.
    )r�eval_contextrrs r�pass_eval_contextr"1s�� �,�A���Hrc�(�tj|_|S)aPass the :class:`~jinja2.Environment` as the first argument to
    the decorated function when called while rendering a template.

    Can be used on functions, filters, and tests.

    .. versionadded:: 3.0.0
        Replaces ``environmentfunction`` and ``environmentfilter``.
    )r�environmentrrs r�pass_environmentr%Bs�� �+�A���Hrc��eZdZej��Zej��Zej��Zede	de
jdfd���ZdS)r�objrc�4�t|d��r|jSdS)Nr)�hasattrr)�clsr's  r�from_objz_PassArg.from_objTs#���3�(�)�)�	&��%�%��trN)
�__name__�
__module__�__qualname__�enum�autorr!r$�classmethodr
�t�Optionalr+r
rrrrOsn�������d�i�k�k�G��4�9�;�;�L��$�)�+�+�K���1����J�!7�����[���rrc�D�t�|j��|S)z%Marks the function as internally used)r�add�__code__rs r�internalcoder7\s�����a�j�!�!�!��Hrr'c�.�ddlm}t||��S)a�Check if the object passed is undefined.  This does nothing more than
    performing an instance check against :class:`Undefined` but looks nicer.
    This can be used for custom filters or tests that want to react to
    undefined variables.  For example a custom default filter can look like
    this::

        def default(var, default=''):
            if is_undefined(var):
                return default
            return var
    �)�	Undefined)�runtimer:�
isinstance)r'r:s  r�is_undefinedr=bs&��#�"�"�"�"�"��c�9�%�%�%r�iterablec��|D]}�dS)z4Consumes an iterable without doing anything with it.Nr
)r>�_s  r�consumerAss��
�
�
���
�
rc�n�ddlm}ddlm}|���|���dS)a Jinja keeps internal caches for environments and lexers.  These are
    used so that Jinja doesn't have to recreate environments and lexers all
    the time.  Normally you don't have to care about that but if you are
    measuring memory consumption you may want to clean the caches.
    r9)�get_spontaneous_environment)�_lexer_cacheN)r$rC�lexerrD�cache_clear�clear)rCrDs  r�clear_cachesrHysR��9�8�8�8�8�8�#�#�#�#�#�#��+�+�-�-�-��������rF�import_name�silentc��	d|vr|�dd��\}}n-d|vr|�d��\}}}nt|��Stt|dd|g��|��S#tt
f$r|s�YdSwxYw)a�Imports an object based on a string.  This is useful if you want to
    use import paths as endpoints or something similar.  An import path can
    be specified either in dotted notation (``xml.sax.saxutils.escape``)
    or with a colon as object delimiter (``xml.sax.saxutils:escape``).

    If the `silent` is True the return value will be `None` if the import
    fails.

    :return: imported object
    �:r9�.N)�split�
rpartition�
__import__�getattr�ImportError�AttributeError)rIrJ�moduler'r@s     r�
import_stringrU�s���
��+���%�+�+�C��3�3�K�F�C�C�
�K�
�
�(�3�3�C�8�8�N�F�A�s�s��k�*�*�*��z�&�$��s�e�<�<�c�B�B�B����(�����	��	�	�	����s�A
A.�
 A.�.B�B�rb�filename�modec�d�tj�|��sdSt||��S)z\Returns a file descriptor for the filename if that file exists,
    otherwise ``None``.
    N)�os�path�isfile�open)rWrXs  r�open_if_existsr^�s/���7�>�>�(�#�#���t���$���rc��|�dS|turdSt|��}|jdkr
|j�d�S|j�d|j�d�S)z�Returns the name of the object's type.  For some recognized
    singletons the name of the object is returned instead. (For
    example for `None` and `Ellipsis`).
    N�None�Ellipsis�builtinsz objectrM)ra�typer-r,)r'r*s  r�object_type_reprrd�s`��
�{��v�	�����z�
�s�)�)�C�
�~��#�#��,�'�'�'�'��n�4�4�s�|�4�4�4�4rc�$�ddlm}||��S)z.Format an object using :func:`pprint.pformat`.r)�pformat)�pprintrf)r'rfs  rrfrf�s"���������7�3�<�<�ra@
    ^
    (
        (https?://|www\.)  # scheme or www
        (([\w%-]+\.)+)?  # subdomain
        (
            [a-z]{2,63}  # basic tld
        |
            xn--[\w%]{2,59}  # idna tld
        )
    |
        ([\w%-]{2,63}\.)+  # basic domain
        (com|net|int|edu|gov|org|info|mil)  # basic tld
    |
        (https?://)  # scheme
        (
            (([\d]{1,3})(\.[\d]{1,3}){3})  # IPv4
        |
            (\[([\da-f]{0,4}:){2}([\da-f]{0,4}:?){1,6}])  # IPv6
        )
    )
    (?::[\d]{1,5})?  # port
    (?:[/?#]\S*)?  # path, query, and fragment
    $
    z^\S+@\w[\w.-]*\.\w+$�text�trim_url_limit�rel�target�
extra_schemesc
�����dtdtf�fd�}ndtdtfd�}tjdttj|������}|rdtj|���d�nd	}|rd
tj|���d�nd	}t|��D�]�\}	}
d	|
d	}
}}tjd|��}|r0|���}||���d�}|�	d��rGtj
d
|��}|r0|���}
|d|����}dD]�\}}|�|��}||�|��kr�4tt||
�|������D]>}|
�|��t!|��z}||
d|�z
}|
|d�}
�?��t"�|��rZ|�d��s|�d��rd|�d|�|�d||���d�}n�d|�d|�|�d||���d�}n�|�d��r4t&�|dd���rd|�d|dd��d�}nqd|vr=|�d��s(d|vr$t&�|��r
d|�d|�d�}n0|�.|D]+}||kr#|�|��rd|�d|�|�d|�d�}�,|�|�|
��||	<���d	�|��S)a;Convert URLs in text into clickable links.

    This may not recognize links in some situations. Usually, a more
    comprehensive formatter, such as a Markdown library, is a better
    choice.

    Works on ``http://``, ``https://``, ``www.``, ``mailto:``, and email
    addresses. Links with trailing punctuation (periods, commas, closing
    parentheses) and leading punctuation (opening parentheses) are
    recognized excluding the punctuation. Email addresses that include
    header fields are not recognized (for example,
    ``mailto:address@example.com?cc=copy@example.com``).

    :param text: Original text containing URLs to link.
    :param trim_url_limit: Shorten displayed URL values to this length.
    :param target: Add the ``target`` attribute to links.
    :param rel: Add the ``rel`` attribute to links.
    :param extra_schemes: Recognize URLs that start with these schemes
        in addition to the default behavior.

    .. versionchanged:: 3.0
        The ``extra_schemes`` parameter was added.

    .. versionchanged:: 3.0
        Generate ``https://`` links for URLs without a scheme.

    .. versionchanged:: 3.0
        The parsing rules were updated. Recognize email addresses with
        or without the ``mailto:`` scheme. Validate IP addresses. Ignore
        parentheses and brackets in more cases.
    Nrrc�H��t|���kr
|d���d�S|S)Nz...)�len)rris �r�trim_urlzurlize.<locals>.trim_urls1����1�v�v��&�&��O�^�O�,�1�1�1�1��Hrc��|S�Nr
rs rrpzurlize.<locals>.trim_urls���Hrz(\s+)z rel="�"rz	 target="z
^([(<]|&lt;)+)�)�>rM�,�
�&gt;z([)>.,\n]|&gt;)+$))�(rt)�<ru)z&lt;rxzhttps://zhttp://z	<a href="ruz</a>z<a href="https://zmailto:�z">�@zwww.rLz<a href="mailto:)�str�rerN�
markupsafe�escape�	enumerate�match�group�end�endswith�search�start�count�range�min�indexro�_http_re�
startswith�	_email_re�join)rhrirjrkrlrp�words�rel_attr�target_attr�i�word�head�middle�tailr��
start_char�end_char�start_countr@�	end_index�schemes `                   r�urlizer��s5���L�!�	��	��	�	�	�	�	�	�	�	��	��	�	�	�	�
�H�X�s�:�#4�T�#:�#:�;�;�<�<�E�58�@�1�
�)�#�.�.�1�1�1�1�b�H�>D�L�:�j�/��7�7�:�:�:�:�"�K��U�#�#�=+�=+���4���r�d�f����)�6�2�2���	+��;�;�=�=�D��E�I�I�K�K�M�M�*�F�
�?�?�=�>�>�	1��I�2�F�;�;�E��
1��{�{�}�}����%�+�+�-�-��0��%M�	(�	(� �J�� �,�,�z�2�2�K��f�l�l�8�4�4�4�4���3�{�D�J�J�x�,@�,@�A�A�B�B�
(�
(�� �J�J�x�0�0�3�x�=�=�@�	��$�z�	�z�*�*���I�J�J�'���	
(��>�>�&�!�!�	W�� � ��,�,�
��0A�0A�)�0L�0L�
�W��W�W��W�;�W�W���&�AQ�AQ�W�W�W���
.��.�.��.�;�.�.��x��'�'�.�.�.���
�
�
�y�
)�
)�	W�i�o�o�f�Q�R�R�j�.I�.I�	W�;��;�;�6�!�"�"�:�;�;�;�F�F�
�6�M�M��%�%�f�-�-�
��6�!�!�����'�'�"�?��>�>�&�>�>�>�F�F�
�
&�'�
W�
W���V�#�#��(9�(9�&�(A�(A�#�V��V�V�(�V�K�V�V�&�V�V�V�F���*�F�*�D�*�*��a���
�7�7�5�>�>�r�T��d�n�htmlr��maxc	�P�ddlm}|���}g}t|��D�]2}d}dx}	}
d}d}g}
t	tt||������D]�\}}	t
|��}||kr|}n�|r|���}d}|tdd��z
|	kr|}	|
d	z
}
|d
z
}|tdd��z
|
kr|x}	}
|d
z
}d}|
�|����d�	|
��}|�
d
��r|dd�d
z}n|�
d
��s|d
z
}|�|����4|sd�	|��Stjd�	d�|D������S)z+Generate some lorem ipsum for the template.r9)�LOREM_IPSUM_WORDSTrNF���rv�
r�rM� ���z

rwc3�FK�|]}dtj|���d�V��dS)z<p>z</p>N)rr���.0rs  r�	<genexpr>z'generate_lorem_ipsum.<locals>.<genexpr>�s9����C�C�q�2�
�)�!�,�,�2�2�2�C�C�C�C�C�Cr)
�	constantsr�rNr�r�rr�
capitalize�appendr�r�r�Markup)r�r�r�r�r�r��resultr@�next_capitalized�
last_comma�
last_fullstopr��last�p�idx�p_strs                r�generate_lorem_ipsumr�Ys��-�,�,�,�,�,��#�#�%�%�E�
�F�
�1�X�X�%�%����%&�&�
�]������� ��i��S�&9�&9� :� :�;�;�	�	�F�C��
��e�}�}���4�<�<��D��	
�
 �
)����(�(��#(� ��Y�q�!�_�_�$�z�1�1� �
���"�
������Y�r�2�&�&�&��6�6�-0�0�
�]�����#'� �
�H�H�T�N�N�N�N���������>�>�#���	��#�2�#�J��$�E�E�����$�$�	��S�L�E��
�
�e������#��{�{�6�"�"�"����	�	�C�C�F�C�C�C�C�C���r�utf-8�charset�for_qsc��t|t��s9t|t��st|��}|�|��}|rdnd}t	||��}|r|�dd��}|S)a5Quote a string for use in a URL using the given charset.

    :param obj: String or bytes to quote. Other types are converted to
        string then encoded to bytes using the given charset.
    :param charset: Encode text to bytes using this charset.
    :param for_qs: Quote "/" and use "+" for spaces.
    r�/z%20�+)r<�bytesr}�encoder	�replace)r'r�r��safe�rvs     r�	url_quoter��s����c�5�!�!�"��#�s�#�#�	��c�(�(�C��j�j��!�!���"�3�3�d�D�	�#�t�	$�	$�B�
�$�
�Z�Z��s�
#�
#��
�Irc��eZdZdZdeddfd�Zdd�Zdeje	ej
ffd�Zdeje	ej
fddfd	�Zdej
fd
�Zdd�Zddej
d
ej
dej
fd�Zddej
d
ej
dej
fd�Zdd�Zdej
defd�Zdefd�Zde	fd�Zdej
dej
fd�Zdej
dej
ddfd�Zdej
ddfd�Zdejej
ej
ej
ffd�Zdejej
fd�Zdejej
fd�Zdejej
fd�Zdejej
fd�Z eZ!dS) �LRUCachez"A simple LRU Cache implementation.�capacityrNc�p�||_i|_t��|_|���dSrr)r��_mappingr�_queue�	_postinit)�selfr�s  r�__init__zLRUCache.__init__�s1�� ��
�.0��
�).������������rc��|jj|_|jj|_|jj|_t��|_|jj	|_
dSrr)r��popleft�_popleft�pop�_pop�remove�_remover�_wlockr��_append�r�s rr�zLRUCache._postinit�s@����+��
��K�O��	��{�)����f�f����{�)����rc�,�|j|j|jd�S)N�r�r�r�r�r�s r�__getstate__zLRUCache.__getstate__�s ���
��
��k�
�
�	
r�dc�b�|j�|��|���dSrr)�__dict__�updater�)r�r�s  r�__setstate__zLRUCache.__setstate__�s.���
���Q�����������rc��|jfSrr)r�r�s r�__getnewargs__zLRUCache.__getnewargs__�s
���
��rc��|�|j��}|j�|j��|j�|j��|S)z&Return a shallow copy of the instance.)�	__class__r�r�r�r��extend�r�r�s  r�copyz
LRUCache.copy�sJ��
�^�^�D�M�
*�
*��
����4�=�)�)�)�
�	�����%�%�%��	r�key�defaultc�8�	||S#t$r|cYSwxYw)z/Return an item from the cache dict or `default`��KeyError�r�r�r�s   r�getzLRUCache.get�s5��	���9����	�	�	��N�N�N�	���s�
��c�B�	||S#t$r
|||<|cYSwxYw)zvSet `default` if the key is not in the cache otherwise
        leave unchanged. Return the value of this key.
        r�r�s   r�
setdefaultzLRUCache.setdefault�s>��	���9����	�	�	��D��I��N�N�N�	���s�
��c��|j5|j���|j���ddd��dS#1swxYwYdS)zClear the cache.N)r�r�rGr�r�s rrGzLRUCache.clear�s���
�[�	 �	 ��M���!�!�!��K������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s�3A�A�Ac��||jvS)z$Check if a key exists in this cache.�r��r�r�s  r�__contains__zLRUCache.__contains__�s���d�m�#�#rc�*�t|j��S)z%Return the current size of the cache.)ror�r�s r�__len__zLRUCache.__len__�s���4�=�!�!�!rc�B�dt|��j�d|j�d�S)Nrzr�ru)rcr,r�r�s rrzLRUCache.__repr__�s&��;�4��:�:�&�;�;���;�;�;�;rc��|j5|j|}|jd|kr<	|�|��n#t$rYnwxYw|�|��|cddd��S#1swxYwYdS)z�Get an item from the cache. Moves the item up so that it has the
        highest priority then.

        Raise a `KeyError` if it does not exist.
        r�N)r�r�r�r��
ValueErrorr�)r�r�r�s   r�__getitem__zLRUCache.__getitem__�s����[�	�	���s�#�B��{�2��#�%�%���L�L��%�%�%�%��!�����D�	�������S�!�!�!��	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s1�A1�>�A1�
A�A1�
A�A1�1A5�8A5�valuec�0�|j5||jvr|�|��n7t|j��|jkr|j|���=|�|��||j|<ddd��dS#1swxYwYdS)zhSets the value for an item. Moves the item up so that it
        has the highest priority then.
        N)r�r�r�ror�r�r�)r�r�r�s   r�__setitem__zLRUCache.__setitem__
s����[�	'�	'��d�m�#�#����S�!�!�!�!��T�]�#�#�t�}�4�4��M�$�-�-�/�/�2��L�L�����!&�D�M�#��	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�	'�	's�A6B�B�Bc��|j5|j|=	|�|��n#t$rYnwxYwddd��dS#1swxYwYdS)z]Remove an item from the cache dict.
        Raise a `KeyError` if it does not exist.
        N)r�r�r�r�r�s  r�__delitem__zLRUCache.__delitem__s����[�	�	��
�c�"�
����S�!�!�!�!���
�
�
���
����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s,�	A�(�A�
5�A�5�A�A	�A	c�p���fd�t�j��D��}|���|S)zReturn a list of items.c�.��g|]}|�j|f��Sr
r�)r�r�r�s  �r�
<listcomp>z"LRUCache.items.<locals>.<listcomp>%s%���I�I�I��3��
�c�*�+�I�I�Ir)�listr��reverse)r�r�s` r�itemszLRUCache.items#s;���I�I�I�I�t�D�K�7H�7H�I�I�I���������
rc�>�d�|���D��S)zReturn a list of all values.c��g|]
}|d��S)r9r
r�s  rrz#LRUCache.values.<locals>.<listcomp>+s��+�+�+���!��+�+�+r)r	r�s r�valueszLRUCache.values)s��+�+�d�j�j�l�l�+�+�+�+rc� �t|��S)z7Return a list of all keys ordered by most recent usage.)rr�s r�keysz
LRUCache.keys-s���D�z�z�rc�D�tt|j����Srr)�reversed�tupler�r�s r�__iter__zLRUCache.__iter__1s����d�k�*�*�+�+�+rc�D�tt|j����S)zTIterate over the keys in the cache dict, oldest items
        coming first.
        )�iterrr�r�s r�__reversed__zLRUCache.__reversed__4s���E�$�+�&�&�'�'�'r�rN)rr�rr)"r,r-r.�__doc__�intr�r�r2�Mappingr}�Anyr�r��Tupler�r�r�r�rG�boolr�r�rr�rr�Iterabler	rr�Iteratorrr�__copy__r
rrr�r��s�������,�,���������*�*�*�*�
�a�i��Q�U�
�3�
�
�
�
��a�i��Q�U�
�3������� ��� � � � �������q�u��q�u����������a�e��a�e��q�u����� � � � �$���$�$�$�$�$�$�"��"�"�"�"�<�#�<�<�<�<��q�u��������,'�q�u�'�Q�U�'�t�'�'�'�'�
�q�u�
��
�
�
�
��q�z�!�'�!�%���,�"7�8�����,��
�1�5�)�,�,�,�,��a�j���'�����,�!�*�Q�U�+�,�,�,�,�(�a�j���/�(�(�(�(��H�H�Hrr��r��htm�xml�enabled_extensions�disabled_extensions�default_for_stringr�c������td�|D�����td�|D�����dtjtdtf����fd�}|S)acIntelligently sets the initial value of autoescaping based on the
    filename of the template.  This is the recommended way to configure
    autoescaping if you do not want to write a custom function yourself.

    If you want to enable it for all templates created from strings or
    for all templates with `.html` and `.xml` extensions::

        from jinja2 import Environment, select_autoescape
        env = Environment(autoescape=select_autoescape(
            enabled_extensions=('html', 'xml'),
            default_for_string=True,
        ))

    Example configuration to turn it on at all times except if the template
    ends with `.txt`::

        from jinja2 import Environment, select_autoescape
        env = Environment(autoescape=select_autoescape(
            disabled_extensions=('txt',),
            default_for_string=True,
            default=True,
        ))

    The `enabled_extensions` is an iterable of all the extensions that
    autoescaping should be enabled for.  Likewise `disabled_extensions` is
    a list of all templates it should be disabled for.  If a template is
    loaded from a string then the default from `default_for_string` is used.
    If nothing matches then the initial value of autoescaping is set to the
    value of `default`.

    For security reasons this function operates case insensitive.

    .. versionadded:: 2.9
    c3�jK�|].}d|�d�������V��/dS�rMN��lstrip�lowerr�s  rr�z$select_autoescape.<locals>.<genexpr>esA����U�U�Q�8����#���!4�!4�!6�!6�8�8�U�U�U�U�U�Urc3�jK�|].}d|�d�������V��/dSr(r)r�s  rr�z$select_autoescape.<locals>.<genexpr>fsA����W�W�a�9�!�(�(�3�-�-�"5�"5�"7�"7�9�9�W�W�W�W�W�Wr�
template_namerc���|��S|���}|����rdS|����rdS�S)NTF)r+r�)r-r�r%�disabled_patterns�enabled_patternss ����r�
autoescapez%select_autoescape.<locals>.autoescapehs]���� �%�%�%�+�+�-�-�
��!�!�"2�3�3�	��4��!�!�"3�4�4�	��5��r)rr2r3r}r)r#r$r%r�r1r/r0s  `` @@r�select_autoescaper2=s�������P�U�U�BT�U�U�U�U�U���W�W�CV�W�W�W�W�W���!�*�S�/��d�����������r�dumps�kwargsc���|�tj}tj||fi|���dd���dd���dd���dd	����S)
a�Serialize an object to a string of JSON with :func:`json.dumps`,
    then replace HTML-unsafe characters with Unicode escapes and mark
    the result safe with :class:`~markupsafe.Markup`.

    This is available in templates as the ``|tojson`` filter.

    The following characters are escaped: ``<``, ``>``, ``&``, ``'``.

    The returned string is safe to render in HTML documents and
    ``<script>`` tags. The exception is in HTML attributes that are
    double quoted; either use single quotes or the ``|forceescape``
    filter.

    :param obj: The object to serialize to JSON.
    :param dumps: The ``dumps`` function to use. Defaults to
        ``env.policies["json.dumps_function"]``, which defaults to
        :func:`json.dumps`.
    :param kwargs: Extra arguments to pass to ``dumps``. Merged onto
        ``env.policies["json.dumps_kwargs"]``.

    .. versionchanged:: 3.0
        The ``dumper`` parameter is renamed to ``dumps``.

    .. versionadded:: 2.9
    Nrzz\u003cruz\u003e�&z\u0026�'z\u0027)�jsonr3rr�r�)r'r3r4s   r�htmlsafe_json_dumpsr9usv��8
�}��
����
��c���V���	���i�	 �	 �	���i�	 �	 �	���i�	 �	 �	���i�	 �	 ���rc�t�eZdZdZdejddfd�Zd	d�Zedejfd���Z	dejfd�Z
e
ZdS)
�CycleraDCycle through values by yield them one at a time, then restarting
    once the end is reached. Available as ``cycler`` in templates.

    Similar to ``loop.cycle``, but can be used outside loops or across
    multiple loops. For example, render a list of folders and files in a
    list, alternating giving them "odd" and "even" classes.

    .. code-block:: html+jinja

        {% set row_class = cycler("odd", "even") %}
        <ul class="browser">
        {% for folder in folders %}
          <li class="folder {{ row_class.next() }}">{{ folder }}
        {% endfor %}
        {% for file in files %}
          <li class="file {{ row_class.next() }}">{{ file }}
        {% endfor %}
        </ul>

    :param items: Each positional argument will be yielded in the order
        given for each cycle.

    .. versionadded:: 2.1
    r	rNc�D�|std���||_d|_dS)Nz$at least one item has to be providedr)�RuntimeErrorr	�pos)r�r	s  rr�zCycler.__init__�s,���	G��E�F�F�F���
�����rc��d|_dS)z*Resets the current item to the first item.rN)r>r�s r�resetzCycler.reset�s
������rc�&�|j|jS)zxReturn the current item. Equivalent to the item that will be
        returned next time :meth:`next` is called.
        )r	r>r�s r�currentzCycler.current�s��
�z�$�(�#�#rc�\�|j}|jdzt|j��z|_|S)zXReturn the current item, then advance :attr:`current` to the
        next item.
        r9)rBr>ror	r�s  r�nextzCycler.next�s*���\���H�q�L�C��
�O�O�3����	rr)r,r-r.rr2rr�r@�propertyrBrD�__next__r
rrr;r;�s���������2�q�u������������$���$�$�$��X�$��a�e������H�H�Hrr;c�0�eZdZdZddeddfd�Zdefd�ZdS)	�JoinerzA joining helper for templates.�, �seprNc�"�||_d|_dS)NF)rJ�used)r�rJs  rr�zJoiner.__init__�s�������	�	�	rc�0�|js	d|_dS|jS)NTr)rLrJr�s r�__call__zJoiner.__call__�s���y�	��D�I��2��x�r)rI)r,r-r.rr}r�rNr
rrrHrH�s\������)�)���C��4������#������rrHc�~�eZdZdZdejdejddfd�Zdedejfd�Zded	ejddfd
�Z	defd�Z
dS)�	Namespacez~A namespace object that can hold arbitrary attributes.  It may be
    initialized from a dictionary or with keyword arguments.�argsr4rNc�L�|d|dd�}}t|i|��|_dS)Nrr9)�dict�_Namespace__attrs)rQr4r�s   rr�zNamespace.__init__�s/���!�W�d�1�2�2�h�d���T�,�V�,�,����r�namec��|dvrt�||��S	|j|S#t$rt	|��d�wxYw)N>r�rT)�object�__getattribute__rTr�rS)r�rUs  rrXzNamespace.__getattribute__�sa���5�5�5��*�*�4��6�6�6�	1��<��%�%���	1�	1�	1� ��&�&�D�0�	1���s	�.�A	r�c��||j|<dSrr�rT)r�rUr�s   rrzNamespace.__setitem__�s��"���T���rc��d|j�d�S)Nz<Namespace rurZr�s rrzNamespace.__repr__�s��.�T�\�.�.�.�.r)r,r-r.rr2rr�r}rXrrr
rrrPrP�s�������@�@�-���-���-�4�-�-�-�-�1�S�1�Q�U�1�1�1�1�#��#�A�E�#�d�#�#�#�#�/�#�/�/�/�/�/�/rrPr)F)rV)NNNN)r�Tr�r�)r�F)r r
TFrr)Ir/r8rZr~�typingr2�collectionsr�collections.abcrrR�randomrr�	threadingr�typesr�urllib.parser	r�
TYPE_CHECKING�typing_extensions�te�TypeVar�Callablerr
rcr�__annotations__�setr�
MutableSetr��concatrr"r%�Enumrr7rr=rrArHr}rUr3�IOr^rdrf�compile�
IGNORECASE�VERBOSEr�r�rr�r�r��MutableMapping�registerr��
Collectionr2r�r9r;rHrPr
rr�<module>rts1�����������	�	�	�	�	�	�	�	�����������"�%�%�%�%�%�%�%���"�"�"�!�!�!�!�!�!�!�!�"����������������������������)�)�)�)�)�)������?�#�"�"�"�"�
�A�I�c���C���J�/�0�0�0��L���m�R�*�6I�6I�)J�K�K�M�M����M�M�M�(+����
�q�|�H�%�-�-�-�	���
�A�
�!�
�
�
�
�"
��
�q�
�
�
�
�"

��

�a�

�

�

�

�
�
�
�
�
�t�y�
�
�
�
�A�
�!�
�
�
�
�&�a�e�&��&�&�&�&�"
�a�j���'�
�D�
�
�
�
�
�
�
�
���s��D��Q�U�����0 � �S� �� �q�z�!�$�7G� � � � �5�!�%�5�C�5�5�5�5�$����3������2�:��2�M�B�J��5���8
�B�J�.�/�/�	�
'+��"�15�v�v�

�v��J�s�O�v�
��C��v�
�J�s�O�	v�
�:�a�j��o�.�v�	�
v�v�v�v�t>A�4�4�
�4��4�(+�4�7:�4��4�4�4�4�n��1�5��3��$��3�����.���R�R�R�R�R�R�R���R�l-C�-/�#��	5�5���S�)�5���c�*�5��5��	5�
�Z���C��!�4�'�(�5�5�5�5�r;?�%�%�	
��%��z�!�*�S�#�X�"6�7�%�JK�%�%���%�%�%�%�P3�3�3�3�3�3�3�3�l��������/�/�/�/�/�/�/�/�/�/s�$�2�2