+
    VBi
e                    ^  a  0 t $ R t^ RIHt Rt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIHt Rt]'       d   ^ RIHtHtHtHtHtHt ^ RIHt ^ RIHt  ]
P0                  ! 4       ;_uu_ 4        ]
P2                  ! R	4       ]P4                  ! 4       ^,          ;'       g    ]P6                  ! 4       ^,          P9                  4       tR
]R&   RRR4        ]P>                  ! ]4        ! R R]"4      t# ! R R]"4      t$R R lt%R R lt& ! R R]4      t' ! R R]4      t( ! R R4      t) ! R R]'4      t* ! R R](4      t+ ! R R]+4      t, ! R  R!]'4      t- ! R" R#](4      t. ! R$ R%]'4      t/ ! R& R'](4      t0 ! R( R)]'4      t1R#   + '       g   i     L; i   Rt L; i  ] ]!3 d    Rt Li ; i)*z
I/O classes provide a uniform API for low-level input and output.  Subclasses
exist for a variety of input/output mechanisms.
)annotationsreStructuredTextN)TransformSpecF)AnyBinaryIOClassVarFinalLiteralTextIO)nodes)StrPathignore
str | None_locale_encodingc                      ] tR t^4tRtR# )
InputError N__name__
__module____qualname____firstlineno____static_attributes__r       0/usr/lib/python3.14/site-packages/docutils/io.pyr   r   4   s    4r   r   c                      ] tR t^5tRtR# )OutputErrorr   Nr   r   r   r   r   r   5   s    Dr   r   c               $    V ^8  d   QhRRRRRR/# )   streamr
   encodingstrreturnzbool | Noner   )formats   "r   __annotate__r$   8   s!      6 S [ r   c                     \         P                  ! V P                  4      \         P                  ! V4      8H  #   \        \        \
        3 d     R# i ; i)a6  Test, whether the encoding of `stream` matches `encoding`.

Returns

