
    j@3                     h    d dl Z  e j        d          ZdZ G d d          Z G d de          ZdS )    Nbcdocs).,?!:;c                       e Zd ZddZed             Zej        d             Zd Zd Zd Z	d Z
d	 ZddZd Zd Zd Zd Zd Zd
S )	BaseStyle   c                 >    || _         || _        d| _        d| _        d S )Nr   T)docindent_width_indent	keep_dataselfr   r   s      Z/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/botocore/docs/bcdoc/style.py__init__zBaseStyle.__init__   s#    (    c                     | j         S Nr   r   s    r   indentationzBaseStyle.indentation   s
    |r   c                     || _         d S r   r   )r   values     r   r   zBaseStyle.indentation    s    r   c                 0    d|                                   S N
)spacesr   s    r   new_paragraphzBaseStyle.new_paragraph$   s    #DKKMM###r   c                 &    | xj         dz  c_         d S )N   r   r   s    r   indentzBaseStyle.indent'   s    r   c                 @    | j         dk    r| xj         dz  c_         d S d S Nr   r$   r   r   s    r   dedentzBaseStyle.dedent*   s+    <!LLALLLL r   c                 &    d| j         | j        z  z  S )N )r   r   r   s    r   r!   zBaseStyle.spaces.   s    dlT%6677r   c                     |S r    r   ss     r   boldzBaseStyle.bold1       r   Nc                     |S r   r,   )r   linktitles      r   refzBaseStyle.ref4   s    r   c                     |S r   r,   r-   s     r   h2zBaseStyle.h27   r0   r   c                     |S r   r,   r-   s     r   h3zBaseStyle.h3:   r0   r   c                     |S r   r,   r-   s     r   	underlinezBaseStyle.underline=   r0   r   c                     |S r   r,   r-   s     r   italicszBaseStyle.italics@   r0   r   c                     | j                                         }|d}|dk    r|d         dk    r|dz  }| j                             |           d S )N r*   )r   	pop_write
push_write)r   
last_writes     r   $add_trailing_space_to_previous_writez.BaseStyle.add_trailing_space_to_previous_writeC   sa     X''))
J
2# 5 5#JJ'''''r   r   r   )__name__
__module____qualname__r   propertyr   setterr"   r%   r(   r!   r/   r4   r6   r8   r:   r<   rC   r,   r   r   r   r      s             X   $ $ $    8 8 8             ( ( ( ( (r   r   c                      e Zd ZdCdZd Zd Zd Zd ZdDdZd	 Z	dDd
Z
d Zd ZdDdZd Zd Zd Zd ZdDdZd Zd ZdDdZd ZdDdZd Zd ZdDdZd ZdDdZd ZdDdZd ZdDd Z d! Z!dDd"Z"d# Z#dDd$Z$dDd%Z%d& Z&dDd'Z'd( Z(d) Z)dDd*Z*d+ Z+dDd,Z,d- Z-dDd.Z.d/ Z/dDd0Z0d1 Z1dDd2Z2d3 Z3d4 Z4d5 Z5dDd6Z6d7 Z7d8 Z8dEd9Z9d: Z:d; Z;dDd<Z<d= Z=d> Z>d? Z?d@ Z@dA ZAdB ZBdS )F	ReSTStyler   c                 h    t                               | ||           d| _        d | _        d| _        d S )NTr   )r   r   do_pa_href
list_depthr   s      r   r   zReSTStyle.__init__O   s3    4l333	r   c                 d    | j                             d|                                             d S Nz

