
    li                        d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
 ddlmZmZmZmZ erddlmZ  G d de      Z G d	 d
e      Z G d de      Z G d de      Z G d de      Z G d de      Zy)z=Custom element classes for presentation-related XML elements.    )annotations)TYPE_CHECKINGCallablecast)
ST_SlideIdST_SlideSizeCoordinate	XsdString)BaseOxmlElementRequiredAttribute
ZeroOrMore	ZeroOrOne)Lengthc                      e Zd ZU dZded<   ded<   ded<    edd	
      Zded<    edd
      Zded<    edd
      Zded<   y)CT_PresentationzZ`p:presentation` element, root of the Presentation part stored as `/ppt/presentation.xml`.zCallable[[], CT_SlideSize]get_or_add_sldSzzCallable[[], CT_SlideIdList]get_or_add_sldIdLstz"Callable[[], CT_SlideMasterIdList]get_or_add_sldMasterIdLstzp:sldMasterIdLst)zp:notesMasterIdLstzp:handoutMasterIdLst
p:sldIdLstp:sldSz	p:notesSz)
successorszCT_SlideMasterIdList | NonesldMasterIdLstr   )r   r   zCT_SlideIdList | NonesldIdLstr   )r   zCT_SlideSize | NonesldSzN)	__name__
__module____qualname____doc____annotations__r   r   r   r        T/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/pptx/oxml/presentation.pyr   r      si    d0055AA 			
 /  '0!9'H#  "+n"E r!   r   c                  J    e Zd ZU dZ ede      Zded<    ede      Z	ded<   y)
CT_SlideIdzz`p:sldId` element.

    Direct child of `p:sldIdLst` that contains an `rId` reference to a slide in the presentation.
    idintr:idstrrIdN)
r   r   r   r   r   r   r%   r   r	   r)   r    r!   r"   r$   r$   )   s+    
  j1B1 3C3r!   r$   c                  P    e Zd ZU dZded<   ded<    ed      Zd
dZedd       Z	y	)CT_SlideIdListz}`p:sldIdLst` element.

    Direct child of <p:presentation> that contains a list of the slide parts in the presentation.
    zlist[CT_SlideId]	sldId_lstzCallable[..., CT_SlideId]
_add_sldIdzp:sldIdc                <    | j                  | j                  |      S )zCreate and return a reference to a new `p:sldId` child element.

        The new `p:sldId` element has its r:id attribute set to `rId`.
        )r%   r)   )r-   _next_id)selfr)   s     r"   	add_sldIdzCT_SlideIdList.add_sldId>   s    
 $--S99r!   c                   ddt        d| j                  d            D cg c]  }t        |       }}t        dz
  g|z         dz   }|k  r|S t	        fd|D              }|rt        d t        |      D              S dS c c}w )	zThe next available slide ID as an `int`.

        Valid slide IDs start at 256. The next integer value greater than the max value in use is
        chosen, which minimizes that chance of reusing the id of a deleted slide.
           iz	list[str]z./p:sldId/@id   c              3  @   K   | ]  }|cxk  rk  sn n|  y wNr    ).0r%   MAX_SLIDE_IDMIN_SLIDE_IDs     r"   	<genexpr>z*CT_SlideIdList._next_id.<locals>.<genexpr>U   s     ^r,":\P\:\^s   
c              3  0   K   | ]  \  }}||k7  r|  y wr6   r    )r7   candidate_idused_ids      r"   r:   z*CT_SlideIdList._next_id.<locals>.<genexpr>W   s$      )L'7* s   )start)r   xpathr&   maxsortednext	enumerate)r0   sused_idssimple_nextvalid_used_idsr8   r9   s        @@r"   r/   zCT_SlideIdList._next_idE   s     !$(djj6Q$RSqCFSS<!+,x781<,&  ^X^^   -6~\-Z 	
 	
 Ts   B
N)r)   r(   returnr$   )rH   r&   )
r   r   r   r   r   r   sldIdr1   propertyr/   r    r!   r"   r+   r+   3   s8    
  ))y!E: 
 
r!   r+   c                  ,    e Zd ZU dZded<    ed      Zy)CT_SlideMasterIdListz`p:sldMasterIdLst` element.

    Child of `p:presentation` containing references to the slide masters that belong to the
    presentation.
    zlist[CT_SlideMasterIdListEntry]sldMasterId_lstzp:sldMasterIdN)r   r   r   r   r   r   sldMasterIdr    r!   r"   rL   rL   a   s     54_-Kr!   rL   c                  .    e Zd ZU dZ ede      Zded<   y)CT_SlideMasterIdListEntryzt
    ``<p:sldMasterId>`` element, child of ``<p:sldMasterIdLst>`` containing
    a reference to a slide master.
    r'   r(   r)   N)r   r   r   r   r   r	   r)   r   r    r!   r"   rP   rP   m   s    
 !3C3r!   rP   c                  J    e Zd ZU dZ ede      Zded<    ede      Zded<   y)CT_SlideSizez`p:sldSz` element.

    Direct child of <p:presentation> that contains the width and height of slides in the
    presentation.
    cxr   cyN)	r   r   r   r   r   r   rS   r   rT   r    r!   r"   rR   rR   v   s9     #$B  #$B r!   rR   N)r   
__future__r   typingr   r   r   pptx.oxml.simpletypesr   r   r	   pptx.oxml.xmlchemyr
   r   r   r   	pptx.utilr   r   r$   r+   rL   rP   rR   r    r!   r"   <module>rZ      sl    C " 0 0 O O X X o 64 4+
_ +
\	.? 	.4 4? r!   