:None:  if `encoding` or `stream.encoding` are not a valid encoding
        argument (e.g. ``None``) or `stream.encoding is missing.
:True:  if the encoding argument resolves to the same value as `encoding`,
:False: if the encodings differ.
N)codecslookupr    LookupErrorAttributeError	TypeError)r   r    s   &&r   check_encodingr+   8   sA    }}V__-x1HHH3 s   69 AAc                    V ^8  d   QhRRRR/# )r   errBaseExceptionr"   r!   r   )r#   s   "r   r$   r$   H   s     . .m . .r   c                8    V P                   P                   RV  2# )z5Return string representation of Exception `err`.
    z: )	__class__r   )r-   s   &r   error_stringr1   H   s      mm$$%Ru--r   c                  F   ] tR t^Nt$ RtRtR]R&   RtR]R&   RR R	 lltR
 R lt	R R lt
R R lt]P                  ! R4      tR]R&    ]P                   R3]P"                  R3]P$                  R3]P&                  R3]P(                  R33tR]R&    R R ltR R ltRtR# )InputaO  
Abstract base class for input wrappers.

Docutils input objects must provide a `read()` method that
returns the source, typically as `str` instance.

Inheriting `TransformSpec` allows input objects to add "transforms" to
the "Transformer".  (Since Docutils 0.19, input objects are no longer
required to be `TransformSpec` instances.)
inputr   component_typeNClassVar[str | None]default_source_pathc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   sourcez$str | TextIO | nodes.document | Nonesource_pathStrPath | Noner    str | Literal['unicode'] | Noneerror_handlerr   r"   Noner   )r#   s   "r   r$   Input.__annotate__^   sC     F F4F $F 2	F
 "F 
Fr   c                	~    W0n          W@n         Wn         W n         V'       g   V P                  V n        R V n        R # N)r    r=   r9   r:   r7   successful_encoding)selfr9   r:   r    r=   s   &&&&&r   __init__Input.__init__^   sB     !1**'&-#77D#' Er   c                   V ^8  d   QhRR/# r   r"   r!   r   )r#   s   "r   r$   r?   w   s     D D# Dr   c                	X    V P                   : R V P                  : RV P                  : 2# )z	: source=z, source_path=)r0   r9   r:   rC   s   &r   __repr__Input.__repr__w   s$    26..$++262B2BD 	Dr   c                   V ^8  d   QhRR/# rG   r   )r#   s   "r   r$   r?   {   s     " "c "r   c                    \         h)z,Return input as `str`. Define in subclasses.NotImplementedErrorrI   s   &r   read
Input.read{       !!r   c                    V ^8  d   QhRRRR/# )r   datastr | bytesr"   r!   r   )r#   s   "r   r$   r?      s     =( =(; =(3 =(r   c                V   V P                   '       d=   V P                   P                  4       R8X  d   \        V\        4      '       g   Q R4       h\        V\        4      '       d   V# V P                   '       d   V P                   .pM\        P
                  ! 4       ;_uu_ 4        \        P                  ! R\        R7       V P                  V4      pRRR4       X'       d   V.pMzR.p\        P                  R,          R8  d   \        P                  ! 4       pM\        P                  ! RR	7      pV'       d'   VP                  4       R8w  d   VP                  V4       V P                   '       g,   V^ ,          R8w  d   \        P                  ! R
\        ^R7       V F"  p \        WV P                   4      pWPn        Vu # 	  \%        RRP)                  R V 4       4       R\+        X4       R24      h  + '       g   i     EL-; i  \$        \&        3 d   pTp Rp?K  Rp?ii ; i)a  
Decode `data` if required.

Return Unicode `str` instances unchanged (nothing to decode).

If `self.encoding` is None, determine encoding from data
or try UTF-8 and the locale's preferred encoding.
The client application should call ``locale.setlocale()`` at the
beginning of processing::

    locale.setlocale(locale.LC_ALL, '')

Raise UnicodeError if unsuccessful.

Provisional: encoding detection will be removed in Docutils 1.0.
unicodez;input encoding is "unicode" but `data` is no `str` instancer   )categoryNutf-8Nr   NF)do_setlocaleur   Input encoding auto-detection will be removed and the encoding values None and "" become invalid in Docutils 1.0.
stacklevelz=Unable to decode input data.  Tried the following encodings: z, c              3  8   "   T F  p\        V4      x  K  	  R # 5irA   )repr).0encs   & r   	<genexpr>Input.decode.<locals>.<genexpr>   s     B.Asc.As   .
())      )r    lower
isinstancer!   warningscatch_warningsfilterwarningsDeprecationWarningdetermine_encoding_from_datasysversion_infolocalegetencodinggetpreferredencodingappendwarnr=   rB   UnicodeErrorr(   joinr1   )	rC   rT   encoding_candidatesdata_encodingfallbackra   decodedr-   errors	   &&       r   decodeInput.decode   s   " ===T]]002i?dC(( N ,M N(dC  K=== $(==/((**'';MN $ A A$ G + '4o#
 (/i###B'72%113H%::NH 0G ;'..x8}}}!4Q!77!BMM ./AaQ 'Cd););<+.(	 ' KyyB.ABBC DU#$A'( 	(= +**6 !+. s$   $.G6#H
6H	
H(H##H(s   coding[:=]\s*([-\w.]+)zClassVar[re.Pattern[bytes]]coding_slugzutf-32z	utf-8-sigzutf-16z'ClassVar[tuple[tuple[bytes, str], ...]]byte_order_marksc                    V ^8  d   QhRRRR/# )r   rT   bytesr"   r   r   )r#   s   "r   r$   r?      s       : r   c                f   \         P                  ! R\        ^R7       V P                   F   w  r#VP	                  V4      '       g   K  Vu # 	  VP                  4       R,           FH  pV P                  P                  V4      pV'       g   K(  VP                  ^4      P                  R4      u # 	  R# )z
Try to determine the encoding of `data` by looking *in* `data`.
Check for a byte order mark (BOM) or an encoding declaration.

Deprecated. Will be removed in Docutils 1.0.
uR   docutils.io.Input.determine_encoding_from_data() will be removed in Docutils 1.0.r\   rZ   asciiN)
rj   ru   rm   r   
startswith
splitlinesr   searchgroupr}   )rC   rT   start_bytesr    linematchs   &&    r   rn   "Input.determine_encoding_from_data   s     	 :(Q	8 &*%:%:!K{++ &; OO%b))D$$++D1Eu{{1~,,W55 * r   c                   V ^8  d   QhRR/# r   r"   boolr   )r#   s   "r   r$   r?             r   c                \     V P                   P                  4       #   \         d     R# i ; i)z>Return True, if the input source is connected to a TTY device.F)r9   isattyr)   rI   s   &r   r   Input.isatty   s,    	;;%%'' 		    ++)r    r=   r9   r:   rB   )NNrY   strict)r   r   r   r   __doc__r5   __annotations__r7   rD   rJ   rP   r}   recompiler   r&   BOM_UTF32_BEBOM_UTF32_LEBOM_UTF8BOM_UTF16_BEBOM_UTF16_LEr   rn   r   r   r   r   r   r3   r3   N   s    	 $NE#04-4F2D"=(~ 02zz"0K,  ( 
		h'			h'	+&			h'			h'A= * r   r3   c                  l    ] tR t^t$ RtRtR]R&   RtR]R&   RR R	 lltR
 R lt	R R lt
R R ltRtR# )OutputaR  
Abstract base class for output wrappers.

Docutils output objects must provide a `write()` method that
expects and handles one argument (the output).

Inheriting `TransformSpec` allows output objects to add "transforms" to
the "Transformer".  (Since Docutils 0.19, output objects are no longer
required to be `TransformSpec` instances.)
outputr   r5   Nr6   default_destination_pathc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   destinationzTextIO | str | bytes | Nonedestination_pathr;   r    r   r=   r"   r>   r   )r#   s   "r   r$   Output.__annotate__   sC     B B0B )B 	B
 "B 
Br   c                	    W0n          T;'       g    R V n         Wn         W n         V'       g   V P                  V n        R# R# )r   N)r    r=   r   r   r   )rC   r   r   r    r=   s   &&&&&r   rD   Output.__init__   sG     %-7"/";";8*8C.0@2$($A$AD!  r   c                   V ^8  d   QhRR/# rG   r   )r#   s   "r   r$   r     s     M M# Mr   c                	X    V P                   : R V P                  : RV P                  : 2# )z: destination=z, destination_path=)r0   r   r   rI   s   &r   rJ   Output.__repr__  s%    >>4#3#3T5J5JL 	Mr   c                    V ^8  d   QhRRRR/# )r   rT   rU   r"   zstr | bytes | Noner   )r#   s   "r   r$   r     s     " "+ "*< "r   c                    \         h)z#Write `data`. Define in subclasses.rN   rC   rT   s   &&r   writeOutput.write  rR   r   c                    V ^8  d   QhRRRR/# r   rT   rU   r"   r   )r#   s   "r   r$   r     s     B B; B; Br   c                   V P                   '       d?   V P                   P                  4       R8X  d    \        V\        4      '       g   Q R4       hV# \        V\        4      '       g   V# VP	                  V P                   V P
                  4      # )a  
Encode and return `data`.

If `data` is a `bytes` instance, it is returned unchanged.
Otherwise it is encoded with `self.encoding`.

Provisional: If `self.encoding` is set to the pseudo encoding name
"unicode", `data` must be a `str` instance and is returned unchanged.
rW   z<output encoding is "unicode" but `data` is no `str` instance)r    rh   ri   r!   encoder=   r   s   &&r   r   Output.encode  su     ===T]]002i?dC(( N ,M N(K$$$K;;t}}d.@.@AAr   )r   r   r    r=   )NNNr   )r   r   r   r   r   r5   r   r   rD   rJ   r   r   r   r   r   r   r   r      s<    	 %NE$5929B,M"B Br   r   c                  N    ] tR tRtRtRR R lltR R ltR R	 ltR
 R ltRt	R# )ErrorOutputi1  zx
Wrapper class for file-like error streams with
failsafe de- and encoding of `str`, `bytes`, and `Exception` instances.
Nc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   z/TextIO | BinaryIO | str | Literal[False] | Noner    r   encoding_errorsr!   decoding_errorsr"   r>   r   )r#   s   "r   r$   ErrorOutput.__annotate__7  s<     '& '&D'& '& 	'&
 '& 
'&r   c                   Vf   \         P                  pM-V'       g   RpM"\        V\        4      '       d   \	        VR4      pWn         T;'       g&    \        VRR4      ;'       g    \        ;'       g    RV n         W0n	         W@n
        R# )a[  
:Parameters:
    - `destination`: a file-like object,
                a string (path to a file),
                `None` (write to `sys.stderr`, default), or
                evaluating to `False` (write() requests are ignored).
    - `encoding`: `destination` text encoding. Guessed if None.
    - `encoding_errors`: how to treat encoding errors.
NFwr    r   )ro   stderrri   r!   openr   getattrr   r    r   r   )rC   r   r    r   r   s   &&&&&r   rD   ErrorOutput.__init__7  s      **KKS)){C0K?J+   {J5   	 	 	-$3%$3%r   c                    V ^8  d   QhRRRR/# )r   rT   zstr | bytes | Exceptionr"   r>   r   )r#   s   "r   r$   r   `  s     / /1 /d /r   c                L   V P                   '       g   R# \        V\        4      '       d   \        V4      p V P                   P	                  V4       R#   \
         dF    TP                  T P                  T P                  4      pT P                   P	                  T4        R# \         d    \        T\        4      '       dE   TP                  T P                  T P                  4      pT P                   P	                  T4        R# T P                   \        P                  \        P                  39   d)   T P                   P                  P	                  T4        R# TP                  T P                  T P                  4      pT P                   P	                  T4        R# i ; i)z
