Ë
    £èh��  ã                  óÞ  — d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
 d dlmZ d dlmZ d dlmZmZ d dlmZ d dlmZmZ e	rd dlmZ d d	lmZ d
ZdZdZdZdZdZ dZ!dZ"dZ#dZ$ejJ                  Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ- e
dd¬«      Z. G d„ d«      Z/ G d„ d«      Z0 G d„ d «      Z1 G d!„ d"«      Z2 G d#„ d$«      Z3 G d%„ d&«      Z4 G d'„ d«      Z5e5Z6 G d(„ d)e5«      Z7 G d*„ d+e5«      Z8	 d-	 	 	 	 	 	 	 d.d,„Z9y)/é    )Úannotations)ÚAnyÚCallableÚIterableÚIteratorÚOptionalÚSequenceÚTYPE_CHECKINGÚTypeVar)Údeepcopy)Úconst)ÚMTextEntityAlignmentÚMAP_MTEXT_ALIGN_TO_FLAGS)ÚMTextSurrogate)ÚUVecÚVec2)ÚBlockLayout)ÚGenericLayoutTypeÚTABLEBACKGROUNDÚTABLECONTENTÚ	TABLEGRIDÚSTANDARDç      ð?g      @gffffffæ?g      ø?Ngš™™™™™¹?é   ÚBYLAYERTé2   ÚTÚCell)Úboundc                  ó\  — e Zd ZdZeedf	 	 	 	 	 dd„Zdd„Zdd„Z	 	 d	 	 	 	 	 	 	 	 	 dd„Z		 	 	 d	 	 	 	 	 	 	 	 	 dd„Z
edd	„«       Zedd
„«       Zdd„Zdd„Zdd„Z	 	 	 d 	 	 	 	 	 	 	 	 	 d!d„Zd"d„Zeej*                  dddej,                  f	 	 	 	 	 	 	 	 	 d#d„«       Zd"d„Z	 	 	 	 d$d„Zd%d&d„Zy)'ÚTablePaintera  The TablePainter class renders tables build from DXF primitives.

    The TablePainter instance contains all the data cells.

    Args:
        insert: insert location as or :class:`~ezdxf.math.UVec`
        nrows: row count
        ncols: column count
        cell_width: default cell width in drawing units
        cell_height: default cell height in drawing units
        default_grid: draw a grid of solid lines if ``True``, otherwise
            draw only explicit defined borders, the default grid has a
            priority of 50.

    Tc                óZ  — t        |«      | _        || _        || _        |g|z  | _        |g|z  | _        t        | _        t        | _	        t        | _        dt        «       i| _        |s%| j                  d«      }|j                  dddd«       i | _        g | _        t%        | «      | _        y )NÚdefaultF)r   ÚinsertÚnrowsÚncolsÚrow_heightsÚ
col_widthsÚDEFAULT_TABLE_BG_LAYERÚbg_layer_nameÚDEFAULT_TABLE_FG_LAYERÚfg_layer_nameÚDEFAULT_TABLE_GRID_LAYERÚgrid_layer_nameÚ	CellStyleÚstylesÚget_cell_styleÚset_border_statusÚ_cellsÚframesr   Ú
empty_cell)Úselfr$   r%   r&   Ú
cell_widthÚcell_heightÚdefault_gridÚdefault_styles           ú9lib/python3.12/site-packages/ezdxf/addons/tablepainter.pyÚ__init__zTablePainter.__init__D   s    € ô ˜6“lˆŒØˆŒ
ØˆŒ
Ø)4¨¸Ñ(=ˆÔØ(2 |°eÑ';ˆŒÜ"8ˆÔÜ"8ˆÔÜ$<ˆÔØ-6¼	»Ð,DˆŒÙØ ×/Ñ/°	Ó:ˆMØ×+Ñ+¨E°5¸%ÀÔGà35ˆŒØ#%ˆŒÜ˜t›*ˆ�ó    c                ó4   — t        |«      | j                  |<   y)zµSet column width in drawing units of the given column index.

        Args:
            index: zero based column index
            value: new column width in drawing units

        N)Úfloatr(   ©r6   ÚindexÚvalues      r;   Úset_col_widthzTablePainter.set_col_width^   s   € ô "' u£ˆ�‰˜Òr=   c                ó4   — t        |«      | j                  |<   y)zªSet row height in drawing units of the given row index.

        Args:
            index: zero based row index
            value: new row height in drawing units
        N)r?   r'   r@   s      r;   Úset_row_heightzTablePainter.set_row_heighth   s   € ô #(¨£,ˆ×Ñ˜Òr=   c                óF   — t        | |||¬«      }| j                  |||«      S )zñFactory method to create a new text cell at location (row, col),
        with `text` as content, the `text` can be a line breaks ``'\n'``.
        The final cell can spread over several cells defined by the argument
        `span`.

        )ÚstyleÚspan)ÚTextCellÚset_cell)r6   ÚrowÚcolÚtextrH   rG   Úcells          r;   Ú	text_cellzTablePainter.text_cellq   s'   € ô ˜˜d¨%°dÔ;ˆØ�}‰}˜S # tÓ,Ð,r=   Nc                óP   — |€i }t        | ||||¬«      }| j                  |||«      S )aA  Factory method to Create a new block cell at position (row, col).

        Content is a block reference inserted by an INSERT entity,
        attributes will be added if the block definition contains ATTDEF.
        Assignments are defined by attribs-key to attdef-tag association.

        Example: attribs = {'num': 1} if an ATTDEF with tag=='num' in
        the block definition exists, an attrib with text=str(1) will be
        created and added to the insert entity.

        The cell spans over 'span' cells and has the cell style with the
        name 'style'.
        )rG   ÚattribsrH   )Ú	BlockCellrJ   )r6   rK   rL   ÚblockdefrH   rQ   rG   rN   s           r;   Ú
