
    h4#                       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JrJrJrJrJr  SSKJrJrJrJrJr  \(       a  SSKJr   " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r  " S S\5      r! " S S\5      r" " S S\5      r# " S S \5      r$ " S! S"\5      r% " S# S$\5      r& " S% S&\5      r' " S' S(\5      r( " S) S*\5      r)g+),zDCustom element classes for shape-related elements like `<w:inline>`.    )annotations)TYPE_CHECKINGcastnsdecls)	parse_xml)ST_CoordinateST_DrawingElementIdST_PositiveCoordinateST_RelationshipId	XsdStringXsdToken)BaseOxmlElementOneAndOnlyOneOptionalAttributeRequiredAttribute	ZeroOrOne)Lengthc                      \ rS rSrSrSrg)	CT_Anchor   z8`<wp:anchor>` element, container for a "floating" shape. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       A/var/www/html/env/lib/python3.13/site-packages/docx/oxml/shape.pyr   r      s    Br    r   c                  R    \ rS rSr% Sr\" S\5      rS\S'   \" S\5      r	S\S'   Sr
g	)
CT_Blip!   zT``<a:blip>`` element, specifies image source and adjustments such as alpha and
tint.zr:embedz
str | Noneembedzr:linklinkr   N)r   r   r   r   r   r   r   r%   __annotations__r&   r   r   r    r!   r#   r#   !   s9     *$E:  )#D* r    r#   c                  2    \ rS rSr% Sr\" SSS9rS\S'   Srg	)
CT_BlipFillProperties-   z9``<pic:blipFill>`` element, specifies picture properties.za:blip)z	a:srcRectza:tilez	a:stretch
successorsr#   blipr   N)	r   r   r   r   r   r   r-   r'   r   r   r    r!   r)   r)   -   s    CAD' r    r)   c                  4    \ rS rSr% Sr\" S5      rS\S'   Srg)CT_GraphicalObject5   z:``<a:graphic>`` element, container for a DrawingML object.za:graphicDataCT_GraphicalObjectDatagraphicDatar   N)	r   r   r   r   r   r   r2   r'   r   r   r    r!   r/   r/   5   s    D*7+K' r    r/   c                  P    \ rS rSr% Sr\" S5      rS\S'   \" S\	5      r
S\S'   Srg	)
r1   =   zI``<a:graphicData>`` element, container for the XML of a DrawingML object.zpic:pic
CT_Picturepicuristrr   N)r   r   r   r   r   r   r6   r'   r   r   r7   r   r   r    r!   r1   r1   =   s%    S	*C* 1C1r    r1   c                      \ rS rSr% Sr\" S5      rS\S'   \" S5      rS\S'   \" S	5      r	S
\S'   \
SS j5       r\
            SS j5       r\
S 5       rSrg)	CT_InlineD   z5`<wp:inline>` element, container for an inline shape.z	wp:extentCT_PositiveSize2Dextentzwp:docPrCT_NonVisualDrawingPropsdocPrz	a:graphicr/   graphicc                \   [        [        [        U R                  5       5      5      nXR                  l        X%R                  l        X5R                  l        SU-  UR                  l	        SUR                  R                  l        UR                  R                  R                  U5        U$ )zTReturn a new ``<wp:inline>`` element populated with the values passed as
parameters.z
Picture %dz8http://schemas.openxmlformats.org/drawingml/2006/picture)r   r:   r   _inline_xmlr=   cxcyr?   idnamer@   r2   r7   _insert_pic)clsrC   rD   shape_idr6   inlines         r!   newCT_Inline.newO   sy     i3??+<!=>"(83)c""&""..s3r    c                    Sn[         R                  XcX$U5      nU R                  XEX5      nUR                  R                  R	                  U5        U$ )zCreate `wp:inline` element containing a `pic:pic` element.

