+
    f0i#                     T   ^ RI t ^ RIHtHt ^ RIHtHtHtHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHtHtHt ]'       d   ^ RIHtHtHtHt ]] ]!,          ]",          ,          t#] PH                  ! ]%4      t& ! R R4      t' ! R R]'4      t( ! R R]'4      t)R# )    N)IterableSequence)TYPE_CHECKINGBinaryIOOptionalcast)utils)PDFColorSpace)PDFFontPDFUnicodeNotDefinedPDFPage)	PDFStream)	PSLiteral)MatrixPathSegmentPointRect)PDFGraphicStatePDFResourceManager	PDFStackTPDFTextStatec                   L  a  ] tR t^ t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	V 3R lR lt
R$V 3R lR lltV 3R lR ltR$V 3R lR lltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR  ltV 3R! lR" ltR#tV tR# )%	PDFDevicezGTranslate the output of PDFPageInterpreter to the output that is neededc                "   < V ^8  d   QhRRRR/# )   rsrcmgrr   returnN )format__classdict__s   "X/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/pdfminer/pdfdevice.py__annotate__PDFDevice.__annotate__#   s     ' ' 4 ' '    c                     Wn         R V n        R # N)r   ctm)selfr   s   &&r"   __init__PDFDevice.__init__#   s    "&r%   c                    < V ^8  d   QhRS[ /# )r   r   str)r    r!   s   "r"   r#   r$   '   s      # r%   c                    R # )z<PDFDevice>r   r)   s   &r"   __repr__PDFDevice.__repr__'   s    r%   c                   < V ^8  d   QhRR/# )r   r   r   r   )r    r!   s   "r"   r#   r$   *   s      ; r%   c                    V # r'   r   r0   s   &r"   	__enter__PDFDevice.__enter__*   s    r%   c                0   < V ^8  d   QhRS[ RS[ RS[ RR/# )r   exc_typeexc_valexc_tbr   N)object)r    r!   s   "r"   r#   r$   -   s)       & & T r%   c                &    V P                  4        R # r'   )close)r)   r8   r9   r:   s   &&&&r"   __exit__PDFDevice.__exit__-   s    

