+
    9i>                      a  0 t $ R t^ RIHt ^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^R	IHtHtHtHtHtHtHtHtHt ^R
IHtHtHt ^RIH t H!t! ^RI"H#t#H$t$H%t%H&t& ^RI'H(t( ]'       dY   ^ RI)t)^ RI*H+t+ ^ RIH,t,H-t-H.t. ^ RI/H0t0 ^RI1H2t2H3t3 ]4]5]43,          t6]7]0,          t8]7]0,          t9]7]:]0]3]2,          3,          ,          t;Rt<R]=R&   Rt>R]=R&   Rt?R]=R&   R R lt@R R ltA]ARRRRR R/R! R" ll4       tB]ARRR R/R# R$ ll4       tC]ARRR R/R% R& ll4       tD]ARRR R/R' R( ll4       tER:R) R* lltFR+ R, ltGR- R. ltHR/RR0RR1R/R2 R3 lltI]ARRRRR R/R4 R5 ll4       tJ]ARRR R/R6 R7 ll4       tK]ARRR R/R8 R9 ll4       tLR# );z$Render functions for console output.)annotationsN)Path)TYPE_CHECKING)IS_INTERACTIVE)ArgumentError)Console)Table)	CIJUPYTER
accept_tosclean_cache	clean_tosget_all_tosget_channelsget_one_tos
reject_tos)CondaToSMissingErrorCondaToSNonInteractiveErrorCondaToSRejectedError)	CACHE_DIRSEARCH_PATH)	NULL_CHARaccepted_mappinglocation_mappingversion_mapping)FuzzyPrompt)Iterable)AnyCallableFinal)Channel)	LocalPair
RemotePairz+* Terms of Service version(s) are outdated.r   TOS_OUTDATEDzBy accessing {channel} with auto acceptance enabled (auto_accept_tos=True) for this repository you acknowledge and agree to the Terms of Service:
{tos_text}TOS_AUTO_ACCEPTED_TEMPLATEzoBy accessing {channel} via CI for this repository you acknowledge and agree to the Terms of Service:
{tos_text}TOS_CI_ACCEPTED_TEMPLATEc               $    V ^8  d   QhRRRRRR/# )   argsr   kwargsreturnNone )formats   "Alib/python3.14/site-packages/conda_anaconda_tos/console/render.py__annotate__r/   A   s&     O O Os Ot O    c                     R# )zDUse this no-op printer when nothing should be printed to the screen.Nr,   )r(   r)   s   *,r.   noop_printerr2   A   s    r0   c                    V ^8  d   QhRRRR/# )r'   funczCallable[..., int]r*   r,   )r-   s   "r.   r/   r/   E   s      & += r0   c                L   a  \         P                  ! S 4      R V 3R ll4       pV# )zPass console and printer functions to the decorated function.

This instantiates a console for the render functions if not provided and
the console and json printers to pass them to the decorated function.
c               $    V ^8  d   QhRRRRRR/# )r'   r(   r   r)   r*   intr,   )r-   s   "r.   r/   printable.<locals>.__annotate__M   s!     
 
s 
c 
c 
r0   c                   < VP                  R \        4       4      pVP                  RR4      pTP                  RV'       d   \        MVP                  4      pVP                  RVP                  4      pS! V / VBRVR VRVRV/B # )consolejsonFprinterjson_printer)popr   r2   print
print_json)r(   r)   r:   r;   r<   r=   r4   s   *,    r.   wrapperprintable.<locals>.wrapperL   s    **Y	2zz&%(**Y'--Pzz.'2D2DE

 
 	

 
 &
 	
r0   )	functoolswraps)r4   rA   s   f r.   	printablerE   E   s'     __T
 
 Nr0   r;   Fverboser:   c               <    V ^8  d   QhRRRRRRRRR	RR
RRRRRRR/	# )r'   channelsstr | Channeltos_rootstr | os.PathLike[str] | Pathcache_timeoutint | float | Noner;   boolrF   r:   Console | Noner<   Callable[..., None]r=   r*   r7   r,   )r-   s   "r.   r/   r/   _   sb     5 55+5 &5 	5
 5 5 !5 &5 	5r0   c           
       a \        4       oSP                  R4       SP                  R4       SP                  R4       SP                  R4       V'       d   SP                  R4       SP                  pMV3R lp/ p	Rp
