lfQ!ddlZddlmZddlmZddlmZddlmZddlm Z ddZ d Z d Z ej d krd ZdSer ddlZd ZdS#e$rdZYdSwxYwddlZGddejZdZdS)N)CodeType)TemplateSyntaxError)PYPY) internal_code)missingctj\}}}t|tr[|jsTd|_||_ |dn#t$rYnwxYwt|d|j pd|j }n|j }g}||j j tvr|j }|j jd}|G||j}t|||j |}||n|||j }|d}t)|D]}t+||}|||fS)aRewrite 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 __jinja_template__)sysexc_info isinstancer translatedsourcewith_tracebackAttributeErrorfake_tracebackfilenamelinenotb_nexttb_framef_coder f_globalsgetget_corresponding_lineno tb_linenoappendreversed tb_set_next) rexc_type exc_valuetbstacktemplaterfake_tbrs l/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/debug.pyrewrite_traceback_stackr& s"lnnHi)011):N# !    $ $T * * * *    D   tY/>; @P   Z E . ;  . .B ;(,,-ABB  66r|DDF$YH4EvNNG LL ! ! ! ! LL    Z! .$Guoo++b'** Y ''sA A&%A&c|0t|jj}|ddni}|||d}t d|dz zdz|d} d}|<|jjj}|d krd }n"|d r d |d dz}g} ddddddddddd|fd|fddddfD]j} t| tr| | d3 | t|d| z[#t$rYgwxYwt| }n#t$rYnwxYw t|||dS#t $r!t#jdjcYSwxYw) 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 codeblock_z block "%s"argcountposonlyargcountkwonlyargcountnlocals stacksizeflagscodeconstsnamesvarnamesrname firstlinenolnotabfreevarscellvarsco_)get_template_localsrf_localspopcompilerco_name startswithr tuplergetattrrr Exceptionr, BaseExceptionr r r) r r!rrlocalsglobalsr6locationfunction code_argsattrs r%rrLs ~%R[%9:: ($////(G 46A:&)DDhPV W WD2  >{)1H6!!4$$X.. 7'(122,6              " X     !   D$$&&   a)))   ut|!.controllers49 222rwqzY7N7N"N{{}}$rh)obj)tputil make_proxy)r!rrps ` r%rrs4 % % % % % $ZR888 8rhc|Srfrgs r%rrsIrhcleZdZdejezfdejfgZdS) _CTraceback PyObject_HEADrN) r) __module__ __qualname__ctypesc_byteobject __sizeof__ py_object_fields_rurhr%rwrwsCfmffhh.A.A.C.CC D ( )  rhrwcztt|}|jPt j|j}t j|_tj||:t j|}tj|||_|Srf) rw from_addressidrr{r pythonapi Py_DecRef Py_IncRef)r!rc_tb c_tb_nexts r%rrs''2// : !(44I!+--DL   & &y 1 1 1  (11I   & &y 1 1 1$DL rhrf)r typesrr_compatrutilsrrr&rrA version_inforrr ImportErrorr{ Structurerwrurhr%rs !!!!!! ?(?(?(?(DX)X)X)v)))Xv  29  9 9 9 9 9       *MMM     f&   sA AA