Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/jinja2/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/jinja2/__pycache__/idtracking.cpython-311.pyc

�

�܋f�)���ddlZddlmZddlmZdZdZdZdZ		dd	ej
ejd
ejdddfd
�Z
	ddejd
ejdddfd�ZGd�d��ZGd�de��ZGd�de��ZdS)�N�)�nodes)�NodeVisitor�param�resolve�alias�	undefinedr�parent_symbols�Symbols�returnc�x�t|���}t|��}|D]}|�|���|S�N)�parent)r�FrameSymbolVisitor�visit)rr
�sym�visitor�nodes     �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/jinja2/idtracking.py�find_symbolsrsJ����
(�
(�
(�C� ��%�%�G������
�
�d������J�rc�P�t|���}|�|��|Sr)r�analyze_node)rr
rs   r�symbols_for_noders-����
(�
(�
(�C����T�����Jrc	���eZdZ	ddejddejeddfd�Zdejdej	ddfd�Z
	dd	ed
ejejeejefdefd�Z
dedejej	fd
�Zd	edejefd�Zd	edefd�Zdd�Zd	eddfd�Zd	edefd�Zd	eddfd�Zdejdddfd�Zdejeeffd�Zdejefd�ZdS)rNr�levelrc��|�|�d}n
|jdz}||_||_i|_i|_t	��|_dS)Nrr)rr�refs�loads�set�stores)�selfrrs   r�__init__zSymbols.__init__sL���=��~������q�(����
����&(��	�)+��
�"%�%�%����rr�kwargsc�@�t|��}|j|fi|��dS�N)�RootVisitorr)r"rr$rs    rrzSymbols.analyze_node.s/���d�#�#����
�d�%�%�f�%�%�%�%�%r�name�loadc�L�d|j�d|��}||j|<|�
||j|<|S)N�l_�_)rrr)r"r(r)�idents    r�_define_refzSymbols._define_ref2s=��)�T�Z�(�(�$�(�(����	�$���� $�D�J�u���r�targetc�t�||jvr
|j|S|j�|j�|��SdSr&)rr�	find_load)r"r/s  rr1zSymbols.find_load;s?���T�Z����:�f�%�%��;�"��;�(�(��0�0�0��trc�t�||jvr
|j|S|j�|j�|��SdSr&)rr�find_ref�r"r(s  rr3zSymbols.find_refDs>���4�9����9�T�?�"��;�"��;�'�'��-�-�-��trc�Z�|�|��}|�td|�d����|S)NzFTried to resolve a name to a reference that was unknown to the frame (�))r3�AssertionError)r"r(�rvs   r�refzSymbols.refMsH��
�]�]�4�
 �
 ��
�:� �4�*.�4�4�4���
��	rc�f�tjtt�|j����}|j�|j��|j�	��|_|j
�	��|_
|j�	��|_|Sr&)�t�castr�object�__new__�	__class__�__dict__�updater�copyrr!)r"r8s  rrBzSymbols.copyVsy��
�V�G�V�^�^�D�N�;�;�
<�
<��
����4�=�)�)�)��)�.�.�"�"����:�?�?�$�$����K�$�$�&�&��	��	rc��|j�|��||jvrc|j�<|j�|��}|� |�|t|f���dS|�|tdf���dSdS�N)r))r!�addrrr3r.�VAR_LOAD_ALIAS�VAR_LOAD_UNDEFINED)r"r(�	outer_refs   r�storez
Symbols.store^s������������t�y� � ��{�&� �K�0�0��6�6�	��(��$�$�T���0K�$�L�L�L��F�
���T�);�T�(B��C�C�C�C�C�!� rc�r�|j�|��|�|tdf���SrD)r!rEr.�VAR_LOAD_PARAMETERr4s  r�declare_parameterzSymbols.declare_parameterps5��������������,>��+E��F�F�Frc�p�|�|��� |�|t|f���dSdSrD)r3r.�VAR_LOAD_RESOLVEr4s  rr)zSymbols.loadtsA���=�=����&����T�)9�4�(@��A�A�A�A�A�'�&r�branch_symbolsc�b�i}|D]2}|jD](}||jvr�|�|d��dz||<�)�3|D]_}|j�|j��|j�|j��|j�|j���`|���D]�\}}|t
|��kr�|�|��}|�
Jd���|j�.|j�|��}|�t|f|j|<�ot|f|j|<��dS)Nrrzshould not happen)r!�getrrAr�items�lenr3rrFrN)	r"rOr!�branchr/rr(�branch_count�outer_targets	         r�
branch_updatezSymbols.branch_updatexsc��#%��$�	;�	;�F� �-�
;�
;���T�[�(�(��!'���F�A�!6�!6��!:��v���
;�
"�	+�	+�C��I���S�X�&�&�&��J���c�i�(�(�(��K���s�z�*�*�*�*�"(�,�,�.�.�	:�	:��D�,��s�>�2�2�2�2���]�]�4�(�(�F��%�%�':�%�%�%��{�&�#�{�3�3�D�9�9���+�*8�,�)G�D�J�v�&��"2�D�!9�D�J�v���	:�	:rc��i}|}|�<t|j��D]}||vr|�|��||<�|j}|�<|Sr&)�sortedr!r3r)r"r8rr(s    r�dump_storeszSymbols.dump_stores�s`��!��&*�����t�{�+�+�
3�
3���r�>�>�#�}�}�T�2�2�B�t�H���;�D����	rc��t��}|}|�K|j���D](\}\}}|tkr|�|���)|j}|�K|Sr&)r rrRrKrEr)r"r8rr/�instrr,s      r�dump_param_targetszSymbols.dump_param_targets�sn��
�U�U��&*����&*�j�&6�&6�&8�&8�
#�
#�"��
����.�.�.��F�F�6�N�N�N���;�D����	r)NNr&)rr)�__name__�
__module__�__qualname__r;�Optional�intr#r�Node�Anyr�str�Tupler.r1r3r9rBrIrLr)�SequencerW�DictrZ�Setr]�rrrrsD������MQ�
(�
(��j��+�
(�;<�:�c�?�
(�	
�
(�
(�
(�
(�&���&�q�u�&��&�&�&�&�
LP����� �z�!�'�#�q�z�#��2F�*G�H��	���������
�1�5�(9������S��Q�Z��_�����������������D�#�D�$�D�D�D�D�$G�c�G�c�G�G�G�G�B��B��B�B�B�B�:�A�J�y�,A�:�d�:�:�:�:�6�Q�V�C��H�-������A�E�#�J������rc	�`�eZdZdd�Zdejdejddfd�ZeZ	eZ
eZeZeZ
eZeZdejdejddfd	�Zdejdejddfd
�Zdejdejddfd�Z	ddejd
edejddfd�Zdejdejddfd�Zdejdejdejddfd�ZdS)r'�symbolsrrNc�.�t|��|_dSr&)r�sym_visitor�r"rls  rr#zRootVisitor.__init__�s��-�g�6�6����rrr$c�h�|���D]}|j�|���dSr&��iter_child_nodesrnr�r"rr$�childs    r�
_simple_visitzRootVisitor._simple_visit�sA���*�*�,�,�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�N�|jD]}|j�|���dSr&��bodyrnrrss    r�visit_AssignBlockzRootVisitor.visit_AssignBlock��7���Y�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�l�|�d���D]}|j�|���dS)N)�call)�excluderqrss    r�visit_CallBlockzRootVisitor.visit_CallBlock�sF���*�*�9�*�=�=�	*�	*�E���"�"�5�)�)�)�)�	*�	*rc�N�|jD]}|j�|���dSr&rwrss    r�visit_OverlayScopezRootVisitor.visit_OverlayScope�rzrrx�
for_branchc��|dkr)|j�|jd���|j}nl|dkr|j}n^|dkrI|j�|jd���|j�|j�|j��dSt
d���|r|D]}|j�|���dSdS)NrxT)�store_as_param�else�testzUnknown for branch)rnrr/rx�else_r��RuntimeError)r"rr�r$rT�items      r�	visit_ForzRootVisitor.visit_For�s���������"�"�4�;�t�"�D�D�D��Y�F�F�
�6�
!�
!��Z�F�F�
�6�
!�
!���"�"�4�;�t�"�D�D�D��y�$�� �&�&�t�y�1�1�1��F��3�4�4�4��	-��
-�
-��� �&�&�t�,�,�,�,�	-�	-�
-�
-rc��|jD]}|j�|���|jD]}|j�|���dSr&)�targetsrnrrx)r"rr$r/rts     r�
visit_WithzRootVisitor.visit_With�sb���l�	+�	+�F���"�"�6�*�*�*�*��Y�	*�	*�E���"�"�5�)�)�)�)�	*�	*r�argsc�J�tdt|��j�����)NzCannot find symbols for )�NotImplementedError�typer^)r"rr�r$s    r�
generic_visitzRootVisitor.generic_visit�s"��!�"T�T�$�Z�Z�=P�"T�"T�U�U�Ur�rlrrN)rx)r^r_r`r#rrcr;rdru�visit_Template�visit_Block�visit_Macro�visit_FilterBlock�visit_Scope�visit_If�visit_ScopedEvalContextModifier�AssignBlockry�	CallBlockr~�OverlayScoper��Forrer��Withr�r�rjrrr'r'�s�������7�7�7�7�*�%�*�*���*�$�*�*�*�*�#�N��K��K�%���K��H�&3�#�*�e�&7�*�1�5�*�T�*�*�*�*�*�E�O�*�q�u�*��*�*�*�*�*�u�'9�*�Q�U�*�t�*�*�*�*�
28�-�-��I�-�+.�-�CD�5�-�	
�-�-�-�-�(*�u�z�*�Q�U�*�t�*�*�*�*�V�%�*�V�Q�U�V�a�e�V�PT�V�V�V�V�V�Vrr'c	�z�eZdZdZdd�Z	ddejd	ed
ej	ddfd�Z
dejd
ej	ddfd�Zdej
d
ej	ddfd
�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Zdejd
ej	ddfd�Z dej!d
ej	ddfd�Z"dej#d
ej	ddfd�Z$dej%d
ej	ddfd�Z&dS)rzA visitor for `Frame.inspect`.rlrrNc��||_dSr&)rlros  rr#zFrameSymbolVisitor.__init__�s
������rFrr�r$c��|s|jdkr!|j�|j��dS|jdkr!|j�|j��dS|jdkr!|j�|j��dSdS)z2All assignments to names go through this function.rrIr)N)�ctxrlrLr(rIr))r"rr�r$s    r�
visit_NamezFrameSymbolVisitor.visit_Name�s����	)�T�X��0�0��L�*�*�4�9�5�5�5�5�5�
�X��
 �
 ��L���t�y�)�)�)�)�)�
�X��
�
��L���d�i�(�(�(�(�(� �
rc�D�|j�|j��dSr&)rlr)r(�r"rr$s   r�visit_NSRefzFrameSymbolVisitor.visit_NSRef�s ������$�)�$�$�$�$�$rc�*�����j|jfi����j�dtjt
jddf���fd�}||j��}||j��}||j	pd��}�j�
|||g��dS)Nrrrc�r������x�_}|D]}�j|fi������_|Sr&)rBrlr)rr8�subnoder$�original_symbolsr"s   ���r�inner_visitz0FrameSymbolVisitor.visit_If.<locals>.inner_visitsS��� 0� 5� 5� 7� 7�7�D�L�2� �
.�
.����
�7�-�-�f�-�-�-�-�+�D�L��Irrj)rr�rlr;�Iterablerrcrx�elif_r�rW)r"rr$r��body_symbols�elif_symbols�else_symbolsr�s` `    @rr�zFrameSymbolVisitor.visit_If�s��������
�4�9�'�'��'�'�'��<��	�q�z�%�*�5�	�)�	�	�	�	�	�	�	�	�#�{�4�9�-�-��"�{�4�:�.�.��"�{�4�:�#3��4�4����"�"�L�,��#M�N�N�N�N�Nrc�D�|j�|j��dSr&)rlrIr(r�s   rr�zFrameSymbolVisitor.visit_Macros ������4�9�%�%�%�%�%rc�`�|j|fi|��|j�|j��dSr&)r�rlrIr/r�s   r�visit_ImportzFrameSymbolVisitor.visit_Imports;�����4�*�*�6�*�*�*�����4�;�'�'�'�'�'rc���|j|fi|��|jD]R}t|t��r!|j�|d���8|j�|���SdS)Nr)r��names�
isinstance�tuplerlrI)r"rr$r(s    r�visit_FromImportz#FrameSymbolVisitor.visit_FromImports������4�*�*�6�*�*�*��J�	)�	)�D��$��&�&�
)���"�"�4��7�+�+�+�+���"�"�4�(�(�(�(�		)�	)rc�R�|j|jfi|��|j|jfi|��dS)z'Visit assignments in the correct order.N)rrr/r�s   r�visit_AssignzFrameSymbolVisitor.visit_Assigns@����
�4�9�'�'��'�'�'���
�4�;�)�)�&�)�)�)�)�)rc�,�|j|jfi|��dS)zqVisiting stops at for blocks.  However the block sequence
        is visited as part of the outer scope.
        N)r�iterr�s   rr�zFrameSymbolVisitor.visit_For#s&��	��
�4�9�'�'��'�'�'�'�'rc�,�|j|jfi|��dSr&)rr|r�s   rr~z"FrameSymbolVisitor.visit_CallBlock)s$����
�4�9�'�'��'�'�'�'�'rc�,�|j|jfi|��dSr&)r�filterr�s   rr�z$FrameSymbolVisitor.visit_FilterBlock,s$����
�4�;�)�)�&�)�)�)�)�)rc�D�|jD]}|�|���dSr&)�valuesr)r"rr$r/s    rr�zFrameSymbolVisitor.visit_With/s2���k�	�	�F��J�J�v�����	�	rc�,�|j|jfi|��dS)zStop visiting at block assigns.N)rr/r�s   rryz$FrameSymbolVisitor.visit_AssignBlock3s$����
�4�;�)�)�&�)�)�)�)�)rc��dS)zStop visiting at scopes.Nrjr�s   rr�zFrameSymbolVisitor.visit_Scope7����rc��dS)zStop visiting at blocks.Nrjr�s   rr�zFrameSymbolVisitor.visit_Block:r�rc��dS)z!Do not visit into overlay scopes.Nrjr�s   rr�z%FrameSymbolVisitor.visit_OverlayScope=r�rr�)F)'r^r_r`�__doc__r#r�Name�boolr;rdr��NSRefr��Ifr��Macror��Importr��
FromImportr��Assignr�r�r�r�r~�FilterBlockr�r�r�r�ry�Scoper��Blockr�r�r�rjrrrr�s�������(�(�����8=�	)�	)��J�	)�04�	)�HI��	)�	
�	)�	)�	)�	)�%���%�q�u�%��%�%�%�%�O�U�X�O���O�4�O�O�O�O�$&���&�q�u�&��&�&�&�&�(���(���(�4�(�(�(�(�)�U�%5�)���)�4�)�)�)�)�*���*���*�4�*�*�*�*�
(�e�i�(�1�5�(�T�(�(�(�(�(�E�O�(�q�u�(��(�(�(�(�*�e�&7�*�1�5�*�T�*�*�*�*��u�z��Q�U��t�����*�e�&7�*�1�5�*�T�*�*�*�*�'���'�q�u�'��'�'�'�'�'���'�q�u�'��'�'�'�'�0�u�'9�0�Q�U�0�t�0�0�0�0�0�0rrr&)�typingr;�rrrrKrNrFrGr�rcrarrrr'rrjrr�<module>r�sv������������ � � � � � ������� ��LP����:�e�j�!��34�:�i�3H�������?C���
�*��&'�j��&;�������M�M�M�M�M�M�M�M�`7V�7V�7V�7V�7V�+�7V�7V�7V�tV0�V0�V0�V0�V0��V0�V0�V0�V0�V0r

Hacked By AnonymousFox1.0, Coded By AnonymousFox