
    ~fs                    Z    d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlm	Z	 d	dZd
ddZ
y)z*
Utilities imported from ipython_genutils
    )annotationsN)dedent)indent)Listc                    t        | d      S )Nz    )_indent)vals    O/var/www/cvtools/html/venv/lib/python3.12/site-packages/traitlets/utils/text.pyr   r      s    3    c                x   t        j                  dt         j                        }t        |       j	                         } |j                  |       ddd   }g }t        j                  dt         j                        }|D ]:  }|j                  |      t        j                  ||      }|j                  |       < |S )a  Wrap multiple paragraphs to fit a specified width.

    This is equivalent to textwrap.wrap, but with support for multiple
    paragraphs, as separated by empty lines.

    Returns
    -------

    list of complete paragraphs, wrapped to fill `ncols` columns.
    z
\n(\s*\n)+N   z\n\s+)
recompile	MULTILINEr   stripsplitsearchtextwrapfillappend)textncolsparagraph_re
paragraphsout_ps	indent_reps          r
   wrap_paragraphsr      s     ::mR\\:L$<D##D)#A#.JF

8R\\2I  A&a'Aa Mr   )r	   strreturnr   )P   )r   r   r   intr    z	List[str])__doc__
__future__r   r   r   r   r   r   typingr   r    r   r
   <module>r'      s(    # 	   &  r   