block_cellzTablePainter.block_cell‚   s8   € ð, ˆ?ØˆGÜØ�( %°¸tô
ˆð �}‰}˜S # tÓ,Ð,r=   c                ó,   — t        | j                  «      S )zReturns the total table width.)Úsumr(   ©r6   s    r;   Útable_widthzTablePainter.table_widthŸ   s   € ô �4—?‘?Ó#Ð#r=   c                ó,   — t        | j                  «      S )zReturns the total table height.)rV   r'   rW   s    r;   Útable_heightzTablePainter.table_height¤   s   € ô �4×#Ñ#Ó$Ð$r=   c                óR   — | j                  ||«      \  }}|| j                  ||f<   |S )z%Insert a cell at position (row, col).)Úvalidate_indexr3   ©r6   rK   rL   rN   s       r;   rJ   zTablePainter.set_cell©   s/   € à×&Ñ& s¨CÓ0‰ˆˆSØ $ˆ�‰�C˜�HÑØˆr=   c                ó†   — | j                  ||«      \  }}	 | j                  ||f   S # t        $ r | j                  cY S w xY w)z Get cell at location (row, col).)r\   r3   ÚKeyErrorr5   ©r6   rK   rL   s      r;   Úget_cellzTablePainter.get_cell¯   sI   € à×&Ñ& s¨CÓ0‰ˆˆSð	#Ø—;‘;˜s C˜xÑ(Ð(øÜò 	#Ø—?‘?Ò"ð	#ús   —( ¨A ¿A c                óœ   — t        |«      }t        |«      }|dk  s#|| j                  k\  s|dk  s|| j                  k\  rt        d«      ‚||fS )Nr   zcell index out of range)Úintr%   r&   Ú
IndexErrorr`   s      r;   r\   zTablePainter.validate_index·   sL   € Ü�#‹hˆÜ�#‹hˆØ�Š7�c˜TŸZ™ZÒ'¨3°ª7°c¸T¿Z¹ZÒ6GÜÐ6Ó7Ð7Ø�Cˆxˆr=   c                ób   — t        | ||f||f|¬«      }| j                  j                  |«       |S )zÄCreates a frame around the give cell area, starting at (row, col) and
        covering `width` columns and `height` rows. The `style` argument is the
        name of a :class:`CellStyle`.
        )ÚposrH   rG   )ÚFramer4   Úappend)r6   rK   rL   ÚwidthÚheightrG   Úframes          r;   rk   zTablePainter.frame¾   s3   € ô �d  c 
°&¸%°ÈÔNˆØ�‰×Ñ˜5Ô!Øˆr=   c                ó²   — t        |t        «      r|dk7  sJ d«       ‚t        | j                  d«      «      }|j	                  |«       || j
                  |<   |S )zëFactory method to create a new :class:`CellStyle` object, overwrites
        an already existing cell style.

        Args:
            name: style name as string
            kwargs: see attributes of class :class:`CellStyle`

        Ú z!name has to be a non-empty stringr#   )Ú
isinstanceÚstrr   r1   Úupdater0   )r6   ÚnameÚkwargsrG   s       r;   Únew_cell_stylezTablePainter.new_cell_styleÎ   sX   € ô �tœSÔ! d¨b¢jð	/à.ó	/Ø0ä# D×$7Ñ$7¸	Ó$BÓCˆØ�‰�VÔØ!ˆ�‰�DÑØˆr=   éd   r   c                ó`   — t        «       }| |_        ||_        ||_        ||_        ||_        |S )ao  Factory method to create a new border style.

        Args:
            status: ``True`` for visible, ``False`` for invisible
            color: :ref:`ACI`
            linetype: linetype name, default is "BYLAYER"
            lineweight: lineweight as int, default is by layer
            priority: drawing priority, higher priorities cover lower priorities

        )ÚBorderStyleÚcolorÚlinetypeÚ
lineweightÚstatusÚpriority)rw   rz   r{   rx   ry   Úborder_styles         r;   Únew_border_stylezTablePainter.new_border_styleß   s9   € ô$ #“}ˆØ"ˆÔØ (ˆÔØ",ˆÔØ$ˆÔØ (ˆÔØÐr=   c                ó    — | j                   |   S )zGet cell style by name.)r0   )r6   rq   s     r;   r1   zTablePainter.get_cell_styleù   s   € à�{‰{˜4Ñ Ð r=   c                ó   ‡ — ˆ fd„|D «       S )zIterate over all visible cellsc              3  óN   •K  — | ]  \  }}||‰j                  ||«      f–— Œ y ­w©N)ra   ©Ú.0rK   rL   r6   s      €r;   Ú	<genexpr>z2TablePainter.iter_visible_cells.<locals>.<genexpr>  s+   øè ø€ ð 
Ù@N±H°C¸ˆS�#�t—}‘} S¨#Ó.Ô/Áùs   ƒ"%© )r6   Úvisibility_maps   ` r;   Úiter_visible_cellszTablePainter.iter_visible_cellsý   s   ø€ ó
Ù@Nó
ð 	
r=   c                ó"  — | j                   }|�t        |«      | _         t        | «      }t        | «      }| j	                  |«      D ].  \  }}}|j                  ||||«       |j                  ||||«       Œ0 |j                  ||«       || _         y)zRender table to layout.N)r$   r   ÚVisibilityMapÚGridr‡   Úrender_cell_backgroundÚrender_cell_contentÚrender_lines)	r6   Úlayoutr$   Úinsert_backupr†   ÚgridrK   rL   rN   s	            r;   ÚrenderzTablePainter.render  sŒ   € àŸ™ˆØÐÜ˜v›,ˆDŒKÜ& tÓ,ˆÜ�D‹zˆØ"×5Ñ5°nÖE‰NˆC��dØ×'Ñ'¨°°S¸$Ô?Ø×$Ñ$ V¨S°#°tÕ<ð Fð 	×Ñ˜& .Ô1Ø#ˆ�r=   )r$   r   r%   rc   r&   rc   )rA   rc   rB   r?   )©é   r“   r#   )
rK   rc   rL   rc   rM   ro   rH   útuple[int, int]ÚreturnrI   )r’   Nr#   )
rK   rc   rL   rc   rS   r   rH   r”   r•   rR   )r•   r?   )rK   rc   rL   rc   rN   r   r•   r   )rK   rc   rL   rc   r•   r   )rK   rc   rL   rc   r•   r”   )r“   r“   r#   )
rK   rc   rL   rc   ri   rc   rj   rc   r•   rg   )rq   ro   r•   r/   )
rw   rc   r{   rc   rx   ro   ry   rc   r•   rv   )r†   r‰   r•   zIterator[tuple[int, int, Cell]]r�   )rŽ   r   r$   zOptional[UVec])Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚDEFAULT_CELL_WIDTHÚDEFAULT_CELL_HEIGHTr<   rC   rE   rO   rT   ÚpropertyrX   rZ   rJ   ra   r\   rk   rs   Ústaticmethodr   r   ÚLINEWEIGHT_BYLAYERr}   r1   r‡   r‘   r…   r=   r;   r!   r!   3   s²  „ ñð* &Ø'Øð%àð%ð ð%ð ó	%ó4.ó/ð !'Øð-àð-ð ð-ð ð	-ð
 ð-ð 
