HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/jinja2/__pycache__/debug.cpython-39.pyc
a

�`Q!�@s�ddlZddlmZddlmZddlmZddlmZddlm	Z	ddd	�Z
d
d�Zdd
�Zej
dkrrdd�ZnXer�zddlZWney�dd�ZYq�0dd�Zn"ddlZGdd�dej�Zdd�ZdS)�N)�CodeType�)�TemplateSyntaxError)�PYPY)�
internal_code)�missingc	Cst��\}}}t|t�rd|jsdd|_||_z|�d�WntyJYn0t|d|j	pZd|j
�}n|j}g}|dur�|jj
tvr�|j}qn|jj�d�}|dur�|�|j�}t|||j	|�}|�|�n
|�|�|j}qnd}t|�D]}t||�}q�|||fS)a�Rewrite the current exception to replace any tracebacks from
    within compiled template code with tracebacks that look like they
    came from the template source.

    This must be called within an ``except`` block.

    :param exc_info: A :meth:`sys.exc_info` tuple. If not provided,
        the current ``exc_info`` is used.
    :param source: For ``TemplateSyntaxError``, the original source if
        known.
    :return: A :meth:`sys.exc_info` tuple that can be re-raised.
    TNz	<unknown>Z__jinja_template__)�sys�exc_info�
isinstancerZ
translated�source�with_traceback�AttributeError�fake_traceback�filename�lineno�tb_next�tb_frame�f_coder�	f_globals�getZget_corresponding_lineno�	tb_lineno�append�reversed�tb_set_next)	r�exc_type�	exc_value�tb�stack�templaterZfake_tbr�r�./usr/lib/python3/dist-packages/jinja2/debug.py�rewrite_traceback_stack
s8
�
r!cCsd|dur"t|jj�}|�dd�ni}|||d�}td|dd|d�}z�d}|dur�|jjj}|d	krpd
}n|�d�r�d|d
d�}g}	ddddddddddd|fd|fddddfD]P}
t|
t	�r�|	�
|
d�q�z|	�
t|d|
��Wq�t�yYq�Yq�0q�t
|	�}Wnt�y*Yn0zt|||�Wn"t�y^t��djYS0dS) a,Produce a new traceback object that looks like it came from the
    template source instead of the compiled code. The filename, line
    number, and location name will point to the template, and the local
    variables will be the current template context.

    :param exc_value: The original exception to be re-raised to create
        the new traceback.
    :param tb: The original traceback to get the local variables and
        code info from.
    :param filename: The template filename.
    :param lineno: The line number in the template source.
    N�__jinja_exception__)�__name__�__file__r"�
rzraise __jinja_exception__�execr�rootztop-level template codeZblock_z
block "%s"�ZargcountZposonlyargcountZkwonlyargcountZnlocalsZ	stacksize�flags�codeZconsts�namesZvarnamesr�nameZfirstlinenoZlnotabZfreevarsZcellvarsZco_�)�get_template_localsr�f_locals�pop�compiler�co_name�
startswithr
�tupler�getattrr
r�	Exceptionr&�
BaseExceptionrr	r)rrrr�locals�globalsr*�locationZfunctionZ	code_args�attrrrr rLsb
�

�
rc		Cs�|�d�}|r|����}ni}i}|��D]v\}}|�d�r,|turHq,z|�dd�\}}}t|�}Wnty|Yq,Yn0|�|d�d}||kr,||f||<q,|��D]*\}\}}|tur�|�	|d�q�|||<q�|S)zlBased on the runtime locals, get the context that would be
    available at that point in the template.
    �contextZl_�_r-)���rN)
rZget_all�copy�itemsr3r�split�int�
ValueErrorr0)	Zreal_locals�ctx�dataZlocal_overridesr,�valuer=ZdepthZ	cur_depthrrr r.�s*


r.)��cCs
||_|S�N�r�rrrrr r�srcCs|SrIrrKrrr r�scs�fdd�}tj||d�S)Ncs$|jdkr|jddkr�S|��S)N�__getattribute__rr)�opname�argsZdelegate)�oprJrr �
controller�sztb_set_next.<locals>.controller)�obj)�tputilZ
make_proxy)rrrPrrJr r�sc@s*eZdZdeje���fdejfgZdS)�_CTracebackZ
PyObject_HEADrN)	r#�
__module__�__qualname__�ctypesZc_byte�object�
__sizeof__�	py_objectZ_fields_rrrr rS�s�rScCsbt�t|��}|jdur:t�|j�}t��|_tj�|�|dur^t�|�}tj�|�||_|SrI)	rSZfrom_address�idrrVrYZ	pythonapiZ	Py_DecRefZ	Py_IncRef)rrZc_tbZ	c_tb_nextrrr r�s


)N)r�typesr�rZ_compatrZutilsrrr!rr.�version_inforrR�ImportErrorrVZ	StructurerSrrrr �<module>s&
B[,