+
    f0i[                       a  Rs tM0 t R t^ RIt^ RIt^ RIt^ RIHtHtHt ^ RI	H
t
 ^ RIHtHtHtHtHtHtHtHt ^ RIHtHt ]'       d   ^ RIHt ^ RIt^ RItRtt]]P8                  ]]P<                  3,          t]]]3,          t  ! R R4      t!R	 R
 lt"R R lt#R R lt$RuR R llt%R R lt&R R lt'R R lt(])]*]*3,          t+])]*]*]*]*3,          t,])]*]*]*]*]*]*3,          t-]])],          ])]]*]*3,          ])]]*]*]*]*3,          ])]]*]*]*]*]*]*3,          3,          t.Rvt/] ^ k R R lt0R R lt1R R lt2R R lt3R R  lt4R! R" lt5R# R$ lt6]! R%4      t7R& R' lt8R( R) lt9R* R+ lt:R, R- lt;RwR. R/ llt<R0 R1 lt=RxR2 R3 llt>R4P                  R5 . ^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^NR6NR7NR8NR9NR:NR;NR<NR=N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^eN^fN^gN^hN^iN^jN^kN^lN^mN^nN^oN^pN^qN^rN^sN^tN^uN^vN^wN^xN^yN^zN^{N^|N^}N^~N^ NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\N^ NR]N^N^N^N^N^N^N^N^N^N^N^N^N^ N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N 4       4      t@R^ R_ ltAR` Ra ltBRb Rc ltCRd Re ltDRf Rg ltE]! RhRiRj7      tF ! Rk Rl]]F,          4      tG. RyOtH. RzOtIRm Rn ltJRo Rp ltKRq Rr ltLR# ){zMiscellaneous Routines.N)CallableIterableIterator)escape)TYPE_CHECKINGAnyBinaryIOGenericTextIOTypeVarUnioncast)PDFTypeErrorPDFValueError)LTComponentc                   Z   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RtV t	R	# )
open_filenamezContext manager that allows opening a filename
(str or pathlib.PurePath type is supported) and closes it on exit,
(just like `open`), but does nothing for file-like objects.
c                0   < V ^8  d   QhRS[ RS[RS[RR/# )   filenameargskwargsreturnN)
FileOrNamer   )format__classdict__s   "T/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/pdfminer/utils.py__annotate__open_filename.__annotate__*   s/     
L 
L 
LC 
L3 
L4 
L    c                h   \        V\        P                  4      '       d   \        V4      p\        V\        4      '       d   \	        V.VO5/ VB V n        R V n        R# \        V\        P                  4      '       d   \        \        V4      V n        RV n        R# \        R\        V4       24      h)TFzUnsupported input type: N)
isinstancepathlibPurePathstropenfile_handlerclosingioIOBaser   AnyIOr   type)selfr   r   r   s   &&*,r   __init__open_filename.__init__*   s    h 0 0118}Hh$$'+H'Ft'Fv'FDDL")),, $UH 5D DL!9$x.9IJKKr   c                    < V ^8  d   QhRS[ /# r   r   )r*   )r   r   s   "r   r   r   6   s     ! !5 !r   c                    V P                   # N)r&   r,   s   &r   	__enter__open_filename.__enter__6   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   9   s)     & & && && &T &r   c                b    V P                   '       d   V P                  P                  4        R # R # r2   )r'   r&   close)r,   r7   r8   r9   s   &&&&r   __exit__open_filename.__exit__9   s"    <<<##% r   )r'   r&   N)
__name__
__module____qualname____firstlineno____doc__r-   r4   r=   __static_attributes____classdictcell__r   s   @r   r   r   $   s*     

L 
L! !& &r   r   c                0    V ^8  d   QhR\         R\        /# )r   in_strr   )r$   bytes)r   s   "r   r   r   >   s      c e r   c                    \        V \        4      '       g   Q \        \        V 4      4      4       hV P                  4       # )z'Converts to bytes, encoding to unicode.)r!   r$   r+   encode)rH   s   &r   make_compat_bytesrL   >   s/    fc""5CV$55"==?r   c                0    V ^8  d   QhR\         R\        /# r   or   )r:   r$   )r   s   "r   r   r   D   s      v # r   c                   \        V \        4      '       dF   \        P                  ! V 4      pVR,          f   \	        V 4      #  V P                  VR,          4      # \	        V 4      #   \         d    \	        T 4      u # i ; i)z>Converts everything to string, if bytes guessing the encoding.encoding)r!   rI   charset_normalizerdetectr$   decodeUnicodeDecodeError)rO   encs   & r   make_compat_strrW   D   so    !U ''*z?"q6M	88C
O,, 1v " 	q6M	s   A' 'B ?B c                <    V ^8  d   QhR\         R\        R\         /# )r   ssizer   )r$   int)r   s   "r   r   r   R   s!      3 c c r   c                 x    V^8  d   V RV # \        V 4      V8  d   V^,
          ^,          pV RV  RW) R  2# V # )   Nz ... )len)rY   rZ   lengths   && r   shorten_strr`   R   sN    ax$x
