+
    bIi'                         R t Rt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHtHt . ^<3R ltRRR	R	R
R/tR^R	^R
^/tRR ltRR ltRR ltR tR tRR ltR tR tRR ltR t ! R R4      tR# )z3.3.0 N)BytesIO)	rl_config)ImageReader	isUnicode)asciiBase85EncodeasciiBase85Decodec                 r    \        ^ \        V 4      V4       F  pVP                  WW2,            4       K  	  V# )    )rangelenappend)srcdst	chunkSizeis   &&& ڃC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\reportlab/pdfbase/pdfutils.py_chunkerr      s1    1SXi(

3%& )J    RGBCMYKLGc           	      2   ^ RI p\        V 4      pVe2   VP                  V4       V'       d   VP                  4       '       d   R# VP	                  4       w  rVVP                  4       p. pVP                  p	V	! R4       V	! RV: RV: R\        VP                  ,          : R24       V	! R4       \        V4      WV,          \        VP                  ,          ,          8X  g   Q R4       hVP                  V4      p
\        V
4      p\        W4       V	! R	4       V# )
r
   NBI/W  /H  /BPC 8 /CS /z /F [/A85 /Fl]IDWrong amount of data for imageEI)zlibr   r   jpeg_fhgetSize
getRGBData_mode2csmoder   	_mode2bppcompressr   r   )filenameIMG
detectJpegr!   imgimgwidth	imgheightrawcoder   
compressedencodeds   &&&         r   makeA85Imager3      s    
h
C


3#++--++-H
..
CD[[F
4L
9XVYV^V^M_M_`a
4Ls8x+Ichh,???aAaa?s#J
+G W
4LKr   c           	         ^ RI p\        V 4      pVe2   VP                  V4       V'       d   VP                  4       '       d   R# VP	                  4       w  rVVP                  4       p. pVP                  p	V	! R4       V	! RV: RV: R\        VP                  ,          : R24       V	! R4       \        V4      WV,          \        VP                  ,          ,          8X  g   Q R4       hVP                  V4      p
\        W4       V	! R	4       V# )
r
   Nr   r   r   r   z	 /F [/Fl]r   r   r    )r!   r   r   r"   r#   r$   r%   r&   r   r'   r(   r   )r)   r*   r+   r!   r,   r-   r.   r/   r0   r   r1   s   &&&        r   makeRawImager5   9   s    
h
C


3#++--++-H
..
CD[[F
4L
HiQTQYQYHZHZ[\
4Ls8x+Ichh,???aAaa?s#J Z
4LKr   c                   \         P                  P                  V 4      ^ ,          \        P                  ;'       d    R;'       g    R,           pW8X  dc   \        V 4      '       d@   ^ RIHp V'       d0   \        RV! V4      P                  4       P                  R4      4      # R# \        RV ,          4      h\        P                  '       d   \        W4      pM\        W4      pV'       d   V# \        VR4      pVP                  RP!                  V4      R,           4       VP#                  4        \        P$                  '       d   \'        RV,          4       R# R# )	zHProcesses image as if for encoding, saves to a file with .a85 extension..a85z.bin)open_for_readN
zNo such cached image %swbzcached image as %s)ospathsplitextr   useA85cachedImageExistsreportlab.lib.utilsr8   filterreadsplitIOErrorr3   r5   openwritejoincloseverboseprint)r)   returnInMemoryr*   
cachednamer8   r0   fs   &&&    r   cacheImageFilerN   T   s     !!(+A.)2B2B2M2Mv2W2WQWXJX&&9fT-
2K2P2P2R2X2XY_2`&aa~3h>??-D-D$; D!	D!&()		&34 r   c                   ^ RI p\        V \        4      '       d   VP                  V 4      pMT pV FK  p\        V4      '       d-   \        P
                  '       d   \        RV,          4       K>  K@  \        V4       KM  	  R# )zPreprocesses one or more image files.

Accepts either a filespec ('C:\mydir\*.jpg') or a list
of image filenames, crunches them all to save time.  Run this
to save huge amounts of time when repeatedly building image
documents.Nz#cached version of %s already exists)glob
isinstancestrr?   r   rI   rJ   rN   )specrP   filelistr)   s   &   r   preProcessImagesrU   m   sd     $s99T?X&&   ;hFG ! 8$ r   c                v   \         P                  P                  V 4      ^ ,          \        P                  ;'       d    R;'       g    R,           p\         P                  P                  V4      '       dE   \         P                  ! V 4      ^,          p\         P                  ! V4      ^,          pW#8  d   ^ # ^# ^ # )zDetermines if a cached image already exists for a given file.

Determines if a cached image exists which has the same name
and equal or newer date to the given file.r7   bin)r;   r<   r=   r   r>   isfilestat)r)   rL   original_datecached_dates   &   r   r?   r?      s    
 !!(+A.)2B2B2M2Mv2V2VQVWJ	ww~~j!!)!,ggj)!,&r   c                    V P                  RV4      P                  RV4      P                  RV4      P                  W!4      # )zrNormalizes different line end character(s).

Ensures all instances of CR, LF and CRLF end up as
the specified one.r9   
)replace)textdesiredunlikelys   &&&r   _normalizeLineEndsrc      s:     WVX&WT8$WT8$WX'	)r   c                    \        V 4      '       d   V P                  R4      p \        4       pVP                  \        P
                  ! V 4      4       VP                  R4       VP                  4       # )zEncodes input using ASCII-Hex coding.