ó-ð, !'ØØð-àð-ð ð-ð ð	-ð
 ð-ð 
ó-ð: ò$ó ð$ð ò%ó ð%óó#óð ØØðàðð ðð ð	ð
 ðð 
óó ð" à—]‘]ØØØ!Ø×2Ñ2ðØðð ðð ð	ð
 ðð 
òó ðó2!ð
Ø+ð
à	(ó
õ$r=   r!   c                  óN   — e Zd ZdZdd„Zd„ Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zy
)r‰   z)Stores the visibility of the table cells.c                óP   — || _         t        «       | _        | j                  «        y)z$Create the visibility map for table.N)ÚtableÚsetÚ_hidden_cellsÚ_create_visibility_map©r6   r¡   s     r;   r<   zVisibilityMap.__init__  s   € à#(ˆŒ
Ü36³5ˆÔØ×#Ñ#Õ%r=   c                óœ   — t        | «      D ]>  \  }}| j                  j                  ||«      }| j                  |||j                  «       Œ@ y)z&Set visibility for all existing cells.N)Úiterr¡   ra   Ú_set_span_visibilityrH   r]   s       r;   r¤   z$VisibilityMap._create_visibility_map  s@   € ä˜Tž
‰HˆC�Ø—:‘:×&Ñ& s¨CÓ0ˆDØ×%Ñ% c¨3°·	±	Õ:ñ #r=   c                ó¬   — |dk7  r=|\  }}t        |«      D ]*  }t        |«      D ]  }| j                  ||z   ||z   «       Œ Œ, | j                  ||«       y)zÙSet the visibility of the given cell.

        The cell itself is visible, all other cells in the span-range
        (tuple: width, height) are invisible, they are covered by the
        main cell (row, col).
        r’   N)ÚrangeÚhideÚshow)r6   rK   rL   rH   r%   r&   ÚrowxÚcolxs           r;   r¨   z"VisibilityMap._set_span_visibility"  sV   € ð �6Š>Ø‰LˆE�5Ü˜ež�Ü! %žL�Dà—I‘I˜c D™j¨#°©*Õ5ñ )ð %ð
 	�	‰	�#�sÕr=   c                ó^   — 	 | j                   j                  ||f«       y# t        $ r Y yw xY w)zShow cell (row, col).N)r£   Úremover_   r`   s      r;   r¬   zVisibilityMap.show3  s1   € ð	Ø×Ñ×%Ñ% s¨C jÕ1øÜò 	Ùð	ús   ‚   	,«,c                ó>   — | j                   j                  ||f«       y)zHide cell (row, col).N)r£   Úaddr`   s      r;   r«   zVisibilityMap.hide:  s   € à×Ñ×Ñ  S˜zÕ*r=   c              #  ó¨   K  — t        | j                  j                  «      D ],  }t        | j                  j                  «      D ]  }||f–— Œ
 Œ. y­w)z8Iterate over all cell indices, yields (row, col) tuples.N)rª   r¡   r%   r&   r`   s      r;   Úiter_all_cellszVisibilityMap.iter_all_cells>  sA   è ø€ ä˜Ÿ™×)Ñ)Ö*ˆCÜ˜TŸZ™Z×-Ñ-Ö.�Ø˜3�h“ñ /ñ +ùs   ‚AAc                ó"   — ||f| j                   vS )z0True if cell (row, col)  is visible, else False.)r£   r`   s      r;   Úis_visible_cellzVisibilityMap.is_visible_cellD  s   € à�Sˆz ×!3Ñ!3Ð3Ð3r=   c                ó6   ‡ — ˆ fd„‰ j                  «       D «       S )zIterate over all visible cells.c              3  óP   •K  — | ]  \  }}‰j                  ||«      r||f–— Œ y ­wr�   )r¶   r‚   s      €r;   r„   z)VisibilityMap.__iter__.<locals>.<genexpr>J  s1   øè ø€ ð 
á3‘
��cØ×#Ñ# C¨Ô-ð �#ŒJÙ3ùs   ƒ#&)r´   rW   s   `r;   Ú__iter__zVisibilityMap.__iter__H  s   ø€ ó
à"×1Ñ1Ô3ó
ð 	
r=   N©r¡   r!   )rK   rc   rL   rc   rH   r”   )rK   rc   rL   rc   )rK   rc   rL   rc   r•   ÚNone)r•   zIterator[tuple[int, int]])rK   rc   rL   rc   r•   Úbool)r–   r—   r˜   r™   r<   r¤   r¨   r¬   r«   r´   r¶   r¹   r…   r=   r;   r‰   r‰     s-   „ Ù3ó&ò;óó"ó+óó4ô
r=   r‰   c                  ób   — e Zd ZdZddd„Zdd„Zdd„Zdd„Zdd„Z	 d	 dd„Z	e
dd	„«       Zdd
„Zy)r/   z–Cell style object.

    .. important::

        Always instantiate new styles by the factory method:
        :meth:`TablePainter.new_cell_style`

    Nc                ó¨  — d| _         t        | _        t        | _        t
        | _        t        | _        t        | _
        d| _        d| _        t        j                  | _        t         | _        t$        | _        t(        | _        t-        «       | _        t-        «       | _        t-        «       | _        t-        «       | _        |r| j7                  |«       y y )Nr   ç        F)Ú