1v}(qGV*U1WX;-00r   c                ^    V ^8  d   QhR\         \        ,          R\        R\        R\        /# )r   bytesorstringrQ   	erractionr   rI   r$   )r   s   "r   r   r   \   s4     5 53;55 5 		5r   c                    \        V \        4      '       d   V # \        V \        4      '       g   Q \        \        V 4      4      4       hV P	                  W4      # )zVWhen Py2 str.encode is called, it often means bytes.encode in Py3.

This does either.
)r!   r$   rI   r+   rT   )rb   rQ   rc   s   &&&r   compatible_encode_methodrf   \   sJ     -%%mU++ESm1D-EE+44r   c                H    V ^8  d   QhR\         R\         R\         R\         /# )r   leftabove
upper_leftr   r[   )r   s   "r   r   r   k   s(      # c s s r   c                     W,           V,
          p\        W0,
          4      p\        W1,
          4      p\        W2,
          4      pWE8:  d	   WF8:  d   V # WV8:  d   V# V# r2   )abs)rh   ri   rj   ppapbpcs   &&&    r   paeth_predictorrr   k   sR     	z!A	QXB	QYB	Q^	B 
xBH	r   c          
      T    V ^8  d   QhR\         R\         R\         R\        R\        /# )r   colorscolumnsbitspercomponentdatar   r[   rI   )r   s   "r   r   r   }   s4      14<A
r   c                   V^8w  d   RV 2p\        V4      hW^,          ,          pW,          p. p\        ^ \        V4      V4       Fl  p. p	\        V4       FG  p
W8V
,           ,          pW8  d   WW,
          ,          ,          pVR,          pV	P                  V4       KI  	  VP	                  V	4       Kn  	  \        V4      # )zReverse the effect of the TIFF predictor 2

Documentation:
https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf
(Section 14, page 64)
 Unsupported `bitspercomponent':    )r   ranger^   appendextendrI   )rt   ru   rv   rw   	error_msgbppnbytesbuf
scanline_irawi	new_values   &&&&        r   apply_tiff_predictorr   }   s     167G6HI	I&&
)
*C]FCAs4y&1
vA!^,Ix\)	S 	JJy!  	

3 2 :r   c                `    V ^8  d   QhR\         R\         R\         R\         R\        R\        /# )r   predrt   ru   rv   rw   r   rx   )r   s   "r   r   r      sL     \ \
\\ \ 	\
 \ \r   c                D   VR9  d   RV 2p\        V4      hW,          V,          ^,          pW,          ^,          p. p\        RV,          4      p	\        ^ \        V4      V^,           4       EF$  p
WJ,          pWJ^,           V
^,           V,            p. pV^ 8X  d   \        V4      pEMV^8X  d_   \	        V4       FM  w  rW,
          ^ 8  d   ^ M\        WV,
          ,          4      pVV,           ^,          pVP                  V4       KO  	  EMqV^8X  d;   \        WRR7       F'  w  ppVV,           ^,          pVP                  V4       K)  	  EM0V^8X  d~   \	        V4       Fm  w  ppW,
          ^ 8  d   ^ M\        WV,
          ,          4      p\        W,          4      pVVV,           ^,          ,           ^,          pVP                  V4       Ko  	  MV^8X  d   \	        V4       F  w  ppW,
          ^ 8  d   ^ p^ pM0\        WV,
          ,          4      p\        WV,
          ,          4      p\        W,          4      p\        VVV4      pVV,           ^,          pVP                  V4       K  	  M\        RV 24      hVP                  V4       Tp	EK'  	  \        V4      # )zpReverse the effect of the PNG predictor

