← back to Atmos Game
assets/gen/.venv/lib/python3.12/site-packages/click/__pycache__/_textwrap.cpython-312.pyc
56 lines
�
c�bj~ � �z � d dl mZ d dlmZ d dlZd dlmZ ddlm Z ddlm
Z
d
d�Z G d� d ej � Zy)� )�annotationsN)�contextmanager� )�_ansi_re)�term_lenc �� � |dk ryd}d}d}t | � }||k rAt j | |� }|�|j � }�.|dz
}|dz
}|}||k\ rn||k r�A| d| S )z�Return the longest prefix of ``text`` containing at most ``n`` visible
characters.
ANSI escape sequences inside the prefix are kept intact and do not count
toward the visible width. A cut is never placed inside an escape sequence.
r � Nr )�lenr �match�end)�text�n�visible�i�cutr �ms �f/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/click/_textwrap.py�_truncate_visibler s� � � �A�v���G� �A�
�C�
�d�)�C�
�c�'��N�N�4��#���=�����A���1��� �Q������a�<�� �c�'� ���:�� c �N � e Zd ZdZ dd�Zdd�Zed d�� Zd
d�Zy)�TextWrappera� ``textwrap.TextWrapper`` variant that measures widths by visible
character count.
ANSI escape sequences embedded in chunks, indents, or the placeholder are
excluded from the width budget. Without this, styled help text (a styled
``Usage:`` prefix, a colorized option name, ...) would be wrapped earlier
than its visible length warrants and tokens would split mid-word.
c �� � t ||z
d� }| j r6|d }t ||� }|t |� d }|j |� ||d<