§
    sŠtjL  ã                  ó¸  — d dl mZ d dlZd dlmZ ddlmZ ddlmZm	Z	  ej
        d¦  «        Zdd„Zddd„Zedk    rœddlmZ  ed¬¦  «        Ze                     d¦  «          e e	dd¦  «        ¦  «          ed¬¦  «        Ze                     ¦   «          e                     d¦  «         e                     ¦   «          e                     d¦  «         dS dS ) é    )ÚannotationsN)ÚIterableé   )Ú	loop_last)Úcell_lenÚ
chop_cellsz	\s*\S+\s*ÚtextÚstrÚreturnúIterable[tuple[int, int, str]]c              #  óì   K  — d}t                                | |¦  «        }|�R|                     ¦   «         \  }}|                     d¦  «        }|||fV — t                                | |¦  «        }|­PdS dS )z·Yields each word from the text as a tuple
    containing (start_index, end_index, word). A "word" in this context may
    include the actual word and any whitespace to the right.
    r   N)Úre_wordÚmatchÚspanÚgroup)r	   ÚpositionÚ
word_matchÚstartÚendÚwords         úH/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/rich/_wrap.pyÚwordsr      s†   è è € ð
 €HÝ—’˜t XÑ.Ô.€JØ
Ð
 Ø—_’_Ñ&Ô&‰
ˆˆsØ×Ò Ñ"Ô"ˆØ�S˜$ÐÐÐÐÝ—]’] 4¨Ñ-Ô-ˆ
ð	 Ð
 Ð
 Ð
 Ð
 Ð
 ó    TÚwidthÚintÚfoldÚboolú	list[int]c                óæ  — g }|j         }d}t          }t          | ¦  «        D ]Î\  }}}	 ||	                     ¦   «         ¦  «        }
||z
  }||
k    }|r| ||	¦  «        z  }Œ?|
|k    ro|rTt	          |	|¬¦  «        }t          |¦  «        D ]2\  }}|r ||¦  «         |r ||¦  «        }Œ |t          |¦  «        z  }Œ3Œ›|r ||¦  «          ||	¦  «        }Œ´|r|r ||¦  «          ||	¦  «        }ŒÏ|S )aœ  Given a string of text, and a width (measured in cells), return a list
    of cell offsets which the string should be split at in order for it to fit
    within the given width.

    Args:
        text: The text to examine.
        width: The available cell width.
        fold: If True, words longer than `width` will be folded onto a new line.

    Returns:
        A list of indices to break the line at.
    r   ©r   )Úappendr   r   Úrstripr   r   Úlen)r	   r   r   Úbreak_positionsr!   Úcell_offsetÚ	_cell_lenr   Ú_endr   Úword_lengthÚremaining_spaceÚword_fits_remaining_spaceÚfolded_wordÚlastÚlines                   r   Údivide_liner.      s^  € ð "$€OØÔ#€FØ€KÝ€Iå" 4™[œ[ð  .ð  .Ñˆˆt�TØ�i §¢¡¤Ñ.Ô.ˆØ +Ñ-ˆØ$3°{Ò$BÐ!à$ð 	.à˜9˜9 T™?œ?Ñ*ˆKˆKð ˜UÒ"Ð"ð ð 2å",¨T¸Ð"?Ñ"?Ô"?�KÝ&/°Ñ&<Ô&<ð /ð /™
˜˜dØ ð *Ø"˜F 5™MœM˜MØð /Ø*3¨)°D©/¬/˜K˜Kà!¥S¨¡Y¤YÑ.˜E˜Eð/ð ð &Ø˜˜u™œ˜Ø"+ )¨D¡/¤/�K�KØð . ð .ð ��u‘”�Ø'˜i¨™oœo�øàÐr   Ú__main__)ÚConsoleé
   r    z@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345Úabcdefghijklmnopqrstuvwxyzé   uR   Textualã�¯Pythonã�®é«˜é€Ÿã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³é–‹ç™ºãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã�§ã�™u4   ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã�¯1670ä¸‡è‰²ã‚’ä½¿ç”¨ã�§ã��)r	   r
   r   r   )T)r	   r
   r   r   r   r   r   r   )Ú
__future__r   ÚreÚtypingr   Ú_loopr   Úcellsr   r   Úcompiler   r   r.   Ú__name__Úconsoler0   ÚprintÚrule© r   r   ú<module>r?      s\  ðØ "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'à
ˆ"Œ*�\Ñ
"Ô
"€ð.ð .ð .ð .ð4ð 4ð 4ð 4ð 4ðn ˆzÒÐØ Ð Ð Ð Ð Ð àˆg˜BÐÑÔ€GØ‡M‚MÐTÑUÔUÐUØ	€Eˆ*ˆ*Ð1°2Ñ
6Ô
6Ñ7Ô7Ð7àˆg˜BÐÑÔ€GØ‡L‚L�N„N€NØ‡M‚MÐfÑgÔgÐgà‡L‚L�N„N€NØ‡M‚MÐHÑIÔIÐIÐIÐIð Ðr   