ó
    6Þ©j]  ã                  ó¸   • S r SSKJr  SSKrSSKJrJrJr  \R                  " S5      r	\
R                  SSSSSS.5      r\\\\\\
4   rS	rSS
 jrSS jrSS jrg)aO  Text that has to be printed on the page to be kept.

The vetting agent copies a table's caption and title off the page. A copy is
accepted only when the page's text layer contains it, the rule values already
follow: anything the page does not print was read off nothing.

`printed_key` folds what rendering changes and reading does not. Whitespace,
dashes and colons are dropped, so a title printed over two lines or a footnote
digit set as a superscript still matches; curly quotes and apostrophes become
straight; case is dropped. Two strings with the same key are the same printed
words.
é    )ÚannotationsN)ÚListÚSequenceÚTupleu   [\sâ€”â€“:\-]+Ú'Ú")u   â€™u   â€˜u   â€œu   â€�u   â€žg      @c                óp   • [         R                  SU R                  [        5      5      R	                  5       $ )z$The comparison form of printed text.Ú )Ú_FOLD_REÚsubÚ	translateÚ_QUOTESÚlower)Útexts    Ú5/home/mande/repo/quber/src/quber/core/printed_text.pyÚprinted_keyr      s%   € ä�<‰<˜˜DŸN™N¬7Ó3Ó4×:Ñ:Ó<Ð<ó    c                óX   • [        U 5      n[        U5      =(       a    U[        U5      ;   $ )zZWhether `value` occurs in `page_text`, compared by printed key. Empty
text is not printed.)r   Úbool)ÚvalueÚ	page_textÚkeys      r   Ú
is_printedr   #   s'   € ô �eÓ
€CÜ�‹9×6˜¤¨IÓ 6Ñ6Ð6r   c                ó2  • [        U S S9n/ n/ nSnU HX  n[        US   [        -  5      nUb'  Xd:w  a"  UR                  SR	                  U5      5        / nUR                  US   5        UnMZ     U(       a   UR                  SR	                  U5      5        U$ )z¤The page's words as printed lines in reading order, top to bottom and
left to right. Two tables printed side by side share lines, which is how
the page prints them.c                ó6   • [        U S   [        -  5      U S   4$ )Né   r   )ÚroundÚLINE_BAND_PTS)Úws    r   Ú<lambda>Úpage_lines.<locals>.<lambda>.   s   € ¬5°°1±¼Ñ1EÓ+FÈÈ!ÉÑ*Mr   )r   Nr   Ú é   )Úsortedr   r   ÚappendÚjoin)ÚwordsÚorderedÚlinesÚcurrentÚbandr   Úbs          r   Ú
page_linesr-   *   s•   € ô �UÑ MÑN€GØ€EØ€GØ€DÛˆÜ�!�A‘$œÑ&Ó'ˆØÑ £	Ø�L‰L˜Ÿ™ 'Ó*Ô+ØˆGØ�‰�q˜‘tÔØŠñ ö Ø�‰�S—X‘X˜gÓ&Ô'Ø€Lr   )r   ÚstrÚreturnr.   )r   r.   r   r.   r/   r   )r'   zSequence[WordBox]r/   z	List[str])Ú__doc__Ú
__future__r   ÚreÚtypingr   r   r   Úcompiler   r.   Ú	maketransr   ÚfloatÚWordBoxr   r   r   r-   © r   r   Ú<module>r9      sn   ðñõ #ã 	ß (Ñ (à�:Š:Ð'Ó(€Ø
�-‰- ¨C¸ÀCÐPSÑTÓ
U€ð ��u˜e U¨CÐ/Ñ
0€ð €ô=ô
7õr   