
    k7in                       S r SSKJr  SrSSKrSSKrSSK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  SS	KJrJr  SS
KJrJrJr  SSKJrJr  SSKJr  Sr\(       a  SSKJr  S(S)S j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!\RR                  5      r* " S" S#\5      r+ " S$ S%\5      r, " S& S'\5      r-g)*zMiscellaneous directives.    )annotationsreStructuredTextN)Path)urlopen)URLError)frontendionodesstatemachineutils)	Directiveconvert_directive_function)
directivesrolesstates)	CodeBlockNumberLines)miscF)StrPathc                    U(       a'  U R                  S5      (       a  [        U5      nU SS  n O[        U5      R                  n[        R                  " S X0-  5      $ )N/   )
startswithr   parentr   relative_path)pathsourceroot_prefixbases       ^/home/james-whalen/.local/lib/python3.13/site-packages/docutils/parsers/rst/directives/misc.py
adapt_pathr!      sN    
 ts++K ABxF|""tTY//    c                  ~   \ rS rSrSrSrSrSr\R                  \R                  \R                  \R                  \\\\R                  \R                  \R                  " S\5      \R                   \R                  S.r\" \R(                  5      R*                  S-  rSS	 jrSS
 jrSS jrSS jrSS jrSS jrSrg)Include*   a  
Include content read from a separate source file.

Content may be parsed by the parser, or included as a literal
block.  The encoding of the included file can be specified.  Only
a part of the given file argument may be included by specifying
start and end line or text to match before and/or after the text
to be used.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#include
r   r   TN)literalcodeencodingparser	tab-width
start-lineend-linestart-after
end-beforenumber-linesclassnameincludec                J   U R                   R                  R                  =U l        nUR                  (       d  U R	                  SU R
                  -  5      eU R                  R                  SUR                  5      U l        U R                  R                  SS5      U R                  R                  SS5      U R                  R                  SS5      U R                  R                  SS5      4U l	        [        R                  " U R                  S	   5      nUR                  S
5      (       a+  UR                  S5      (       a  SUSS -   nU R                  nOUR                   n[#        UU R                   R                  R$                  U5      nX R                  S'   U R'                  U5      nSU R                  ;   a  U R)                  U5      $ SU R                  ;   a  U R+                  U5      $ SU R                  ;   a  U R-                  U5      $ U R/                  U5        / $ )zInclude a file as part of the content of this reST file.

Depending on the options, the file content (or a clipping) is
converted to nodes and returned or inserted into the input stream.
"%s" directive disabled.r+   r,   Nr-   r.    r/   r   <>r   r   r   r'   r(   r*   )statedocumentsettingsfile_insertion_enabledwarningr2   optionsget	tab_widthclip_optionsr   r   	argumentsr   endswithstandard_include_pathr   r!   current_source	read_fileas_literal_blockas_code_blockcustom_parseinsert_into_input_lines)selfr<   r   r   inputstrings        r    runInclude.runK   s    $(::#6#6#?#??..,,9DIIEFF))+x7I7IJ!\\--lDA!\\--j$?!\\--mR@!\\--lB?A t~~a01??3DMM#$6$6a#D44K"..K$**--<<%' "&XnnT*$((55T\\!%%k22t||#$$[11$$[1	r"   c           	     8   U R                   R                  SU R                  R                  5      nU R                  R                  n [
        R                  " UUUS9nU R                  R                  R                  U5         UR                  5       nU R                   u  pxpU(       d  Ub#  UR#                  5       nSR%                  XU 5      nU	(       aF  UR'                  U	5      nUS:  a  U R                  SU R                   S35      eXl[)        U	5      -   S nU
(       a;  UR'                  U
5      nUS:  a  U R                  SU R                   S35      eUSU nU$ ! [         a#    U R                  SU R                   SU S35      e[         a;  nU R                  SU R                   S[
        R                  " U5       S35      eSnAff = f! [         a;  nU R                  S	U R                   S
3[
        R                  " U5      -   5      eSnAff = f)zARead text file at `path`. Clip and return content.

Provisional.
r)   source_pathr)   error_handlerProblems with "z1" directive path:
Cannot encode input file path "z" (wrong locale?)." directive path:
.NProblem with "" directive:

r   z&Problem with "start-after" option of "z" directive:
Text not found.z%Problem with "end-before" option of ")r?   r@   r<   input_encodinginput_encoding_error_handlerr	   	FileInputrecord_dependenciesaddUnicodeEncodeErrorseverer2   OSErrorerror_stringreadUnicodeErrorrB   
splitlinesjoinfindlen)rL   r   r)   rS   include_fileerrortext	startlineendline	starttextendtextlinesafter_indexbefore_indexs                 r    rG   Include.read_fileo   s%   
 <<##J0L0LMBB	8<<D196CEL MM--11$7	8$$&D
 261B1B.	I,OO%E99UW56D ))I.KQkk #&&*ii[0M#O P Pc)n456D99W-Lakk #&&*ii[0M#O P P&DG " 	2++		{ ;@@Dv F11 2 2  	<++		{:M!#!7 8; < <	<  	8++tyykH " 67 8 8	8s0   E! G !5G6GG
H6HHc                   U R                   S   nU R                  S:  a  UR                  U R                  5      n[        R                  " SX R                   R                  S/ 5      S9nX#l        U R                   R                  SS5      S-   Ul        U R                  U5        SU R                   ;   a  U R                   S   =(       d    SnUR                  S	5      nU[        UR                  5       5      -   n[        / U4/XE5      nU H?  u  pxU(       a  U[        R                  " SXS
9-  nM&  U[        R                  " U5      -  nMA     U/$ U[        R                  " U5      -  nU/$ )z?Return list with literal_block containing `text`.

Provisional
r   r   r6   r1   )r   classesr,   r   r0   rY   )ru   )r?   rA   
expandtabsr
   literal_blockr@   r   lineadd_nameremovesuffixrh   re   r   inlineText)	rL   rk   r   rw   	firstlinelastlinetokensru   values	            r    rH   Include.as_literal_block   s<   
 h'>>Q??4>>2D++v||'7'7'DF%!\\--lA>Bm$T\\)^49I$$T*D 3t'8#99H 2t*yCF"(!U\\"e%MMM!UZZ%66M	 #)  UZZ--Mr"   c                ~   U R                   S:  a  UR                  U R                   5      n[        U R                  U R                  R                  S5      /U R                  UR                  S5      /U R                  U R                  U R                  U R                  U R                  5	      nUR                  5       $ )z>Pass `text` to the `CodeBlock` directive class.

