ó
    ‰*£h  ã                  ó  • S r SSKJr  SSKJrJrJr  SSKJr  SSK	J
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  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\5      r'g)z+|DocumentPart| and closely related objects.é    )Úannotations)ÚIOÚTYPE_CHECKINGÚcast)ÚDocument)ÚRELATIONSHIP_TYPE)ÚCommentsPart)Ú
FooterPartÚ
HeaderPart)ÚNumberingPart)ÚSettingsPart)Ú	StoryPart)Ú
StylesPart)ÚInlineShapes)Úlazyproperty)ÚComments)ÚWD_STYLE_TYPE)ÚCoreProperties)ÚSettings)Ú	BaseStylec                  ó  • \ rS rSrSrS rS r\SS j5       r\SS j5       r	\S 5       r
SS jrSS	 jrSS
 jrS rSS jr\S 5       r\SS j5       rSS jr\SS j5       r\S 5       r\SS j5       r\S S j5       r\S!S j5       rSrg)"ÚDocumentParté   a}  Main document part of a WordprocessingML (WML) package, aka a .docx file.

Acts as broker to other parts such as image, core properties, and style parts. It
also acts as a convenient delegate when a mid-document object needs a service
involving a remote ancestor. The `Parented.part` property inherited by many content
objects provides access to this part object for that purpose.
c                óˆ   • [         R                  " U R                  5      nU R                  U[        R
                  5      nX4$ )z=Return (footer_part, rId) pair for newly-created footer part.)r
   ÚnewÚpackageÚ	relate_toÚRTÚFOOTER)ÚselfÚfooter_partÚrIds      ÚP/home/mande/repo/quber/.venv/lib/python3.13/site-packages/docx/parts/document.pyÚadd_footer_partÚDocumentPart.add_footer_part#   ó1   € ä —n’n T§\¡\Ó2ˆØ�n‰n˜[¬"¯)©)Ó4ˆØÐÐó    c                óˆ   • [         R                  " U R                  5      nU R                  U[        R
                  5      nX4$ )z=Return (header_part, rId) pair for newly-created header part.)r   r   r   r   r   ÚHEADER)r    Úheader_partr"   s      r#   Úadd_header_partÚDocumentPart.add_header_part)   r&   r'   c                ó.   • U R                   R                  $ )zJ|Comments| object providing access to the comments added to this document.)Ú_comments_partÚcomments©r    s    r#   r/   ÚDocumentPart.comments/   s   € ð ×"Ñ"×+Ñ+Ð+r'   c                ó.   • U R                   R                  $ )z^A |CoreProperties| object providing read/write access to the core properties
of this document.)r   Úcore_propertiesr0   s    r#   r3   ÚDocumentPart.core_properties4   s   € ð �|‰|×+Ñ+Ð+r'   c                ó.   • [        U R                  U 5      $ )zEA |Document| object providing access to the content of this document.)r   Ú_elementr0   s    r#   ÚdocumentÚDocumentPart.document:   s   € ô ˜Ÿ™ tÓ,Ð,r'   c                ó&   • U R                  U5        g)z/Remove related header part identified by `rId`.N)Údrop_rel©r    r"   s     r#   Údrop_header_partÚDocumentPart.drop_header_part?   s   € à�‰�cÕr'   c                ó    • U R                   U   $ )z%Return |FooterPart| related by `rId`.©Úrelated_partsr;   s     r#   r!   ÚDocumentPart.footer_partC   ó   € à×!Ñ! #Ñ&Ð&r'   c                ó8   • U R                   R                  X5      $ )z®Return the style in this document matching `style_id`.

Returns the default style for `style_type` if `style_id` is |None| or does not
match a defined style of `style_type`.
)ÚstylesÚ	get_by_id)r    Ústyle_idÚ
style_types      r#   Ú	get_styleÚDocumentPart.get_styleG   s   € ð �{‰{×$Ñ$ XÓ:Ð:r'   c                ó8   • U R                   R                  X5      $ )a,  Return the style_id (|str|) of the style of `style_type` matching
`style_or_name`.

