+
    Vj&                    $   ^ 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   "|/home/vela/workspace/domain/tn-silver/web/tn-site/.runtime/imagegen-venv/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                	   V P                   f   Q hV P                   P                  4       p\        V4      '       g   Rp\        V4      h\        P
                  ! V4      V n        V P                  P                  4       w  V n        V P                  R&   q0n
        V n        V^,	          ^,          V^,	          ^,          V^,          V^,	          ^,          3V P                  R&   V P                  ^8  V n        V P                  R8X  d   RMV P                  V n        RRRR	R
R/P                  4        F8  w  rEV P                  P                  V4      ;p'       g   K*  W`P                  V&   K:  	  V P!                  RR7       R # )Nznot a WEBP fileloop
backgroundRGBXr
   icc_profileICCPexifEXIFxmpzXMP F)reset)fpreadr    SyntaxErrorr   WebPAnimDecoder_decoderget_info_sizeinfon_framesrawmodeis_animated_modeitems	get_chunk_reset)selfsmsgbgcolorkey
chunk_namevalues   &      r   _openWebPImageFile._open-   sL   ww"""GGLLNqzz#Cc"" --a0 MM""$ 	L
DIIf%wt| ]d"\T!dN]d"	#
		,  ==1,"llf4U$,,
 6F6 
 %'	 OC
 //
;;u;;!&		#  	% r   c                   V ^8  d   QhRR/# )r   r   zdict[int, Any] | Noner   )r   s   "r   r   r&   Q   s     1 1/ 1r   c                	d    R V P                   9  d   R# V P                  4       P                  4       # )r-   N)r8   getexif_get_merged_dictr@   s   &r   _getexifWebPImageFile._getexifQ   s&    "||~..00r   c                    V ^8  d   QhRRRR/# r   frameintr   r%   r   )r   s   "r   r   r&   V   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.seekV   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)r5   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&   d   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)r5   get_nextr_   r?   rY   EOFErrorra   )r@   retrB   data	timestampdurations   &     r   	_get_nextWebPImageFile._get_nextd   s    mm$$&" ;KKMIIaL<C3- ///$ 		((r   c                    V ^8  d   QhRRRR/# rQ   r   )r   s   "r   r   r&   y   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?   rl   rX   s   &&r   _seekWebPImageFile._seeky   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  qP                  R &   V P                  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       # )rj   rk   raw)r   r   )r`   rW   rp   rl   r8   r1   _exclusive_fpcloser   r   _Tilesizer:   tilesuperload)r@   ri   	__class__s   & r   r{   WebPImageFile.load   s    ==D000JJt++, CG..BR?D))K($))J*? 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__timestampr5   r<   r7   r1   r;   r9   r:   ry   )T)__name__
__module____qualname____firstlineno__r   format_descriptionr`   rW   rG   rN   rY   r?   rl   rp   r{   r   r   __static_attributes____classcell__)r|   s   @r   r"   r"   '   sP    F%HO"!H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
   )mode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   r1   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_imagesr9   Nr)   rk   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_saver8   
isinstancerS   
getpaletter   ExiftobytestuplelenallOSErrorr   WebPAnimEncoderrx   r   rangerY   r   addgetimroundassemblewrite)'r   r1   r   r   r   totalimsr)   palettergbrk   r(   r   r   r   r   verboser   r   r   r   r+   r-   r/   rB   bg_rbg_gbg_bbg_aenc	frame_idxrj   cur_idxnfridxrR   ri   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   r1   r   r   r   r   r+   r-   r/   r   r   ri   rB   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