Provisional.
r   r(   rY   )rA   rv   r   r2   r?   poprz   linenocontent_offset
block_textr:   state_machinerN   )rL   rk   	codeblocks      r    rI   Include.as_code_block   s     >>Q??4>>2Ddii#||//78"ll#0067"kk"11"oo"jj"00	 	 }}r"   c                   U R                   S   " 5       n[        R                  " U5      nU R                  R                  R                  5        H  u  pE[        X4U5        M     U R                   S   Ul        [        R                  " UR                  U5      nU R                  R                  R                  Ul        U R                  R                  R                  Ul        U R                  R                  R                  Ul        U R                  R                  R                  Ul        UR!                  X5        U R                  R                  R"                  R%                  UR"                  5        UR&                  R)                  U45        UR&                  R+                  5         U R                  R                  R,                  R%                  UR,                  5        UR.                  $ )zParse with custom parser.

Parse with ``self.options['parser']`` into a new (dummy) document,
apply the parser's default transforms,
return child elements.

Provisional.
r*   r   )r?   r   get_default_settingsr<   __dict__itemssetattr_sourcer   new_documentr:   r;   include_logidsnameids	nametypesparseparse_messagesextendtransformerpopulate_from_componentsapply_transformstransform_messageschildren)rL   rk   r*   r<   kvr;   s          r    rJ   Include.custom_parse   sa    h')008MM**002DAH# 3<<1%%h&6&6A#zz22>>zz**..::..66!ZZ00::T$