text_styleÚDEFAULT_CELL_CHAR_HEIGHTÚchar_heightÚDEFAULT_CELL_LINE_SPACINGÚline_spacingÚDEFAULT_CELL_X_SCALEÚscale_xÚDEFAULT_CELL_Y_SCALEÚscale_yÚDEFAULT_CELL_TEXTCOLORÚ
text_colorÚrotationÚstackedr   Ú
TOP_CENTERÚalignÚDEFAULT_CELL_X_MARGINÚmargin_xÚDEFAULT_CELL_Y_MARGINÚmargin_yÚDEFAULT_CELL_BG_COLORÚbg_colorrv   ÚleftÚtopÚrightÚbottomrp   )r6   Údatas     r;   r<   zCellStyle.__init__[  s–   € à$ˆŒä3ˆÔä5ˆÔä+ˆŒä+ˆŒä0ˆŒàˆŒàˆŒä)×4Ñ4ˆŒ
ä-ˆŒä-ˆŒä-ˆŒä“MˆŒ	ä“=ˆŒä “]ˆŒ
ä!“mˆŒÙØ�K‰K˜Õð r=   c                ó    — | j                   |   S r�   )Ú__dict__)r6   Úks     r;   Ú__getitem__zCellStyle.__getitem__  s   € Ø�}‰}˜QÑÐr=   c                ót   — || j                   v r| j                   j                  ||«       y t        d|› �«      ‚)Nzinvalid attribute name: )rÛ   Ú__setitem__r_   )r6   rÜ   Úvs      r;   rß   zCellStyle.__setitem__‚  s5   € Ø�—‘ÑØ�M‰M×%Ñ% a¨Õ+äÐ5°a°SÐ9Ó:Ð:r=   c                óš   — |j                  «       D ]  \  }}| j                  ||«       Œ t        | j                  t        «      sJ d«       ‚y )NzBenum ezdxf.enums.MTextEntityAlignment for text alignments required)Úitemsrß   rn   rÎ   r   )r6   rÙ   rÜ   rà   s       r;   rp   zCellStyle.updateˆ  sL   € Ø—J‘J–L‰DˆAˆqØ×Ñ˜Q Õ"ð !äØ�J‰JÔ,ô
ð 	PàOó	Pñ 
r=   c                óŒ   — || j                   _        || j                  _        || j                  _        || j                  _        y)z'Set status of all cell borders at once.N)rÕ   rz   r×   rÖ   rØ   )r6   rÕ   r×   rÖ   rØ   s        r;   r2   zCellStyle.set_border_status�  s1   € àˆ�	‰	ÔØ!ˆ�
‰
ÔØˆ�‰ŒØ#ˆ�‰Õr=   c                ó@   — d|fd|fd|fd|ffD ]  \  }}|sŒ	|| |<   Œ y)z.Set border styles of all cell borders at once.rÕ   r×   rÖ   rØ   Nr…   )r6   rG   rÕ   r×   rÖ   rØ   Úborderrz   s           r;   Úset_border_stylezCellStyle.set_border_style–  s@   € ð
 �TˆNØ�eÐØ�CˆLØ�vÐó	
‰NˆF�Fò Ø$��V’ñ
r=   c                 ó   — t        «       S r�   )rv   r…   r=   r;   Úget_default_border_stylez"CellStyle.get_default_border_style£  s
   € ä‹}Ðr=   c                ó(   — t         | j                     S r�   )r   rÎ   rW   s    r;   Úget_text_align_flagszCellStyle.get_text_align_flags§  s   € Ü'¨¯
©
Ñ3Ð3r=   r�   )rÙ   zOptional[dict[str, Any]])rÜ   ro   r•   r   )rÜ   ro   rà   r   )rÙ   zdict[str, Any])TTTT)rG   rv   )r•   rv   ©r•   r”   )r–   r—   r˜   r™   r<   rÝ   rß   rp   r2   ræ   r�   rè   rê   r…   r=   r;   r/   r/   Q  sO   „ ñô"óH ó;óPó$ð KOð%Ø ó%ð òó ðô4r=   r/   c                  óF   — e Zd ZdZeeeej                  e	f	 	 	 	 	 	 	 dd„Z
y)rv   z Border style class.

    .. important::

        Always instantiate new border styles by the factory method:
        :meth:`TablePainter.new_border_style`

    c                óJ   — || _         || _        || _        || _        || _        y r�   )rz   rw   rx   ry   r{   )r6   rz   rw   rx   ry   r{   s         r;   r<   zBorderStyle.__init__µ  s'   € ð ˆŒàˆŒ
à ˆŒà$ˆŒà ˆ�r=   N)rz   r¼   rw   rc   rx   ro   r{   rc   )r–   r—   r˜   r™   ÚDEFAULT_BORDER_STATUSÚDEFAULT_BORDER_COLORÚDEFAULT_BORDER_LINETYPEr   rž   ÚDEFAULT_BORDER_PRIORITYr<   r…   r=   r;   rv   rv   «  sI   „ ñð -Ø)Ø/Ø×+Ñ+Ø/ð!àð!ð ð!ð ð	!ð ô!r=   rv   c                  ó(  — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Z	 	 	 	 	 	 	 	 dd„Z	dd„Z
dd	„Z	 	 	 	 	 	 	 	 dd
„Zdd„Zdd„Z	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 	 	 d d„Z	 	 	 	 	 	 	 	 d d„Zd!d„Zd"d„Z	 	 	 	 	 	 	 	 	 	 d#d„Z	 	 	 	 	 	 	 	 	 	 d$d„Zd%d„Zd&d„Zy)'rŠ   z8Grid contains the graphical representation of the table.c                óª   — || _         | j                  «       | _        | j                  «       | _        g | _        g | _        t        dddd¬«      | _        y )NFiç  r   r   )rz   r{   rx   rw   )	r¡   Ú_calc_col_posÚcol_posÚ_calc_row_posÚrow_posÚ
_x_bordersÚ
_y_bordersrv   Ú	no_borderr¥   s     r;   r<   zGrid.__init__Ì  sP   € Ø#(ˆŒ
à$(×$6Ñ$6Ó$8ˆŒà$(×$6Ñ$6Ó$8ˆŒð .0ˆŒð
 .0ˆŒä$Ø 3°À!ô
ˆ�r=   c                ó–   — | j                   j                  dz   | j                   j                  dz   z  }|g|z  | _        |g|z  | _        y)z@Init the _hborders with  <hborder> and _vborders with <vborder>.r“   N)r¡   r%   r&   rø   rù   )r6   Úx_borderÚy_borderÚborder_counts       r;   Ú_init_borderszGrid._init_bordersã  sH   € ð "ŸZ™Z×-Ñ-°Ñ1°d·j±j×6FÑ6FÈÑ6JÑKˆØ#˜* |Ñ3ˆŒØ#˜* |Ñ3ˆ�r=   c                ó@   — || j                   j                  dz   z  |z   S )zCCalculate linear index for border arrays _x_borders and _y_borders.r“   )r¡   r&   r`   s      r;   Ú_border_indexzGrid._border_indexî  s!   € à�d—j‘j×&Ñ&¨Ñ*Ñ+¨cÑ1Ð1r=   c                ó>   — | j                  | j                  |||«      S )zYSet <border_style> for the horizontal border element above
        <row>, <col>.
        )Ú_set_border_stylerø   ©r6   rK   rL   r|   s       r;   Úset_x_borderzGrid.set_x_borderò  ó   € ð ×%Ñ% d§o¡o°s¸CÀÓNÐNr=   c                ó>   — | j                  | j                  |||«      S )zYSet <border_style> for the vertical border element left of
        <row>, <col>.
        )r  rù   r  s       r;   Úset_y_borderzGrid.set_y_borderø  r  r=   c                óp   — | j                  ||«      }||   }|j                  |j                  k\  r|||<   yy)z1Set <border_style> for <row>, <col> in <borders>.N)r  r{   )r6   ÚbordersrK   rL   r|   Úborder_indexÚactual_borderstyles          r;   r  zGrid._set_border_styleþ  sF   € ð ×)Ñ)¨#¨sÓ3ˆØ$ \Ñ2ÐØ× Ñ Ð$6×$?Ñ$?Ò?Ø$0ˆG�LÒ!ð @r=   c                ó<   — | j                  | j                  ||«      S )zˆGet the horizontal border element above <row>, <col>.
        Last grid line (below <nrows>) is the element above of <nrows+1>.
        )Ú_get_borderrø   r`   s      r;   Úget_x_borderzGrid.get_x_border  ó   € ð ×Ñ §¡°°cÓ:Ð:r=   c                ó<   — | j                  | j                  ||«      S )zŠGet the vertical border element left of <row>, <col>.
        Last grid line (right of <ncols>) is the element left of <ncols+1>.
        )r  rù   r`   s      r;   Úget_y_borderzGrid.get_y_border  r  r=   c                ó,   — || j                  ||«         S )z2Get border element at <row>, <col> from <borders>.)r  )r6   r
  rK   rL   s       r;   r  zGrid._get_border  s   € ð �t×)Ñ)¨#¨sÓ3Ñ4Ð4r=   c                ó    — g }| j                   j                  j                  }t        || j                   j                  |j
                  «       |S )zBCalculate the x-axis coords of the grid lines between the columns.)r¡   r$   ÚxÚ