Write `data` to self.destination. Ignore, if self.destination is False.

`data` can be a `bytes`, `str`, or `Exception` instance.
N)r   ri   	Exceptionr!   r   UnicodeEncodeErrorr   r    r   r*   ro   r   stdoutbufferr}   r   )rC   rT   binarystrings   &&  r   r   ErrorOutput.write`  s)    dI&&t9D	/""4(! 	+ [[0D0DEF""6* 
	/$$$T]]D4H4HI  &&v.!!cjj#**%==  ''--d3 T]]D4H4HI  &&v.
	/s-   A AF##F#,AF#AF#AF#"F#c                   V ^8  d   QhRR/# r   r"   r>   r   )r#   s   "r   r$   r     s      t r   c                    V P                   \        P                  \        P                  39   d   R#  V P                   P	                  4        R#   \
         d     R# i ; i)zv
Close the error-output stream.

Ignored if the destination is` sys.stderr` or `sys.stdout` or has no
close() method.
N)r   ro   r   r   closer)   rI   s   &r   r   ErrorOutput.close  sK     

CJJ77	""$ 		s   A AAc                   V ^8  d   QhRR/# r   r   )r#   s   "r   r$   r     r   r   c                \     V P                   P                  4       #   \         d     R# i ; i)z=Return True, if the destination is connected to a TTY device.F)r   r   r)   rI   s   &r   r   ErrorOutput.isatty  s.    	##**,, 		r   )r   r   r    r   )NNbackslashreplacereplace)
r   r   r   r   r   rD   r   r   r   r   r   r   r   r   r   1  s"    
'&R/@ r   r   c                  Z   a  ] tR tRtRtRR V 3R llltR R ltR R ltR	 R
 ltRt	V ;t
# )	FileInputi  z-
Input for single, simple file-like objects.
c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r   r9   TextIO | Noner:   r;   r    r<   r=   r   	autocloser   modezLiteral['r', 'rb', 'br']r"   r>   r   )r#   s   "r   r$   FileInput.__annotate__  sP     , ,, $, 2	,
 ", , ', 
,r   c                l  < \         SV `  WW44       WPn        \        4       V n        VfH   V'       d*    \        W&V P                  V P                  R7      V n        Ml\        P                  V n        MV\        V P                  V P                  4      RJ d3   \!        RV P                  : RV P                  P                  : R24      hV'       g    V P                  P"                  V n        R# R#   \         d'   p\        TP                  TP                  T4      hRp?ii ; i  \&         d     R# i ; i)a)  
:Parameters:
    - `source`: either a file-like object (which is read directly), or
      `None` (which implies `sys.stdin` if no `source_path` given).
    - `source_path`: a path to a file, which is opened for reading.
    - `encoding`: the expected text encoding of the input file.
    - `error_handler`: the encoding error handler to use.
    - `autoclose`: close automatically after read (except when
      `sys.stdin` is the source).
    - `mode`: how the file is to be opened (see standard function
      `open`). The default is read only ('r').
