
    h                        % S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  \(       a*  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SrS\S'    " S S\5      rg	)zBlock item container, used by body, cell, header, etc.

Block level items are things like paragraph and table, although there are a few other
specialized ones like structured document tags.
    )annotations)TYPE_CHECKINGIterator)	TypeAlias)CT_Tbl)CT_P)
StoryChild)	ParagraphN)CT_Body)	CT_HdrFtr)CT_Tc)Length)ParagraphStyleTablezCT_Body | CT_HdrFtr | CT_Tcr   BlockItemElementc                  x   ^  \ rS rSrSrSU 4S jjrSSS jjrSS jrSS jr\	S 5       r
\	S 5       rS	 rS
rU =r$ )BlockItemContainer    zBase class for proxy objects that can contain block items.

These containers include _Body, _Cell, header, footer, footnote, endnote, comment,
and text box objects. Provides the shared functionality to add a block item like a
paragraph or table.
c                8   > [         [        U ]  U5        Xl        g )N)superr   __init___element)selfelementparent	__class__s      ?/var/www/html/env/lib/python3.13/site-packages/docx/blkcntnr.pyr   BlockItemContainer.__init__(   s     $08    c                h    U R                  5       nU(       a  UR                  U5        Ub  X#l        U$ )a  Return paragraph newly added to the end of the content in this container.

The paragraph has `text` in a single run if present, and is given paragraph
style `style`.

If `style` is |None|, no paragraph style is applied, which has the same effect
as applying the 'Normal' style.
)_add_paragraphadd_runstyle)r   textr$   	paragraphs       r   add_paragraph BlockItemContainer.add_paragraph,   s4     '')	d##Or    c                    SSK Jn  [        R                  " XU5      nU R                  R                  U5        U" XP5      $ )zReturn table of `width` having `rows` rows and `cols` columns.

The table is appended appended at the end of the content in this container.

`width` is evenly distributed between the table columns.
r   r   )
docx.tabler   r   new_tblr   _insert_tbl)r   rowscolswidthr   tbls         r   	add_tableBlockItemContainer.add_table<   s4     	%nnT/!!#&Sr    c              #     #    SSK Jn  U R                  R                   H-  n[	        U[
        5      (       a  [        X 5      OU" X 5      v   M/     g7f)zIGenerate each `Paragraph` or `Table` in this container in document order.r   r   N)r*   r   r   inner_content_elements
isinstancer   r
   )r   r   r   s      r   iter_inner_content%BlockItemContainer.iter_inner_contentI   s;     $}};;G/9'4/H/H9W+eT[Nbc <s   AAc                l    U R                   R                   Vs/ s H  n[        X5      PM     sn$ s  snf )zSA list containing the paragraphs in this container, in document order.

Read-only.
)r   p_lstr
   )r   ps     r   
paragraphsBlockItemContainer.paragraphsP   s-     -1MM,?,?@,?q	!",?@@@s   1c                p    SSK Jn  U R                  R                   Vs/ s H
  o!" X 5      PM     sn$ s  snf )zOA list containing the tables in this container, in document order.

Read-only.
r   r   )r*   r   r   tbl_lst)r   r   r0   s      r   tablesBlockItemContainer.tablesX   s0     	%,0MM,A,AB,ASc ,ABBBs   3c                J    [        U R                  R                  5       U 5      $ )zIReturn paragraph newly added to the end of the content in this container.)r
   r   add_p)r   s    r   r"   !BlockItemContainer._add_paragraphb   s    ,,.55r    )r   )r   r   r   zt.ProvidesStoryPart) N)r%   strr$   zstr | ParagraphStyle | Nonereturnr
   )r-   intr.   rG   r/   r   rF   r   )rF   zIterator[Paragraph | Table])__name__
__module____qualname____firstlineno____doc__r   r'   r1   r6   propertyr;   r?   r"   __static_attributes____classcell__)r   s   @r   r   r       sS       d A A C C6 6r    r   ) rL   
__future__r   typingr   r   typing_extensionsr   docx.oxml.tabler   docx.oxml.text.paragraphr   docx.sharedr	   docx.text.paragraphr
   
docx.typestypestdocx.oxml.documentr   docx.oxml.sectionr   r   r   docx.styles.styler   r*   r   r   __annotations__r    r    r   <module>r_      sR    # * ' " ) " )*+%"0 ; ) ;D6 D6r    