+
    UBiF'                    $   ^ RI Ht ^ RIHt ^RIHtHt  ^RIHt RtRt
]
'       d	   ^ RIHtHt RR	R
RRR/tR R lt ! R R]P                  4      tR R ltR R ltR R lt]P(                  ! ]P*                  ]]4       ]'       dw   ]P,                  ! ]P*                  ]4       ]P.                  ! ]P*                  ]4       ]P0                  ! ]P*                  R4       ]P2                  ! ]P*                  R4       R# R#   ]	 d    Rt Li ; i)    )annotations)BytesIO)Image	ImageFile)_webpTF)IOAnys   VP8 RGBs   VP8XRGBAs   VP8Lc                    V ^8  d   QhRRRR/# )   prefixbytesreturnz
bool | str )formats   "8/usr/lib/python3.14/site-packages/PIL/WebPImagePlugin.py__annotate__r      s      E j     c                    V P                  R 4      pV R,          R8H  pV R,          \        9   pV'       d"   V'       d   V'       d   \        '       g    R# R# R# )s   RIFF:      Ns   WEBP:r      NzEimage file could not be identified because WEBP support not installedTF)
startswith_VP8_MODES_BY_IDENTIFIER	SUPPORTED)r   is_riff_file_formatis_webp_fileis_valid_vp8_modes   &   r   _acceptr       sN     ++G4$<7*Lu)AA|0AyW r   c                     a  ] tR t^'tRtRt^ t^ tR R ltR R lt	R R lt
RR	 R
 lltR R ltR R ltR V 3R lltR R ltR R ltRtV ;t# )WebPImageFileWEBPz
WebP imagec                   V ^8  d   QhRR/# )r   r   Noner   )r   s   "r   r   WebPImageFile.__annotate__-   s      !  !t  !r   c                	   \         P                  ! V P                  P                  4       4      V n        V P                  P                  4       w  V n        rr4WP                  R &   V^,	          ^,          V^,	          ^,          V^,	          ^,          V^,          3w  rVrxWgW3V P                  R&   W0n        V P                  ^8  V n	        VR8X  d   RMTV n
        W@n        V P                  P                  R4      p	V P                  P                  R4      p
V P                  P                  R4      pV	'       d   WP                  R&   V
'       d   WP                  R&   V'       d   WP                  R	&   V P                  R
R7       R# )loop
backgroundRGBXr
   ICCPEXIFzXMP icc_profileexifxmpF)resetN)r   WebPAnimDecoderfpread_decoderget_info_sizeinfon_framesis_animated_moderawmode	get_chunk_reset)self