Returns |None| if the style resolves to the default style for `style_type` or if
`style_or_name` is itself |None|. Raises if `style_or_name` is a style of the
wrong type or names a style not present in the document.
)rD   Úget_style_id)r    Ústyle_or_namerG   s      r#   rK   ÚDocumentPart.get_style_idO   s   € ð �{‰{×'Ñ'¨ÓBÐBr'   c                ó    • U R                   U   $ )z%Return |HeaderPart| related by `rId`.r?   r;   s     r#   r*   ÚDocumentPart.header_partY   rB   r'   c                óB   • [        U R                  R                  U 5      $ )zIThe |InlineShapes| instance containing the inline shapes in the document.)r   r6   Úbodyr0   s    r#   Úinline_shapesÚDocumentPart.inline_shapes]   s   € ô ˜DŸM™M×.Ñ.°Ó5Ð5r'   c                óì   •  [        [        U R                  [        R                  5      5      $ ! [
         a:    [        R                  " 5       nU R                  U[        R                  5        Us $ f = f)z’A |NumberingPart| object providing access to the numbering definitions for this document.

Creates an empty numbering part if one is not present.
)r   r   Úpart_related_byr   Ú	NUMBERINGÚKeyErrorr   r   )r    Únumbering_parts     r#   rX   ÚDocumentPart.numbering_partb   sX   € ð	"Üœ t×';Ñ';¼B¿L¹LÓ'IÓJÐJøÜó 	"Ü*×.Ò.Ó0ˆNØ�N‰N˜>¬2¯<©<Ô8Ø!Ò!ð	"ús   ‚,/ ¯AA3Á2A3c                ó:   • U R                   R                  U5        g)z}Save this document to `path_or_stream`, which can be either a path to a
filesystem location (a string) or a file-like object.N)r   Úsave)r    Úpath_or_streams     r#   r[   ÚDocumentPart.saveo   s   € ð 	�‰×Ñ˜.Õ)r'   c                ó.   • U R                   R                  $ )z[A |Settings| object providing access to the settings in the settings part of
this document.)Ú_settings_partÚsettingsr0   s    r#   r`   ÚDocumentPart.settingst   s   € ð ×"Ñ"×+Ñ+Ð+r'   c                ó.   • U R                   R                  $ )zUA |Styles| object providing access to the styles in the styles part of this
document.)Ú_styles_partrD   r0   s    r#   rD   ÚDocumentPart.stylesz   s   € ð × Ñ ×'Ñ'Ð'r'   c                ó   •  [        [        U R                  [        R                  5      5      $ ! [
         aT    U R                  c   e[        R                  " U R                  5      nU R                  U[        R                  5        Us $ f = f)z‰A |CommentsPart| object providing access to the comments added to this document.

Creates a default comments part if one is not present.
)	r   r	   rU   r   ÚCOMMENTSrW   r   Údefaultr   )r    Úcomments_parts     r#   r.   ÚDocumentPart._comments_part€   sn   € ð	!Üœ d×&:Ñ&:¼2¿;¹;Ó&GÓHÐHøÜó 	!Ø—<‘<Ñ+Ð+Ð+Ü(×0Ò0°·±Ó>ˆMØ�N‰N˜=¬"¯+©+Ô6Ø Ò ð		!ús   ‚,/ ¯ABÂBc                ó  •  [        [        U R                  [        R                  5      5      $ ! [
         aE    [        R                  " U R                  5      nU R                  U[        R                  5        Us $ f = f)z“A |SettingsPart| object providing access to the document-level settings for
this document.

Creates a default settings part if one is not present.
)	r   r   rU   r   ÚSETTINGSrW   rg   r   r   )r    Úsettings_parts     r#   r_   ÚDocumentPart._settings_partŽ   s^   € ð	!Üœ d×&:Ñ&:¼2¿;¹;Ó&GÓHÐHøÜó 	!Ü(×0Ò0°·±Ó>ˆMØ�N‰N˜=¬"¯+©+Ô6Ø Ò ð	!ús   ‚,/ ¯AA>Á=A>c                ó  •  [        [        U R                  [        R                  5      5      $ ! [
         aL    U R                  nUc   e[        R                  " U5      nU R                  U[        R                  5        Us $ f = f)zaInstance of |StylesPart| for this document.

Creates an empty styles part if one is not present.
)	r   r   rU   r   ÚSTYLESrW   r   rg   r   )r    r   Ústyles_parts      r#   rc   ÚDocumentPart._styles_partœ   so   € ð	Üœ
 D×$8Ñ$8¼¿¹Ó$CÓDÐDøÜó 	Ø—l‘lˆGØÑ&Ð&Ð&Ü$×,Ò,¨WÓ5ˆKØ�N‰N˜;¬¯	©	Ô2ØÒð	ús   ‚,/ ¯ABÂB© N)Úreturnr   )rs   r   )r"   Ústrrs   ÚNone)r"   rt   )rF   z
str | NonerG   r   rs   r   )rs   r   )r\   zstr | IO[bytes])rs   r   )rs   r	   )rs   r   )rs   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r$   r+   Úpropertyr/   r3   r7   r<   r!   rH   rK   r*   r   rR   rX   r[   r`   rD   r.   r_   rc   Ú__static_attributes__rr   r'   r#   r   r      sø   † ñò ò ð ó,ó ð,ð ó,ó ð,ð
 ñ-ó ð-ôô'ô;òCô'ð ñ6ó ð6ð ó
"ó ð
"ô*ð
 ó,ó ð,ð
 ñ(ó ð(ð
 ó!ó ð!ð ó!ó ð!ð óó ór'   r   N)(rz   Ú
__future__r   Útypingr   r   r   Údocx.documentr   Údocx.opc.constantsr   r   Údocx.parts.commentsr	   Údocx.parts.hdrftrr
   r   Údocx.parts.numberingr   Údocx.parts.settingsr   Údocx.parts.storyr   Údocx.parts.stylesr   Ú
docx.shaper   Údocx.sharedr   Údocx.commentsr   Údocx.enum.styler   Údocx.opc.corepropsr   Údocx.settingsr   Údocx.styles.styler   r   rr   r'   r#   Ú<module>rŽ      sO   ðÙ 1å "ç *Ñ *å "Ý 6Ý ,ß 4Ý .Ý ,Ý &Ý (Ý #Ý $æÝ&Ý-Ý1Ý&Ý+ôO�9õ Or'   