sum_fieldsr(   rh   )r6   rõ   Ústart_xs      r;   rô   zGrid._calc_col_pos  s;   € à!ˆØŸ™×*Ñ*×,Ñ,ˆÜ�7˜DŸJ™J×1Ñ1°7·>±>ÔBØˆr=   c                ó¢   — g }| j                   j                  j                  }t        || j                   j                  |j
                  d«       |S )z?Calculate the y-axis coords of the grid lines between the rows.g      ð¿)r¡   r$   Úyr  r'   rh   )r6   r÷   Ústart_ys      r;   rö   zGrid._calc_row_pos$  s=   € à!ˆØŸ™×*Ñ*×,Ñ,ˆÜ�7˜DŸJ™J×2Ñ2°G·N±NÀDÔIØˆr=   c                óž   — | j                   |   }| j                   ||d   z      }| j                  |   }| j                  ||d   z      }||||fS )z„Get the coordinates of the cell <row>,<col> as absolute drawing units.

        :return: a tuple (left, right, top, bottom)
        r   r“   )r÷   rõ   )r6   rK   rL   rH   rÖ   rØ   rÕ   r×   s           r;   Úcell_coordszGrid.cell_coords+  s[   € ð �l‰l˜3ÑˆØ—‘˜c D¨¡G™mÑ,ˆØ�|‰|˜CÑ ˆØ—‘˜S 4¨¡7™]Ñ+ˆØ�U˜C Ð'Ð'r=   c                óú   — |j                   }|j                  €y| j                  |||j                  «      \  }}}}	|j	                  ||f||	f||f||	ff|j                  | j
                  j                  dœ¬«       y)z:Render the cell background for (row, col) as SOLID entity.N)rw   Úlayer)ÚpointsÚ
dxfattribs)rG   rÔ   r  rH   Ú	add_solidr¡   r*   )
r6   rŽ   rK   rL   rN   rG   rÕ   r×   rÖ   rØ   s
             r;   r‹   zGrid.render_cell_background8  sƒ   € ð —
‘
ˆØ�>‰>Ð!Øà#'×#3Ñ#3°C¸¸d¿i¹iÓ#HÑ ˆˆe�S˜&Ø×ÑØ˜3�K $¨ °%¸°ÀÀv¸ÐOàŸ™ØŸ™×1Ñ1ñð 	õ 	
r=   c                óŒ   — | j                  |||j                  «      }|j                  ||| j                  j                  «       y)z;Render the cell content for <row>,<col> into layout object.N)r  rH   r‘   r¡   r,   )r6   rŽ   rK   rL   rN   Úcoordss         r;   rŒ   zGrid.render_cell_contentI  s6   € ð
 ×!Ñ! # s¨D¯I©IÓ6ˆØ�‰�F˜F D§J¡J×$<Ñ$<Õ=r=   c                ód  — | j                   j                  d«      }|j                  }|j                  }| j	                  ||«       | j                  | j                   j                  «       | j                  | j                   j                  |«      «       | j                  || j                   «       y)z)Render all grid lines into layout object.r#   N)