Documentation: http://www.libpng.org/pub/png/spec/1.2/PNG-Filters.html
rz       F)strictzUnsupported predictor value: )      )r   listr|   r^   	enumerater[   r}   ziprr   r~   rI   )r   rt   ru   rv   rw   msgr   r   r   
line_abover   filter_typeline_encodedr   jsub_x	raw_x_bppraw_xup_xprior_x	average_xpaeth_xprior_x_bpppaeths   &&&&&                   r   apply_png_predictorr      sZ    v%01A0BCC   00A5F

#q
(C
Cg'(JAs4y&1*5
&NZ!^f-DE!|$CA &l3!"1A#cc'l2C	*c1

5! 4
 A "%\e!Lg3.

5! "M A !*, 79!"1A#cc'l2C	jm,"i'&9a%??3F

5!	 !8 A (5
77Q; !I"#K #CCL 1I"%jS&9":Kjm,'	7KH 5C/

5! 6  "?} MNN

3
Q 6R :r   c                0    V ^8  d   QhR\         R\        /# rN   )r   Rect)r   s   "r   r   r     s     B B# B$ Br   c                      V w  rr4\        V4      \        V4      \        V4      \        V4      3#   \         d   p\        R 4      ThRp?ii ; i)zCould not parse rectangleN)float
ValueErrorr   )rO   x0y0x1y1errs   &     r   
parse_rectr     sQ    BRy%)U2Yb	99 B78cABs   .1 AAAc                <    V ^8  d   QhR\         R\         R\         /# )r   m1m0r   )Matrix)r   s   "r   r   r     s!      F  6 r   c                 ,   V w  r#rErgVw  rrr W,          W,          ,           W,          W,          ,           W,          W,          ,           W,          W,          ,           W,          W,          ,           V,           W,          W,          ,           V,           3# r2    )r   r   a1b1c1d1e1f1a0b0c0d0e0f0s   &&            r   mult_matrixr     sy    !RRR!RRR5
"'
"'
"'
"'
"'B
"'B r   c                <    V ^8  d   QhR\         R\        R\         /# r   mvr   r   Point)r   s   "r   r   r     s!     < < <5 <V <r   c                    V w  r#rErgVw  rW#WEW,          W,          ,           V,           W,          W,          ,           V,           3# )zTranslates a matrix by (x, y) inside the projection.

