AlkantarClanX12

Your IP : 18.219.253.199


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/formatting.cpython-311.pyc

�

j��f�%�
��UddlZddlmZddlmZddlmZddlm	Z	dZ
ejee
d<dejejeefd	ejed
ffd�Zdejejeefded	ejejed
ffd
�Z				ddededededed	efd�ZGd�d��Zdejed	ejeeffd�ZdS)�N)�contextmanager)�gettext�)�term_len)�	split_opt�FORCED_WIDTH�rows�return.c��i}|D]K}t|��D]9\}}t|�|d��t|����||<�:�Lt	d�t|�����D����S)Nrc3� K�|]	\}}|V��
dS)N�)�.0�x�ys   �p/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/click/formatting.py�	<genexpr>z measure_table.<locals>.<genexpr>s&����6�6�t�q�!��6�6�6�6�6�6�)�	enumerate�max�getr�tuple�sorted�items)r	�widths�row�idx�cols     r�
measure_tablers���!�F��A�A��!�#���	A�	A�H�C���f�j�j��a�0�0�(�3�-�-�@�@�F�3�K�K�	A��6�6�v�f�l�l�n�n�5�5�6�6�6�6�6�6r�	col_countc#�HK�|D]}|d|t|��z
zzV��dS)N)�)�len)r	rrs   r�	iter_rowsr#sE�����3�3���E�Y��S���1�2�2�2�2�2�2�3�3r�Nr!F�text�width�initial_indent�subsequent_indent�preserve_paragraphsc����
��ddlm}|���}||||d���}|s|�|��Sg�g�d�
d
��
�fd�}|���D]]}|s
|��d�
��
�5t|��}	|���}|	t|��z
�
��|���^|��g}
�D]�\�
}}|�d�
z��5|r)|
�|�	|����n(|
�|�|����ddd��n#1swxYwY��d	�
|
��S)a�A helper function that intelligently wraps text.  By default, it
    assumes that it operates on a single paragraph of text but if the
    `preserve_paragraphs` parameter is provided it will intelligently
    handle paragraphs (defined by two empty lines).

    If paragraphs are handled, a paragraph can be prefixed with an empty
    line containing the ``\b`` character (``\x08``) to indicate that
    no rewrapping should happen in that block.

    :param text: the text that should be rewrapped.
    :param width: the maximum width for the text.
    :param initial_indent: the initial indent that should be placed on the
                           first line as a string.
    :param subsequent_indent: the indent string that should be placed on
                              each consecutive line.
    :param preserve_paragraphs: if this flag is set then the wrapping will
                                intelligently handle paragraphs.
    r)�TextWrapperF)r'r(�replace_whitespaceNr
c	����sdS�d���dkr6���pddd��dd���f��n-���pddd����f���dd�=dS)Nr�T�
rF� )�strip�append�join)�buf�indent�ps���r�
_flush_parzwrap_text.<locals>._flush_parFs�����	��F��q�6�<�<�>�>�T�!�!�
�H�H�f�k��4����3�q�r�r�7�);�);�<�=�=�=�=�
�H�H�f�k��5�#�(�(�3�-�-�8�9�9�9�����F�F�Frr0z

�r
N)�	_textwrapr+�
expandtabs�fill�
splitlinesr�lstripr2�extra_indent�indent_onlyr3)r%r&r'r(r)r+�wrapperr7�line�orig_len�rv�rawr4r5r6s            @@@r�	wrap_textrEs�����2'�&�&�&�&�&��?�?���D��k�
�%�+� �	���G��"��|�|�D�!�!�!�)+�A��C�
�F������������!�!�	�	���	��J�L�L�L��F�F��~�#�D�>�>���{�{�}�}��!�H�T�N�N�2���J�J�t������J�L�L�L�	�B��.�.����T�
�
!�
!�#��,�
/�
/�	.�	.��
.��	�	�'�-�-�d�3�3�4�4�4�4��	�	�'�,�,�t�,�,�-�-�-�		.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.���;�;�r�?�?�s�0AE�E	�E	c	��eZdZdZ			d dedejedejeddfd�Zd	eddfd
�Z	d!d�Z
d!d�Z	d"dededejeddfd�Zdeddfd�Z
d!d�Zdeddfd�Z		d#dejejeefdededdfd�Zededejdfd���Zedejdfd���Zdefd�ZdS)$�
HelpFormattera�This class helps with formatting text-based help pages.  It's
    usually just needed for very special internal cases, but it's also
    exposed so that developers can write their own fancy outputs.

    At present, it always writes into memory.

    :param indent_increment: the additional increment for each level.
    :param width: the width for the text.  This defaults to the terminal
                  width clamped to a maximum of 78.
    �N�indent_incrementr&�	max_widthr