r¡   r1   rÖ   rÕ   rÿ   Ú_set_framesr4   Ú_set_bordersr‡   Ú_render_borders)r6   rŽ   Úvmr:   rü   rý   s         r;   r�   zGrid.render_linesQ  s‡   € ð Ÿ
™
×1Ñ1°)Ó<ˆØ ×$Ñ$ˆØ ×%Ñ%ˆØ×Ñ˜8 XÔ.Ø×Ñ˜Ÿ™×*Ñ*Ô+Ø×Ñ˜$Ÿ*™*×7Ñ7¸Ó;Ô<Ø×Ñ˜V T§Z¡ZÕ0r=   c                óÞ   — |D ]h  \  }}}||j                   d   z   }||j                   d   z   }| j                  |||||j                  «       | j                  ||||| j                  «       Œj y)z!Set borders of the visible cells.r   r“   N)rH   Ú_set_rect_bordersrG   Ú_set_inner_bordersrú   )r6   Úvisible_cellsrK   rL   rN   Ú
bottom_rowÚ	right_cols          r;   r&  zGrid._set_borders\  sm   € ã+‰NˆC��dØ˜tŸy™y¨™|Ñ+ˆJØ˜dŸi™i¨™lÑ*ˆIØ×"Ñ" 3¨
°C¸ÀDÇJÁJÔOØ×#Ñ#Ø�Z  i°·±õñ	 ,r=   c                ó  — ||z
  dkD  r8t        ||«      D ])  }t        |dz   |«      D ]  }| j                  |||«       Œ Œ+ ||z
  dkD  r9t        ||«      D ])  }t        |dz   |«      D ]  }| j                  |||«       Œ Œ+ yy)zdSet `border_style` to the inner borders of the rectangle (top_row,
        bottom_row, ...)
        r“   N)rª   r  r  )r6   Útop_rowr-  Úleft_colr.  r|   rL   rK   s           r;   r+  zGrid._set_inner_bordersf  s•   € ð ˜Ñ !Ò#Ü˜X yÖ1�Ü  ¨1¡¨jÖ9�CØ×%Ñ% c¨3°Õ=ñ :ð 2ð �xÑ !Ò#Ü˜W jÖ1�Ü  ¨A¡¨yÖ9�CØ×%Ñ% c¨3°Õ=ñ :ñ 2ð $r=   c                ó0  — t        ||«      D ]<  }| j                  |||j                  «       | j                  |||j                  «       Œ> t        ||«      D ]<  }| j	                  |||j
                  «       | j	                  |||j                  «       Œ> y)a  Set border `style` to the rectangle (top_row, bottom_row, ...)

        The values describing the grid lines between the cells, see doc-strings
        for methods set_x_border() and set_y_border() and see comments for
        self._x_borders and self._y_borders.
        N)rª   r  rÖ   rØ   r  rÕ   r×   )r6   r0  r-  r1  r.  rG   rL   rK   s           r;   r*  zGrid._set_rect_bordersz  s€   € ô ˜ 9Ö-ˆCØ×Ñ˜g s¨E¯I©IÔ6Ø×Ñ˜j¨#¨u¯|©|Õ<ð .ô ˜ *Ö-ˆCØ×Ñ˜c 8¨U¯Z©ZÔ8Ø×Ñ˜c 9¨e¯k©kÕ:ñ .r=   c                óÔ   — |D ]c  }|j                   d   }|j                   d   }||j                  d   z   }||j                  d   z   }| j                  |||||j                  «       Œe y)z#Set borders for all defined frames.r   r“   N)rf   rH   r*  rG   )r6   r4   rk   r0  r1  r-  r.  s          r;   r%  zGrid._set_frames�  sg   € ãˆEØ—i‘i ‘lˆGØ—y‘y ‘|ˆHØ  5§:¡:¨a¡=Ñ0ˆJØ  5§:¡:¨a¡=Ñ0ˆIØ×"Ñ"Ø˜ X¨y¸%¿+¹+õñ r=   c                ól   ‡ ‡‡‡‡— dˆˆfd„Šˆˆ ˆfd„}ˆˆ ˆfd„}‰j                   Š |«         |«        y)z:Render the grid lines as LINE entities into layout object.c           	     óŽ   •— |j                   r8‰j                  | |‰|j                  |j                  |j                  dœ¬«       yy)z*Render the LINE entity into layout object.)r  rw   rx   ry   )ÚstartÚendr   N)rz   Úadd_linerw   rx   ry   )r6  r7  rG   r  rŽ   s      €€r;   Úrender_linez)Grid._render_borders.<locals>.render_line�  sE   ø€ à�|Š|Ø—‘ØØà!&Ø!&§¡Ø$)§N¡NØ&+×&6Ñ&6ñ	 ð  õ 	ð r=   c            	     ó4  •— t        ‰j                  dz   «      D ]|  } ‰j                  |    }t        ‰j                  «      D ]S  }‰j                  |   }‰j                  |dz      }‰j                  | |«      } ‰t        ||«      t        ||«      |«       ŒU Œ~ y)zDraw the horizontal grid lines.r“   N)rª   r%   r÷   r&   rõ   r  r   )	rK   r  rL   rÕ   r×   rG   r9  r6   r¡   s	         €€€r;   Úrender_x_bordersz.Grid._render_borders.<locals>.render_x_borders«  s…   ø€ ä˜UŸ[™[¨1™_Ö-�Ø—L‘L Ñ%�Ü  §¡Ö-�CØŸ<™<¨Ñ,�DØ ŸL™L¨¨q©Ñ1�EØ ×-Ñ-¨c°3Ó7�EÙ¤ T¨1£¬t°E¸1«~¸uÕEñ	 .ñ .r=   c            	     ó4  •— t        ‰j                  dz   «      D ]|  } ‰j                  |    }t        ‰j                  «      D ]S  }‰j                  |   }‰j                  |dz      }‰j                  || «      } ‰t        ||«      t        ||«      |«       ŒU Œ~ y)zDraw the vertical grid lines.r“   N)rª   r&   rõ   r%   r÷   r  r   )	rL   r  rK   rÖ   rØ   rG   r9  r6   r¡   s	         €€€r;   Úrender_y_bordersz.Grid._render_borders.<locals>.render_y_bordersµ  s…   ø€ ä˜UŸ[™[¨1™_Ö-�Ø—L‘L Ñ%�Ü  §¡Ö-�CØŸ,™, sÑ+�CØ!Ÿ\™\¨#°©'Ñ2�FØ ×-Ñ-¨c°3Ó7�EÙ¤ Q¨£¬d°1°f«o¸uÕEñ	 .ñ .r=   N)r6  r   r7  r   rG   rv   )r.   )r6   rŽ   r¡   r;  r=  r  r9  s   ```  @@r;   r'  zGrid._render_bordersš  s-   ü€ ö	ö	Fö	Fð ×%Ñ%ˆÙÔÙÕr=   Nrº   )rü   rv   rý   rv   )rK   rc   rL   rc   r•   rc   )rK   rc   rL   rc   r|   rv   )r
  úlist[BorderStyle]rK   rc   rL   rc   r|   rv   )rK   rc   rL   rc   r•   rv   )r
  r>  rK   rc   rL   rc   r•   rv   )r•   úlist[float])rK   rc   rL   rc   rH   r”   r•   z!tuple[float, float, float, float])rŽ   r   rK   rc   rL   rc   rN   r   )rŽ   r   r(  r‰   )r,  zIterable[tuple[int, int, Cell]])
