Current File : //proc/self/root/lib/python3/dist-packages/jinja2/__pycache__/ext.cpython-312.pyc
�

P}<b{��>�UdZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZddlmZdd
lmZddlmZej,rGddlZddlmZddlmZddlmZGd�dej<�ZGd�de�Z ejBee fZ"dZ#ejHe%dfe&d<ejNd�Z(Gd�d�Z)ededejTdejTdejBejTeffd ��Z+d!ejXe%ge%fdejXde%ffd"�Z-d!ejXe%e%e.ge%fdejXde%ffd#�Z/d!ejXe%e%ge%fdejXde%ffd$�Z0d!ejXe%e%e%e.ge%fdejXde%ffd%�Z1Gd&�d'e)�Z2Gd(�d)e)�Z3Gd*�d+e)�Z4Gd,�d-e)�Z5e#d.fd/e	jld0ejne%d1e8dejrejHe.e%ejBejte%ejHejte%dffffd2�Z;Gd3�d4�Z<d5ejzd6ejne%d7ejne%d8ej|e%ejTfdejrejHe.e%ejBejte%ejHejte%dffej~e%ff
d9�Z@e2ZAe3ZBe4ZCe5ZDy):z2Extension API for adding custom tags and behavior.�N)�Markup�)�defaults)�nodes)�Environment)�TemplateAssertionError)�TemplateSyntaxError)�concat)�Context)�	Undefined)�
import_string)�pass_context)�Token)�TokenStream)�Parserc�4�eZdZdedefd�Zdedededefd�Zy)	�_TranslationsBasic�message�returnc��y�N�)�selfrs  �,/usr/lib/python3/dist-packages/jinja2/ext.py�gettextz_TranslationsBasic.gettext�����singular�plural�nc��yrr)rrrr s    r�ngettextz_TranslationsBasic.ngettexts��rN)�__name__�
__module__�__qualname__�strr�intr"rrrrrs6��	�3�	�3�	�	�S�	�#�	�#�	�#�	rrc
�<�eZdZdededefd�Zdededededef
d�Zy	)
�_TranslationsContext�contextrrc��yrr)rr*rs   r�pgettextz_TranslationsContext.pgettext!rrrrr c��yrr)rr*rrr s     r�	npgettextz_TranslationsContext.npgettext$rrN)r#r$r%r&r,r'r.rrrr)r) sE��	�C�	�#�	�#�	�	�S�	�C�	��	��	�QT�	rr))�_rr"r,r..�GETTEXT_FUNCTIONSz\s*\n\s*c�,�eZdZUdZej
eed<dd�Ze	�Z
ejeed<dZde
ddfd	�Zde
ddfd
�Z	ddedej ed
ej edefd�Zdddej$dej&dffd�Zdddej$ej,ej.ej,ffd�Z	ddedej edej4fd�Z					ddedej ej.ej8dej ej.ej:dej ej8dej ej8dej edej<fd�Zy) �	ExtensionagExtensions can be used to add extra functionality to the Jinja template
    system at the parser level.  Custom extensions are bound to an environment
    but may not store environment specific data on `self`.  The reason for
    this is that an extension can be bound to another environment (for
    overlays) by creating a copy and reassigning the `environment` attribute.

    As extensions are created by the environment they cannot accept any
    arguments for configuration.  One may want to work around that by using
    a factory function, but that is not possible as extensions are identified
    by their import name.  The correct way to configure the extension is
    storing the configuration values on the environment.  Because this way the
    environment ends up acting as central configuration storage the
    attributes may clash which is why extensions have to ensure that the names
    they choose for configuration are not too generic.  ``prefix`` for example
    is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
    name as includes the name of the extension (fragment cache).
    �
identifierrNc�D�|j�d|j��|_y)N�.)r$r#r3)�clss r�__init_subclass__zExtension.__init_subclass__Ks���N�N�+�1�S�\�\�N�;��r�tags�d�environmentc��||_yr)r:)rr:s  r�__init__zExtension.__init__Xs
��&��rc��tj|j�}|jj	|j�||_|S)z=Create a copy of this extension bound to another environment.)�object�__new__�	__class__�__dict__�updater:)rr:�rvs   r�bindzExtension.bind[s6��
�^�^�D�N�N�
+��
�����4�=�=�)�$����	r�source�name�filenamec��|S)z�This method is called before the actual lexing and can be used to
        preprocess the source.  The `filename` is optional.  The return value
        must be the preprocessed source.
        r)rrErFrGs    r�
