+
    }i#                         ^ RI t ^ RIHt ^ RIHt ^ RIHtHt ^RIH	t	 ^RI
HtHtHt  ! R R]4      tR	 R
 ltRR R lltR R ltR R ltRR R lltR# )    N)Enum)Lock)ListOptional)InvalidAddonPath)get_pathunzipwebdlc                       ] tR t^
tRtRtRtR# )DefaultAddonsz!
Default addons to be downloaded
zLhttps://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi N)__name__
__module____qualname____firstlineno____doc__UBO__static_attributes__r       a/Users/ahmad/.openclaw/workspace/my-crawler/.venv/lib/python3.14/site-packages/camoufox/addons.pyr   r   
   s     YCr   r   c                >    V ^8  d   QhR\         \        ,          RR/# )   pathsreturnN)r   str)formats   "r   __annotate__r      s     
 
c 
t 
r   c                   V  F  p\         P                  P                  V4      '       g   \        V4      h\         P                  P	                  \         P                  P                  VR4      4      '       d   Kx  \        R4      h	  R# )z)
Confirms that the addon paths are valid
zmanifest.jsonzJmanifest.json is missing. Addon path must be a path to an extracted addon.N)ospathisdirr   existsjoin)r   r    s   & r   confirm_pathsr$      s^     ww}}T"""4((ww~~bggll4ABB"\ 	 r   c                v    V ^8  d   QhR\         \        ,          R\        \         \        ,          ,          RR/# )r   addons_listexclude_listr   N)r   r   r   r   )r   s   "r   r   r      s2     3 3c3*243F*G3	3r   c                    Vf   . p\          Uu. uF  q"V9  g   K  VNK  	  pp\        4       ;_uu_ 4        \        W04       RRR4       R# u upi   + '       g   i     R# ; i)zJ
Adds default addons, minus any specified in exclude_list, to addons_list
N)r   r   maybe_download_addons)r&   r'   addonaddonss   &&  r   add_default_addonsr,      sN     !.L|2KeeFL	f2 
 M	s   AAAA"	c                @    V ^8  d   QhR\         R\         R\         RR/# )r   urlextract_pathnamer   Nr   )r   s   "r   r   r   /   s.     I Ic I IC ID Ir   c                N    \        V RV R2RR7      p\        W1RV R2RR7       R# )zF
Downloads and extracts an addon from a given URL to a specified path
zDownloading addon ()F)descbarzExtracting addon ()r5   N)r
   r	   )r.   r/   r0   buffers   &&& r   download_and_extractr7   /   s2    
 324&:FF	&"4TF! <%Hr   c                0    V ^8  d   QhR\         R\         /# )r   
addon_namer   r1   )r   s   "r   r   r   8   s     8 8s 8s 8r   c                T    \        \        P                  P                  RV 4      4      # )z
Returns a path to the addon
r+   )r   r   r    r#   )r9   s   &r   get_addon_pathr;   8   s     BGGLL:677r   c                v    V ^8  d   QhR\         \        ,          R\        \         \        ,          ,          RR/# )r   r+   r&   r   N)r   r   r   r   )r   s   "r   r   r   ?   s7     G GG.6tCy.AG	Gr   c                   V  F  p\        VP                  4      p\        P                  P	                  V4      '       d   Ve   VP                  V4       KT   \        P                  ! VRR7       \        VP                  W2P                  4       Ve   VP                  V4       K  K  	  R#   \         d'   p\        RTP                   RT 24        Rp?K  Rp?ii ; i)z
Downloads and extracts addons from a given dictionary to a specified list
Skips downloading if the addon is already downloaded
NT)exist_okzFailed to download and extract z: )r;   r0   r   r    r"   appendmakedirsr7   value	Exceptionprint)r+   r&   r*   
addon_pathes   &&   r   r)   r)   ?   s     #EJJ/
 77>>*%%&"":.	GKK
T2 j**E&"":. '! $  	G3EJJ<r!EFF	Gs   AB--C8CC)N)r   enumr   multiprocessingr   typingr   r   
exceptionsr   pkgmanr   r	   r
   r   r$   r,   r7   r;   r)   r   r   r   <module>rK      sI    	    ! ( * *YD Y
3 I8G Gr   