r%   c                   < V ^8  d   QhRR/# r   r   Nr   )r    r!   s   "r"   r#   r$   0   s      t r%   c                    R # r'   r   r0   s   &r"   r=   PDFDevice.close0       r%   c                $   < V ^8  d   QhRS[ RR/# )r   r(   r   N)r   )r    r!   s   "r"   r#   r$   3   s      6 d r%   c                    Wn         R # r'   )r(   )r)   r(   s   &&r"   set_ctmPDFDevice.set_ctm3   s    r%   Nc                8   < V ^8  d   QhRS[ RS[R,          RR/# r   tagpropsr   r   Nr   r   )r    r!   s   "r"   r#   r$   6   s(      Y x/D PT r%   c                    R # r'   r   r)   rK   rL   s   &&&r"   	begin_tagPDFDevice.begin_tag6   rD   r%   c                   < V ^8  d   QhRR/# rA   r   )r    r!   s   "r"   r#   r$   9   s       r%   c                    R # r'   r   r0   s   &r"   end_tagPDFDevice.end_tag9   rD   r%   c                8   < V ^8  d   QhRS[ RS[R,          RR/# rJ   rM   )r    r!   s   "r"   r#   r$   <   s'      ) H[,A T r%   c                    R # r'   r   rO   s   &&&r"   do_tagPDFDevice.do_tag<   rD   r%   c                *   < V ^8  d   QhRS[ RS[RR/# r   pager(   r   Nr   r   )r    r!   s   "r"   r#   r$   ?   s"      w V  r%   c                    R # r'   r   )r)   r\   r(   s   &&&r"   
begin_pagePDFDevice.begin_page?   rD   r%   c                $   < V ^8  d   QhRS[ RR/# r   r\   r   Nr   )r    r!   s   "r"   r#   r$   B   s      W  r%   c                    R # r'   r   r)   r\   s   &&r"   end_pagePDFDevice.end_pageB   rD   r%   c                0   < V ^8  d   QhRS[ RS[RS[RR/# )r   namebboxmatrixr   N)r.   r   r   )r    r!   s   "r"   r#   r$   E   s)       D & T r%   c                    R # r'   r   )r)   rh   ri   rj   s   &&&&r"   begin_figurePDFDevice.begin_figureE   rD   r%   c                $   < V ^8  d   QhRS[ RR/# )r   rh   r   Nr-   )r    r!   s   "r"   r#   r$   H   s      s t r%   c                    R # r'   r   )r)   rh   s   &&r"   
end_figurePDFDevice.end_figureH   rD   r%   c                J   < V ^8  d   QhRRRS[ RS[ RS[ RS[S[,          RR/# )	r   graphicstater   strokefillevenoddpathr   N)boolr   r   )r    r!   s   "r"   r#   r$   K   sL      '  	
  {# 
r%   c                    R # r'   r   )r)   rs   rt   ru   rv   rw   s   &&&&&&r"   
paint_pathPDFDevice.paint_pathK   s     	r%   c                *   < V ^8  d   QhRS[ RS[RR/# )r   rh   streamr   N)r.   r   )r    r!   s   "r"   r#   r$   U   s"       i D r%   c                    R # r'   r   )r)   rh   r}   s   &&&r"   render_imagePDFDevice.render_imageU   rD   r%   c          
      2   < V ^8  d   QhRRRS[ RS[RRRR/# 	r   	textstater   seqncsrs   r   r   N
PDFTextSeqr
   )r    r!   s   "r"   r#   r$   X   s=      !  	
 ( 
r%   c                    R # r'   r   )r)   r   r   r   rs   s   &&&&&r"   render_stringPDFDevice.render_stringX   s     	r%   )r(   r   r'   )__name__
__module____qualname____firstlineno____doc__r*   r1   r5   r>   r=   rG   rP   rT   rX   r_   re   rl   rp   rz   r   r   __static_attributes____classdictcell__r!   s   @r"   r   r       s     Q' '               r%   r   c                   h   a  ] tR t^bt o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltR	tV t	R
# )PDFTextDevicec          
      2   < V ^8  d   QhRRRS[ RS[RRRR/# r   r   )r    r!   s   "r"   r#   PDFTextDevice.__annotate__c   s=     0 0!0 0 	0
 (0 
0r%   c                n   V P                   f   Q h\        P                  ! VP                  V P                   4      pVP                  pVP
                  pVP                  R,          pVP                  V,          p	VP                  V,          p
VP                  pVf   Q hVP                  4       '       d   ^ p
RV,          V,          pVP                  4       '       d.   V P                  VVVP                  VVVV	V
VVVV4      Vn        R # V P                  VVVP                  VVVV	V
VVVV4      Vn        R # )Ng{Gz?gMbP?)r(   r	   mult_matrixrj   fontfontsizescaling	charspace	wordspaceriseis_multibyteis_verticalrender_string_vertical
linematrixrender_string_horizontal)r)   r   r   r   rs   rj   r   r   r   r   r   r   dxscales   &&&&&        r"   r   PDFTextDevice.render_stringc   s7    xx###""9#3#3TXX>~~%%##d*'''1	'''1	~~I("W,#'#>#>$$$I  $(#@#@$$$I r%   c                f   < V ^8  d   QhRS[ RS[RS[RS[RS[RS[RS[RS[R	S[R
S[RS[RRRS[/# r   r   rj   posr   r   r   r   r   r   r   r   rs   r   r   r   r   r   r   floatr
   )r    r!   s   "r"   r#   r           + ++ + 	+
 + + + + + + + + (+ 
+r%   c                   Vw  rR pV F  p\        V\        \        34      '       d   VVV
,          ,          pRpK3  \        V\        4      '       dx   VP	                  V4       F`  pV'       d	   W,          pWP                  \        P                  ! W-V34      VVVV	VVV4      ,          pV^ 8X  d   V'       d	   W,          pRpKb  	  K  \        P                  RV: R24       K  	  W3# )FTz(Cannot render horizontal string because $ is not a valid int, float or bytes.

isinstanceintr   bytesdecoderender_charr	   translate_matrixloggerwarningr)   r   rj   r   r   r   r   r   r   r   r   r   rs   xyneedcharspaceobjcids   &&&&&&&&&&&&&     r"   r   &PDFTextDevice.render_string_horizontal   s     C#U|,,S7]" $C'';;s+C$))..v1v> $	 	A byY$(M ," >gAC- 4 vr%   c                f   < V ^8  d   QhRS[ RS[RS[RS[RS[RS[RS[RS[R	S[R
S[RS[RRRS[/# r   r   )r    r!   s   "r"   r#   r      r   r%   c                   Vw  rR pV F  p\        V\        \        34      '       d   VVV
,          ,          pRpK3  \        V\        4      '       dx   VP	                  V4       F`  pV'       d	   W,          pWP                  \        P                  ! W-V34      VVVV	VVV4      ,          pV^ 8X  d   V'       d	   W,          pRpKb  	  K  \        P                  RV: R24       K  	  W3# )FTz&Cannot render vertical string because r   r   r   s   &&&&&&&&&&&&&     r"   r   $PDFTextDevice.render_string_vertical   s     C#U|,,S7]" $C'';;s+C$))..v1v> $	 	A byY$(M ," <SG D+ ,- 4 vr%   c                N   < V ^8  d   QhRS[ RS[RS[RS[RS[RS[RS[RR	R
S[/	# )r   rj   r   r   r   r   r   r   rs   r   r   )r   r   r   r   r
   )r    r!   s   "r"   r#   r      se        	
     ( 
r%   c	                    ^ # )r   r   )	r)   rj   r   r   r   r   r   r   rs   s	   &&&&&&&&&r"   r   PDFTextDevice.render_char   s     r%   r   N)
r   r   r   r   r   r   r   r   r   r   r   s   @r"   r   r   b   s0     0 0d+ +Z+ +Z r%   r   c                      a  ] tR t^t o RV 3R lR lltV 3R lR ltV 3R lR ltV 3R lR ltRV 3R
 lR lltV 3R lR lt	RV 3R lR llt
V 3R lR ltRtV tR	# )TagExtractorc                .   < V ^8  d   QhRRRS[ RS[RR/# )r   r   r   outfpcodecr   N)r   r.   )r    r!   s   "r"   r#   TagExtractor.__annotate__   s3     
* 
*%
* 
* 	
*
 

*r%   c                d    \         P                  W4       W n        W0n        ^ V n        . V n        R# )r   N)r   r*   r   r   pageno_stack)r)   r   r   r   s   &&&&r"   r*   TagExtractor.__init__   s*     	4)

')r%   c          
      2   < V ^8  d   QhRRRS[ RS[RRRR/# r   r   )r    r!   s   "r"   r#   r   
  s=     % %!% % 	%
 (% 
%r%   c                   VP                   pVf   Q hRpV F{  p\        V\        4      '       d   \        P                  ! V4      p\        V\
        4      '       g   KG  VP                  V4      pV F  p	 VP                  V	4      p
Wj,          pK  	  K}  	  V P                  \        P                  ! V4      4       R #   \         d     KZ  i ; i)N )r   r   r.   r	   make_compat_bytesr   r   	to_unichrr   _writeenc)r)   r   r   r   rs   r   textr   charsr   chars   &&&&&      r"   r   TagExtractor.render_string
  s     ~~C#s##--c2c5))KK$E>>#.DLD   	EIIdO$ , s   5B==CCc                *   < V ^8  d   QhRS[ RS[RR/# r[   r]   )r    r!   s   "r"   r#   r   "  s"      w V  r%   c                    R V P                    R\        P                  ! VP                  4       RVP                   R2pV P                  V4       R# )z
<page id="z" bbox="z
" rotate="z">N)r   r	   bbox2strmediaboxrotater   )r)   r\   r(   outputs   &&& r"   r_   TagExtractor.begin_page"  sJ    XennT]].K-L M{{m2' 	 	Fr%   c                $   < V ^8  d   QhRS[ RR/# rb   r   )r    r!   s   "r"   r#   r   )  s      W  r%   c                Z    V P                  R 4       V ;P                  ^,          un        R# )z</page>
N)r   r   rd   s   &&r"   re   TagExtractor.end_page)  s    K qr%   Nc                8   < V ^8  d   QhRS[ RS[R,          RR/# rJ   rM   )r    r!   s   "r"   r#   r   -  s(        Y  x/D  PT  r%   c                   R p\        V\        4      '       dl   R P                  \        VP	                  4       4       UUu. uF6  w  rER\
        P                  ! V4       R\
        P                  ! V4       R2NK8  	  upp4      pR\
        P                  ! \        \        VP                  4      4       V R2pV P                  V4       V P                  P                  V4       R# u uppi )r    z=""<>N)r   dictjoinsorteditemsr	   r   make_compat_strr   r.   rh   r   r   append)r)   rK   rL   skvout_ss   &&&    r"   rP   TagExtractor.begin_tag-  s    eT"" #)"7"7 		!~R(=(=a(@'AC"7A EIId3123A3a8E3s    <C&
c                   < V ^8  d   QhRR/# rA   r   )r    r!   s   "r"   r#   r   :  s       r%   c                   V P                   '       g   Q \        V P                  4      4       hV P                   P                  R4      pR\        P
                  ! \        \        VP                  4      4       R2pV P                  V4       R# )   z</r   N)	r   r.   r   popr	   r   r   rh   r   )r)   rK   r   s   &  r"   rT   TagExtractor.end_tag:  s_    {{{,C,,{kkoob!UYYtC234A6Er%   c                8   < V ^8  d   QhRS[ RS[R,          RR/# rJ   rM   )r    r!   s   "r"   r#   r   @  s'      ) H[,A T r%   c                ^    V P                  W4       V P                  P                  R4       R# )r   Nr   )rP   r   r   rO   s   &&&r"   rX   TagExtractor.do_tag@  s    s"r%   c                $   < V ^8  d   QhRS[ RR/# )r   r   r   Nr-   )r    r!   s   "r"   r#   r   D  s     / / / /r%   c                n    V P                   P                  VP                  V P                  4      4       R # r'   )r   writeencoder   )r)   r   s   &&r"   r   TagExtractor._writeD  s!    

$**-.r%   )r   r   r   r   )zutf-8r'   )r   r   r   r   r*   r   r_   re   rP   rT   rX   r   r   r   r   s   @r"   r   r      sU     
* 
*% %0       / /r%   r   )*loggingcollections.abcr   r   typingr   r   r   r   pdfminerr	   pdfminer.pdfcolorr
   pdfminer.pdffontr   r   pdfminer.pdfpager   pdfminer.pdftypesr   pdfminer.psparserr   pdfminer.utilsr   r   r   r   pdfminer.pdfinterpr   r   r   r   r   r   r   r   	getLoggerr   r   r   r   r   r   r%   r"   <module>r     s     .   + : $ ' ' ; ;  cEkE)*
			8	$? ?DXI XvH/9 H/r%   