\        VRV R	V/  EF1  w  rV'       g7   R
WP                  &   V! VP                  \
        \
        \
        \
        4       KD  / VP                  P                  RR7      CR\        VP                  4      R\        VP                  4      /CWP                  &   T
;'       g    \        VP                  4      p
V! VP                  \        VP                  P                  VP                  4      \        VP                  4      VP                  P                  \!        VP                  4      4       EK4  	  V'       d   V! V	R7       ^ # V! S4       V
'       d   V! R\"         24       ^ # )zGDisplay listing of unaccepted, accepted, and rejected Terms of Service.r    VersionAcceptedSupportLocationc                 *   < SP                   ! V R R !  # )N)add_row)r(   tables   *r.   <lambda>render_list.<locals>.<lambda>s   s    tCRy 9r0   FrJ   rL   Nr;   modeoutdatedpathdataz[bold yellow])r   
add_columnrX   r   base_urlr   metadata
model_dumprN   remotestrr_   r   versionr   supportr   r#   )rJ   rL   r;   rF   r:   r<   r=   rH   rX   json_outputr^   channelmetadata_pairrY   s   $$$$$$$*     @r.   render_listrm   ^   s    GE	Y	Y	Z 	Y$--9"$KH"-	## $#
 ,0K(()G$$iIyQ-((333@-D!5!56M../-K(()
  ==4(<(<#=H   6 6 > >@T@TU !7!78&&.. !3!34#. +&
  	mL>23r0   c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# r'   rH   rI   rJ   rK   rL   rM   r;   rN   r:   rO   r<   rP   r=   r*   r7   r,   )r-   s   "r.   r/   r/      sX      + & 	
  ! & 	r0   c                L   / p\        V!   FX  p \        VV VR7      P                  p	V	P                  RR7      WxP                  &   V! RV R24       V! V	P
                  4       KZ  	  V'       d
   V! VR7       ^ #   \         d    RYxP                  &   T! RT 24        K  i ; i)	z9Display the Terms of Service text for the given channels.rJ   rL   r;   r\   zviewing Terms of Service for :Nzno Terms of Service for r`   )r   r   rd   re   rc   textr   
rJ   rL   r;   r:   r<   r=   rH   rj   rk   rd   s
   $$$$$$*   r.   render_viewru      s     #%K*	#"!+ h	  -5,?,?V,?,LK(()3G9A>?HMM" + +& $ 	:,0K(().wi89	:s   A;;$B#"B#c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# ro   r,   )r-   s   "r.   r/   r/      X      + & 	
  ! & 	r0   c                &   / p\        V!   FE  p \        VV VR7      P                  p	V	P                  RR7      WxP                  &   V! RV 24       KG  	  V'       d
   V! VR7       ^ #   \
         d    RYxP                  &   T! RT 24        K  i ; i)zBDisplay acceptance of the Terms of Service for the given channels.rq   r;   r\   zaccepted Terms of Service for NTerms of Service not found for r`   )r   r   rd   re   rc   r   rt   s
   $$$$$$*   r.   render_acceptrz           #%K*	@!!+ h	  -5,?,?V,?,LK(()4WI>? + +& $ 	A,0K(()5gY?@	A   A(($BBc               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# ro   r,   )r-   s   "r.   r/   r/      rw   r0   c                &   / p\        V!   FE  p \        VV VR7      P                  p	V	P                  RR7      WxP                  &   V! RV 24       KG  	  V'       d
   V! VR7       ^ #   \
         d    RYxP                  &   T! RT 24        K  i ; i)zADisplay rejection of the Terms of Service for the given channels.rq   r;   r\   zrejected Terms of Service for Nry   r`   )r   r   rd   re   rc   r   rt   s
   $$$$$$*   r.   render_rejectr      r{   r|   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r'   rk   r    pairRemotePair | LocalPairr:   r   choiceszIterable[str]r*   rN   r,   )r-   s   "r.   r/   r/      sA     T TT
 T T 	T
 
Tr0   c                .   R pVP                   '       d*   RpVP                  P                  '       d   RpRV  RV R2p\        P                  ! V RV  R2VVR7      pVR	8X  d   R
# VR8X  d   R# VP                  VP                  4       \        WVR4      # ) z[bold red]rejected[/]z[bold green]accepted[/]zThe Terms of Service for z was previously z0. An updated Terms of Service is now available.
z-Do you accept the Terms of Service (ToS) for ?)r   r:   acceptTrejectF)(a)ccept(r)eject)rf   rd   tos_acceptedr   askr?   latest_text_prompt_acceptance)rk   r   r:   r   prologuestateresponses   &&&&   r.   r   r      s     H{{{'==%%%-E'y0@ H> ? 	
 *A'!LH
 8	X	d&&'!':RSSr0   c               (    V ^8  d   QhRRRRRRRR/# )	r'   rH   rI   rJ   rK   rL   rM   r*   z3tuple[AcceptedType, RejectedType, ChannelPairsType]r,   )r-   s   "r.   r/   r/     s0     - --+- &-	-r0   c                   / p. p. p\        V!   F  p \        W`VR 7      pTP                  '       g   \	        TP
                  RR4      f   TP                  Yg34       KP  TP
                  P                  '       d+   TP
                  P                  RR7      Y6P                  &   K  TP                  T4       K  	  W4V3#   \         d     K  i ; i)rq   r   Nr;   r\   )
r   r   r   rf   getattrrd   appendr   re   rc   )rJ   rL   rH   acceptedrejectedchannel_pairsrk   r   s   $$*     r.   _gather_tosr     s     HHM*	wWD
 ;;;'$--FN   '1]]''')-)A)Av)A)NH%%&OOG$ + },, $ 		s   B??CCc               8    V ^8  d   QhRRRRRRRRRRR	R
RRRR/# )r'   rk   r    r   r   auto_accept_tosrN   
always_yes	json_moder:   r   r<   rP   r*   r,   )r-   s   "r.   r/   r/   1  sZ     &6 &6&6 !&6 	&6
 &6 &6 &6 !&6 
&6r0   c                J   V'       d,   V! \         P                  V VP                  R7      RR7       R# \        '       d,   V! \        P                  V VP                  R7      RR7       R# V'       g!   V'       g   \
        '       g   \        '       g   \        h\        WV4      # )z<Determine if the Terms of Service is accepted for a channel.)rk   tos_textzbold yellow)styleT)	r$   r-   r   r	   r%   r
   r   r   r   rk   r   r   r   r   r:   r<   s   $$$$$$$r.   _is_tos_acceptedr   1  s     &--)) .   	
  
r$++)) ,   	
  J'')) gW55r0   r   r   non_interactivec               H    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRRRRRR/# )r'   r   ChannelPairsTyperJ   rK   rL   rM   r   rN   r   r   r:   r   r<   rP   r   zAcceptedType | Noner   zRejectedType | Noner   zNonInteractiveType | Noner*   z5tuple[AcceptedType, RejectedType, NonInteractiveType]r,   )r-   s   "r.   r/   r/   Z  s     */ */#*/ ,*/ &	*/
 */ */ */ */ !*/ "*/ "*/ /*/ ;*/r0   c                P   Vf   / MTpV	f   . MT	p	V
f   . MT
p
V  Fb  w  r \        VVVVVVVR7      '       d'   \        VVVR7      P                  WP                  &   KD  \	        WVR7       V	P                  V4       Kd  	  WV
3#   \         d    T
P                  T4        K  i ; i)z<Iterate over channel pairs and process the Terms of Service.r   rq   )r   r   rd   rc   r   r   r   )r   rJ   rL   r   r   r   r:   r<   r   r   r   rk   r   s   $$$$$$$$$$$  r.   _process_channel_pairsr   Z  s      %r8H%r8H+3bO&	, /%#  .8%"/. (	 ))* 7]S(% ', .. + 	,""7+	,s   <BBB%$B%c               D    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRRRR/# )r'   rH   rI   rJ   rK   rL   rM   r;   rN   rF   r   r   r:   rO   r<   rP   r=   r*   r7   r,   )r-   s   "r.   r/   r/     sv     ; ;;+; &; 	;
 ; ; ; ; !; &; 	;r0   c        	           V'       d	   V! R4       \        V	RV RV/ w  rpV'       d	   V! R4       V'       d   V! R\        V4       R24       \        V!  h\        '       d
   V! R4       M\        '       d	   V! R4       \        V
VVV VVVVVVR	7
      w  rpV'       d
   \        V!  hV'       d   V! R\        V4       R24       \        V!  hV'       g	   V
'       d   V! R
\        V
4       R24       V'       d
   V! V
R7       ^ # )z>Prompt user to accept or reject Terms of Service for channels.z [bold blue]Gathering channels...rJ   rL   z"[bold yellow]Reviewing channels...z
[bold red]z" channel Terms of Service rejectedz[bold yellow]CI detected...z [bold yellow]Jupyter detected...)
r   r   r   rJ   rL   r   r   r   r:   r<   z[bold green]z" channel Terms of Service acceptedr`   )r   lenr   r	   r
   r   r   )rJ   rL   r;   rF   r   r   r:   r<   r=   rH   r   r   r   r   s   $$$$$$$$$*    r.   render_interactiver     s    23(3	)) $)%H 45 *S]O+MNO#X..	r-.	23*@##'+'H )?;;	*S]O+MNO#X..(,s8}o-OPQ(#r0   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r'   r;   rN   r:   rO   r<   rP   r=   r*   r7   r,   )r-   s   "r.   r/   r/     s<      
  !	
 & 	r0   c                B   / p\         VR&    \        R\        P                  ! \        P                  ! 4       4      4      p\        V4      VR&   V '       d   V! VR7       ^ # \        RR7      pVP                  R4       VP                  R4       VP                  4        F]  w  rx\        V\        \        34      '       d!   R	P                  \        \        V4      4      pM\        V4      pVP                  Wx4       K_  	  V! V4       ^ #   \
         d
    \        p Li ; i)
z5Display information about the Terms of Service cache.r   ~r   r`   F)show_headerKeyValue
)r   r   r   relative_tohome
ValueErrorrg   r   rb   items
isinstancetuplelistjoinmaprX   )	r;   r:   r<   r=   ra   relative_dirrY   keyvalues	   $$$$     r.   render_infor     s     .0D%D!C!6!6tyy{!CD L)D$  %(!**,JC%%//		#c5/2E
MM#% ' 	%  ! !s   3D
 
DDc               <    V ^8  d   QhRRRRRRRRRRRR	R
RRRRR/	# )r'   cacherN   tosallrJ   rK   r;   r:   rO   r<   rP   r=   r*   r7   r,   )r-   s   "r.   r/   r/     sb      	 

 ,   ! & 	r0   c                  V'       g   V '       g   V'       g   \        R4      h/ pV'       g	   V '       d<   \        \        \        \	        4       4      4      ;VR&   p	V! R\        V	4       R24       V'       g	   V'       d=   \        \        \        \        V4      4      4      ;VR&   p
V! R\        V
4       R24       V'       d
   V! VR7       ^ # )z%Clean the metadata cache directories.zHAt least one removal target must be given. See 'conda tos clean --help'.r   zRemoved z cache files.r   z Terms of Service files.r`   )r   r   r   rg   r   r   r   )r   r   r   rJ   r;   r:   r<   r=   rj   cache_files	tos_filess   &&&$$$$$   r.   render_cleanr     s     5CV
 	
 #%K
e-1#c;=2I-JJG{(3{+,M:;
c)-c#y7J.K)LLEY(3y>**BCD+&r0   ))r   r   z(v)iew)M__conditional_annotations____doc__
__future__r   rC   pathlibr   typingr   conda.common.ior   conda.exceptionsr   rich.consoler   
rich.tabler   apir	   r
   r   r   r   r   r   r   r   
exceptionsr   r   r   r_   r   r   mappersr   r   r   r   promptr   oscollections.abcr   r   r   r   conda.models.channelr    modelsr!   r"   dictrg   AcceptedTyper   RejectedTypeNonInteractiveTyper   r   r#   __annotations__r$   r%   r2   rE   rm   ru   rz   r   r   r   r   r   r   r   r   )r   s   @r.   <module>r      s5   + "     * *   
 
 
 
 * S S (++,.T	?L=LgE':	+A"ABC De C E  % O2 5 	5
 5 #5 5p  	
 # >  	
 # <  	
 # <T<-<&6R*/ %)*/ %)*/ 26*/Z ; 	;
 ; #; ;|  # B   # r0   