preprocesszExtension.preprocessbs	���
r�streamrrc��|S)aIt's passed a :class:`~jinja2.lexer.TokenStream` that can be used
        to filter tokens returned.  This method has to return an iterable of
        :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a
        :class:`~jinja2.lexer.TokenStream`.
        r)rrJs  r�
filter_streamzExtension.filter_streamks	���
r�parserrc��t��)aIf any of the :attr:`tags` matched this method is called with the
        parser as first argument.  The token the parser stream is pointing at
        is the name token that matched.  This method has to return one or a
        list of multiple nodes.
        )�NotImplementedError)rrMs  r�parsezExtension.parseus
��"�#�#r�linenoc�F�tj|j||��S)z�Return an attribute node for the current extension.  This is useful
        to pass constants on extensions to generated template code.

        ::

            self.attr('_my_attribute', lineno=lineno)
        �rQ)r�ExtensionAttributer3)rrFrQs   r�attrzExtension.attr}s���'�'�����f�M�Mr�args�kwargs�dyn_args�
dyn_kwargsc�j�|�g}|�g}tj|j||��|||||��S)zsCall a method of the extension.  This is a shortcut for
        :meth:`attr` + :class:`jinja2.nodes.Call`.
        rS)r�CallrU)rrFrVrWrXrYrQs       r�call_methodzExtension.call_method�sH���<��D��>��F��z�z��I�I�d�6�I�*������

�	
r)rNr)NNNNN) r#r$r%�__doc__�t�ClassVarr&�__annotations__r7�setr8�Set�priorityrr<rD�OptionalrI�Union�IterablerLr�Node�ListrPr'rTrU�Expr�Keywordr[r\rrrr2r26s����$�
�
�3���<��u�D�!�%�%��*���H�'�K�'�D�'������OS����!"���C���<=�J�J�s�O��	���#��	
�����
�
�7� 3�3�	4��$�H�$�������Q�V�V�E�J�J�=O�1O�)P�$�48�
N��
N�!"���C��
N�	�	!�	!�
N�04�48�+/�-1�"&�
��
��j�j�����
�
�+�,�
��
�
�1�6�6�%�-�-�0�1�	
�
�*�*�U�Z�Z�(�
��J�J�u�z�z�*�

��
�
�3��
�
���
rr2�	__contextrVrWrc�L�|j|jd�g|��i|��S)Nr)�call�resolve)rkrVrWs   r�_gettext_aliasro�s*���9�>�>�)�+�+�I�6�H��H��H�Hr�funcc	�j��tdtdtdtjdtf�fd��}|S)Nrk�__string�	variablesrc�t��|j�|�}|jjrt|�}||zSr)rm�eval_ctx�
autoescaper)rkrrrsrCrps    �rrz"_make_new_gettext.<locals>.gettext�s7���
�^�^�D�(�
+�����(�(����B��I�~�r�rrr&r^�Any)rprs` r�_make_new_gettextry�s<�����7��c������#�����Nrc
���tdtdtdtdtdtj
dtf�fd��}|S)Nrk�
__singular�__plural�__numrsrc���|jd|�|j�|||�}|jjrt	|�}||zS)N�num��
setdefaultrmrurvr)rkr{r|r}rsrCrps      �rr"z$_make_new_ngettext.<locals>.ngettext�sK���	���U�E�*�
�^�^�D�*�h��
>�����(�(����B��I�~�r�rrr&r'r^rx)rpr"s` r�_make_new_ngettextr��sX������������	�
�U�U��

�
����Orc�v��tdtdtdtdtjdtf
�fd��}|S)Nrk�__string_ctxrrrsrc���|jd|�|j�||�}|jjrt	|�}||zS)Nr*r�)rkr�rrrsrCrps     �rr,z$_make_new_pgettext.<locals>.pgettext�sK���	���Y��5�
�^�^�D�,��
9�����(�(����B��I�~�rrw)rpr,s` r�_make_new_pgettextr��sH����
��
�*-�
�9<�
�KL�5�5�
�	�
��
��Orc���tdtdtdtdtdtdtj
dtf�fd��}|S)	Nrkr�r{r|r}rsrc����|jd|�|jd|�|j�||||�}|jjrt	|�}||zS)Nr*rr�)rkr�r{r|r}rsrCrps       �rr.z&_make_new_npgettext.<locals>.npgettext�s_���	���Y��5����U�E�*�
�^�^�D�,�
�H�e�
L�����(�(����B��I�~�rr�)rpr.s` r�_make_new_npgettextr��se������������	�
���U�U�
�

����$�rc�f��eZdZdZdhZdeddf�fd�Z	d&ddd	eje	ddfd
�Z
d&d	eje	ddfd�Z			d'deje
ge
fd
eje
e
ege
fd	eje	dejeje
e
ge
fdejeje
e
e
ege
fddfd�Zd(d�Zefdej$e
ej(fdej*e
dej,ej.ee
ej$eje
ej.eje
dffffd�Zdddej$ej2ej4ej2ffd�Zefde
dej:e
de
fd�Zddde	dej.ej4e
e
ffd�Zde
deje
d eje
d!ej@e
ejBfd"ejejBd#e	d$e	dejDfd%�Z#�xZ$S))�InternationalizationExtensionz-This extension adds gettext support to Jinja.�transr:rNc����t�|�|�t|jd<|j	|j
|j|j|j|jd��y)Nr/F)�install_gettext_translations�install_null_translations�install_gettext_callables�uninstall_gettext_translations�extract_translations�newstyle_gettext)
�superr<ro�globals�extend�_install�
_install_null�_install_callables�
_uninstall�_extract)rr:r@s  �rr<z&InternationalizationExtension.__init__s]���
����%�#1����C� ����)-���&*�&8�&8�&*�&=�&=�+/�?�?�!%���"�
	�	