r0  rc   r-  rc   r1  rc   r.  rc   r|   rv   )
r0  rc   r-  rc   r1  rc   r.  rc   rG   r/   )r4   zIterable[Frame])rŽ   r   r¡   r!   )r–   r—   r˜   r™   r<   rÿ   r  r  r  r  r  r  r  rô   rö   r  r‹   rŒ   r�   r&  r+  r*  r%  r'  r…   r=   r;   rŠ   rŠ   É  sq  „ ÙBó
ó.	4ó2óOóOð1à"ð1ð ð1ð ð	1ð
 "ó1ó;ó;ð5Ø(ð5Ø/2ð5Ø9<ð5à	ó5óóð(Øð(Ø ð(Ø(7ð(à	*ó(ð
Ø'ð
Ø.1ð
Ø8;ð
ØCGó
ð">Ø'ð>Ø.1ð>Ø8;ð>ØCGó>ó	1óð>àð>ð ð>ð ð	>ð
 ð>ð "ó>ð(;àð;ð ð;ð ð	;ð
 ð;ð ó;ó*	ô'r=   rŠ   c                  ó<   — e Zd ZdZ	 	 	 d	 	 	 	 	 dd„Zedd„«       Zy)rg   a0  Represent a rectangle cell area enclosed by borderlines.

    Args:
         table: the assigned data table
         pos: tuple (row, col), border goes left and top of pos
         span: count of cells that Frame covers, border goes right and below of this cells
         style: style name as string
    c                ó<   — || _         || _        || _        || _        y r�   )r¡   rf   rH   Ú	stylename)r6   r¡   rf   rH   rG   s        r;   r<   zFrame.__init__Î  s    € ð ˆŒ
ØˆŒØˆŒ	Øˆ�r=   c                óL   — | j                   j                  | j                  «      S r�   ©r¡   r1   rB  rW   s    r;   rG   zFrame.styleÚ  s   € à�z‰z×(Ñ(¨¯©Ó8Ð8r=   N))r   r   r’   r#   )r¡   r!   rf   r”   rH   r”   ©r•   r/   )r–   r—   r˜   r™   r<   rœ   rG   r…   r=   r;   rg   rg   Ä  sG   „ ñð  &Ø &Øð
àð
ð ð
ð ó	
ð ò9ó ñ9r=   rg   c                  óŠ   — e Zd ZdZ	 	 d		 	 	 d
d„Zedd„«       Zej                  dd„«       Zedd„«       Z	 	 	 	 	 	 dd„Z	dd„Z
y)r   a²  Base class for table cells.

    Args:
        table: assigned data table
        style: style name as string
        span: tuple(spanrows, spancols), count of cells that cell covers

    A cell doesn't know its own position in the data table, because a cell can
    be used multiple times in the same or in different tables, therefore the
    cell itself can not determine if the cell-range reaches beyond the table
    borders.
    c                ó.   — || _         || _        || _        y r�   )r¡   rB  rH   )r6   r¡   rG   rH   s       r;   r<   zCell.__init__í  s   € ð ˆŒ
ØˆŒàˆ�	r=   c                ó   — | j                   S )zGet/set table span parameters.)Ú_spanrW   s    r;   rH   z	Cell.spanø  s   € ð �z‰zÐr=   c                óJ   — t        d|d   «      t        d|d   «      f| _        y)z4Ensures that span values are >= 1 in each direction.r“   r   N)ÚmaxrI  )r6   rB   s     r;   rH   z	Cell.spaný  s&   € ô ˜!˜U 1™XÓ&¬¨A¨u°Q©xÓ(8Ð9ˆ�
r=   c                óL   — | j                   j                  | j                  «      S )z*Returns the associated :class:`CellStyle`.rD  rW   s    r;   rG   z
Cell.style  s   € ð �z‰z×(Ñ(¨¯©Ó8Ð8r=   c                 ó   — y)z1Renders the cell content into the given `layout`.Nr…   )r6   rŽ   r#  r  s       r;   r‘   zCell.render  s   € ð 	r=   c                ó–   — | j                   j                  }| j                   j                  }|d   |z   |d   |z
  |d   |z
  |d   |z   fS )zCReduces the cell-coords about the margin_x and the margin_y values.r   r“   é   é   )rG   rÐ   rÒ   )r6   r#  rÐ   rÒ   s       r;   Úget_workspace_coordszCell.get_workspace_coords  sZ   € à—:‘:×&Ñ&ˆØ—:‘:×&Ñ&ˆà�1‰I˜Ñ Ø�1‰I˜Ñ Ø�1‰I˜Ñ Ø�1‰I˜Ñ ð	
ð 	
r=   N©r#   r’   )r¡   r!   rH   r”   rë   )rB   r”   rE  ©rŽ   r   r#  úSequence[float]r  ro   )r#  rT  r•   rT  )r–   r—   r˜   r™   r<   rœ   rH   ÚsetterrG   r‘   rQ  r…   r=   r;   r   r   ß  sˆ   „ ñð  Ø &ð		àð	ð ó		ð òó ðð 
‡[�[ò:ó ð:ð ò9ó ð9ðØ'ðØ1@ðØILóô	
r=   c                  óH   ‡ — e Zd ZdZ	 	 d	 	 	 	 	 dˆ fd„Z	 	 	 	 	 	 dd„Zˆ xZS )rI   a¶  Implements a cell type containing a multi-line text. Uses the
    :class:`~ezdxf.addons.MTextSurrogate` add-on to render the multi-line
    text, therefore the content of these cells is compatible to DXF R12.

    Args:
        table: assigned data table
        text: multi line text, lines separated by the new line character ``"\n"``
        style: cell style name as string
        span: tuple(rows, cols) area of cells to cover

    c                ó>   •— t         t        | �  |||«       || _        y r�   )ÚsuperrI   r<   rM   )r6   r¡   rM   rG   rH   Ú	__class__s        €r;   r<   zTextCell.__init__)  s   ø€ ô 	Œh˜Ñ& u¨e°TÔ:Øˆ�	r=   c                óì  — t        | j                  «      sy| j                  |«      \  }}}}| j                  }|j	                  «       \  }	}
| j                  j
                  }| j                  }|j                  r4d}dj                  d„ | j                  j                  dd«      D «       «      }|t        ||z   «      dz  |f|	   }|t        ||z   «      dz  |f|
dz
     }t        |||f| j                  j                  | j                  j                  | j                  j                  || j                  j                  |j                  | j                  j                   |¬«
      }|j#                  |«       y)	z¾Text cell.

        Args:
            layout: target layout
            coords: tuple of border-coordinates: left, right, top, bottom
            layer: target layer name as string

        Nr¿   Ú