This is a verbose encoding used for binary data within
a PDF file.  One byte binary becomes two bytes of ASCII.
Helper function used by images.utf-8   >)r   encoder   rF   binasciib2a_hexgetvalue)inputoutputs   & r   _AsciiHexEncoderm      sT     W%YF
LL!!%()
LL??r   c                   \        V 4      '       g   V P                  R4      p RP                  V P                  4       4      pVR,          R8X  g   Q R4       hVRR p\	        V4      ^,          ^ 8X  g   Q R4       hRP                  \        ^ \	        V4      ^4       Uu. uF!  p\        \        WV^,            ^4      4      NK#  	  up4      # u upi )zaDecodes input using ASCII-Hex coding.

Not used except to provide a test of the inverse function.re   r   >z'Invalid terminator for Ascii Hex StreamNz(Ascii Hex stream has odd number of bytes)r   decoderG   rC   r   r   chrint)rk   strippedr   s   &  r   _AsciiHexDecoderu      s     UW%wwu{{}%HB<3I II}Hx=1!M#MM!77%#h-PQ:RS:RQCHqsOB/0:RSTTSs   'Cc                >   . p\        V 4      p^ pW,          pWS8  d-   VP                  WWQ,            4       V^,           pW,          pK2  \        VR,          4      ^8X  d.   VR,          RR VR,          R,          VR,          ,           .VRR% RP                  V4      # )z=Wraps input at a given column size by inserting 
characters.Nr9   rp   )r   r   rG   )rk   columnsrl   lengthr   poss   &&    r   _wrapr{      s    FZF	A
+C
,e,-Ek
6":bz#2vbz"~fRj'@Ars;;vr   c                   ^ RI p^ RIHp . R	Op. R
Op. ROpRp^ pV'       Eg   VP                  RV P	                  ^4      4      pV^ ,          ^8X  g   K:  VP                  RV P	                  ^4      4      pV^ ,          V9   d   V P                  ^^4       VP                  RV P	                  ^4      4      pV^ ,          ^8w  d	   V! R4      hVP                  RV P	                  ^4      4      p	V	^ ,          ^,          V	^,          ,           p
VP                  RV P	                  ^4      4      p	V	^ ,          ^,          V	^,          ,           pVP                  RV P	                  ^4      4      p	V	^ ,          pWW3# V^ ,          ^8X  d   VP                  RV P	                  ^4      4      pV^ ,          ^,          V^,          ,           ^,
          pV P	                  V4      pVP                  RVR,          4      p	VP                  RVR,          4      pV^ ,          ^,          V^,          ,           V	^ ,          ^,          V	^,          ,           3pEK4  V^ ,          V9   d   V! RV^ ,          ,          4      hV^ ,          V9  g   EKi  VP                  RV P	                  ^4      4      pV P                  V^ ,          ^,          V^,          ,           ^,
          ^4       EK  R# )z@Read width, height and number of components from open JPEG file.N)PDFErrorBz#JPEG must have 8 bits per componentBB:
      N:   r   Nz#JPEG Unsupported JPEG marker: %0.2x)         )
                              )                                 )H   r   )structreportlab.pdfbase.pdfdocr}   unpackrB   seek)imager   r}   validMarkersnoParamMarkersunsupportedMarkersdpidonexyheightwidthcolorns   &             r   readJPEGInfor      sS    1 &L 	G 
 	M  CDdMM#uzz!}-Q44<c5::a=1At|#

1a MM#uzz!}5Q419"#HIIMM$

16A$!)qt+MM$

16A$!)qt+MM#uzz!}51e001tMM$

16qTQY!A$&*JJqMMM$%1MM$$0!a1Q4'1q!A$71++DqtKLL1^+ MM$

16

QqTQY!A$.2A6= r   c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	_fusci  c                    V'       g   Q R 4       hWn         \        V4      V n        \        V4      ;'       g    ^V n        R# )z'Argument k should be a non empty stringN)_kr   _klenrs   _n)selfkr   s   &&&r   __init___fusc.__init__  s1    ;;;qV
a&++Ar   c                    V P                  \        R P                  \        \        V P                  \        \        \        V4      4      4      4      4      4      V P                  4      # r   )	_fusc__rotater   rG   maprr   _fusc__fusclistordr   r   ss   &&r   encrypt_fusc.encrypt  sH    }}.rwws3t{{4PSTWXYPZK[?\7]/^_`d`g`ghhr   c                    R P                  \        \        V P                  \	        \        \
        \        V P                  WP                  ) 4      4      4      4      4      4      4      # r   )	rG   r   rr   r   r   r   r   r   r   r   s   &&r   decrypt_fusc.decrypt  sF    wws3t{{4C8I$--XY[b[bZbJc8d0e+fghiir   c                    \        V4      pV^ 8  d	   W2,           pW#,          pV'       g   V# W) R VRW2,
           ,           # r
   N)r   )r   r   r   ls   &&& r   __rotate_fusc.__rotate!  s>    FQ3AC	(vag~r   c                    \        V4      p\        \        R  V\        \        \        \	        W P
                  ,          4      ^,           V P                  ,          RV 4      4      4      4      # )c                     W,          # )N )r   r   s   &&r   <lambda>_fusc.__fusc.<locals>.<lambda>*  s    AEr   N)r   r   r   r   rs   r   r   )r   r   slens   && r   __fusc_fusc.__fusc(  sR    1vC)!DS3tJJ;OPQ;QSWSZSZ:Z\a]a9b1c,deffr   )r   r   r   N)__name__
__module____qualname____firstlineno__r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r     s'     ijg gr   r   )NFr   )r9   z )<   )__version____doc__r;   rh   ior   	reportlabr   r@   r   r   reportlab.lib.rl_accelr   r   r   r%   r'   r3   r5   rN   rU   r?   rc   rm   ru   r{   r   r   r   r   r   <module>r      s    
 
    6 G"  %c2AvaQ'	6652%.0
)U437jg gr   