r   writer!   r   s    r   r"   zReSTStyle.new_paragraphU   s-    -dkkmm--.....r   c                 d    | j                             d|                                             d S r   rR   r   s    r   new_linezReSTStyle.new_lineX   s-    +DKKMM++,,,,,r   c                     	 | j                                         }|dv r|dv r| j                             d           n# t          $ r Y nw xY w| j                             |           d S )N)***r*   )r   
peek_writerS   
IndexErrorr   markuprB   s      r   _start_inlinezReSTStyle._start_inline[   s    	$,,..J [((V{-B-Bs###	  	 	 	D	
 	vs   > 
A
Ac                     | j                                         }||k    rd S | j                             |           | j                             |           d S r   )r   r@   rA   rS   r[   s      r   _end_inlinezReSTStyle._end_inlineg   sW    
 X''))
FJ'''vr   Nc                 0    |                      d           d S NrX   r]   r   attrss     r   
start_boldzReSTStyle.start_boldr   s    4     r   c                 0    |                      d           d S ra   r_   r   s    r   end_boldzReSTStyle.end_boldu   s    r   c                 H    d| j         _        |                     |           d S NT)r   do_translationre   rc   s     r   start_bzReSTStyle.start_bx   s$    "&r   c                 F    d| j         _        |                                  d S NF)r   rk   rh   r   s    r   end_bzReSTStyle.end_b|   s    "'r   c                     |rD|                                   | j                            |           |                                  d S d S r   )re   r   rS   rh   r-   s     r   r/   zReSTStyle.bold   I     	OOHNN1MMOOOOO	 	r   c                 P    ||}| j                             d| d| d           d S )N:doc:` <>`)r   rS   r   r3   r2   s      r   r4   zReSTStyle.ref   s:    <D11111122222r   c                     |t          |          z  }|                                  | j                            | d| d|            |                                  d S r   )lenr"   r   rS   )r   r.   border_charborders       r   _headingzReSTStyle._heading   sf    s1vv%&11A1111222r   c                 2    |                      |d           d S NrW   r{   r-   s     r   h1zReSTStyle.h1       ar   c                 2    |                      |d           d S )N=r~   r-   s     r   r6   zReSTStyle.h2   r   r   c                 2    |                      |d           d S )N-r~   r-   s     r   r8   zReSTStyle.h3   r   r   c                 0    |                      d           d S r}   rb   rc   s     r   start_italicszReSTStyle.start_italics   s    3r   c                 0    |                      d           d S r}   rg   r   s    r   end_italicszReSTStyle.end_italics   s    r   c                     |rD|                                   | j                            |           |                                  d S d S r   )r   r   rS   r   r-   s     r   r<   zReSTStyle.italics   sR     	   HNN1	 	r   c                 v    | j         r1| j                            d|                                             d S d S rQ   rM   r   rS   r!   rc   s     r   start_pzReSTStyle.start_p   A    9 	3HNN1$++--1122222	3 	3r   c                 v    | j         r1| j                            d|                                             d S d S rQ   r   r   s    r   end_pzReSTStyle.end_p   r   r   c                 p    d| j         _        |                                  |                     d           d S )NT``)r   rk   rC   r]   rc   s     r   
start_codezReSTStyle.start_code   s8    "&113334     r   c                 H    d| j         _        |                     d           d S )NFr   )r   rk   r_   r   s    r   end_codezReSTStyle.end_code   s&    "'r   c                     |rD|                                   | j                            |           |                                  d S d S r   )r   r   rS   r   r-   s     r   codezReSTStyle.code   rq   r   c                     |                                   | j                            d           |                                  |                                   d S )Nz	.. note::r"   r   rS   r%   rc   s     r   
start_notezReSTStyle.start_note   sM    {###r   c                 V    |                                   |                                  d S r   r(   r"   r   s    r   end_notezReSTStyle.end_note   '    r   c                     |                                   | j                            d           |                                  |                                   d S )Nz.. warning::r   rc   s     r   start_importantzReSTStyle.start_important   sM    ~&&&r   c                 V    |                                   |                                  d S r   r   r   s    r   end_importantzReSTStyle.end_important   r   r   c                     |                                   | j                            d           |                                  |                                   d S )Nz.. danger::r   rc   s     r   start_dangerzReSTStyle.start_danger   sM    }%%%r   c                 V    |                                   |                                  d S r   r   r   s    r   
end_dangerzReSTStyle.end_danger   r   r   c                    |                                   |rB|D ]>\  }}|dk    r3|                                | _        | j                            d           ?n| j                            d           d| j        _        d S )Nhref`r*   T)rC   striprN   r   rS   rk   )r   rd   attr_key
attr_values       r   start_azReSTStyle.start_a   s     	11333 	 (- ( ($*v%% #-"2"2"4"4DKHNN3'''( HNN3"&r   c                 F    | j                             d| d|            d S )Nz.. _z: )r   writeln)r   refnamer2   s      r   link_target_definitionz ReSTStyle.link_target_definition   s/    11141122222r   c                     ||}| j         j        dk    r#| j                             d| d| d           d S | j                             |           d S )Nhtmlz:ref:`rt   ru   r   targetrS   )r   labeltexts      r   sphinx_reference_labelz ReSTStyle.sphinx_reference_label   sc    <D8?f$$HNN5D55E55566666HNN4     r   c                 b   | j         }|                                }|                    d          s,|                                |z   }|                    d          ,|dk    rL|                    d          r d|dd                              d           }|                    |           d S d S )Nr   r>   z` r$   r*   )r   r@   
startswithlstriprA   )r   r   rB   s      r   _clean_link_textzReSTStyle._clean_link_text   s    h]]__
'',, 	6:5J '',, 	6$$T** >=ABB!6!6s!;!;==
NN:&&&&&	 r   c                 |   d| j         _        | j        r'|                                  | j                                         }|                    d          }|r^|dk    rXd|v r|                    dd          }| j                             |           | j                             d| j         d           n||dk    r$| j                             d| j         d           nR| j                             | j                   | j        | j         j        | j        <   | j         	                    d	           d | _        d S d S )
NFr*   r   r   z\:rt   z>`__z`<z`__)
r   rk   rN   r   r@   rstripreplacerA   hrefsrS   )r   
next_childrB   s      r   end_azReSTStyle.end_a  sD   "'; 	!!###++--J#**3//J &jC//*$$!+!3!3C!?!?J##J///##$:$:$:$:;;;;s"" ##$:$:$:$:;;;;##DK000.2kt{+u%%%DKKK)	 	r   c                 F    d| j         _        |                                  d S rj   )r   rk   r   rc   s     r   start_izReSTStyle.start_i  s$    "&r   c                 F    d| j         _        |                                  d S rn   )r   rk   r   r   s    r   end_izReSTStyle.end_i!  s$    "'r   c                 p    |                                   d| _        | j                            d           d S )NFz* )rU   rM   r   rS   rc   s     r   start_lizReSTStyle.start_li%  s0    	tr   c                 <    d| _         |                                  d S rj   )rM   rU   r   s    r   end_lizReSTStyle.end_li*  s    	r   c                     |rD|                                   | j                            |           |                                  d S d S r   )r   r   r   r   r-   s     r   lizReSTStyle.li.  sH     	MMOOOHQKKMMMMM	 	r   c                     | j         dk    r|                                  | xj         dz  c_         |                                  d S r'   rO   r%   r"   rc   s     r   start_ulzReSTStyle.start_ul4  sD    ?aKKMMM1r   c                     | xj         dz  c_         | j         dk    r|                                  |                                  d S Nr$   r   rO   r(   r"   r   s    r   end_ulzReSTStyle.end_ul:  D    1?aKKMMMr   c                     | j         dk    r|                                  | xj         dz  c_         |                                  d S r'   r   rc   s     r   start_olzReSTStyle.start_ol@  sD    ?aKKMMM1r   c                     | xj         dz  c_         | j         dk    r|                                  |                                  d S r   r   r   s    r   end_olzReSTStyle.end_olG  r   r   c                     d| j         _        d S rn   r   r   rc   s     r   start_exampleszReSTStyle.start_examplesM      "r   c                     d| j         _        d S rj   r   r   s    r   end_exampleszReSTStyle.end_examplesP      !r   c                     d| j         _        d S rn   r   rc   s     r   start_fullnamezReSTStyle.start_fullnameS  r   r   c                     d| j         _        d S rj   r   r   s    r   end_fullnamezReSTStyle.end_fullnameV  r   r   c                     | j                             d           |                                  |                                  d S )Nz::)r   rS   r%   r"   rc   s     r   start_codeblockzReSTStyle.start_codeblockY  s;    tr   c                 V    |                                   |                                  d S r   r   r   s    r   end_codeblockzReSTStyle.end_codeblock^  r   r   c                     |                                   | j                            |           |                                  dS )z
        Literal code blocks are introduced by ending a paragraph with
        the special marker ::.  The literal block must be indented
        (and, like all paragraphs, separated from the surrounding
        ones by blank lines).
        N)r   r   r   r   )r   r   s     r   	codeblockzReSTStyle.codeblockb  sD     	r   c                     | j         j        dk    rP| j                             d           | j                             d           | j                             d           d S |                                  d S )Nr   
.. toctree::
  :maxdepth: 1
z  :titlesonly:

)r   r   rS   r   r   s    r   toctreezReSTStyle.toctreem  sg    8?f$$HNN-...HNN-...HNN/00000MMOOOOOr   c                     | j         j        dk    r|                     |           d S |r| j                             d|            d S | j                             d|            d S )Nmanz  )r   r   r   r   )r   item	file_names      r   tocitemzReSTStyle.tocitemu  ss    8?e##GGDMMMMM .  !1i!1!122222  d-----r   c                     | j         j        dk    rP| j                             d           | j                             d           | j                             d           d S d S )Nr   r   r   z  :hidden:

r   r   s    r   hidden_toctreezReSTStyle.hidden_toctree~  s^    8?f$$HNN-...HNN-...HNN+,,,,, %$r   c                 T    | j         j        dk    r|                     |           d S d S )Nr   )r   r   r   )r   r   s     r   hidden_tocitemzReSTStyle.hidden_tocitem  s1    8?f$$LL %$r   c                     | j                             d           || j                             |           || j                             d|            d S d S )Nz.. contents:: z   :depth: )r   rS   r   )r   r3   depths      r   table_of_contentszReSTStyle.table_of_contents  sf    '(((HU###H252233333 r   c                     |                                   | j                            d|            |                                  |                                   d S )Nz.. py:class:: r   )r   
class_names     r   start_sphinx_py_classzReSTStyle.start_sphinx_py_class  sV    4
44555r   c                 V    |                                   |                                  d S r   r   r   s    r   end_sphinx_py_classzReSTStyle.end_sphinx_py_class  r   r   c                     |                                   d| }|	|d| dz  }| j                            |           |                                  |                                   d S )Nz.. py:method:: ()r   )r   method_name
parameterscontents       r   start_sphinx_py_methodz ReSTStyle.start_sphinx_py_method  sv    1K11!(:((((Gwr   c                 V    |                                   |                                  d S r   r   r   s    r   end_sphinx_py_methodzReSTStyle.end_sphinx_py_method  r   r   c                     |                                   | j                            d|            |                                  |                                   d S )Nz.. py:attribute:: r   )r   	attr_names     r   start_sphinx_py_attrzReSTStyle.start_sphinx_py_attr  sV    7I77888r   c                 V    |                                   |                                  d S r   r   r   s    r   end_sphinx_py_attrzReSTStyle.end_sphinx_py_attr  r   r   c                 l    |                                 }|D ]}| j                            |           d S r   )
splitlinesr   r   )r   	docstringdocstring_linesdocstring_lines       r   write_py_doc_stringzReSTStyle.write_py_doc_string  sE    #..00- 	- 	-NH^,,,,	- 	-r   c                     | j         j        dk    r#| j                             d| d| d           d S | j                             |           d S )Nr   r   rt   z>`_r   rv   s      r   external_linkzReSTStyle.external_link  sY    8?f$$HNN1u1111122222HNN5!!!!!r   c                     | j         j        dk    r#| j                             d| d| d           d S | j                             |           d S )Nr   rs   rt   ru   r   )r   r3   pages      r   internal_linkzReSTStyle.internal_link  sY    8?f$$HNN5E55T55566666HNN5!!!!!r   rD   r   )NN)CrE   rF   rG   r   r"   rU   r]   r_   re   rh   rl   ro   r/   r4   r{   r   r6   r8   r   r   r<   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r  r,   r   r   rK   rK   N   sG          / / /- - -
 
 
	 	 	! ! ! !         3 3 3 3
                   3 3 3 33 3 3! ! ! !
                   ' ' ' '&3 3 3! ! ! !
' 
' 
'   0        
              # # # #" " "# # # #" " "   
  	 	 	  . . . .- - -  4 4 4 4             - - -
" " "" " " " "r   rK   )logging	getLoggerloggerPUNCTUATION_CHARACTERSr   rK   r,   r   r   <module>r     s    		8	$	$7 6( 6( 6( 6( 6( 6( 6( 6(rq" q" q" q" q"	 q" q" q" q" q"r   