c              3  ó    K  — | ]  }|–— Œ y ­wr�   r…   )rƒ   Úchars     r;   r„   z"TextCell.render.<locals>.<genexpr>H  s   è ø€ ÐLÑ/K tœdÑ/Kùs   ‚Ú ç       @r“   )rÄ   rG   rÂ   rË   Úwidth_factorrÎ   rw   r  )ÚlenrM   rQ  rG   rê   rË   rÌ   ÚjoinÚreplacer?   r   rÄ   rÀ   rÂ   rÆ   rÎ   rÊ   r‘   )r6   rŽ   r#  r  rÕ   r×   rÖ   rØ   rG   Úh_alignÚv_alignÚrotatedrM   ÚxposÚyposÚmtexts                   r;   r‘   zTextCell.render3  sB  € ô �4—9‘9Œ~Øà#'×#<Ñ#<¸VÓ#DÑ ˆˆe�S˜&Ø—
‘
ˆØ ×5Ñ5Ó7Ñˆ�Ø—*‘*×%Ñ%ˆØ�y‰yˆØ�=Š=ØˆGØ—9‘9ÑL¨t¯y©y×/@Ñ/@ÀÀsÔ/KÓLÓMˆDØ”e˜D 5™LÓ)¨CÑ/°Ð7¸Ñ@ˆØœ˜f s™lÓ+¨cÑ1°3Ð7¸À!¹ÑDˆÜØØ�4ˆLØŸ™×0Ñ0Ø—*‘*×'Ñ'ØŸ
™
×.Ñ.ØØŸ™×+Ñ+Ø—+‘+Ø—*‘*×'Ñ'Øô
ˆð 	�‰�VÕr=   rR  )r¡   r!   rM   ro   rH   r”   rS  ©r–   r—   r˜   r™   r<   r‘   Ú__classcell__©rY  s   @r;   rI   rI     sN   ø„ ñ
ð  Ø &ðàðð ðð
 õð$Ø'ð$Ø1@ð$ØIL÷$r=   rI   c                  óJ   ‡ — e Zd ZdZ	 	 	 d	 	 	 	 	 dˆ fd„Z	 	 	 	 	 	 dd„Zˆ xZS )rR   a<  Implements a cell type containing a block reference.

    Args:
        table: table object
        blockdef: :class:`ezdxf.layouts.BlockLayout` instance
        attribs: BLOCK attributes as (tag, value) dictionary
        style: cell style name as string
        span: tuple(rows, cols) area of cells to cover

    c                óh   •— |€i }t         t        | �  |||«       |j                  | _        || _        y r�   )rX  rR   r<   rq   Ú
block_namerQ   )r6   r¡   rS   rG   rQ   rH   rY  s         €r;   r<   zBlockCell.__init__f  s4   ø€ ð ˆ?ØˆGÜŒi˜Ñ'¨¨u°dÔ;Ø"Ÿ-™-ˆŒØˆ�r=   c           
     ól  — | j                  |«      \  }}}}| j                  }|j                  «       \  }	}
|t        ||z   «      dz  |f|	   }|t        ||z   «      dz  |f|
dz
     }|j	                  | j
                  ||f| j                  |j                  |j                  |j                  |dœ¬«       y)züCreate the cell content as INSERT-entity with trailing ATTRIB-Entities.

        Args:
            layout: target layout
            coords: tuple of border-coordinates : left, right, top, bottom
            layer: target layer name as string

        r_  r“   )ÚxscaleÚyscalerË   r  )rq   r$   Úvaluesr   N)
rQ  rG   rê   r?   Úadd_auto_blockrefro  rQ   rÆ   rÈ   rË   )r6   rŽ   r#  r  rÕ   r×   rÖ   rØ   rG   rd  re  rg  rh  s                r;   r‘   zBlockCell.rendert  sÀ   € ð $(×#<Ñ#<¸VÓ#DÑ ˆˆe�S˜&Ø—
‘
ˆØ ×5Ñ5Ó7Ñˆ�Ø”e˜D 5™LÓ)¨CÑ/°Ð7¸Ñ@ˆØœ˜f s™lÓ+¨cÑ1°3Ð7¸À!¹ÑDˆØ× Ñ Ø—‘Ø˜$�<Ø—<‘<àŸ-™-ØŸ-™-Ø!ŸN™NØñ	ð	 	!õ 
	
r=   )r#   Nr’   )r¡   r!   rS   r   rH   r”   rS  rj  rl  s   @r;   rR   rR   Z  sQ   ø„ ñ	ð ØØ &ðàðð ðð õð
Ø'ð
Ø1@ð
ØIL÷
r=   rR   c                óF   — | } ||«       |D ]  }|||z  z  } ||«       Œ y)z™Adds step-by-step the fields-values, starting with <start_value>,
    and appends the resulting values to another object with the
    append-method.
    Nr…   )Ústart_valueÚfieldsrh   ÚsignÚpositionÚelements         r;   r  r  ‘  s1   € ð €HÙ
ˆ8ÔÛˆØ�G˜d‘NÑ"ˆÙˆxÕñ r=   )r   )rv  r?   rw  r?  rh   zCallable[[float], None]rx  r?   ):Ú
__future__r   Útypingr   r   r   r   r   r	   r
   r   Úcopyr   Úezdxf.lldxfr   Úezdxf.enumsr   r   Úezdxf.addonsr   Ú
ezdxf.mathr   r   Úezdxf.layoutsr   Úezdxf.eztypesr   r)   r+   r-   ÚDEFAULT_TEXT_STYLEr›   rš   rÁ   rÃ   rÅ   rÇ   r   rÉ   rÓ   rÏ   rÑ   rï   rð   rî   rñ   r   r!   r‰   r/   rv   rŠ   rg   r   Ú
CustomCellrI   rR   r  r…   r=   r;   Ú<module>r†     sU  ðõ #÷	÷ 	ó 	õ å ÷õ (ß !áÝ)Ý/à*Ð Ø'Ð Ø&Ð ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØŸ™Ð ØÐ ØÐ ØÐ ØÐ Ø#Ð ØÐ ØÐ ñ ˆC�vÔ€÷]$ñ ]$÷@;
ñ ;
÷|W4ñ W4÷t!ñ !÷<xñ x÷v9ñ 9÷67
ñ 7
ðt €
ô;ˆtô ;ô|4
�ô 4
ðv ð	Øðàðð $ðð ô	r=   