HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/rich/__pycache__/constrain.cpython-310.pyc
o

;j�@sXddlmZmZddlmZddlmZer"ddlmZm	Z	m
Z
mZGdd�de�ZdS)	�)�Optional�
TYPE_CHECKING�)�JupyterMixin)�Measurement)�Console�ConsoleOptions�RenderableType�RenderResultc@sXeZdZdZddddeeddfdd	�Z	
			
		ddd�Z	
			
		ddd�ZdS)�	Constrainz�Constrain the width of a renderable to a given number of characters.

    Args:
        renderable (RenderableType): A renderable object.
        width (int, optional): The maximum width (in characters) to render. Defaults to 80.
    �P�
renderabler	�width�returnNcCs||_||_dS�N)r
r)�selfr
r�r�B/opt/saltstack/salt/lib/python3.10/site-packages/rich/constrain.py�__init__s
zConstrain.__init__�consoler�optionsrr
ccsD�|jdur|jVdS|�t|j|j��}|�|j|�EdHdSr)rr
�update_width�minZ	max_widthZrender)rrrZ
child_optionsrrr�__rich_console__s
�
zConstrain.__rich_console__rcCs*|jdur|�|j�}t�|||j�}|Sr)rrr�getr
)rrrZmeasurementrrr�__rich_measure__s
zConstrain.__rich_measure__)r)rrrrrr
)rrrrrr)	�__name__�
__module__�__qualname__�__doc__r�intrrrrrrrr
s"��
�	���rN)
�typingrrZjupyterrZmeasurerrrrr	r
rrrrr�<module>s