r�translations�_SupportedTranslations�newstylec���t|dd�}|�|j}t|dd�}|�|j}t|dd�}t|dd�}|j|||||��y)N�ugettext�	ungettextr,r.)r�r,r.)�getattrrr"r�)rr�r�rr"r,r.s       rr�z&InternationalizationExtension._install
s{��
�,�
�D�9���?�"�*�*�G��<��d�;����#�,�,�H��<��T�:���L�+�t�<�	�����X��8�y�	 �	
rc
�T�ddl}|j�}t|d�r
|j}ndtdtdtfd�}t|d�r
|j
}n"dtdtdtd	tdtf
d
�}|j|j|j|||��y)Nrr,�c�src��|Srr)r�r�s  rr,z=InternationalizationExtension._install_null.<locals>.pgettext)s���rr.�pr c��|dk(r|S|S)Nrr)r�r�r�r s    rr.z>InternationalizationExtension._install_null.<locals>.npgettext0s����F�q�)��)r)rr"r�r,r.)	r�NullTranslations�hasattrr,r&r.r'r�r")rr�rr�r,r.s      rr�z+InternationalizationExtension._install_nulls�����/�/�1���<��,�#�,�,�H�
�C�
�C�
�C�
��<��-�$�.�.�I�
*�S�
*�S�
*�S�
*�S�
*�S�
*�	
��� �(�(�!�*�*����	 �	
rrr"r,r.c��|�||j_|jjr0t|�}t|�}|�t	|�}|�t|�}|jjj||||��y�N)rr"r,r.)r:r�ryr�r�r�r�rB)rrr"r�r,r.s      rr�z0InternationalizationExtension._install_callables;s�����08�D���-����,�,�'��0�G�)�(�3�H��#�-�h�7���$�/�	�:�	���� � �'�'��h��Y�	(�	
rc�^�dD](}|jjj|d��*yr�)r:r��pop)rr��keys   rr�z(InternationalizationExtension._uninstallSs-��C�	4�C����$�$�(�(��d�3�	4rrE�gettext_functions.c�p�t|t�r|jj|�}t	||�Sr)�
isinstancer&r:rP�extract_from_ast)rrEr�s   rr�z&InternationalizationExtension._extractWs2���f�c�"��%�%�+�+�F�3�F���(9�:�:rrMrc
�	�t|j�j}d}|jjd�}|�|j}d}d}d}i}d}	|jj
jdk7�r�|r|jjd�|jjd�r�n�|jjd�}
|
j|vr0|jd|
j�d	�|
jt�
�|jj
jdk(r5t|j�|j�x||
j<}nP|	�|
jdvr|
jd
k(}	��0tj|
jd�x||
j<}|�{t|tj�rPtjdd�}|||
j<tj tjdd�|�}n|}|
jdk(}|jj
jdk7r���|jjd�d}d}
t#�}|j%|d�\}}|r4|j'|�|�!tj|dd�}|ddk(}|jj
j)d��rd}
t|j�|jj
jdk7rw|jjd�}
|
j|vr0|jd|
j�d�|
jt�
�||
j}|
jdk(}|jjd�|j%|d�\}}t|j�|j'|�nt|j�|D] }||vs�tj|d�||<�"|
sd}n|�|jd|�|	�|j*j,d}	|	r$|j/|�}|r|j/|�}|j1|||||t3|�|xr|
�}|j5|�|�||gS|S)zParse a translatable tag.N�stringF�	block_end�comma�colonrFztranslatable variable z defined twice.)�exc�assign)�trimmed�	notrimmedr��load�_trans�storerTr�name:pluralizezunknown variable z for pluralizationzpluralize without variables�ext.i18n.trimmed)�nextrJrQ�next_if�value�current�type�expect�skip_if�failr�parse_expressionr�Namer�r[�Assignra�_parse_blockrB�testr:�policies�_trim_whitespace�
_make_node�bool�
set_lineno)rrMrQr*�
context_token�plural_expr�plural_expr_assignment�num_called_numrsr��token�varr�have_plural�
referenced�singular_namesr�plural_namesrF�nodes                    rrPz#InternationalizationExtension.parsebsH���f�m�m�$�+�+�����
�
�-�-�h�7�
��$�#�)�)�G�
/3��;?����-/�	����m�m�#�#�(�(�K�7���
�
�$�$�W�-��}�}�$�$�W�-���M�M�(�(��0�E��{�{�i�'����,�U�[�[�O�?�K��L�L�.����}�}�$�$�)�)�X�5��V�]�]�#�/5�/F�/F�/H�H�	�%�+�+�&����U�[�[�4L�%L��+�+��2���/4�z�z�%�+�+�v�/N�N�	�%�+�+�&���"��c�5�:�:�.�"'�*�*�X�v�">�K�-8�I�e�k�k�*�-2�\�\��
�
�8�W�5�s�.�*�#&�K�!&����!5��G�m�m�#�#�(�(�K�7�J	�
�
���[�)������U�
�$(�#4�#4�V�T�#B� �������n�-��"�#�j�j���):�F�C��!/��!2�e�!;���=�=� � �%�%�&6�7��K�������}�}�$�$�)�)�[�8��
�
�,�,�V�4���;�;�i�/��K�K�+�E�K�K�?�:L�M����2� ��
(����4��!&����!5���M�M� � ��-�#'�#4�#4�V�U�#C� �L�&���������l�+�������	;�D��9�$�"'�*�*�T�6�":�	�$��	;���K�
�
 ��K�K�5�v�>��?��&�&�/�/�0B�C�G���,�,�X�6�H���.�.�v�6��������������*�{�
��	
�����!�-�*�D�1�1��Krr��_ws_rec�B�|jd|j��S)N� )�sub�strip)rr�r�s   rr�z.InternationalizationExtension._trim_whitespace�s���z�z�#�v�|�|�~�.�.r�allow_pluralizec��g}g}	|jjjdk(rV|j|jjjjdd��t
|j��n{|jjjdk(r|t
|j�|jjd�j}|j|�|jd|�d��|jjd�n�|jjjd	k(r�t
|j�|jjjd
�rn�|jjjd�r|rnX|jd�|jd
�n3|jjr|jd�ntd�����|t|�fS)z1Parse until the next block tag with a given name.�data�%�%%�variable_beginrFz%(z)s�variable_end�block_beginz
name:endtransr�z:a translatable section can have only one pluralize sectionz;control structures in translatable sections are not allowedzunclosed translation blockzinternal parser error)
rJr�r��appendr��replacer�r�r�r��eos�RuntimeErrorr
)rrMr�r��bufrFs      rr�z*InternationalizationExtension._parse_block�s����
�����}�}�$�$�)�)�V�3��
�
�6�=�=�0�0�6�6�>�>�s�D�I�J��V�]�]�#����&�&�+�+�/?�?��V�]�]�#��}�}�+�+�F�3�9�9���!�!�$�'��
�
�R��v�R�=�)��
�
�$�$�^�4����&�&�+�+�}�<��V�]�]�#��=�=�(�(�-�-�o�>���]�]�*�*�/�/�0@�A�&���K�K�T�����Q�����"�"����8�9�"�#:�;�;�5�8�6�#�;�&�&rrrr*rsr��vars_referencedr�c��|jj}|s(|s&|jdd�}|r|jdd�}d}	tj|�g}
|�*|
jdtj|��d|	��}	|�+d|	��}	|
j
tj|�|f�tjtj|	d�|
gdd�}|rP|j�D]<\}}
|r|d	k(r�|jjtj||
���>n�tj|�}|rqtj|tj|j�D��
cgc].\}}
tj tj|�|
���0c}
}��}tj"|g�Scc}
}w)
z/Generates a useful node from the data provided.r�r�rNrr�r r�r)r:r�r�r�Const�insertr�r[r��itemsrWr�rj�MarkSafeIfAutoescape�Mod�Dict�Pair�Output)rrrr*rsr�r�r�r��	func_name�	func_argsr�r�r�s              rr�z(InternationalizationExtension._make_nodes����#�#�4�4��
�x��'�'��c�2�H������c�2���	�).���X�)>�(?�	������Q����G� 4�5��I�;��I��"��I�;��I����e�k�k�&�1�;�?�@��z�z�%�*�*�Y��7��B��d�S��
�'�o�o�/�
>�
��U�"�c�U�l�����"�"�5�=�=��e�#<�=�
>��-�-�d�3�D���y�y���J�J�/8�o�o�.?�� *��U�"�J�J�u�{�{�3�'7��?������|�|�T�F�#�#��
s�:3Gr)NNN)r�r�rN)%r#r$r%r]r8rr<r^rdr�r�r��Callabler&r'r�r�r0rer�Template�Sequence�Iterator�Tupler�rgrhrPr��Patternr�r�r�rir�r��
__classcell__)r@s@rr�r��s����7��9�D�

�K�

�D�

�TX�
�4�
�@A�
�
�4�@P�
�	
�
�$
�a�j�j��&6�
�$�
�@&*�<@�GK�

����S�E�3�J�'�
��*�*�c�3��_�c�1�2�
��*�*�T�"�	
�
�*�*�Q�Z�Z��c�
�C��8�9�
��:�:�a�j�j�#�s�C��)=�s�)B�C�D�

�
�
�04�.?�	;�����U�^�^�+�,�	;��:�:�c�?�	;�
���	����S�!�'�'�!�*�*�S�/�1�7�7�1�:�:�c�?�C�;O�3P�"P�Q�Q�R�
�		;�x�H�x�������Q�V�V�E�J�J�=O�1O�)P�x�tFL�/�s�/�A�I�I�c�N�/�PS�/�#'��#'�15�#'�	
��������c�!�	"�#'�J<$��<$��
�
�3��<$����C��	<$�
�6�6�#�u�z�z�/�*�<$��Z�Z��
�
�+�
<$��<$��<$�
���<$rr�c�:�eZdZdZdhZdddejfd�Zy)�ExprStmtExtensionzrAdds a `do` tag to Jinja that works like the print statement just
    that it doesn't print the return value.
    �dorMrrc��tjt|j�j��}|j�|_|S)NrS)r�ExprStmtr�rJrQ�parse_tupler�)rrMr�s   rrPzExprStmtExtension.parseJs4���~�~�T�&�-�-�%8�%?�%?�@���&�&�(��	��rN)r#r$r%r]r8rr	rPrrrrrCs'���
�6�D��H�����rrc�n�eZdZdZddhZdddejejejffd�Z
y)	�LoopControlExtensionz/Adds break and continue to the template engine.�break�continuerMrrc���t|j�}|jdk(r tj|j
��Stj|j
��S)Nr
rS)r�rJr�r�BreakrQ�Continue)rrMr�s   rrPzLoopControlExtension.parseUsB���V�]�]�#���;�;�'�!��;�;�e�l�l�3�3��~�~�U�\�\�2�2rN)r#r$r%r]r8r^rerrrrPrrrrrPs8��9��Z� �D�3�H�3�������e�n�n�1L�)M�3rrc�J�eZdZdZdhZdddejfd�Zdede	fd�Z
y	)
�DebugExtensiona�A ``{% debug %}`` tag that dumps the available variables,
    filters, and tests.

    .. code-block:: html+jinja

        <pre>{% debug %}</pre>

    .. code-block:: text

        {'context': {'cycler': <class 'jinja2.utils.Cycler'>,
                     ...,
                     'namespace': <class 'jinja2.utils.Namespace'>},
         'filters': ['abs', 'attr', 'batch', 'capitalize', 'center', 'count', 'd',
                     ..., 'urlencode', 'urlize', 'wordcount', 'wordwrap', 'xmlattr'],
         'tests': ['!=', '<', '<=', '==', '>', '>=', 'callable', 'defined',
                   ..., 'odd', 'sameas', 'sequence', 'string', 'undefined', 'upper']}

    .. versionadded:: 2.11.0
    �debugrMrrc���|jjd�j}tj�}|jd|g|��}tj|g|��S)Nz