N)r    errorsFz#Encoding clash: encoding given is "z&" but source is opened with encoding "z".)superrD   r   r   _stderrr   r    r=   r9   OSErrorr   errnostrerrorro   stdinr+   rv   namer:   r)   )	rC   r9   r:   r    r=   r   r   r|   r0   s	   &&&&&&& r   rD   FileInput.__init__  s    * 	hF""}>O"&{04.2.@.@#BDK "iiDKK75@ $t{{/C/C E F F #';;#3#3    O$U[[%..+NNO " s)   'C0 D$ 0D!;!DD!$D32D3c                   V ^8  d   QhRR/# rG   r   )r#   s   "r   r$   r     s      c r   c                    V P                   '       gz   \        V P                  R4      '       d^   V P                  P                  P	                  4       pV P                  V4      pRP                  VP                  4       R.,           4      pMV P                  P	                  4       pV P                  '       d   V P                  4        V#   T P                  '       d   T P                  4        i i ; i)z1
Read and decode a single file, return as `str`.
r   
 )
r    hasattrr9   r   rP   r}   rw   r   r   r   r   s   & r   rP   FileInput.read  s    	===WT[[(%C%C{{))..0{{4(yy!2B4!78{{'')~~~

 ~~~

 s   C BC %C0c                   V ^8  d   QhRR/# )r   r"   z	list[str]r   )r#   s   "r   r$   r     s     , ,9 ,r   c                @    V P                  4       P                  R4      # )z3
Return lines of a single file as list of strings.
T)rP   r   rI   s   &r   	readlinesFileInput.readlines  s     yy{%%d++r   c                   V ^8  d   QhRR/# r   r   )r#   s   "r   r$   r     s        t  r   c                	z    V P                   \        P                  Jd   V P                   P                  4        R # R # rA   )r9   ro   r   r   rI   s   &r   r   FileInput.close  s'    ;;cii'KK (r   )r   r   r9   r:   )NNrY   r   Tr)r   r   r   r   r   rD   rP   r   r   r   __classcell__r0   s   @r   r   r     s'    , ,\&,   r   r   c                  z   a  ] tR tRt$ RtRtR]R&   RtR]R&    RR	 V 3R
 llltR R lt	R R lt
R R ltRtV ;t# )
FileOutputi  z,Output for single, simple file-like objects.z<file>r   r   r   z:Literal['w', 'a', 'x', 'wb', 'ab', 'xb', 'bw', 'ba', 'bx']r   c               4    V ^8  d   QhRRRRRRRRRR	R
RRR/# )r   r   r   r   r;   r    r   r=   r   r   handle_io_errorsr>   r"   r   )r#   s   "r   r$   FileOutput.__annotate__  sN     3 3+3#13 &3 !+	3
 !3 $(3 3r   c                ^  < \         SV `  WW44       RV n        WPn        Ve   \        P
                  ! R\        ^R7       Ve   Wpn        \        4       V n	        Vf'   V'       d	   RV n        M\        P                  V n        MrV'       dk   \        V P                  R4      '       dO   WpP                  P                  8w  d5   \        RV P                  P                  : RV: R	2V P                  R
7       V'       g    V P                  P                  V n        R# R#   \"         d     R# i ; i)a  
:Parameters:
    - `destination`: either a file-like object (which is written
      directly) or `None` (which implies `sys.stdout` if no
      `destination_path` given).
    - `destination_path`: a path to a file, which is opened and then
      written.
    - `encoding`: the text encoding of the output file.
    - `error_handler`: the encoding error handler to use.
    - `autoclose`: close automatically after write (except when
      `sys.stdout` or `sys.stderr` is the destination).
    - `handle_io_errors`: ignored, deprecated, will be removed.
    - `mode`: how the file is to be opened (see standard function
      `open`). The default is 'w', providing universal newline
      support for text files.
TNz_io.FileOutput: init argument "handle_io_errors" is ignored and will be removed in Docutils 2.0.r\   Fr   zWarning: Destination mode "z" differs from specified mode "")file)r   rD   openedr   rj   ru   rm   r   r   r   ro   r   r   r   printr   r   r)   )	rC   r   r   r    r=   r   r   r   r0   s	   &&&&&&&&r   rD   FileOutput.__init__  s    2 	8	D"'MM *+=!M I"}##&:: wt//88**///!%!1!1!6!6>||%  (,(8(8(=(=%   " s   >D D,+D,c                   V ^8  d   QhRR/# r   r   )r#   s   "r   r$   r   (  s      d r   c                	:   R V P                   9  d   RV P                  RV P                  /pM/ p \        V P                  V P                   3/ VB V n        RT n
        R#   \         d1   p\        TP                  TP                  T P                  4      hRp?ii ; i)br    r   NT)r   r    r=   r   r   r   r   r   r   r   r   )rC   kwargsr|   s   &  r   r   FileOutput.open(  s    dii $-- 2 24F F	5#D$9$9499OOD   	5ekk5>>"335 5	5s   &A B*+BBc                    V ^8  d   QhRRRR/# r   r   )r#   s   "r   r$   r   6  s     , ,+ ,+ ,r   c                   V P                   '       g   V P                  4        \        V\        4      '       dk   \	        V P
                  V P                  4      RJ dG   \        P                  R8w  d!   VP                  R\        P                  4      pV P                  V4      p V P
                  P                  V4       T P*                  '       d   T P-                  4        T#   \         d   p\        T\        4      '       d    T P
                  P                  P                  T4        Rp?Lp  \         de    \	        T P
                  T P                  4      RJ d>   \!        RT P"                   RT P
                  P                   RT P                   R24      hThi ; i Rp?LRp?i\$        \&        3 d+   p\%        RT P                   R	\)        T4       R24      hRp?ii ; i  T P*                  '       d   T P-                  4        i i ; i)
a  Write `data` to a single file, also return it.

`data` can be a `str` or `bytes` instance.
If writing `bytes` fails, an attempt is made to write to
the low-level interface ``self.destination.buffer``.

If `data` is a `str` instance and `self.encoding` and
`self.destination.encoding` are  set to different values, `data`
is encoded to a `bytes` instance using `self.encoding`.

Provisional: future versions may raise an error if `self.encoding`
and `self.destination.encoding` are set to different values.
Fr   zEncoding of z (z&) differs 
  from specified encoding (re   Nz2Unable to encode output data. output-encoding is: rd   )r   r   ri   r!   r+   r   r    oslinesepr   r   r   r*   r   r   r)   
ValueErrorr   rv   r(   r1   r   r   )rC   rT   r-   s   && r   r   FileOutput.write6  s    {{{IIKtS!!t//?5HzzT!||D"**5;;t$D	""4(& ~~~

)  	"$&&
"$$++11$77% "%d&6&6&*mm58=>(*4+@+@*A B  $ 0 0 9 9: ;::>--KL L
 "	" ' k* 	<D==/l3&7%8;< <	<
 ~~~

 sU   $C# #G$.F&%D/*G' /A/FF&!G' &G$9G$:%GG$$G' '%Hc                   V ^8  d   QhRR/# r   r   )r#   s   "r   r$   r   d  s        t  r   c                	    V P                   \        P                  \        P                  39  d$   V P                   P	                  4        R V n        R# R# )FN)r   ro   r   r   r   r   rI   s   &r   r   FileOutput.closed  s;    CJJ

#;;""$DK <r   )r   r   r   r   r   r   )NNNr   TNN)r   r   r   r   r   r   r   r   rD   r   r   r   r   r   r   s   @r   r   r     s?    6&.e.GJD
DJ)
3 3j,\   r   r   c                  6   a  ] tR tRtRtRtR V 3R lltRtV ;t# )BinaryFileOutputij  u   
A version of docutils.io.FileOutput which writes to a binary file.

Deprecated. Use `FileOutput` (works with `bytes` since Docutils 0.20).
Will be removed in Docutils 0.24.
wbc               $    V ^8  d   QhRRRRRR/# )r   argsr   r  r"   r>   r   )r#   s   "r   r$   BinaryFileOutput.__annotate__t  s!     * *c *S *T *r   c                	b   < \         P                  ! R \        ^R7       \        SV `  ! V/ VB  R# )zU"BinaryFileOutput" is obsoleted by "FileOutput" and will be removed in Docutils 0.24.r\   N)rj   ru   rm   r   rD   )rC   r  r  r0   s   &*,r   rD   BinaryFileOutput.__init__t  s-     ?(Q	8 	$)&)r   r   )	r   r   r   r   r   r   rD   r   r   r   s   @r   r  r  j  s     D* *r   r  c                  @    ] tR tRt$ RtR]R&   RtR]R&   R R	 ltR
tR# )StringInputi{  z'Input from a `str` or `bytes` instance.rU   r9   <string>r   r7   c                   V ^8  d   QhRR/# rG   r   )r#   s   "r   r$   StringInput.__annotate__  s     ( (c (r   c                8    V P                  V P                  4      # )zPReturn the source as `str` instance.

Decode, if required (see `Input.decode`).
)r}   r9   rI   s   &r   rP   StringInput.read  s    
 {{4;;''r   r   N	r   r   r   r   r   r   r7   rP   r   r   r   r   r  r  {  s     1!++( (r   r  c                  @    ] tR tRt$ RtR]R&   RtR]R&   R R	 ltR
tR# )StringOutputi  z5Output to a `bytes` or `str` instance.

Provisional.
rU   r   r  r   r   c                    V ^8  d   QhRRRR/# r   r   )r#   s   "r   r$   StringOutput.__annotate__  s        +  +  r   c                F    V P                  V4      V n        V P                  # )a&  Store `data` in `self.destination`, and return it.

If `self.encoding` is set to the pseudo encoding name "unicode",
`data` must be a `str` instance and is stored/returned unchanged
(cf. `Output.encode`).

Otherwise, `data` can be a `bytes` or `str` instance and is
stored/returned as a `bytes` instance
(`str` data is encoded with `self.encode()`).

Attention: the `output_encoding`_ setting may affect the content
of the output (e.g. an encoding declaration in HTML or XML or the
representation of characters as LaTeX macro vs. literal character).
)r   r   r   s   &&r   r   StringOutput.write  s!      ;;t,r   )r   N	r   r   r   r   r   r   r   r   r   r   r   r   r   r     s$    
 &0e0   r   r   c                  @    ] tR tRt$ RtR]R&   RtR]R&   R R	 ltR
tR# )	NullInputi  zDegenerate input: read nothing.r>   r9   z
null inputr   r7   c                   V ^8  d   QhRR/# rG   r   )r#   s   "r   r$   NullInput.__annotate__  s      c r   c                    R# )zReturn an empty string.r   r   rI   s   &r   rP   NullInput.read  s    r   r   Nr  r   r   r   r'  r'    s    )L!-- r   r'  c                  @    ] tR tRt$ RtR]R&   RtR]R&   R R	 ltR
tR# )
NullOutputi  z!Degenerate output: write nothing.r>   r   znull outputr   r   c                    V ^8  d   QhRRRR/# )r   rT   rU   r"   r>   r   )r#   s   "r   r$   NullOutput.__annotate__  s     ' '+ '$ 'r   c                    R# )zDo nothing, return None.Nr   r   s   &&r   r   NullOutput.write  s    r   r   Nr%  r   r   r   r-  r-    s     +&3e3' 'r   r-  c                  @    ] tR tRt$ RtR]R&   RtR]R&   R R	 ltR
tR# )DocTreeInputi  za
Adapter for document tree input.

The document tree must be passed in the ``source`` parameter.
nodes.documentr9   zdoctree inputr   r7   c                   V ^8  d   QhRR/# )r   r"   r4  r   )r#   s   "r   r$   DocTreeInput.__annotate__  s      n r   c                    V P                   # )zReturn the document tree.)r9   rI   s   &r   rP   DocTreeInput.read  s    {{r   r   Nr  r   r   r   r3  r3    s$     !00 r   r3  )2__conditional_annotations__r   
__future__r   __docformat__r&   rq   r  r   ro   rj   docutilsr   TYPE_CHECKINGtypingr   r   r   r   r	   r
   r   docutils.nodesr   rk   simplefilter	getlocalegetdefaultlocalerh   r   r   r'   r(   r*   r   r   r   r+   r1   r3   r   r   r   r   r  r  r   r'  r-  r3  )r9  s   @r   <module>rC     s  

 #"   	 	 
  "FF&			 	 	"	"h'(.(8(8(:1(= )H )H+1+B+B+DQ+G*/%' 	* 	2 
#
MM"#
     '   .]M ]@@B] @BFb bJN  N b@  @ F*z *"(% ( 6  :
 
	' 	'5 u 
#	"
 	Y s=   F -AFF F F	F F FF,+F,