The contents of the `pic:pic` element is taken from the argument values.
r   )r5   rK   r@   r2   rG   )	rH   rI   rIdfilenamerC   rD   pic_idr6   rJ   s	            r!   new_pic_inlineCT_Inline.new_pic_inline\   sH     nnVs;/""..s3r    c                $    S[        SSSS5      -  $ )Na  <wp:inline %s>
  <wp:extent cx="914400" cy="914400"/>
  <wp:docPr id="666" name="unnamed"/>
  <wp:cNvGraphicFramePr>
    <a:graphicFrameLocks noChangeAspect="1"/>
  </wp:cNvGraphicFramePr>
  <a:graphic>
    <a:graphicData uri="URI not set"/>
  </a:graphic>
</wp:inline>wpar6   rr   rH   s    r!   rB   CT_Inline._inline_xmlj   s!    	 %T3s;	<	
r    r   N)
rC   r   rD   r   rI   intr6   r5   returnr:   )rI   rY   rN   r8   rO   r8   rC   r   rD   r   rZ   r:   )r   r   r   r   r   r   r=   r'   r?   r@   classmethodrK   rQ   rB   r   r   r    r!   r:   r:   D   s    ? -k :F:&3'E#  #0#G  
 
 !$039?EK	  
 
r    r:   c                  <    \ rS rSrSr\" S\5      r\" S\5      r	Sr
g)r>   z   zhUsed for ``<wp:docPr>`` element, and perhaps others.

Specifies the id and name of a DrawingML drawing.
rE   rF   r   N)r   r   r   r   r   r   r
   rE   r   rF   r   r   r    r!   r>   r>   z   s"    
 
4!4	5BVY/Dr    r>   c                      \ rS rSrSrSrg)CT_NonVisualPictureProperties   zK``<pic:cNvPicPr>`` element, specifies picture locking and resize behaviors.r   Nr   r   r    r!   r_   r_      s    Ur    r_   c                      \ rS rSr% Sr\" S5      rS\S'   \" S5      rS\S'   \" S	5      r	S
\S'   \
S 5       r\
S 5       rSrg)r5      z+``<pic:pic>`` element, a DrawingML picture.zpic:nvPicPrCT_PictureNonVisualnvPicPrzpic:blipFillr)   blipFillzpic:spPrCT_ShapePropertiesspPrc                   [        U R                  5       5      nXR                  R                  l        X&R                  R                  l        X6R                  R                  l        XFR                  l
        XVR                  l        U$ )zReturn a new ``<pic:pic>`` element populated with the minimal contents
required to define a viable picture element, based on the values passed as
parameters.)r   _pic_xmlrd   cNvPrrE   rF   re   r-   r%   rg   rC   rD   )rH   rP   rO   rN   rC   rD   r6   s          r!   rK   CT_Picture.new   s[    
 '%!)"%
r    c                "    S[        SSS5      -  $ )Naq  <pic:pic %s>
  <pic:nvPicPr>
    <pic:cNvPr id="666" name="unnamed"/>
    <pic:cNvPicPr/>
  </pic:nvPicPr>
  <pic:blipFill>
    <a:blip/>
    <a:stretch>
      <a:fillRect/>
    </a:stretch>
  </pic:blipFill>
  <pic:spPr>
    <a:xfrm>
      <a:off x="0" y="0"/>
      <a:ext cx="914400" cy="914400"/>
    </a:xfrm>
    <a:prstGeom prst="rect"/>
  </pic:spPr>
</pic:pic>r6   rU   rV   r   rW   s    r!   ri   CT_Picture._pic_xml   s    $ #5#s3%4	
r    r   N)r   r   r   r   r   r   rd   r'   re   rg   r[   rK   ri   r   r   r    r!   r5   r5      si    5#0$G   '4'H#   -Z8D
8
 
 
 
r    r5   c                  (    \ rS rSrSr\" S5      rSrg)rc      z9``<pic:nvPicPr>`` element, non-visual picture properties.z	pic:cNvPrr   N)r   r   r   r   r   r   rj   r   r   r    r!   rc   rc      s    C+&Er    rc   c                  <    \ rS rSrSr\" S\5      r\" S\5      rSr	g)
CT_Point2D   zYUsed for ``<a:off>`` element, and perhaps others.

Specifies an x, y coordinate (point).
xyr   N)
r   r   r   r   r   r   r	   rs   rt   r   r   r    r!   rq   rq      s!    
 	#}-A#}-Ar    rq   c                  R    \ rS rSr% Sr\" S\5      rS\S'   \" S\5      r	S\S'   Sr