**11(2I2IJ55vi@--/

..55''	)   r"   c                V   U R                   S   n[        R                  " XR                  SS9n[	        U5       Hb  u  pE[        U5      U R                  R                  :  d  M*  US-   U R                   R                  SS5      -   nU R                  SU SU S	35      e   U R                  R                  R                  nU(       dH  [        R                  " S
U R                  R                  R                  5      nUR!                  US45        X R"                  4U;   aH  S [%        U5       5       n	SR'                  U/U	Q75      n
U R                  SU R(                   SU
 35      eUR!                  X R"                  45        USSU S3/-  nU R*                  R-                  X25        g
)zLInsert file content into the rST input of the calling parser.

Provisional.
r   T)convert_whitespacer   r,   r   "z": line z exceeds the line-length-limit.N)NNr6   r6   c              3  *   #    U  H	  u  pUv   M     g 7fr&    ).0pthopts      r    	<genexpr>2Include.insert_into_input_lines.<locals>.<genexpr>  s     H2GJSC2Gs   z
> zcircular inclusion in "rX   r6   z.. end of inclusion from ")r?   r   string2linesrA   	enumeraterh   r<   line_length_limitr@   r>   r:   r;   r   r   r   rF   appendrB   reversedrf   r2   r   insert_input)rL   rk   r   	textlinesirx   line_nor   rF   source_chaininclusion_chains              r    rK   Include.insert_into_input_lines   s   
 h' --dNNAEG	 !+GA4y4==:::a%$,,"2"2<"CCllQvhhwi @9 $9 : : , jj))55"00 $djj&9&9&H&HJN0DEF%%&+5H(;2GHL$kk6*AL*ABO,,!8 D//>.? A B BF$5$567b6vha@AA	''	:r"   )rB   r<   rA   N)returnlist)r   r   r   str)rk   r   r   zlist[nodes.literal_block])rk   r   r   r   )rk   r   r   None)__name__