c���ddl}||_|�d}|�At}|�8tt	|���j|��dz
d��}||_d|_g|_	dS)Nr�PrH�2)
�shutilrIrr�min�get_terminal_size�columnsr&�current_indent�buffer)�selfrIr&rJrNs     r�__init__zHelpFormatter.__init__rsx��	�
�
�
� 0������I��=� �E��}��C�� 8� 8� :� :� B�I�N�N�QR�R�TV�W�W����
����#%����r�stringc�:�|j�|��dS)z1Writes a unicode string into the internal buffer.N)rSr2)rTrVs  r�writezHelpFormatter.write�s������6�"�"�"�"�"rc�0�|xj|jz
c_dS)zIncreases the indentation.N�rRrI�rTs rr5zHelpFormatter.indent�������t�4�4����rc�0�|xj|jzc_dS)zDecreases the indentation.NrZr[s r�dedentzHelpFormatter.dedent�r\rr!�prog�args�prefixc�$�|�td���d�}|d|j���|�d�}|j|jz
}|t|��dzkr9dt|��z}|�t||||�����nx|�|��|�d��dt
|jt|����dzz}|�t||||�����|�d��dS)	z�Writes a usage line into the buffer.

        :param prog: the program name.
        :param args: whitespace separated list of arguments.
        :param prefix: The prefix for the first line. Defaults to
            ``"Usage: "``.
        NzUsage:r0�>�)r'r(r/�)�_rRr&rrXrEr)rTr_r`ra�usage_prefix�
text_widthr5s       r�write_usagezHelpFormatter.write_usage�sE���>��(���&�&�&�F� �@�4�#6�@�@�@��@�@�@���Z�$�"5�5�
��(�<�0�0�2�5�6�6��8�L�1�1�1�F��J�J����#/�&,�	���
�
�
�
�
�J�J�|�$�$�$��J�J�t�����C�� 3�X�f�5E�5E�F�F��J�K�F��J�J���*�V�v����
�
�
�	
�
�
�4�����r�headingc�L�|�dd|j���|�d���dS)z!Writes a heading into the buffer.r!rcz:
N)rXrR)rTrjs  r�
write_headingzHelpFormatter.write_heading�s6���
�
�b�=�4�.�=�=�=��=�=�=�>�>�>�>�>rc�B�|jr|�d��dSdS)z#Writes a paragraph into the buffer.r/N)rSrXr[s r�write_paragraphzHelpFormatter.write_paragraph�s.���;�	��J�J�t������	�	rr%c	��d|jz}|�t||j||d�����|�d��dS)zaWrites re-indented text into the buffer.  This rewraps and
        preserves paragraphs.
        r0T)r'r(r)r/N)rRrXrEr&)rTr%r5s   r�
write_textzHelpFormatter.write_text�sd���t�*�*���
�
����
�%�"(�$(�
�
�
�	
�	
�	
�	
�
�
�4�����r�r	�col_max�col_spacingc��t|��}t|��}t|��dkrtd���t	|d|��|z}t|t|����D�]_\}}|�dd|j���|����|s|�d���@t|��||z
kr)|�d|t|��z
z��n5|�d��|�d||jzz��t|j
|z
dz
d��}t||d	�
��}	|	���}
|
rS|�|
d�d���|
dd�D](}|�dd||jz���|�d����)��J|�d����adS)
anWrites a definition list into the buffer.  This is how options
        and commands are usually formatted.

        :param rows: a list of two item tuples for the terms and values.
        :param col_max: the maximum width of the first column.
        :param col_spacing: the number of spaces between the first and
                            second column.
        rHz(Expected two columns for definition listrr!rcr/r0�
T)r)rN)
�listrr"�	TypeErrorrOr#rXrRrrr&rEr<)rTr	rrrsr�	first_col�first�secondrh�wrapped_text�linesrAs            r�write_dlzHelpFormatter.write_dl�s���D�z�z���t�$�$���v�;�;�!����F�G�G�G���q�	�7�+�+�k�9�	�&�t�S��[�[�9�9�	!�	!�M�E�6��J�J�"�<�t�2�<�<�<�U�<�<�=�=�=��
��
�
�4� � � ������)�k�"9�9�9��
�
�3�)�h�u�o�o�"=�>�?�?�?�?��
�
�4� � � ��
�
�3�)�d�.A�"A�B�C�C�C��T�Z�)�3�a�7��<�<�J�$�V�Z�T�R�R�R�L� �+�+�-�-�E��
!��
�
�e�A�h�?�?�?�+�+�+�!�!�"�"�I�S�S�D��J�J�"�Q�y�4�3F�'F�Q�Q�Q��Q�Q�Q�R�R�R�R�S��
�
�4� � � � �+	!�	!r�namec#��K�|���|�|��|���	dV�|���dS#|���wxYw)z�Helpful context manager that writes a paragraph, a heading,
        and the indents.

        :param name: the section name that is written as heading.
        N)rnrlr5r^)rTr~s  r�sectionzHelpFormatter.section�sl����	
���������4� � � ����
�
�
�	��E�E�E��K�K�M�M�M�M�M��D�K�K�M�M�M�M���s�A�A1c#�K�|���	dV�|���dS#|���wxYw)z1A context manager that increases the indentation.N)r5r^r[s r�indentationzHelpFormatter.indentation
sF����	
���
�
�
�	��E�E�E��K�K�M�M�M�M�M��D�K�K�M�M�M�M���s	�2�Ac�6�d�|j��S)zReturns the buffer contents.r!)r3rSr[s r�getvaluezHelpFormatter.getvalues���w�w�t�{�#�#�#r)rHNNr8)r!N)rqrH)�__name__�
__module__�__qualname__�__doc__�int�t�OptionalrU�strrXr5r^rirlrnrp�Sequence�Tupler}r�Iteratorr�r�r�r
rrrGrGfs5������	�	�!"�!%�%)�	&�&��&��z�#��&��:�c�?�	&�

�&�&�&�&�&#�C�#�D�#�#�#�#�5�5�5�5�5�5�5�5�
DH�&�&��&�"�&�12��C��&�	
�&�&�&�&�P?�S�?�T�?�?�?�?�����
�s��t�����&��	*!�*!��j����c��*�+�*!��*!��	*!�

�*!�*!�*!�*!�X��C��A�J�t�$4�����^����Q�Z��-�����^��$�#�$�$�$�$�$�$rrG�optionsc��g}d}|D]C}t|��d}|dkrd}|�t|��|f���D|�d����d�d�|D����|fS)	aGiven a list of option strings this joins them in the most appropriate
    way and returns them in the form ``(formatted_string,
    any_prefix_is_slash)`` where the second item in the tuple is a flag that
    indicates if any of the option prefixes was a slash.
    Fr�/Tc��|dS)Nrr
)rs r�<lambda>zjoin_options.<locals>.<lambda>,s
��!�A�$�r)�keyz, c3�&K�|]}|dV��
dS)rNr
)rrs  rrzjoin_options.<locals>.<genexpr>-s&����&�&�a�Q�q�T�&�&�&�&�&�&r)rr2r"�sortr3)r�rC�any_prefix_is_slash�optras     r�join_optionsr�s���
�B����&�&���3����"���S�=�=�"&��
�	�	�3�v�;�;��$�%�%�%�%��G�G���G�����9�9�&�&�2�&�&�&�&�&�(;�;�;r)r$r!r!F)�typingr��
contextlibrrrf�_compatr�parserrrr�r��__annotations__�Iterabler�r�rr�r#�boolrErGr�r�r
rr�<module>r�s��������%�%�%�%�%�%� � � � � � �������������!%��a�j��o�$�$�$�7��
�1�7�3��8�#4�5�7�!�'�#�s�(�:K�7�7�7�7�3�
�*�Q�W�S�#�X�&�
'�3�47�3��Z����S��!�"�3�3�3�3���� %�F�F�

�F��F��F��	F�
�F�	�
F�F�F�F�Rr$�r$�r$�r$�r$�r$�r$�r$�j<�!�*�S�/�<�a�g�c�4�i�.@�<�<�<�<�<�<r