+
     hk  c                  s<   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
t
^ RIHt ^RIHt ]P                  ! R4      t]P"                  ! R]P$                  ]P&                  ,          4      tR	t ! R
 R]4      tRR R lltR R ltRR R lltRR R lltR# )z=tldextract helpers for testing and fetching remote resources.)annotationsN)Sequence)cast)FileAdapter)	DiskCache
tldextractz^(?P<suffix>[.*!]*\w[\S]*)z// ===BEGIN PRIVATE DOMAINS===c                  s    ] tR t^tRtRtR# )SuffixListNotFoundzA recoverable error while looking up a suffix list.

Recoverable because you can specify backups, or use this library's bundled
snapshot.
 N)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z__static_attributes__r       ;/usr/lib/python3.14/site-packages/tldextract/suffix_list.pyr   r      s    r	   r   c          
     s,    V ^8  d   QhRRRRRRRRR	R
/# )   cacher   urlsSequence[str]cache_fetch_timeoutfloat | int | Nonesessionrequests.Session | Nonereturnstrr   Zformat   "r
   __annotate__r      s:      
 , %	
 	r	   c                s   RpVf2   \         P                  ! 4       pVP                  R\        4       4       Rp V F0  p V P	                  W5VR7      u V'       d   VP                  4        # # 	  V'       d   VP                  4        \        R4      h  \         P                  P                   d    \        P                  RTRR7        K  i ; i  T'       d   TP                  4        i i ; i)zQDecode the first successfully fetched URL, from UTF-8 encoding to Python unicode.Fzfile://T)r   urlZtimeoutz+Exception reading Public Suffix List url %s)Zexc_infozNo remote Public Suffix List found. Consider using a mirror, or avoid this fetch by constructing your TLDExtract with `suffix_list_urls=()`.)requestsZSessionZmountr   Zcached_fetch_urlZcloseZ
exceptionsZRequestExceptionLOGZwarningr   )r   r   r   r   Zsession_createdr   s   &&&&  r
   find_first_responser      s     O""$i/C--#6I .   MMO   MMO
	M  &&77 A3QU   MMO s4   C BC -C 7C	C CC C+c               s     V ^8  d   QhRRRR/# )r   suffix_list_textr   r   tuple[list[str], list[str]]r   r   r   r
   r   r   @   s     % %C %<W %r	   c                s   V P                  \        4      w  rp\        P                  V4       Uu. uF  qDP	                  R4      NK  	  pp\        P                  V4       Uu. uF  qDP	                  R4      NK  	  ppWV3# u upi u upi )zJParse the raw suffix list text for its different designations of suffixes.Zsuffix)Z	partitionPUBLIC_PRIVATE_SUFFIX_SEPARATORPUBLIC_SUFFIX_REZfinditerZgroup)r   Zpublic_textZ_Zprivate_textZmpublic_tldsprivate_tldss   &      r
   extract_tlds_from_suffix_listr"   @   s~    #3#=#='$ KL /?.G.G.TU.T778$.TKU/?/H/H/VW/V!GGH%/VLW$$ VWs   B "Bc               0    V ^8  d   QhRRRRRRRRR	R
RR/# r   r   r   r   r   r   r   fallback_to_snapshotZboolr   r   r   r   r   r   r   r
   r   r   K   sD      
 , 	
 % !r	   c                sL    V P                  \        RRV RVRVRVRV/RR.R7      # ))Fetch, parse, and cache the suffix lists.zpublicsuffix.org-tldsr   r   r   r%   r   )ZfuncZ	namespaceZkwargsZhashed_argnames)Zrun_and_cache_get_suffix_lists)r   r   r   r%   r   s   &&&&&r
   get_suffix_listsr(   K   sM     )UD!#6"$8w
  !78   r	   c               r#   r$   r   r   r   r
   r   r   a   sD     % %%
% ,% 	%
 %% !%r	   c                s     \        WW$R7      p\        T4      w  rY3#   \         dM   pT'       d>   \        P                  ! RR4      p\	        \
        T4      pTP                  R4      p Rp?L`ThRp?ii ; i)r&   )r   r   r   z.tld_set_snapshotzutf-8N)r   r   pkgutilZget_datar   ZbytesZdecoder"   )r   r   r   r%   r   ZtextZexcZmaybe_pkg_dataZpkg_datar    r!   s   &&&&&      r
   r'   r'   a   sv    "-@
 !>d CK$$  $--l<OPNE>2H??7+DIs    A6A A1/A11A6)NN)N)r   Z
__future__r    Zloggingr)   ZreZcollections.abcr   Ztypingr   r   Zrequests_filer   r   r   Z	getLoggerr   ZcompileZUNICODEZ	MULTILINEr   r   ZLookupErrorr   r   r"   r(   r'   r   r	   r
   <module>r*      s~    C "   	 $   % %::;RZZ",,=VW "B  D%,% %r	   