403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/reportlab/platypus/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/reportlab/platypus/__pycache__/xpreformatted.cpython-311.pyc
�

~G�b�2���dZdZdZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZd�Zd	�Zd
�Zd�ZGd�d
e��ZGd�de��ZedkrsddlZd�Zd�Zd�ZddlmZmZe��Z e dZ!ede!���Z"de"_#dde"dddfdde"dddfdde d dd!d"ffD]\Z$Z%Z&Z'Z(Z)e)ree$e&e%e'e(���dSdS)#)�
XPreformatted�PythonPreformattedz3.5.20z:A 'rich preformatted text' widget allowing internal markup�)�	PyFontify)�	Paragraph�_handleBulletWidth�	ParaLines�
_getFragWords�stringWidth�getAscentDescent�	imgVRange�imgNormV)�isSeq)�	_dedenterc��g}g}|dd�}|gkr�|d}|j}|d=|�d��}|dkr�||dzd�}|�|�|d|������|�|��g}|dkr*|�d|�|�����n|�|��|gk��|gkr|�|��|S)Nr�
���text�)r�find�append�clone�insert)�frags�lines�cline�W�w�t�i�tlefts        �B/usr/lib/python3/dist-packages/reportlab/platypus/xpreformatted.py�
_getFragLinesr#s	���E��E�
�a�a�a��A�
�r�'�'�
�a�D��
�F��
�a�D�
�F�F�4�L�L���a�4�4��a��c�d�d�G�E��L�L����a����e��,�,�-�-�-��L�L������E��b�y�y�����1�7�7��7�.�.�/�/�/���L�L��O�O�O��r�'�'�
�b�y�y�
���U�����L�c��|���}dD]"}t||��rt||���#|j||�|_|gS)N)rr)r�hasattr�delattrr)�blPara�start�stop�f�as     r"�
_split_blParar-&sR�������A�
�&�&���1�Q�<�<�%���1������l�5��:�&�A�G�
�3�Jr$c�,�|�d��S)N� )�countrs r"�_countSpacesr1.s���:�:�c�?�?�r$c�P�g}d}d}|D]�}|jdd�}|�||f��t|dd��}|r(t|dd��}t|d��r||_|t||j|j��z
}||�d��z
}��|||fS)z� given a fragment list return a list of lists
        [size, spaces, (f00,w00), ..., (f0n,w0n)]
        each pair f,w represents a style and some string
    rN�cbDefn�width�normalizedValuer/)	rr�getattrr&�_normalizerr
�fontName�fontSizer0)	r�maxWidthr�n�sr+r�cb�_ws	         r"�_getFragWordr?8s���
	�A�	�A�	�A�
�����v�a�a�a�y��	���!�D�����
�Q�x��
%�
%��
�	*���G�A�&�&�B��r�+�,�,�
*�!)���	�[��q�z�1�:�
6�
6�6��	
�T�Z�Z��_�_����
�a��7�Nr$c�&�eZdZdd�Zd�ZeZd�ZdS)rNrrc�P�||_|fd�}|�|||||��dS)Nc�L�d�t|pd|����S)Nrr)�joinr)r�dedents  r"�<lambda>z(XPreformatted.__init__.<locals>.<lambda>Ts ��d�i�i�	�$�*�"�V�8T�8T�.U�.U�r$)�
caseSensitive�_setup)�selfr�style�
bulletTextrrFrD�cleaners        r"�__init__zXPreformatted.__init__Rs8��*���&,�U�U�U�����D�%��U�G�<�<�<�<�<r$c
���d|_t|��s|g}n|}g}d}||}|j}t|j��}d}t|j||��d|_t|dt|dd����}	|	dv}
|j	}t|��}|dk�rl|d}
t|
d��r�|
j}|
j}t||��\}}d}|
j�d��}|D]�}t!|||��}||jkr||_t#||��}||z
}|�||�d��|f��|dz}|t|��kr||p|d	}��|
�|||||�
��}nP|
j}|
j}|D](}|dkr	|d}n|j}t#||��}�)|
�||���}t#|j|��|_|S|dkr2t1d|j|j|j|jd
|jzg���St5|��D�]�}t7||��\}}}|dd}
|
j}t|
j|��\}}|
���g}|dd|d	_|dd�D]�}|d���}
|d|
_|�|
��|
j}|
j}|
rct|
dd��}t|dd��r-t9t;|j|��|j|��\}}n't||��\}}nt||��\}}t#||��}t#||��}t?||��}��|dz
}|t|��kr||p|d	}t#||��}||z
}||jkr||_|�t1|||||||d��������t#|j|��|_t1d|���S)a/
        Returns a broken line structure. There are two cases

        A) For the simple case of a single formatting input fragment the output is
            A fragment specifier with
                - kind = 0
                - fontName, fontSize, leading, textColor
                - lines=  A list of lines
                
                    Each line has two items:
                    
                    1. unused width in points
                    2. a list of words

        B) When there is more than one input formatting fragment the out put is
            A fragment specifier with
                - kind = 1
                - lines =  A list of fragments each having fields:
                
                    - extraspace (needed for justified)
                    - fontSize
                    - words=word list
                    - each word is itself a fragment with
                    - various settings

        This structure can be used to easily draw paragraphs with the various alignments.
        You can supply either a single width or a list of widths; the latter will have its
        last item repeated until necessary. A 2-element list is useful when there is a
        different first line indent; a longer list could be created to facilitate custom wraps
        around irregular objects.r�autoLeadingr)r�offrrrr/���)�kindr�ascent�descentr9�)rQrg������ɿ)rQr9r8�	textColorrRrSrNr3r4T)�
extraSpace�	wordCount�wordsr9rRrS�currentWidth�preformatted) �
_width_maxrrI�floatr9rrJ�heightr6r�lenr&r8rr�splitr
�maxrrrQrrYr4rrUr#r?rr
�valign�min) rHr4�	maxWidthsr�linenor:rI�	fFontSize�
requiredWidthrN�
calcBoundsr�nFragsr+r9r8rRrSrQ�L�lrYrVr(r;r�maxSize�	maxAscent�
minDescentrXr r3s                                 r"�
breakLineszXPreformatted.breakLinesWs���@����U�|�|�	 �%��Y�Y��i������V�$���
���%�.�)�)�	��
�	�4�?�5��;�;�;�����d�=���}�R�1P�1P�Q�Q�� �
�2�
��
���E�
�
���1�9�9��a��A��q�� � �
9��:���:��"2�8�H�"E�"E�������&�,�,�t�$�$���\�\�A�#.�q��(�#C�#C�L�#�d�o�5�5��t��$'��]�$C�$C�M�!)�,�!6�J��L�L�*�Q�W�W�S�\�\�,�!G�H�H�H�#�A�X�F�%�c�)�n�n�4�J��6�9J�[�i�XZ�m�H�H����d�%�v�g�_g��h�h����v������D�D�A��Q�w�w�'(��t���'(�~��$'��]�$C�$C�M�M����d�%��8�8���T�Z�
�6�6�D�J��M�
�Q�Y�Y��!�e�n�u�~�&+�o�e�n�UY�Z_�Zh�Uh�"$�&�&�&�
&�#�5�)�)�
{�
{��%1�!�H�%=�%=�"��a���a�D��G���*��(8���G�(L�(L�%�	�:��������!"�1��a���b�	���1�2�2��9�9�A��!��
�
���A��Q�4�A�F��L�L��O�O�O� �z�H� �z�H�!�N�!(��8�D�!9�!9��"�6�'�!�4�4�R�-6�x��
�h�7W�7W�X^�Xe�fn�-o�-o�N�G�F�F�.>�x��.Q�.Q�O�F�G�G�*:�8�H�*M�*M����!�'�(�3�3�G� #�I�f� 5� 5�I�!$�Z��!8�!8�J�J��!���!�#�i�.�.�0�F�Y�v�5F�W�)�TV�-�� #�L�� ?� ?�
�%��4�
��$�/�1�1�\�4�?����Y�*�q�PU�`g�py�CM�[g�uy�z�z�z�{�{�{�{��T�Z�
�6�6�D�J��!�5�1�1�1�1r$c��tS)N)r-)rHs r"�_get_split_blParaFuncz#XPreformatted._get_split_blParaFunc�s���r$)NNrr)�__name__�
__module__�__qualname__rLrn�
breakLinesCJKrp�r$r"rrQsQ������=�=�=�=�
x�x�x�t�M�����r$rc�8�eZdZdZddddddd�Zdd�Zd�Zd
�Zd	S)rzGUsed for syntax-colored Python code, otherwise like XPreformatted.
    )rr)z<font color="green">�</font>)z<font color="blue"><b>z</b></font>)z<font color="black">rw)z<font color="red">rw)z<font color="gray">rw)�rest�comment�keyword�	parameter�
identifier�stringNrc��|r(|�|�|����}t�||||||���dS)N)rJrDr)�fontify�
escapeHtmlrrL)rHrrIrJrDrs      r"rLzPythonPreformatted.__init__�sO���	7��<�<����� 5� 5�6�6�D����t�T�5�J�f�[`��a�a�a�a�ar$c��|�dd��}|�dd��}|�dd��}|S)N�&z&amp;�<z&lt;�>z&gt;)�replace)rHrr<s   r"r�zPythonPreformatted.escapeHtml�s@���L�L��g�&�&��
�I�I�c�6�"�"��
�I�I�c�6�"�"���r$c���|ddkr
|dd�}tj|��}d}d}|D]9\}}}}||||�z}|j|\}	}
||	z|||�z|
z}|}�:|||d�z}|S)z/Return a fontified version of some Python code.rrrNr)rr�formats)rH�code�tags�
fontifiedCode�pos�kr �j�dummyr<�es           r"rzPythonPreformatted.fontify�s�����7�d�?�?�����8�D�� ��&�&���
���"�	�	�N�A�q�!�U�)�D��Q��K�7�M��<��?�D�A�q�)�A�-��Q�q�S�	�9�A�=�M��C�C�%��S�T�T�
�2�
��r$)NrN)rqrrrs�__doc__r�rLr�rrur$r"rr�st�������� �:�@�:�8�9�
<�<�G�b�b�b�b�
�������r$r�__main__Nc��tdt|��z��|jj}t	|��}t
jj}t|��D]q}||}|j	}t	|��}|d|||j
fz��t|��D]}|d|||jfz���t���rdS)Nz(
############dumpXPreforemattedLines(%s)zline%d: %d(%d)
  z %d:'%s')�print�strr(rr^�sys�stdout�write�rangerXrWr)	�Prr;�outwrj�linerX�nwordsrs	         r"�dumpXPreformattedLinesr�s���
�9�C��F�F�B�C�C�C������u�:�:��
�Z�
���q���	�	�A���8�D��J�E���Z�Z�F��D�%��6�$�.�(A�A�B�B�B��6�]�]�
3�
3����Z��5��8�=� 1�1�2�2�2�2��G�G�G�G�	�	r$c	���tdt|��z��|j}t|��}t	|��D]!}td|||jfz���"tjj}d}t|��D]g}d}t|d��D]M}|d|||dfz��|dz}|dd�D]}|d|dz���t���N|dz}�hdS)Nz(
############dumpXPreforemattedFrags(%s)zfrag%d: '%s'rihzfrag%d.%d: size=%drz '%s')r�r�rr^r�rr�r�r�r#r	)r�rr;rjr�rirrs        r"�dumpXPreformattedFragsr�s#��
�9�C��F�F�B�C�C�C�����u�:�:���q���	7�	7�A��.�A�u�Q�x�}�#5�5�6�6�6�6�
�Z�
��
���u�%�%�	�	�A��A�"�1�S�)�)�
�
����)�Q��1�Q�4�L�8�9�9�9���E���1�2�2��)�)�A��D��1�Q�4��(�(�(�(�������A��A�A�	�	r$c�:�t|||���}t|��|�||��\}}t|��|�||��}t|��|D])}	|	�||��t|	��d}�*dS)N)rDi�)rr��wrapr�r_)
rrIrD�aW�aHr�r�h�Sr<s
          r"�try_itr�#s���
��U�&�
1�
1�
1���q�!�!�!��f�f�R��n�n���!��q�!�!�!�
�G�G�B�r�N�N���q�!�!�!��	�	�A�
�F�F�2�b�M�M�M�"�1�%�%�%��B�B�	�	r$)�getSampleStyleSheet�ParagraphStyle�BodyText�discussiontext)�parent�	Helveticaa?


The <font name=courier color=green>CMYK</font> or subtractive

method follows the way a printer
mixes three pigments (cyan, magenta, and yellow) to form colors.
Because mixing chemicals is more difficult than combining light there
is a fourth parameter for darkness.  For example a chemical
combination of the <font name=courier color=green>CMY</font> pigments generally never makes a perfect

black -- instead producing a muddy color -- so, to get black printers
don't use the <font name=courier color=green>CMY</font> pigments but use a direct black ink.  Because
<font name=courier color=green>CMYK</font> maps more directly to the way printer hardware works it may
be the case that &amp;| &amp; | colors specified in <font name=courier color=green>CMYK</font> will provide better fidelity
and better control when printed.


g�|@gffffffE@av

   This is a non rearranging form of the <b>Paragraph</b> class;
   <b><font color=red>XML</font></b> tags are allowed in <i>text</i> and have the same

      meanings as for the <b>Paragraph</b> class.
   As for <b>Preformatted</b>, if dedent is non zero <font color=red size=+1>dedent</font>
       common leading spaces will be removed from the
   front of each line.

�z�    <font color=blue>class </font><font color=red>FastXMLParser</font>:
        # Nonsense method
        def nonsense(self):
            self.foo = 'bar'
�Codeg333333@r)*�__all__�__version__r��
reportlab.libr�reportlab.platypus.paragraphrrrr	r
rrr
�reportlab.lib.utilsr�reportlab.platypus.flowablesrr#r-r1r?rrrqr�r�r�r��reportlab.lib.stylesr�r��
styleSheet�B�DTstyler8rrDrIr�r��activerur$r"�<module>r�s�����
��H��#�#�#�#�#�#�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�%�%�%�%�%�%�2�2�2�2�2�2����,���������2D�D�D�D�D�I�D�D�D�L'�'�'�'�'��'�'�'�R�Z����J�J�J�������&
�
�
�I�H�H�H�H�H�H�H�$�$�&�&�J��:��A��n�-�a�8�8�8�G�!�G��2�$�g�u�d�A�%1�&
��w��t�Q�
 ��
�z�&��5�#�q�*�=$0�%3�%3�+��f�U�B��F�J�2�6�6�$�u�V�B�r�2�2�2��s��h%3�%3r$

Youez - 2016 - github.com/yon3zu
LinuXploit