loop_countbgcolorframe_countmodebg_abg_rbg_gbg_br-   r.   r/   s   &           r   _openWebPImageFile._open-   s;    --dgglln= >B]]=S=S=U:
J&		&]d"]d"\T!dN	"
D $(t":		,#==1,"fnU$
 mm--f5}}&&v.mm%%f-'2IIm$ $IIf"IIe 	% r   c                   V ^8  d   QhRR/# )r   r   zdict[int, Any] | Noner   )r   s   "r   r   r&   O   s     1 1/ 1r   c                	d    R V P                   9  d   R# V P                  4       P                  4       # )r.   N)r7   getexif_get_merged_dictr>   s   &r   _getexifWebPImageFile._getexifO   s&    "||~..00r   c                    V ^8  d   QhRRRR/# r   frameintr   r%   r   )r   s   "r   r   r&   T   s     % %# %$ %r   c                	D    V P                  V4      '       g   R # Wn        R # N)_seek_check_WebPImageFile__logical_framer>   rR   s   &&r   seekWebPImageFile.seekT   s    &&  %r   c                    V ^8  d   QhRRRR/# )r   r0   boolr   r%   r   )r   s   "r   r   r&   [   s      D D r   c                	t    V'       d   V P                   P                  4        ^ V n        RV n        ^ V n        R# )r   N)r4   r0   _WebPImageFile__physical_frame_WebPImageFile__loaded_WebPImageFile__timestamp)r>   r0   s   &&r   r=   WebPImageFile._reset[   s,    MM! !r   c                   V ^8  d   QhRR/# )r   r   ztuple[bytes, int, int]r   )r   s   "r   r   r&   b   s     ) )1 )r   c                	   V P                   P                  4       pV ;P                  ^,          un        Vf/   V P                  4        V P	                  ^ 4       Rp\        V4      hVw  r4W@P                  ,
          pW@n        WE,          pW4V3# )   z(failed to decode next frame in WebP file)r4   get_nextr_   r=   rY   EOFErrorra   )r>   retmsgdata	timestampdurations   &     r   	_get_nextWebPImageFile._get_nextb   s    mm$$&" ;KKMIIaL<C3- ///$ 		((r   c                    V ^8  d   QhRRRR/# rQ   r   )r   s   "r   r   r&   w   s      3 4 r   c                	    V P                   V8X  d   R # WP                   8  d   V P                  4        V P                   V8  d   V P                  4        K#  R # rU   )r_   r=   rm   rX   s   &&r   _seekWebPImageFile._seekw   sE      E)(((KKM##e+NN ,r   c                   V ^8  d   QhRR/# )r   r   zImage.core.PixelAccess | Noner   )r   s   "r   r   r&      s      3 r   c                	  < V P                   V P                  8w  d   V P                  V P                  4       V P                  4       w  rpW P                  R &   W0P                  R&   V P                  V n         V P
                  '       d-   V P                  '       d   V P
                  P                  4        \        V4      V n        \        P                  ! RRV P                  ,           ^ V P                  4      .V n        \        SV `=  4       # )rk   rl   raw)r   r   )r`   rW   rq   rm   r7   r2   _exclusive_fpcloser   r   _Tilesizer;   tilesuperload)r>   rj   rk   rl   	__class__s   &   r   r|   WebPImageFile.load   s    ==D000JJt++, )-(8%DX%.IIk"$,IIj! 00DM www4---dmDG"0BAt||TUDIw|~r   c                    V ^8  d   QhRRRR/# )r   posrS   r   r%   r   )r   s   "r   r   r&      s      S T r   c                	    R # rU   r   )r>   r   s   &&r   	load_seekWebPImageFile.load_seek   s    r   c                   V ^8  d   QhRR/# )r   r   rS   r   )r   s   "r   r   r&      s     $ $c $r   c                	    V P                   # rU   )rW   rM   s   &r   tellWebPImageFile.tell   s    ###r   )__loaded__logical_frame__physical_frame__timestampr4   r:   r6   r2   r9   r8   r;   rz   )T)__name__
__module____qualname____firstlineno__r   format_descriptionr`   rW   rG   rN   rY   r=   rm   rq   r|   r   r   __static_attributes____classcell__)r}   s   @r   r"   r"   '   sP    F%HO !D1
%)* $$ $r   r"   c                    V ^8  d   QhRRRR/# )r   imImage.Imager   r   )r   s   "r   r   r      s      { { r   c                r    V P                   R9  d&   T P                  V P                  '       d   RMR4      p V # )r*   r   r
   )r*   r   r
   )rB   converthas_transparency_data)r   s   &r   _convert_framer      s/    	ww--ZZ"":":":FIr   c               (    V ^8  d   QhRRRRRRRR/# 	r   r   r   r2   z	IO[bytes]filenamezstr | bytesr   r%   r   )r   s   "r   r   r      s.     y y+ y9 y y yr   c           
     
   V P                   P                  4       p\        VP                  R . 4      4      p^ pV .V,            F  pV\	        VR^4      ,          pK  	  V^8X  d   \        WV4       R# RpRV9   d   VR,          pMyRV P                  9   di   V P                  R,          p\        V\        4      '       d@   V P                  4       pV'       d#   W^,          V^,           ^,           w  rpWV^3pMWwV^3pV P                   P                  RV P                  P                  R^ 4      4      pV P                   P                  R^ 4      pV P                   P                  RR4      pV P                   P                  RR4      pV P                   P                  R	R4      pV P                   P                  R
R4      pRpV P                   P                  RR4      pV P                   P                  R^P4      pV P                   P                  R^d4      pV P                   P                  R^ 4      pV P                   P                  R4      ;'       g    RpV P                   P                  RR4      p\        V\        P                  4      '       d   VP                  4       pV P                   P                  RR4      pV'       d   RpVf   V'       d   ^	M^pVf   V'       d   ^M^p\        V\        \        34      '       dK   \        V4      ^8w  g;   \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   RV 2p\!        V4      hVw  ppppV^,          V^,          ,          V^,          ,          V^ ,          ,          p\"        P$                  ! V P&                  VVVVVVV4      p^ p ^ p!V P)                  4       p" V .V,            F  p\	        VR^4      p#\+        V#4       F  p$VP-                  V$4       \/        V4      p%VP1                  V%P3                  4       \5        V!4      VVVV4       \        V\        \        34      '       d   V!VV ,          ,          p!M	V!V,          p!V ^,          p K  	  K  	  V P-                  V"4       VP1                  R\5        V!4      VVV^ 4       VP7                  VVV4      p&V&f   Rp\!        V4      hVP9                  V&4       R#   T P-                  T"4       i ; i)append_imagesr8   Nr)   rl   r(   minimize_sizeFkminkmaxallow_mixedlosslessqualityalpha_qualitymethodr-    r.   r/   c              3  N   "   T F  p^ Tu;8*  ;'       d    R8  Mu x  K  	  R# 5i)r      Nr   ).0vs   & r   	<genexpr>_save_all.<locals>.<genexpr>   s     4A1<<C<<s   %%Tz:Background color is not an RGBA tuple clamped to (0-255): 1cannot write file as WebP (encoder returned None))r   r   r   r   )encoderinfocopylistgetgetattr_saver7   
isinstancerS   
getpaletter   ExiftobytestuplelenallOSErrorr   WebPAnimEncoderry   r   rangerY   r   addgetimroundassemblewrite)'r   r2   r   r   r   totalimsr)   palettergbrl   r(   r   r   r   r   verboser   r   r   r   r-   r.   r/   ri   rD   rE   rF   rC   enc	frame_idxrk   cur_idxnfridxrR   rj   s'   &&&                                    r   	_save_allr      sL   ..%%'K"=>M Etm##j!,, $zbh(4J{" .
		 WW\*
j#&& mmoG!q.JNa3GHaAs^
(j#F
~~!!*bggkk*a.HIH>>fa(DNN&&>M>>fd+D>>fd+D..$$]E:KG~~!!*e4Hnn  B/GNN&&<M^^!,F..$$]399rK>>fb)D$

##||~
..

UB
'C |q!|r1 zD%=11z?as44sss4444J:,Wcl (D$d"*,	:daiHJ 


	C IIggiG4-''C#z1-CSz&s+ KKM)$! hu66)!44I)IQ	) "	 (6 	 GGD%	"Hg}aH <<T3/D|AclHHTN 	s   B8S4 4Tc               (    V ^8  d   QhRRRRRRRR/# r   r   )r   s   "r   r   r     s(      k y K D r   c                `   V P                   P                  R R4      pV P                   P                  R^P4      pV P                   P                  R^d4      pV P                   P                  R4      ;'       g    RpV P                   P                  RR4      p\        V\        P                  4      '       d   VP                  4       pVP                  R4      '       d
   VR	,          pV P                   P                  R
R4      pV P                   P                  R^4      p	V P                   P                  R4      '       d   ^M^ p
\        V 4      p \        P                  ! V P                  4       V\        V4      \        V4      VV	V
VV4	      pVf   Rp\        V4      hVP                  V4       R# )r   Fr   r   r-   r   r.   r   s   Exif  :   NNr/   r   exactNr   )r   r   r   r   r   r   r   r   r   
WebPEncoder   floatr   r   )r   r2   r   r   r   r   r-   r.   r/   r   r   rj   ri   s   &&&          r   r   r     sV   ~~!!*e4Hnn  B/GNN&&<M..$$]399rK>>fc*D$

##||~''Bx
..

UB
'C^^!,F##G,,A!E		B

gm
D |AclHHTNr   z.webpz
image/webpN)
__future__r   ior   r   r   r   r   r   ImportErrorTYPE_CHECKINGtypingr   r	   r   r    r"   r   r   r   register_openr   register_saveregister_save_allregister_extensionregister_mimer   r   r   <module>r      s    "  I  UVV n$I'' n$byxD   M((- A	,,e4	M00)<	]117;	,,l;	 g	  Is   D 	DD