__module____qualname____firstlineno____doc__required_argumentsoptional_argumentsfinal_argument_whitespacer   flag	unchangedr)   parser_nameintunchanged_requiredvalue_orclass_optionoption_specr   r   __file__r   rE   rN   rG   rH   rI   rJ   rK   __static_attributes__r   r"   r    r$   r$   *   s    
  $(oo%//)22'33 #!$"","?"?!+!>!>#-#6#6w#D&33%//1K !1889D"H.`8(!:;r"   r$   c                      \ rS rSrSrSrSrSr\R                  \R                  \R                  \R                  S.rSrS rSrg	)
Rawi  z
Pass through content unchanged

Content is included in output based on type argument

Content may be included inline (content section of directive) or
imported from a file or url.
r   r   T)fileurlr)   r1   c                n   U R                   R                  R                  nUR                  (       a1  UR                  (       d>  SU R
                  ;   d  SU R
                  ;   a  U R                  SU R                  -  5      eSSR                  U R                  S   R                  5       R                  5       5      0nU R
                  R                  SUR                  5      nUR                  nU R                  (       a[  SU R
                  ;   d  SU R
                  ;   a  U R!                  SU R                  -  5      eS	R                  U R                  5      nGO=SU R
                  ;   a  SU R
                  ;   a  U R!                  S
U R                  -  5      e[#        U R
                  S   U R                   R                  R$                  UR&                  5      n [(        R*                  " UUUS9nUR,                  R/                  U5         UR7                  5       nXbS'   OuSU R
                  ;   aU  U R
                  S   n	 [;        U	5      R7                  5       n
[(        R>                  " XUUS9n UR7                  5       nXS'   OU RA                  5         [B        RD                  " SW4SU R
                  R                  S/ 5      0UD6nU RF                  RI                  U RJ                  5      u  Ul&        Ul'        U/$ ! [0         a;  nU R3                  SU R                   S[(        R4                  " U5       S35      eS nAff = f! [8         a;  nU R3                  SU R                   S3[(        R4                  " U5      -   5      eS nAff = f! [<        [0        4 aK  nU R3                  SU R                   SU R
                  S    S[(        R4                  " U5       S35      eS nAff = f! [8         a;  nU R3                  SU R                   S3[(        R4                  " U5      -   5      eS nAff = f)Nr   r   r5   format r   r)   zF"%s" directive may not both specify an external file and have content.rY   zXThe "file" and "url" options may not be simultaneously specified for the "%s" directive.rQ   rT   rU   rV   rW   rX   r   z" directive URL "z":
)r   rR   r)   rS   r6   ru   r1   )(r:   r;   r<   raw_enabledr=   r?   r>   r2   rf   rC   lowersplitr@   rZ   r[   contentrj   r!   rF   r   r	   r\   r]   r^   ra   r`   rb   rc   rd   r   r   StringInputassert_has_contentr
   rawr   get_source_and_liner   r   rx   )rL   r<   
attributesr)   rS   rk   r   raw_filerj   r   raw_textraw_nodes               r    rN   Raw.run"  s   ::&&//$$33t||+u/D,,9DIIEFF):)@)@)B)H)H)J KL
<<##J0G0GH ==<<%$,,)>jj(*.))45 5 99T\\*Dt||#$jj8:>))DE E dll62"jj11@@&224D
7<<D196CE ,,006<}} $(x dll"\\%(F@"6?//1
 ~~X/74ACH<}} $*x  ##%99R +t||/?/?/L +)+ ,,@@M		zK  GkkODII; ?,,.OOE,B+C1#F G GG   <kkN499+^"L$&OOE$:#; < << g& @kkODII; ?&&*ll5&9%:$%'__U%;$<A#? @ @@   <kkN499+^"L$&OOE$:#; < <<sa   L M	 N 3O/ 
M6MM	
N6N		NO,!AO''O,/
P496P//P4r   N)r   r   r   r   r   r   r   r   r   r   urir)   r   r   has_contentrN   r   r   r"   r    r   r     sO      $%??$..)22&335K K@r"   r   c                      \ rS rSrSrS rSrg)Replaceie  Tc                   [        U R                  [        R                  5      (       d  U R	                  SU R
                  -  5      eU R                  5         SR                  U R                  5      n[        R                  " U5      nU R                  R                  U R                  U R                  U5        S n/ nU H  nU(       d#  [        U[        R                  5      (       a  UnM-  [        U[        R                  5      (       a  / US'   UR                  U5        Md  U R                   R	                  SU R
                   S3U R"                  S9/s  $    U(       a  XCR$                  -   $ U$ )NVInvalid context: the "%s" directive can only be used within a substitution definition.rY   backrefs
Error in "z1" directive: may contain a single paragraph only.rx   )
isinstancer:   r   SubstitutionDefrj   r2   r   rf   r   r
   Elementnested_parser   	paragraphsystem_messager   reporterr   r   )rL   rk   elementnodemessageselems         r    rN   Replace.runi  s<   $**f&<&<==**-/3yy9: : 	!yy&--%

d.A.A '	) DJtU__==D%"6"677#%Z % MM''$TYYK 03 39= ( FG G  mm++r"   r   Nr   r   r   r   r   rN   r   r   r"   r    r   r   e  s    Kr"   r   c                      \ rS rSrSrSrSrSr\R                  \R                  \R                  S.r
\R                  " S5      rS rS	rg
)Unicodei  ac  
Convert Unicode character codes (numbers) to characters.  Codes may be
decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``,
``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character
entities (e.g. ``&#x262E;``).  Text following ".." is a comment and is
ignored.  Spaces are ignored, and any other text remains as-is.
r   r   T)trimltrimrtrimz( |\n|^)\.\. c           
     8   [        U R                  [        R                  5      (       d  U R	                  SU R
                  -  5      eU R                  R                  nSU R                  ;   a  SUR                  S'   SUR                  S'   SU R                  ;   a  SUR                  S'   SU R                  ;   a  SUR                  S'   U R                  R                  U R                  S   5      S   R                  5       n[        R                  " 5       nU H3  n [        R                   " U5      nU[        R(                  " U5      -  nM5     UR*                  $ ! ["         a2  nU R	                  SU< S[$        R&                  " U5      < 35      eS nAff = f)	Nr   r   r   r   r   r   zInvalid character code: rY   )r   r:   r   r   rj   r2   r   r   r?   r   comment_patternr   rC   r
   r   r   unicode_code
ValueErrorr	   rb   r|   r   )rL   substitution_definitioncodesr   r(   decodedrj   s          r    rN   Unicode.run  sm   $**f&<&<==**-/3yy9: : #'"4"4"9"9T\\!:;#..w7:;#..w7dll":;#..w7dll":;#..w7$$**4>>!+<=a@FFH--/DC$11$7 uzz'**G  	  Cjj$("//%*@"B C CCs   E
F'-FFr   N)r   r   r   r   r   r   r   r   r   r   r   recompiler   rN   r   r   r"   r    r   r     sM      $%??&OO&OO-K jj!12O r"   r   c                  .    \ rS rSrSrSrSrSrSrS r	Sr
g)	Classi  z
Set a "class" attribute on the directive content or the next element.
When applied to the next element, a "pending" element is inserted, and a
transform does the work later.
r   r   Tc                    [         R                  " U R                  S   5      n/ nU R                  (       a  [        R                  " 5       nU R                  R                  U R                  U R                  U5        U H  nUS   R                  U5        M     UR                  UR                  5        U$ [        R                  " [        R                   XR
                  S.U R"                  5      nU R$                  R&                  R)                  U5        UR+                  U5        U$ ! [         a2    U R	                  SU R
                  < SU R                  S   < S35      ef = f)Nr   z#Invalid class attribute value for "z" directive: "".ru   )r1   	directive)r   r   rC   r   rj   r2   r   r
   r   r:   r   r   r   r   pendingr   ClassAttributer   r   r;   note_pendingr   )rL   class_value	node_list	containerr   r
  s         r    rN   	Class.run  s'   	2$11$..2CDK
 	<<IJJ##DLL$2E2E$-/!Y&&{3 "Y//0  mm##%II>!G ''44W=W%'  	2**99dnnQ/12 2	2s   #D, ,<E(r   N)r   r   r   r   r   r   r   r   r   rN   r   r   r"   r    r  r    s%      $Kr"   r  c                  x    \ rS rSrSr\R                  " S\R                  R                  4S-  -  5      r
S rSrg)Rolei  Tz(%s)\s*(\(\s*(%s)\s*\)\s*)?$   c                   U R                   U R                  :  d  U R                  (       d  U R                  SU R                  -  5      eU R                  S   nU R
                  R                  U5      nU(       d$  U R                  SU R                  < SU< S35      eUR                  S5      nUR                  S5      n/ nU(       a  [        R                  " X@R                  R                  U R                  U R                  R                  5      u  peUc`  U R                  R                  R                  S	U-  [        R                  " U R                   U R                   5      U R                  S
9nXW/-   $ O[        R"                  n[%        US5      (       a   SU R                  < SU< S35       e ['        U5      nU R                  R)                  U R                  SS U R                   U0 S9u  ppSU
;  a   [.        R0                  " U5      U
S'   [        R4                  " X6X5      n[        R6                  " X>5        U$ ! [*        R,                   ap  nU R                  R                  SU R                  < SU< S3[        R                  " U R                   U R                   5      U R                  S
9nXW/-   s SnA$ SnAff = f! [2         ap  nU R                  R                  SU R                  < SU< S3[        R                  " U R                   U R                   5      U R                  S
9nXW/-   s SnA$ SnAff = f)z?Dynamically create and register a custom interpreted text role.z4"%s" directive requires arguments on the first line.r   r   z-" directive arguments not valid role names: "r  r      N#Unknown interpreted text role "%s".r   rC   z&Supplemental directive arguments for "z)" directive not supported (specified by "z" role).)option_presetsr   rX   rV   r1   zInvalid argument for ")r   r   r   rj   r2   argument_patternmatchgroupr   roler   languager:   r   r
   rw   r   generic_custom_rolehasattrr   parse_directive_blockr   MarkupErrorr   r   r   
CustomRoleregister_local_role)rL   argsr  new_role_namebase_role_namer   	base_rolerj   converted_rolerC   r?   r   r   detailr  s                  r    rN   Role.run  s   ,DLL** %'+yy1 2 2||A%%++D1**(,		49 : :AQ"'** 2 2 ; ;T[[

###%I  

++119NJ''I 2 &  ')) ! 11I9k22 	L59YY	K	L2	&7	BN11LL$d&9&9"2 2 7Y '!*#-#:#:=#I  'K!!-6% !! 	&MM''3799fE##DOOT__E[[ ( "E g%%	&  *++yy&*''I	 , &
  '))*s?   6AI >K K
A%K?K
K

MA%M<MMr   N)r   r   r   r   r   r  r  r   Inliner
simplenamer  rN   r   r   r"   r    r  r    s:    Kzz"A&,nn&?&?%AA%E#G H4r"   r  c                  &    \ rS rSrSrSrSrS rSrg)DefaultRolei  z&Set the default interpreted text role.r   Fc                   U R                   (       d'  S[        R                  ;   a  [        R                  S	 / $ U R                   S   n[        R                  " XR                  R
                  U R                  U R                  R                  5      u  p#Uc`  U R                  R                  R                  SU-  [        R                  " U R                  U R                  5      U R                  S9nX4/-   $ U[        R                  S'   U$ )Nr6   r   r  r   )rC   r   _rolesr  r   r  r   r:   r   rj   r
   rw   r   )rL   	role_namer  r   rj   s        r    rN   DefaultRole.run  s    ~~U\\!LL$INN1%	I/A/A/J/J$(KK1D1DF<JJ''--5	A##DOOT__E[[ . "E g%%Rr"   r   N)	r   r   r   r   r   r   r   rN   r   r   r"   r    r-  r-    s    0 %r"   r-  c                  &    \ rS rSrSrSrSrS rSrg)Titlei0  r   r   Tc                R    U R                   S   U R                  R                  S'   / $ )Nr   title)rC   r   r;   )rL   s    r    rN   	Title.run6  s&    /3~~a/@##G,	r"   r   N)	r   r   r   r   r   r   r   rN   r   r   r"   r    r3  r3  0  s     $r"   r3  c                       \ rS rSrS rS rSrg)MetaBodyi;  c                \    U R                  U5      u  pEU =R                  U-  sl        / U/ 4$ )zMeta element.)	parsemetar   )rL   r  context
next_stater   blank_finishs         r    field_markerMetaBody.field_marker=  s.    !^^E2t:r!!r"   c           	     B   U R                  U5      n[        R                  " [        R                  " U5      5      nU R
                  R                  UR                  5       5      u  p4pV[        R                  " 5       n[        R                  " [        R                  " SR                  U5      5      5      US'   U(       dL  U R
                  R                  nU R                  R                  SU-  [        R                  " X5      5      n	X4$ UR                  5       n
 [        R                  " U
S   5      S   u  pXUR!                  5       '   U
SS   H1  n [        R                  " U5      S   u  pXUR!                  5       '   M3     Xv4$ ! [        R"                   a    U
S   US'    N[f = f! [        R"                   a^  nU R
                  R                  nU R                  R%                  SU< SU< S	3[        R                  " X5      5      n	X4s S nAs  $ S nAff = f)
Nr   r   zNo content for meta tag "%s".r   r2   r   z"Error parsing meta tag attribute "z": rV   )parse_field_markerr
   unescaper   escape2nullr   get_first_known_indentedendmetarf   rx   r   inforw   r   extract_name_valuer   NameValueErrorrj   )rL   r  r2   indentedindentline_offsetr=  r   rx   msgr   attnamevaltokenr(  s                  r    r:  MetaBody.parsemetaC  s   &&u-~~e//5688E	;zz|..):):,/HHX,>*@ AY%%**D--$$1D8%%d13C $$	% 33F1I>qALG$'! ABZE)$77>qA(+W]]_%   !! ## 	%!!9DL	% '' )))..mm))().)<)<T)HJ (()s1   0F
 -F,
F)(F),H AHHHr   N)r   r   r   r   r>  r:  r   r   r"   r    r8  r8  ;  s    ""r"   r8  c                  (    \ rS rSrSrS\40rS rSrg)Metaid  Tstate_classesc           	        U R                  5         [        R                  " 5       nU R                  R	                  U R
                  U R                  USSU R                  S9u  p#X R                  -
  [        U R
                  5      :w  aR  U R                  R                  S[        R                  " U R                  U R                  5      U R                  S9nX-  nU R                  R                  R                  [        R                   [        R"                  45      =(       d    SnUR$                  U R                  R                  XU& / $ )Nr8  T)initial_stater=  state_machine_kwargszInvalid meta directive.r   r   )r   r
   r   r:   nested_list_parser   r   SMkwargsrh   r   rj   rw   r   r   r;   first_child_not_matching_classTitularrF  r   )rL   r   new_line_offsetr=  rj   indexs         r    rN   Meta.runj  s   !}}(,

(D(DLL$--t$4!% )E )0% 111c$,,6GGMM'')##DOOT__E[[ ( "E MD

##BB).

(CE JHI 	+/==

E(	r"   r   N)	r   r   r   r   r   r8  rY  rN   r   r   r"   r    rS  rS  d  s    K(-Hr"   rS  c                      \ rS rSrSrS rSrg)Datei  Tc                2   [        U R                  [        R                  5      (       d  U R	                  SU R
                  -  5      eSR                  U R                  5      =(       d    Sn[        R                  " U5      n[        R                  " U5      /$ )Nr   rY   z%Y-%m-%d)r   r:   r   r   rj   r2   rf   r   timestrftimer
   r|   )rL   
format_strrk   s      r    rN   Date.run  sv    $**f&<&<==**-/3yy9: : YYt||,:

" }}Z(

4 !!r"   r   Nr   r   r"   r    r`  r`    s    K"r"   r`  c                  F    \ rS rSrSrSrSrS\R                  0r	Sr
S rSrg)	TestDirectivei  z3This directive is useful only for testing purposes.r   Toptionc           	        U R                   (       a  SR                  U R                   5      nU R                  R                  SU R                  < SU R
                  < SU R                  < S3[        R                  " X5      U R                  S9nU/$ U R                  R                  SU R                  < SU R
                  < SU R                  < S3U R                  S9nU/$ )NrY   zDirective processed. Type="z", arguments=z
, options=z
, content:r   z, content: None)
r   rf   r   rG  r2   rC   r?   r
   rw   r   )rL   rk   rG  s      r    rN   TestDirective.run  s    <<99T\\*D==%%"iiG##D/dkk & CD v	 ==%%#'99dnndllL[[ & "D vr"   r   N)r   r   r   r   r   r   r   r   r   r   r   rN   r   r   r"   r    rg  rg    s+    = $Z::;KKr"   rg  )r6   r6   )r   r   r   r   ).r   
__future__r   __docformat__r  rb  pathlibr   urllib.requestr   urllib.errorr   docutilsr   r	   r
   r   r   docutils.parsers.rstr   r   r   r   r   $docutils.parsers.rst.directives.bodyr   r   docutils.transformsr   TYPE_CHECKINGdocutils.nodesr   r!   r$   r   r   r   r  r  r-  r3  SpecializedBodyr8  rS  r`  rg  r   r"   r    <module>rw     s   
   "" 	   " ! = = F : : G $&0`;i `;HT) Tni B) i ) X#I #L;9 ;|) 4I &"v%% &"R9 6"9 "<I r"   