The matrix is changed so that its origin is at the specified point in its own
coordinate system. Note that this is different from translating it within the
original coordinate system.r   
r   r   abcdefxys
   &&        r   translate_matrixr     s@     Q1FQququ}q(!%!%-!*;;;r   c                <    V ^8  d   QhR\         R\        R\        /# r   r   )r   s   "r   r   r   '  s!     0 0v 0% 0E 0r   c                    V w  r#rErgVw  rW(,          WI,          ,           V,           W8,          WY,          ,           V,           3# )zApplies a matrix to a point.r   r   s
   &&        r   apply_matrix_ptr   '  s:    Q1FQ515=1aeaema///r   c                <    V ^8  d   QhR\         R\        R\        /# )r   r   rectr   )r   r   )r   s   "r   r   r   .  s!       t  r   c           	         Vw  r#rEW#3pWC3pWE3pW%3p	\        W4      w  r\        W4      w  r\        W4      w  r\        W	4      w  pp\        V
VW4      \        WVV4      \        V
VW4      \        WVV4      3# )a  Applies a matrix to a rectangle.

Note that the result is not a rotated rectangle, but a rectangle with the same
orientation that tightly fits the outside of the rotated content.

:param m: The rotation matrix.
:param rect: The rectangle coordinates (x0, y0, x1, y1), where x0 < x1 and y0 < y1.
:returns a rectangle with the same orientation, but that would fit the rotated
    content.
)r   minmax)r   r   r   r   r   r   left_bottomright_bottom	right_topleft_topleft1bottom1right1bottom2right2top1left2top2s   &&                r   apply_matrix_rectr   .  s     RR(K8LIxH&q6U'8V$Q2NV#A0MUD 	E5&)GdD)E5&)GdD)	 r   c                <    V ^8  d   QhR\         R\        R\        /# r   r   )r   s   "r   r   r   L  s!     ( ( (E (e (r   c                j    V w  r#rErgVw  rW(,          WI,          ,           W8,          WY,          ,           3# )zCEquivalent to apply_matrix_pt(M, (p,q)) - apply_matrix_pt(M, (0,0))r   )
r   r   r   r   r   r   _e_frn   qs
   &&        r   apply_matrix_normr   L  s0    Q1FQ515=!%!%-''r   c                0    V ^8  d   QhR\         R\        /# r   r   r   r:   bool)r   s   "r   r   r   V  s     ' ' '4 'r   c                 .    \        V \        \        34      # r2   )r!   r[   r   r   s   &r   isnumberr   V  s    a#u&&r   _Tc                \    V ^8  d   QhR\         \        ,          R\        \        ,          /# )r   objsr   )r   r   r   )r   s   "r   r   r   ]  s"      x|  r   c              #  n   "   \        4       pV  F   pW!9   d   K  VP                  V4       Vx  K"  	  R# 5i)zEliminates duplicated elements.N)setadd)r   doneobjs   &  r   uniqr   ]  s.     5D;		 s   35c          	          V ^8  d   QhR\         \        .\        3,          R\        \        ,          R\        \
        \        ,          \
        \        ,          3,          /# )r   r   r   r   )r   r   r   r   tupler   )r   s   "r   r   r   g  sC     	 	2$*% 	Xb\ 	eDHdSUhDV>W 	r   c                    . p. pV F5  pV ! V4      '       d   VP                  V4       K$  VP                  V4       K7  	  W#3# )z9Split a list into two classes according to the predicate.)r}   )r   r   tr   r   s   &&   r   fsplitr   g  s>    
A
A99HHSMHHSM	 
 4Kr   c                H    V ^8  d   QhR\         R\         R\        R\        /# )r   v0v1r   r   )r   r[   r|   )r   s   "r   r   r   s  s(     1 1u 1% 1C 1E 1r   c                f    \        \        V 4      V,          \        W,           4      V,          4      # )zReturns a discrete range.)r|   r[   )r  r  r   s   &&&r   dranger  s  s"    RAs26{a/00r   c                F    V ^8  d   QhR\         \        ,          R\        /# )r   ptsr   )r   r   r   )r   s   "r   r   r   x  s     	 	8E? 	t 	r   c                    \         \         \         ) \         ) 3pVw  r#rEV  F1  w  rg\        W&4      p\        W74      p\        WF4      p\        WW4      pK3  	  W#WE3# )z7Compute a minimal rectangle that covers all the points.)INFr   r   )r  limitr   r   r   r   r   r   s   &       r   	get_boundr
  x  sZ    cTC4(ERRZZZZ	 
 2>r   c          	          V ^8  d   QhR\         \        ,          R\        \        .\        3,          R\        R,          R\        R,          /# )r   seqfuncmaxobjNr   )r   r   r   r   )r   s   "r   r   r     sG      	"
B4;
 I $Y	r   c                H    RpV  F  pV! V4      pVe	   W58  g   K  YTr#K  	  V# )z;Picks the object obj where func(obj) has the highest value.Nr   )r  r  r  maxscorer   scores   &&&   r   pickr    s3     HS	x/"'v  Mr   c          	          V ^8  d   QhR\         R\        \        ,          R\        \        \        R3,          ,          /# )r   nr  r   .)r[   r   r   r   r   )r   s   "r   r   r     s2       (2, 8E"c'N+C r   c              #     "   . pV F5  pVP                  V4       \        V4      V 8X  g   K&  \        V4      x  . pK7  	  R# 5i)z$Groups every n elements of the list.N)r}   r^   r   )r  r  rr   s   &&  r   choplistr    s8     
A	q6Q;(NA	 s
   &AAc                <    V ^8  d   QhR\         R\        R\        /# )r   rY   defaultr   )rI   r[   )r   s   "r   r   r     s&     @ @u @s @3 @r   c                \    \        V 4      pV'       g   V# \        P                  V RRR7      # )z7Unpacks variable-length unsigned integers (big endian).bigF)	byteordersigned)r^   r[   
from_bytes)rY   r  r_   s   && r   nunpackr    s(    VF~~a5~??r    c              #   8   "   T F  p\        V4      x  K  	  R # 5ir2   )chr).0r   s   & r   	<genexpr>r$    s$      DA FFAs   i  i  i  i  i  i  i  i  i"   i    i!   i&   i   i   i  iD   i9   i:   i"  i0   i   i   i   i   i   i   i"!  i  i  iA  iR  i`  ix  i}  i1  iB  iS  ia  i~  i   c                0    V ^8  d   QhR\         R\        /# )r   rY   r   rd   )r   s   "r   r   r     s     5 55 5S 5r   c                    V P                  R4      '       d   \        V R,          RR4      # RP                  R V  4       4      # )z+Decodes a PDFDocEncoding string to Unicode.s   :r   NNzutf-16beignorer   c              3   <   "   T F  p\         V,          x  K  	  R # 5ir2   )PDFDocEncoding)r#  r   s   & r   r$  decode_text.<locals>.<genexpr>  s     4!Q~a((!s   )
startswithr$   join)rY   s   &r   decode_textr-    s9    ||K  1R5*h//ww4!444r   c                0    V ^8  d   QhR\         R\         /# r   r$   )r   s   "r   r   r     s      3 3 r   c                H    \        V \        4      '       d   R# \        V 4      # )z"Encodes a string for SGML/XML/HTMLr   )r!   rI   r   r   s   &r   rV   rV     s    !U!9r   c                0    V ^8  d   QhR\         R\        /# r   bboxr   )r   r$   )r   s   "r   r   r     s     2 24 2C 2r   c                 .    V w  rr4VR  RVR  RVR  RVR  2# )z.3f,r   )r3  r   r   r   r   s   &    r   bbox2strr6    s1    RRXQr#ha3xqC11r   c                0    V ^8  d   QhR\         R\        /# )r   r   r   )r   r$   )r   s   "r   r   r     s     C C& CS Cr   c                 D    V w  rr4rVR VR RVR RVR RVR RVR RVR R2# )[z.2fr5  z, (z)]r   )r   r   r   r   r   r   r   s   &      r   
matrix2strr:    sG    Q1qgQqgQqgQqgS3q3rBBr   c                ,    V ^8  d   QhRRRRR\         /# )r   obj1r   obj2r   )r   )r   s   "r   r   r     s!     & &- &} & &r   c                .   \        V P                  VP                  4      \        V P                  VP                  4      r2\        V P                  VP                  4      \        V P
                  VP
                  4      rTWB,
          WS,
          rvW`P                  ,
          VP                  ,
          WpP                  ,
          VP                  ,
          rV^ 8  d   V	^ 8  d   V P                  V P                  ,           ^,          V P                  V P
                  ,           ^,          rVP                  VP                  ,           ^,          VP                  VP
                  ,           ^,          rW,
          W,
          3# \        ^ V4      \        ^ V	4      3# )ai  A distance function between two TextBoxes.

Consider the bounding rectangle for obj1 and obj2.
Return vector between 2 boxes boundaries if they don't overlap, otherwise
returns vector between boxes centers

         +------+..........+ (x1, y1)
         | obj1 |          :
         +------+www+------+
         :          | obj2 |
(x0, y0) +..........+------+
)r   r   r   r   r   r   widthheight)r<  r=  r   r   r   r   owohiwihxc1yc1xc2yc2s   &&            r   vecBetweenBoxesrI    s    DGGTWW%s477DGG'<DGGTWW%s477DGG'<ZZ$**,b;;.>.L	Av"q&ww(A-$''0AQ/Fcww(A-$''0AQ/Fcy#)##1bz3q":%%r   LTComponentTr   )boundc                      a  ] tR tRt o R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V 3R lR ltV 3R lR ltRtV tR# )Planei  zA set-like data structure for objects placed on a plane.

Can efficiently find objects in a certain rectangular area.
It maintains two parallel lists of objects, each of
which is sorted by its x or y coordinate.
c                *   < V ^8  d   QhRS[ RS[RR/# )r   r3  gridsizer   N)r   r[   )r   r   s   "r   r   Plane.__annotate__  s"     4 4T 4S 4$ 4r   c                    . V n         \        4       V n        / V n        W n        Vw  V n        V n        V n        V n        R # r2   )	_seqr   _objs_gridrO  r   r   r   r   )r,   r3  rO  s   &&&r   r-   Plane.__init__  s4    (*	(+
68
 /3,$'47DGr   c                    < V ^8  d   QhRS[ /# r0   r/  )r   r   s   "r   r   rP    s     . .# .r   c                "    R \        V 4      : R2# )z<Plane objs=>)r   r3   s   &r   __repr__Plane.__repr__  s    d4j^1--r   c                0   < V ^8  d   QhRS[ S[,          /# r0   )r   rJ  )r   r   s   "r   r   rP    s     ? ?(<0 ?r   c                0   a  V 3R  lS P                    4       # )c              3   L   <"   T F  qSP                   9   g   K  Vx  K  	  R # 5ir2   rS  )r#  r   r,   s   & r   r$  !Plane.__iter__.<locals>.<genexpr>  s     >y4::,=ys   $
$)rR  r3   s   fr   __iter__Plane.__iter__  s    >tyy>>r   c                    < V ^8  d   QhRS[ /# r0   rk   )r   r   s   "r   r   rP    s       r   c                ,    \        V P                  4      # r2   )r^   rS  r3   s   &r   __len__Plane.__len__  s    4::r   c                &   < V ^8  d   QhRS[ RS[/# )r   r   r   r   )r   r   s   "r   r   rP    s     ! ! !4 !r   c                    WP                   9   # r2   r^  )r,   r   s   &&r   __contains__Plane.__contains__  s    jj  r   c                6   < V ^8  d   QhRS[ RS[S[,          /# r2  )r   r   r   )r   r   s   "r   r   rP    s     
' 
'd 
'x 
'r   c              #    "   Vw  r#rEW@P                   8:  g3   V P                  V8:  g"   WPP                  8:  g   V P                  V8:  d   R # \	        V P                   V4      p\	        V P                  V4      p\        V P                  V4      p\        V P                  V4      p\        W5V P                  4       F%  p\        W$V P                  4       F  pWv3x  K
  	  K'  	  R # 5ir2   )r   r   r   r   r   r   r  rO  )r,   r3  r   r   r   r   grid_ygrid_xs   &&      r   	_getrangePlane._getrange  s     =DGGrMR77]dggm""""RT]]3F 7&& 8 4s   C#C%c                4   < V ^8  d   QhRS[ S[,          RR/# )r   r   r   N)r   rJ  )r   r   s   "r   r   rP  	  s       8L1 d r   c                :    V F  pV P                  V4       K  	  R # r2   )r   )r,   r   r   s   && r   r~   Plane.extend	  s    CHHSM r   c                $   < V ^8  d   QhRS[ RR/# r   r   r   NrJ  )r   r   s   "r   r   rP    s     
 
| 
 
r   c                   V P                  VP                  VP                  VP                  VP                  34       FH  pW P
                  9  d   . pW0P
                  V&   MV P
                  V,          pVP                  V4       KJ  	  V P                  P                  V4       V P                  P                  V4       R# )zPlace an object.N)
rn  r   r   r   r   rT  r}   rR  rS  r   )r,   r   kr  s   &&  r   r   	Plane.add  s     @AA

"(* !

1JJqMHHSM B 			

sr   c                $   < V ^8  d   QhRS[ RR/# rt  ru  )r   r   s   "r   r   rP    s      , 4 r   c                   V P                  VP                  VP                  VP                  VP                  34       FU  p\
        P                  ! \        \        4      ;_uu_ 4        V P                  V,          P                  V4       RRR4       KW  	  V P                  P                  V4       R#   + '       g   i     K  ; i)zDisplace an object.N)rn  r   r   r   r   
contextlibsuppressKeyErrorr   rT  removerS  )r,   r   rw  s   && r   r~  Plane.remove  s     @AA$$Xz::

1$$S) ;: B 	

# ;::s   (#B44Cc                6   < V ^8  d   QhRS[ RS[S[,          /# r2  )r   r   rJ  )r   r   s   "r   r   rP     s        (<"8 r   c              #  v  "   Vw  r#rE\        4       pV P                  V4       F  pWpP                  9  d   K  V P                  V,           Fd  pW9   d   K  VP                  V4       VP                  V8:  g2   WHP
                  8:  g"   VP                  V8:  g   WXP                  8:  d   K`  Vx  Kf  	  K  	  R# 5i)z)Finds objects that are in a certain area.N)r   rn  rT  r   r   r   r   r   )	r,   r3  r   r   r   r   r   rw  r   s	   &&       r   find
Plane.find   s     u%A

"zz!}};66R<2<366R<2<	 % &s   B7B9)rT  rS  rR  rO  r   r   r   r   N)2   )r?   r@   rA   rB   rC   r-   rY  r`  rd  rh  rn  r~   r   r~  r  rD   rE   rF   s   @r   rM  rM    sn     4 4. .? ? ! !
' 
' 
 
  r   rM  c                0    V ^8  d   QhR\         R\        /# r   valuer   r[   r$   )r   s   "r   r   r   4  s      C C r   c                p   ^ T u;8  d	   R8  g   Q h Q h. p^ pV ^ 8w  Ed   \        V ^
4      w  rV^	8X  dC   VP                  ^ \        V,          4       VP                  ^\        V^,           ,          4       MV^8X  d<   VP                  ^ \        V,          4       VP                  ^\        V,          4       MaV^8  pV'       d'   VP                  ^ \        V,          4       V^,          pTP                  V'       d   ^M^ \        V,          V,          4       V^,          pEK  RP	                  V4      # )z,Format a number as lowercase Roman numerals.i  r   )divmodinsert
ROMAN_ONESROMAN_FIVESr,  )r  resultindex	remainder	over_fives   &    r   format_int_romanr  4  s    utFE
1*!%,>MM!Z./MM!Z	23!^MM!Z./MM![/0!QIaU!34Q	MMy!aE1BY1NO
776?r   c                0    V ^8  d   QhR\         R\        /# r  r  )r   s   "r   r   r   M  s     
 
C 
C 
r   c                   V ^ 8  g   Q h. pV ^ 8w  dU   \        V ^,
          \        \        P                  4      4      w  rVP	                  \        P                  V,          4       K[  VP                  4        RP                  V4      # )z5Format a number as lowercase letters a-z, aa-zz, etc.r   )r  r^   stringascii_lowercaser}   reverser,  )r  r  r  s   &  r   format_int_alphar  M  sg    199F
1*!%!)S1G1G-HIf,,Y78
NN776?r   c                0    V ^8  d   QhR\         R\         /# )r   paddedr   )rI   )r   s   "r   r   r   Z  s      e  r   c                  a \        V 4      ^ 8X  d   V # V R,          oS^8  d   V # S\        V 4      8  d   V # \        ;QJ d#    V3R lV S) R  4       F  '       d   K   RM	  RM! V3R lV S) R  4       4      '       d   V RS)  # V # )a  Remove block padding as described in PDF 1.7 section 7.6.2:

> For an original message length of M, the pad shall consist of 16 -
(M mod 16) bytes whose value shall also be 16 - (M mod 16).
> Note that the pad is present when M is evenly divisible by 16;
it contains 16 bytes of 0x10.
c              3   ,   <"   T F	  qS8H  x  K  	  R # 5ir2   r   )r#  r   paddings   & r   r$  unpad_aes.<locals>.<genexpr>l  s     
3!2A<!2s   NFT)r^   all)r  r  s   &@r   	unpad_aesr  Z  s     6{aRjG|V
s
3	!2
3sss
3	!2
333ix  Mr   c                @    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   MATRIX_IDENTITY)__conditional_annotations__r   )r   s   "r   r   r      s      D - , ,E r   i)zutf-8r'  )r       r  r   r  r  r2   )r  )r   r   r   r   )r   lr   )Nr  rC   r(   r"   r  collections.abcr   r   r   htmlr   typingr   r   r   r	   r
   r   r   r   pdfminer.pdfexceptionsr   r   pdfminer.layoutr   r{  rR   r  r#   r$   r)   r   r*   r   rL   rW   r`   rf   rr   r   r   r   r   r   r   r   PathSegmentr  r   r   r   r   r   r   r   r   r   r   r  r
  r  r  r  r,  r)  r-  rV   r6  r:  rI  rJ  rM  r  r  r  r  r  r   )r  s   @r   <module>r     s    	   8 8 	 	 	 ?+   7##S"))34
fh& &45$8\~ 	eUlUE5%'(	ueUE5%7	8	#J	#ue
	#ueUE
)*	#ueUE5%
78: - ,B<0<(' T]	1
	@  DAAA 	A 		A
 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A  	!A" 	#A$ 	%A& 	'A( 	)A* 	+A, 	-A. 	/A0 	1A2 	3A4 	5A6 	7A8 	9A: 	;A< 	=A> 	?A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAB 	CAD 	EAF 	GAH 	IAJ 	KAL 	MAN 	OAP 	QAR 	SAT 	UAV 	WAX 	YAZ 	[A\ 	]A^ 	_A` 	aAb 	cAd 	eAf 	gAh 	iAj 	kAl 	mAn 	oAp 	qAr 	sAt 	uAv 	wAx 	yAz 	{A| 	}A~ 	A@ 	AAD DN52
C
&4 ~];KGL! K\ "
2
r   