
    Mi                        S r SSKJr  SSKrSSKrSSKJrJrJrJ	r	  \(       a  SSK
Jr  \	" SSS9r " S	 S
\\R                  5      r " S S\\R                  5      r " S S\5      rg)z4Base classes and other objects used by enumerations.    )annotationsN)TYPE_CHECKINGAnyTypeTypeVar)Self_TBaseXmlEnum)boundc                  (    \ rS rSrSrSS jrS rSrg)BaseEnum   zBase class for Enums that do not map XML attr values.

The enum's value will be an integer, corresponding to the integer assigned the
corresponding member in the MS API enum of the same name.
c                f    [         R                  X5      nXl        UR                  5       Ul        U$ N)int__new___value_strip__doc__)clsms_api_valuedocstrselfs       h/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/pptx/enum/base.pyr   BaseEnum.__new__   s'    {{3-#||~    c                :    U R                    SU R                   S3$ zEThe symbolic name and string value of this member, e.g. 'MIDDLE (3)'.z ()namevaluer   s    r   __str__BaseEnum.__str__       ))Btzzl!,,r   )r   r   N)r   r   r   str)__name__
__module____qualname____firstlineno__r   r   r$   __static_attributes__ r   r   r   r      s    -r   r   c                  p    \ rS rSr% SrS\S'   SS jrS r\SS j5       r	\SS j5       r
\SS	 j5       rS
rg)r
   !   zBase class for Enums that also map XML attr values.

The enum's value will be an integer, corresponding to the integer assigned the
corresponding member in the MS API enum of the same name.

str | None	xml_valuec                r    [         R                  X5      nXl        X$l        UR	                  5       Ul        U$ r   )r   r   r   r1   r   r   )r   r   r1   r   r   s        r   r   BaseXmlEnum.__new__*   s,    {{3-#"||~r   c                :    U R                    SU R                   S3$ r   r    r#   s    r   r$   BaseXmlEnum.__str__1   r&   r   c                   ^ T(       a  [        U4S jU  5       S5      OSnUc#  [        U R                   S[        T5       35      eU$ )aF  Enumeration member corresponding to XML attribute value `xml_value`.

Raises `ValueError` if `xml_value` is the empty string ("") or is not an XML attribute
value registered on the enumeration. Note that enum members that do not correspond to one
of the defined values for an XML attribute have `xml_value == ""`. These
"return-value only" members cannot be automatically mapped from an XML attribute value and
must be selected explicitly by code, based on the appropriate conditions.

Example::

    >>> WD_PARAGRAPH_ALIGNMENT.from_xml("center")
    WD_PARAGRAPH_ALIGNMENT.CENTER

c              3  J   >#    U  H  oR                   T:X  d  M  Uv   M     g 7fr   )r1   ).0memberr1   s     r   	<genexpr>'BaseXmlEnum.from_xml.<locals>.<genexpr>G   s     LsV.>.>).K&&ss   #	#Nz has no XML mapping for )next
ValueErrorr(   repr)r   r1   r9   s    ` r   from_xmlBaseXmlEnum.from_xml5   sN    &  LsLdS 	 >~-Ed9oEVWXXr   c                    U " U5      nUR                   nU(       d%  [        U R                   SUR                   S35      eU$ )z@XML value of this enum member, generally an XML attribute value..z has no XML representation)r1   r=   r(   r!   )r   r"   r9   r1   s       r   to_xmlBaseXmlEnum.to_xmlQ   sB    
 U$$	~Qv{{m;UVWWr   c                D    X;  a  [        U SU R                   S35      eg)z9Raise |ValueError| if `value` is not an assignable value.z not a member of z enumerationN)r=   r(   )r   r"   s     r   validateBaseXmlEnum.validate\   s,     w&7~\RSS r   )r   r   r1   N)r   r   r1   r0   r   r'   )r1   r'   returnr   )r   Type[_T]r"   zint | _TrH   r'   )r   rI   r"   r	   )r(   r)   r*   r+   r   __annotations__r   r$   classmethodr?   rC   rF   r,   r-   r   r   r
   r
   !   sW     -  6   T Tr   c                  |    \ rS rSrSrSS jr\S 5       r\S 5       rSS jr	\S 5       r
\S 5       r\S	 5       rS
rg)DocsPageFormatterc   zHFormats a reStructuredText documention page (string) for an enumeration.c                    Xl         X l        g r   )_clsname_clsdict)r   clsnameclsdicts      r   __init__DocsPageFormatter.__init__f   s    r   c                j    SnU R                   U R                  U R                  U R                  4nX-  $ )zi
The RestructuredText documentation page for the enumeration. This is
the only API member for the class.
z.. _%s:

%s

%s

----

%s)_ms_name_page_title_intro_text_member_defs)r   tmpl
componentss      r   page_strDocsPageFormatter.page_strj   s=     3MM	

   r   c                     U R                   S   nUc  g[        R                  " U5      R	                  5       $ ! [         a    Sn N6f = f)zZ
The docstring of the enumeration, formatted for use at the top of the
documentation page
r    )rQ   KeyErrortextwrapdedentr   )r   cls_docstrings     r   rY   DocsPageFormatter._intro_texty   sN    	 MM)4M  }-3355  	M	s   9 AAc                    [         R                  " UR                  =(       d    S5      R                  5       n[         R                  " USSSS9nUR
                  < SU< S3$ )zxReturn an individual member definition formatted as an RST glossary entry.

Output is wrapped to fit within 78 columns.
r`   N   z    )widthinitial_indentsubsequent_indent
)rb   rc   r   r   fillr!   )r   r9   member_docstrings      r   _member_defDocsPageFormatter._member_def   sR    
 $??6>>+?R@FFH#=="%	
 $[[*:;;r   c                    U R                   S   nU Vs/ s H"  o"R                  c  M  U R                  U5      PM$     nnSR                  U5      $ s  snf )z`
A single string containing the aggregated member definitions section
of the documentation page
__members__rk   )rQ   r!   rn   join)r   membersr9   member_defss       r   rZ   DocsPageFormatter._member_defs   sM     --.>EagF/t''/gayy%% bs
   AAc                     U R                   S   $ )z-
The Microsoft API name for this enumeration
__ms_name__)rQ   r#   s    r   rW   DocsPageFormatter._ms_name   s    
 }}]++r   c                `    S[        U R                  5      S-   -  nSU R                  < SU< 3$ )z|
The title for the documentation page, formatted as code (surrounded
in double-backtics) and underlined with '=' characters
=   z``z``
)lenrP   )r   title_underscores     r   rX   DocsPageFormatter._page_title   s-     #dmm"4q"89#}}.>??r   )rQ   rP   N)rR   r'   rS   zdict[str, Any])r9   zBaseEnum | BaseXmlEnum)r(   r)   r*   r+   r   rT   propertyr]   rY   rn   rZ   rW   rX   r,   r-   r   r   rM   rM   c   su    R  ! ! 6 6< & & , , @ @r   rM   )r   
__future__r   enumrb   typingr   r   r   r   typing_extensionsr   r	   r   Enumr   r
   objectrM   r-   r   r   <module>r      s`    : "   4 4&T'-sDII -$?T#tyy ?TDL@ L@r   