g)r<      zhUsed for ``<wp:extent>`` element, and perhaps others later.

Specifies the size of a DrawingML drawing.
rC   r   rD   r   N)r   r   r   r   r   r   r   rC   r'   rD   r   r   r    r!   r<   r<      s9    
 ##B  ##B r    r<   c                      \ rS rSrSrSrg)CT_PresetGeometry2D   zS``<a:prstGeom>`` element, specifies an preset autoshape geometry, such as
``rect``.r   Nr   r   r    r!   rx   rx      s    r    rx   c                      \ rS rSrSrSrg)CT_RelativeRect   zT``<a:fillRect>`` element, specifying picture should fill containing rectangle
shape.r   Nr   r   r    r!   r{   r{          r    r{   c                      \ rS rSrSr\" SSS9r\S 5       r\R                  S 5       r\S 5       r
\
R                  S	 5       r
S
rg)rf      zF``<pic:spPr>`` element, specifies size and shape of picture container.za:xfrm)z
a:custGeomz
a:prstGeomza:lnza:effectLstza:effectDagz	a:scene3dza:sp3dza:extLstr+   c                :    U R                   nUc  gUR                  $ )z:Shape width as an instance of Emu, or None if not present.N)xfrmrC   selfr   s     r!   rC   CT_ShapeProperties.cx        yy<wwr    c                0    U R                  5       nXl        g N)get_or_add_xfrmrC   r   valuer   s      r!   rC   r          ##%r    c                :    U R                   nUc  gUR                  $ )z;Shape height as an instance of Emu, or None if not present.N)r   rD   r   s     r!   rD   CT_ShapeProperties.cy   r   r    c                0    U R                  5       nXl        g r   )r   rD   r   s      r!   rD   r     r   r    r   N)r   r   r   r   r   r   r   propertyrC   setterrD   r   r   r    r!   rf   rf      so    P	
D   YY    YY r    rf   c                      \ rS rSrSrSrg)CT_StretchInfoPropertiesi  zP``<a:stretch>`` element, specifies how picture should fill its containing
shape.r   Nr   r   r    r!   r   r     r}   r    r   c                      \ rS rSrSr\" SSS9r\" SSS9r\S 5       r	\	R                  S	 5       r	\S
 5       r\R                  S 5       rSrg)CT_Transform2Di  zD``<a:xfrm>`` element, specifies size and shape of picture container.za:off)a:extr+   r   r   c                :    U R                   nUc  g UR                  $ r   )extrC   r   r   s     r!   rC   CT_Transform2D.cx      hh;vvr    c                0    U R                  5       nXl        g r   )get_or_add_extrC   r   r   r   s      r!   rC   r         !!#r    c                :    U R                   nUc  g UR                  $ r   )r   rD   r   s     r!   rD   CT_Transform2D.cy$  r   r    c                0    U R                  5       nXl        g r   )r   rD   r   s      r!   rD   r   +  r   r    N)r   r   r   r   r   r   offr   r   rC   r   rD   r   r   r    r!   r   r     ss    N
G

3C
G
+C  YY    YY r    r   N)*r   
__future__r   typingr   r   docx.oxml.nsr   docx.oxml.parserr   docx.oxml.simpletypesr	   r
   r   r   r   r   docx.oxml.xmlchemyr   r   r   r   r   docx.sharedr   r   r#   r)   r/   r1   r:   r>   r_   r5   rc   rq   r<   rx   r{   rf   r   r   r   r    r!   <module>r      s   J " &   &   "C C	o 	O  2_ 23
 3
l0 0VO V.
 .
b'/ '. . / 
o 
) )X 
_ r    