name:debug�_renderrS)rJr�rQr�ContextReferencer\r�)rrMrQr*�results     rrPzDebugExtension.parsessV�����%�%�l�3�:�:���(�(�*���!�!�)�g�Y�v�!�F���|�|�V�H�V�4�4rr*c��|j�t|jjj	��t|jj
j	��d�}t
j|dd��S)N)r*�filters�tests�T)�depth�compact)�get_all�sortedr:r�keysr�pprint�pformat)rr*rs   rrzDebugExtension._renderysb�����(��d�.�.�6�6�;�;�=�>��D�,�,�2�2�7�7�9�:�
���~�~�f�A�t�<�<rN)r#r$r%r]r8rr�rPrr&rrrrrr\s:���(
�9�D�5�H�5����5�=�w�=�3�=rrT�astr��babel_stylec#�*K�|jtj�D�]l}t|jtj
�r|jj|vr�Ag}|jD]c}t|tj�r6t|jt�r|j|j��S|jd��e|jD]}|jd��|j�|jd�|j�|jd�|std�|D��}|s!��)t!|�dk(r|d}nt|�}|j"|jj|f����oy�w)a�Extract localizable strings from the given template node.  Per
    default this function returns matches in babel style that means non string
    parameters as well as keyword arguments are returned as `None`.  This
    allows Babel to figure out what you really meant if you are using
    gettext functions that allow keyword arguments for placeholder expansion.
    If you don't want that behavior set the `babel_style` parameter to `False`
    which causes only strings to be returned and parameters are always stored
    in tuples.  As a consequence invalid gettext calls (calls without a single
    string parameter or string parameters after non-string parameters) are
    skipped.

    This example explains the behavior:

    >>> from jinja2 import Environment
    >>> env = Environment()
    >>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
    >>> list(extract_from_ast(node))
    [(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
    >>> list(extract_from_ast(node, babel_style=False))
    [(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]

    For every string found this function yields a ``(lineno, function,
    message)`` tuple, where:

    * ``lineno`` is the number of the line on which the string was found,
    * ``function`` is the name of the ``gettext`` function used (if the
      string was extracted from embedded Python code), and
    *   ``message`` is the string, or a tuple of strings for functions
         with multiple string arguments.

    This extraction function operates on the AST and is because of that unable
    to extract any comments.  For comment support you have to use the babel
    extraction interface or extract comments yourself.
    Nc3�&K�|]	}|��|���y�wrr)�.0�xs  r�	<genexpr>z#extract_from_ast.<locals>.<genexpr>�s����<�a�a�m��<�s��rr)�find_allrr[r�r�r�rFrVr�r�r&r�rWrXrY�tuple�lenrQ)r$r�r%r��strings�argr/�outs        rr�r��s8����V���U�Z�Z�(�!/���4�9�9�e�j�j�1��y�y�~�~�%6�6��+-���9�9�	%�C��#�u�{�{�+�
�3�9�9�c�0J����s�y�y�)����t�$�		%����	!�A��N�N�4� �	!��=�=�$��N�N�4� ��?�?�&��N�N�4� ���<�7�<�<�C����7�|�q� ��a�j���G�n���k�k�4�9�9�>�>�3�.�.�C!/�s�FFc���eZdZdZdej
ejeeefdej
eddfd�Z	dedejefd�Zd	edejefd
�Zy)�_CommentFinderz�Helper class to find comments in a token stream.  Can only
    find comments for gettext calls forwards.  Once the comment
    from line 4 is found, a comment for line 1 will not return a
    usable value.
    �tokens�comment_tagsrNc�<�||_||_d|_d|_y)Nr)r3r4�offset�last_lineno)rr3r4s   rr<z_CommentFinder.__init__�s"�����(��������rr6c�(�	t|j|j|�D]I\}}}|dvs�	|jdd�\}}||j
vs�1|j
�gc||_Sg||_S#t$rY�`wxYw#||_wxYw)N)�comment�linecommentr)�reversedr3r6�split�
ValueErrorr4�rstrip)rr6r/�
token_type�token_value�prefixr9s       r�find_backwardsz_CommentFinder.find_backwards�s���
	!�.6����D�K�K�&�1�/�	
2�*��:�{��!;�;�!�*5�*;�*;�D�!�*D������!2�!2�2� '��� 0�1�1�!�D�K�	
2�� �D�K��
&�!� �!��!�D�K�s:�-B�A9�B�B�/B�9	B�B�B�B�	BrQc�*�|jr|j|kDrgSt|j|jd�D].\}\}}}||kDs�|j|j|z�cS|jt
|j��Sr)r4r7�	enumerater3r6rBr-)rrQ�idx�token_linenor/s     r�
find_commentsz_CommentFinder.find_comments�s���� � �D�$4�$4�v�$=��I�)2�4�;�;�t�{�{�}�3M�)N�	>�%�C�%�,��1��f�$��*�*�4�;�;��+<�=�=�	>��"�"�3�t�{�{�#3�4�4r)
r#r$r%r]r^rrr'r&r<rhrBrGrrrr2r2�s{�����j�j�����c�3��!7�8��HI�
�
�SV���	
��!�S�!�Q�V�V�C�[�!� 5�C�5�A�F�F�3�K�5rr2�fileobj�keywordsr4�optionsc#��K�i}|jdd�jd�D]#}|j�}|s�d|t|�<�%t|vr	d|t<ddt
jttfdtdtd	tfd
�}||dd�}t|jd
tj�|jdtj�|jdtj�|jdtj�|jdtj�|jdtj �|jd�xstj"|jd�xstj$||dtj&�||dtj(�tj*||dtj,�t/|�dd��}||d�rd|j0d<||d�rd|_|j5�j7|jdd��}		|j9|	�}
t;|j=|j?|	���}tC||�}tE|
|�D]\}
}}|
|||jG|
�f���y#t@$r|s�YywxYw�w) aBabel extraction method for Jinja templates.

    .. versionchanged:: 2.3
       Basic support for translation comments was added.  If `comment_tags`
       is now set to a list of keywords for extraction, the extractor will
       try to find the best preceding comment that begins with one of the
       keywords.  For best results, make sure to not have more than one
       gettext call in one line of code and the matching comment in the
       same line or the line before.

    .. versionchanged:: 2.5.1
       The `newstyle_gettext` flag can be set to `True` to enable newstyle
       gettext calls.

    .. versionchanged:: 2.7
       A `silent` option can now be provided.  If set to `False` template
       syntax errors are propagated instead of being ignored.

    :param fileobj: the file-like object the messages should be extracted from
    :param keywords: a list of keywords (i.e. function names) that should be
                     recognized as translation functions
    :param comment_tags: a list of translator tags to search for and include
                         in the results.
    :param options: a dictionary of additional options (optional)
    :return: an iterator over ``(lineno, funcname, message, comments)`` tuples.
             (comments will be empty currently)
    �
extensions��,NFrJr��defaultrc�X�|j|t|��j�dvS)N>�1�on�yes�true)�getr&�lower)rJr�rOs   r�getboolzbabel_extract.<locals>.getbool-s&���{�{�3��G��-�3�3�5�9S�S�Sr�silentT�block_start_string�block_end_string�variable_start_string�variable_end_string�comment_start_string�comment_end_string�line_statement_prefix�line_comment_prefix�trim_blocks�
lstrip_blocks�keep_trailing_newliner)�
cache_size�auto_reloadr�r�r��encodingzutf-8)F)$rUr<r�r
r�r^�Mappingr&r�rr�BLOCK_START_STRING�BLOCK_END_STRING�VARIABLE_START_STRING�VARIABLE_END_STRING�COMMENT_START_STRING�COMMENT_END_STRING�LINE_STATEMENT_PREFIX�LINE_COMMENT_PREFIX�TRIM_BLOCKS�
LSTRIP_BLOCKS�NEWLINE_SEQUENCE�KEEP_TRAILING_NEWLINEr,r�r��read�decoderP�list�lexrIr	r2r�rG)rHrIr4rJrL�extension_namerWrXr:rEr�r3�finderrQrprs                r�
babel_extractrz�s�����J35�J�!�+�+�l�B�7�=�=�c�B�9��'�-�-�/����48�
�=��0�1�
9�%�J�6�48�
�0�1�T����3��8�,�T�3�T��T�RV�T��W�h��
-�F�����(�(�*E�*E�F����&��(A�(A�B����+�X�-K�-K�L����)�8�+G�+G�H����*�H�,I�,I�J����(�(�*E�*E�F����+�,�N��0N�0N����)�*�J�h�.J�.J�����(<�(<�=����(�*@�*@�A��!�!���0�(�2P�2P�Q�
�j�����K�$�w�	�"�37����/�0��w�*�+�'+��$�
�\�\�^�
"�
"�7�;�;�z�7�#C�
D�F��� � ��(���k�o�o�k�&<�&<�V�&D�E�F���F�L�
1�F�!1�$��!A�B����g��d�G�V�%9�%9�&�%A�A�A�B�������	�s*�IK!�:K�9K!�K�K!�K�K!)Er]r"�re�typingr^�
markupsaferrMrrr:r�
exceptionsrr	�runtimer
rr�utilsr
r�
TYPE_CHECKING�typing_extensions�te�lexerrrrMr�Protocolrr)rer�r0rr&r`�compiler�r2rxror�ryr'r�r�r�r�rrrr�rr�rrdr�r2�BinaryIOr�rhrz�i18nr�loopcontrolsrrrr�<module>r�sr��8�
�	�����$�.�+���� ���?�?�"��"���R�[�[���1���W�W�%7�9M�%M�N��
(��1�7�7�3��8�$��
����K�	 ��j
�j
�Z�I��I� �u�u�I�01���I��W�W�Q�U�U�I�
��I��I��A�J�J��u�c�z�2��q�z�z�#�s�(�7K���Q�Z�Z��c�3���(<�=��!�*�*�S�RU�X�BV��&�Q�Z�Z��c�
�C��8��Q�Z�Z��S��=Q��"�
�*�*�c�3��S�)�3�.�
/���Z�Z��S����2K$�I�K$�\

�	�
�	3�9�	3�%=�Y�%=�T*;��L/�	���L/��z�z�#��L/��L/��Z�Z��G�G�C��a�g�g�a�j�j��o�q�w�w�q�z�z�#���7K�/L�L�M�M�N��	L/�^%5�%5�PYB�
�Z�Z�YB��j�j��o�YB��*�*�S�/�YB��V�V�C����J�
�	YB�
�Z�Z��G�G��S�!�'�'�!�*�*�S�/�1�7�7�1�:�:�c�?�C�3G�+H�H�I�1�6�6�RU�;�V���YB�z%����#���r
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!