Ë
    M/ÅeÅW  ã                   ót  — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 dd	lm
Z
 dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ  ej*                  e«      ZdZ	 dZ	 dZ	  G d„ d«      Z e«       Z e
d«      Z G d„ d«      Z G d„ d«      Zdeeef   fd„Z deeef   ddfd„Z!y)zFThis modules define the actual display implementations used in Certboté    N)ÚAny)ÚIterable)ÚList)ÚOptional)ÚTextIO)ÚTuple)ÚTypeVar)ÚUnion)Úerrors)Ú	constants)Ú	completer)Úutil)ÚosÚokÚcancelzO- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -c                   ó   — e Zd Zdd„Zy)Ú_DisplayServiceNc                 ó   — d | _         y ©N©Údisplay)Úselfs    ú?/usr/lib/python3/dist-packages/certbot/_internal/display/obj.pyÚ__init__z_DisplayService.__init__)   s	   € ØLPˆ�ó    )ÚreturnN)Ú__name__Ú
__module__Ú__qualname__r   © r   r   r   r   (   s   „ ôQr   r   ÚTc                   ó˜  ‡ — e Zd ZdZdededdfˆ fd„Z	 	 d#deded	eded
eddfd„Z	 	 	 d$dede	e
eeef      e
e   f   dee   dee   dee   dee   dee   dededeeef   fd„Z	 	 d%dedee   dee   dededeeef   fd„Z	 	 	 d&dedededee   dee   dededefd„Z	 	 d%dede
e   dee
e      dee   dededeee
e   f   fd„Zdedee   dee   dedee   f
d„Zdedefd„Z	 	 d%dedee   dee   dededeeef   fd„Zdee	eef      de
e   de
e   fd„Zdede	e
eeef      e
e   f   ddfd „Zd!edeeef   fd"„Zˆ xZS )'ÚFileDisplayzFile-based display.ÚoutfileÚforce_interactiver   Nc                 óL   •— t         ‰| �  «        || _        || _        d| _        y )NF)Úsuperr   r$   r%   Úskipped_interaction)r   r$   r%   Ú	__class__s      €r   r   zFileDisplay.__init__6   s%   ø€ Ü‰ÑÔØˆŒØ!2ˆÔØ#(ˆÕ r   ÚmessageÚpauseÚwrapÚdecoratec                 óª  — |rt        j                  |«      }t        j                  d|«       | j                  j                  |rdnddz   |rdndz   j                  t        j                  t        |¬«      «       | j                  j                  «        |r=| j                  |«      rt        j                  d«       y	t        j                  d«       y	y	)
a  Displays a notification and waits for user acceptance.

        :param str message: Message to display
        :param bool pause: Whether or not the program should pause for the
            user's confirmation
        :param bool wrap: Whether or not the application should wrap text
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions
        :param bool decorate: Whether to surround the message with a
            decorated frame

        úNotifying user: %sú{line}{frame}{line}Ú ú{msg}{line}ú{frame}{line}©ÚlineÚframeÚmsgzPress Enter to Continuez!Not pausing for user confirmationN)r   Ú
wrap_linesÚloggerÚdebugr$   ÚwriteÚformatr   ÚlinesepÚ
SIDE_FRAMEÚflushÚ_can_interactÚinput_with_timeout)r   r*   r+   r,   r%   r-   s         r   ÚnotificationzFileDisplay.notification<   s­   € ñ Ü—o‘o gÓ.ˆGä�‰Ð)¨7Ô3à�‰×ÑÙ'/Ñ#°RØñá!)‰o¨rñ3÷ ‘œRŸZ™Z¬z¸w�ÓGô		
ð 	�‰×ÑÔáØ×!Ñ!Ð"3Ô4Ü×'Ñ'Ð(AÕBä—‘Ð@ÕAð	 r   ÚchoicesÚok_labelÚcancel_labelÚ
help_labelÚdefaultÚcli_flagÚunused_kwargsc	                 óª   — | j                  ||||«      }
|
�t        |
fS | j                  ||«       | j                  t	        |«      «      \  }}||dz
  fS )aC  Display a menu.

        .. todo:: This doesn't enable the help label/button (I wasn't sold on
           any interface I came up with for this). It would be a nice feature

        :param str message: title of menu
        :param choices: Menu lines, len must be > 0
        :type choices: list of tuples (tag, item) or
            list of descriptions (tags will be enumerated)
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions

        :returns: tuple of (`code`, `index`) where
            `code` - str display exit code
            `index` - int index of the user's selection

        :rtype: tuple

        é   )Ú_return_defaultÚOKÚ_print_menuÚ_get_valid_int_ansÚlen)r   r*   rC   rD   rE   rF   rG   rH   r%   rI   Úreturn_defaultÚcodeÚ	selections                r   ÚmenuzFileDisplay.menu]   sc   € ð4 ×-Ñ-¨g°wÀÐJ[Ó\ˆØÐ%Ü�~Ð%Ð%à×Ñ˜ 'Ô*à×1Ñ1´#°g³,Ó?‰ˆˆià�Y ‘]Ð"Ð"r   c                 óÆ   — | j                  ||||«      }|�t        |fS t        j                  d|z  «      dz   }t        j                  |«      }|dv rt
        dfS t        |fS )a  Accept input from the user.

        :param str message: message to display to the user
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions

        :returns: tuple of (`code`, `input`) where
            `code` - str display exit code
            `input` - str of the user's input
        :rtype: tuple

        z%s (Enter 'c' to cancel):ú )ÚcÚCz-1)rL   rM   r   r8   rA   ÚCANCEL)r   r*   rG   rH   r%   rI   rQ   Úanss           r   ÚinputzFileDisplay.input�   sr   € ð  ×-Ñ-¨g°wÀÐJ[Ó\ˆØÐ%Ü�~Ð%Ð%ô —/‘/Ð"=ÀÑ"GÓHÈ3ÑNˆÜ×%Ñ% gÓ.ˆà�*ÑÜ˜4�<ÐÜ�3ˆwˆr   Ú	yes_labelÚno_labelc                 óà  — | j                  ||||«      }|�|S t        j                  |«      }| j                  j	                  dj                  t        j                  t        t        j                  z   |¬«      «       | j                  j                  «        	 t        j                  dj                  t        j                  |«      t        j                  |«      ¬«      «      }	|	j                  |d   j                  «       «      s"|	j                  |d   j                  «       «      ry|	j                  |d   j                  «       «      s"|	j                  |d   j                  «       «      ryŒ×)až  Query the user with a yes/no question.

        Yes and No label must begin with different letters, and must contain at
        least one letter each.

        :param str message: question for the user
        :param str yes_label: Label of the "Yes" parameter
        :param str no_label: Label of the "No" parameter
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions

        :returns: True for "Yes", False for "No"
        :rtype: bool

        z{0}{frame}{msg}{0}{frame})r6   r7   Tz{yes}/{no}: )ÚyesÚnor   F)rL   r   r8   r$   r;   r<   r   r=   r>   r?   rA   Úparens_around_charÚ
startswithÚlowerÚupper)
r   r*   r\   r]   rG   rH   r%   rI   rQ   rZ   s
             r   ÚyesnozFileDisplay.yesnož   s3  € ð( ×-Ñ-¨g°wÀÐJ[Ó\ˆØÐ%Ø!Ð!ä—/‘/ 'Ó*ˆà�‰×ÑÐ6×=Ñ=Ü�J‰Jœj¬2¯:©:Ñ5¸7ð >ó Dô 	Eà�‰×ÑÔàÜ×)Ñ)¨.×*?Ñ*?Ü×+Ñ+¨IÓ6Ü×*Ñ*¨8Ó4ð +@ó +6ó 7ˆCð —‘˜y¨™|×1Ñ1Ó3Ô4Ø—‘˜y¨™|×1Ñ1Ó3Ô4ØØ—‘˜x¨™{×0Ñ0Ó2Ô3Ø—‘˜x¨™{×0Ñ0Ó2Ô3Øð r   Útagsc           	      ó  — | j                  ||||«      }|�t        |fS 	 | j                  ||«       | j                  dd¬«      \  }}	|t        k(  r²|	j	                  «       s.dj                  d„ t        dt        |«      dz   «      D «       «      }	t        j                  |	«      }
| j                  |
|«      }|r||fS | j                  j                  dt        j                  z  «       | j                  j                  «        n|g fS Œè)aC  Display a checklist.

        :param str message: Message to display to user
        :param list tags: `str` tags to select, len(tags) > 0
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions

        :returns: tuple of (`code`, `tags`) where
            `code` - str display exit code
            `tags` - list of selected tags
        :rtype: tuple

        TzrSelect the appropriate numbers separated by commas and/or spaces, or leave input blank to select all options shown)r%   rV   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr   )Ústr)Ú.0Úxs     r   ú	<genexpr>z(FileDisplay.checklist.<locals>.<genexpr>ê   s   è ø€ Ò"I¨a¤3 q§6Ñ"Iùs   ‚rK   z!** Error - Invalid selection **%s)rL   rM   rN   r[   ÚstripÚjoinÚrangerP   r   Úseparate_list_inputÚ_scrub_checklist_inputr$   r;   r   r=   r?   )r   r*   rf   rG   rH   r%   rI   rQ   rR   rZ   ÚindicesÚselected_tagss               r   Ú	checklistzFileDisplay.checklistÊ   s  € ð$ ×-Ñ-¨g°wÀÐJ[Ó\ˆØÐ%Ü�~Ð%Ð%àØ×Ñ˜W dÔ+àŸ
™
ð $Gð 6:ð #ó ;‰IˆD�#ð
 ”rŠzØ—y‘y”{ØŸ(™(Ñ"I´5¸¼CÀ»IÀa¹KÓ3HÔ"IÓI�CÜ×2Ñ2°3Ó7�Ø $× ;Ñ ;¸GÀTÓ J�Ù Ø Ð.Ð.Ø—‘×"Ñ"Ø7¼"¿*¹*ÑDôFà—‘×"Ñ"Õ$à˜R�x�ð' r   Úpromptc                 óÔ   — | j                  |«      ry|€<dj                  |«      }|r|dj                  |«      z  }t        j                  |«      ‚t        j                  d||«       |S )a²  Should we return the default instead of prompting the user?

        :param str prompt: prompt for the user
        :param T default: default answer to prompt
        :param str cli_flag: command line option for setting an answer
            to this question
        :param bool force_interactive: if interactivity is forced

        :returns: The default value if we should return it else `None`
        :rtype: T or `None`

        Nz-Unable to get an answer for the question:
{0}zA
You can provide an answer on the command line with the {0} flag.z-Falling back to default %s for the prompt:
%s)r@   r<   r   ÚErrorr9   r:   )r   ru   rG   rH   r%   r7   s         r   rL   zFileDisplay._return_defaultõ   st   € ð ×ÑÐ/Ô0ØØˆ?ØB×IÑIÈ&ÓQˆCÙØð6ß6<±f¸XÓ6FñH�ô —,‘,˜sÓ#Ð#Ü�‰Ø<Ø�Vô	ð ˆr   c                 ó   — | j                   s:|s8t        j                  j                  «       r| j                  j                  «       ry| j
                  s+t        j                  dt        j                  «       d| _        y)zÉCan we safely interact with the user?

        :param bool force_interactive: if interactivity is forced

        :returns: True if the display can interact with the user
        :rtype: bool

        Tz�Skipped user interaction because Certbot doesn't appear to be running in a terminal. You should probably include --non-interactive or %s on the command line.F)
r%   ÚsysÚstdinÚisattyr$   r(   r9   Úwarningr   ÚFORCE_INTERACTIVE_FLAG)r   r%   s     r   r@   zFileDisplay._can_interact  sd   € ð ×"Ò"Ñ&7Ü�I‰I×ÑÔ 4§<¡<×#6Ñ#6Ô#8ØØ×'Ò'Ü�N‰Nð?ô ×0Ñ0ô	2ð
 (,ˆDÔ$Ør   c                 ó~   — t        j                  «       5  | j                  ||||«      cddd«       S # 1 sw Y   yxY w)a
  Display a directory selection screen.

        :param str message: prompt to give the user
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI
        :param bool force_interactive: True if it's safe to prompt the user
            because it won't cause any workflow regressions

        :returns: tuple of the form (`code`, `string`) where
            `code` - display exit code
            `string` - input entered by the user

        N)r   Ú	Completerr[   )r   r*   rG   rH   r%   rI   s         r   Údirectory_selectzFileDisplay.directory_select'  s<   € ô  × Ñ Ó"ñ 	MØ—:‘:˜g w°Ð:KÓL÷	M÷ 	Mò 	Mús   •3³<rr   c                 óú   — 	 |D �cg c]  }t        |«      ‘Œ }}t        t        |«      «      }|D ]  }|dk  s|t	        |«      kD  sŒg c S  |D �cg c]
  }||dz
     ‘Œ c}S c c}w # t        $ r g cY S w xY wc c}w )zþValidate input and transform indices to appropriate tags.

        :param list indices: input
        :param list tags: Original tags of the checklist

        :returns: valid tags the user selected
        :rtype: :class:`list` of :class:`str`

        rK   )ÚintÚ
ValueErrorÚlistÚsetrP   )r   rr   rf   ÚindexÚindices_ints        r   rq   z"FileDisplay._scrub_checklist_input:  s�   € ð	Ø3:Ö;¨%œ3˜u�:Ð;ˆKÐ;ô
 œ3˜{Ó+Ó,ˆð !ò 	ˆEØ�qŠy˜E¤C¨£IÓ-Ø’	ð	ð .9Ö9 E��U˜Q‘Y“Ò9Ð9ùò <øÜò 	ØŠIð	üò :s'   ‚A' †A"˜A' ÁA8Á"A' Á'A5Á4A5c                 ó¾  — |r-t        |d   t        «      r|D �cg c]  }|d   › d|d   › �‘Œ }}| j                  j                  t        j
                  › |› t        j
                  › �«       | j                  j                  t        t        j
                  z   «       t        |d«      D ]c  \  }}|› d|› �}| j                  j                  t        j                  |«      «       | j                  j                  t        j
                  «       Œe | j                  j                  t        t        j
                  z   «       | j                  j                  «        yc c}w )zãPrint a menu on the screen.

        :param str message: title of menu
        :param choices: Menu lines
        :type choices: list of tuples (tag, item) or
            list of descriptions (tags will be enumerated)

        r   z - rK   z: N)Ú
isinstanceÚtupler$   r;   r   r=   r>   Ú	enumerater   r8   r?   )r   r*   rC   rW   ÚiÚdescr7   s          r   rN   zFileDisplay._print_menuU  s  € ñ ”z '¨!¡*¬eÔ4Ø3:Ö;¨a˜!˜A™$˜˜s 1 Q¡4 &Ò)Ð;ˆGÐ;ð 	�‰×ÑœbŸj™j˜\¨'¨´2·:±:°,Ð?Ô@Ø�‰×Ñœ:¬¯
©
Ñ2Ô3ô ! ¨!Ó,ò 	+‰GˆAˆtØ�C�r˜$˜�.ˆCØ�L‰L×ÑœtŸ™¨sÓ3Ô4ð �L‰L×ÑœrŸz™zÕ*ð	+ð 	�‰×Ñœ:¬¯
©
Ñ2Ô3Ø�‰×ÑÕùò <s   šEÚmax_c                 óÞ  — d}|dkD  rdj                  |¬«      }nd}|dk  rdt        j                  |«      }|j                  d«      s|j                  d«      rt        dfS 	 t        |«      }|dk  s||kD  rd}t        ‚	 |dk  rŒdt        |fS # t        $ rU | j                  j                  dj                  t        j                  «      «       | j                  j                  «        Y Œkw xY w)	a5  Get a numerical selection.

        :param int max: The maximum entry (len of choices), must be positive

        :returns: tuple of the form (`code`, `selection`) where
            `code` - str display exit code ('ok' or cancel')
            `selection` - int user's selection
        :rtype: tuple

        éÿÿÿÿrK   zMSelect the appropriate number [1-{max_}] then [enter] (press 'c' to cancel): )rŽ   z@Press 1 [enter] to confirm the selection (press 'c' to cancel): rW   rX   z{0}** Invalid input **{0})r<   r   rA   rb   rY   r‚   rƒ   r$   r;   r   r=   r?   rM   )r   rŽ   rS   Ú	input_msgrZ   s        r   rO   zFileDisplay._get_valid_int_ansr  sì   € ð ˆ	Ø�!Š8ð%ç%+¡V° VÓ%6ñ ð3ˆIà˜!ŠmÜ×)Ñ)¨)Ó4ˆCØ�~‰~˜cÔ" c§n¡n°SÔ&9Ü˜r�zÐ!ð	%Ü ›H�	Ø˜q’= I°Ò$4Ø "�IÜ$Ð$ð %5ð ˜!‹mô �9ˆ}Ðøô ò %Ø—‘×"Ñ"Ø/×6Ñ6´r·z±zÓBôDà—‘×"Ñ"Ö$ð%ús   Á"B ÂAC,Ã+C,)TTFT)NNNNNF)NNF)ÚYesÚNoNNF)r   r   r   Ú__doc__r   Úboolr   ri   rB   r
   r   r   r   r‚   r   rT   r[   re   rt   r!   rL   r@   r€   r   rq   rN   rO   Ú__classcell__©r)   s   @r   r#   r#   2   s1  ø„ Ùð) ð )¸4ð )ÀDõ )ð KOØGKñB Cð B°ð BÀ4ð BØ(,ðBØ@DðBØPTóBðD LPØHLØGLñ"#˜Cð "#¨%°°U¸3À¸8±_Ñ0EÀtÈCÁyÐ0PÑ*Qð "#Ø ‘}ð"#Ø;CÀC¹=ð"#à! #™ð"#à8@À¹ð"#ð   ‘}ð"#ð AEð"#ð "ð	"#ð ',¨C°¨H¡oó	"#ðH \`Ø(-ñ˜Sð ¨8°C©=ð È8ÐTWÉ=ð Ø!%ðØ@CðØHMÈcÐSVÈhÉóð: KOØHLØ(-ñ*˜Sð *¨Sð *ÀCð *Ø ‘~ð*Ø8@À¹ð*à!%ð*à@Cð*àHLó*ðX W[ØLQñ)  ð ) ¨D°©Ið ) ÀÈÈcÉÑ@Sð ) Ø$ S™Mð) ØEIð) à#&ð) à+0°°d¸3±i°Ñ+@ó) ðV cð °H¸Q±Kð Ø"*¨3¡-ðØDHðØMUÐVWÉ[óð:¨tð ¸ó ð* GKØSXñM¨ð M°h¸s±mð MØ#+¨C¡=ðMØLPðMà*-ðMà27¸¸S¸±/óMð&:¨h°u¸SÀ#¸X±Ñ.Gð :Ø%)¨#¡Yð:Ø37¸±9ó:ð6 3ð Ø" 4¨¨c°3¨h©Ñ#8¸$¸s¹)Ð#CÑDðØIMóð:" sð "¨u°S¸#°X©÷ "r   r#   c                   ó  ‡ — e Zd ZdZdedededdfˆ fd„Z	 dded	ee   d
ede	j                  fd„Z	 	 ddedededededdfd„Z	 	 	 ddedeeeeef      ee   f   dee   dee   dee   dee   d	ee   dedeeef   fd„Zd dedee   d	ee   dedeeef   f
d„Z	 	 d!dedee   dee   dee   d	ee   dedefd„Z	 	 d dedee   deee      d	ee   dedeeee   f   fd„Z	 	 d dedee   d	ee   dedeeef   f
d„Zˆ xZS )"ÚNoninteractiveDisplayzKA display utility implementation that never asks for interactive user inputr$   Úunused_argsrI   r   Nc                 ó0   •— t         ‰| �  «        || _        y r   )r'   r   r$   )r   r$   rš   rI   r)   s       €r   r   zNoninteractiveDisplay.__init__š  s   ø€ Ü‰ÑÔØˆ�r   r*   rH   Úextrac                 óz   — d}||z  }|r|d|z   z  }|r|dj                  |«      z  }t        j                  |«      S )zNReturn error to raise in case of an attempt to interact in noninteractive modez<Missing command line flag or config entry for this setting:
ú
z&

(You can set this with the {0} flag))r<   r   ÚMissingCommandlineFlag)r   r*   rH   rœ   r7   s        r   Ú_interaction_failz'NoninteractiveDisplay._interaction_failž  sN   € ð NˆØˆw‰ˆÙØ�4˜%‘<ÑˆCÙØÐ=×DÑDÀXÓNÑNˆCÜ×,Ñ,¨SÓ1Ð1r   r+   r,   r-   c                 ó,  — |rt        j                  |«      }t        j                  d|«       | j                  j                  |rdnddz   |rdndz   j                  t        j                  t        |¬«      «       | j                  j                  «        y)ae  Displays a notification without waiting for user acceptance.

        :param str message: Message to display to stdout
        :param bool pause: The NoninteractiveDisplay waits for no keyboard
        :param bool wrap: Whether or not the application should wrap text
        :param bool decorate: Whether to apply a decorated frame to the message

        r/   r0   r1   r2   r3   r4   N)r   r8   r9   r:   r$   r;   r<   r   r=   r>   r?   )r   r*   r+   r,   r-   rI   s         r   rB   z"NoninteractiveDisplay.notification©  sz   € ñ Ü—o‘o gÓ.ˆGä�‰Ð)¨7Ô3à�‰×ÑÙ'/Ñ#°RØñá!)‰o¨rñ3÷ ‘œRŸZ™Z¬z¸w�ÓGô		
ð 	�‰×ÑÕr   rC   rD   rE   rF   rG   c                 óT   — |€| j                  ||dt        |«      z   «      ‚t        |fS )a_  Avoid displaying a menu.

        :param str message: title of menu
        :param choices: Menu lines, len must be > 0
        :type choices: list of tuples (tag, item) or
            list of descriptions (tags will be enumerated)
        :param int default: the default choice
        :param dict kwargs: absorbs various irrelevant labelling arguments

        :returns: tuple of (`code`, `index`) where
            `code` - str display exit code
            `index` - int index of the user's selection
        :rtype: tuple
        :raises errors.MissingCommandlineFlag: if there was no default

        z	Choices: )r    ÚreprrM   )	r   r*   rC   rD   rE   rF   rG   rH   rI   s	            r   rT   zNoninteractiveDisplay.menuÀ  s1   € ð* ˆ?Ø×(Ñ(¨°(¸KÌ$ÈwË-Ñ<WÓXÐXä�7ˆ{Ðr   c                 ó:   — |€| j                  ||«      ‚t        |fS )aK  Accept input from the user.

        :param str message: message to display to the user

        :returns: tuple of (`code`, `input`) where
            `code` - str display exit code
            `input` - str of the user's input
        :rtype: tuple
        :raises errors.MissingCommandlineFlag: if there was no default

        )r    rM   ©r   r*   rG   rH   rI   s        r   r[   zNoninteractiveDisplay.inputÚ  s&   € ð ˆ?Ø×(Ñ(¨°(Ó;Ð;Ü�7ˆ{Ðr   r\   r]   c                 ó.   — |€| j                  ||«      ‚|S )a+  Decide Yes or No, without asking anybody

        :param str message: question for the user
        :param dict kwargs: absorbs yes_label, no_label

        :raises errors.MissingCommandlineFlag: if there was no default
        :returns: True for "Yes", False for "No"
        :rtype: bool

        )r    )r   r*   r\   r]   rG   rH   rI   s          r   re   zNoninteractiveDisplay.yesnoë  s!   € ð ˆ?Ø×(Ñ(¨°(Ó;Ð;Øˆr   rf   c                 ó`   — |€%| j                  ||dj                  |«      dz   «      ‚t        |fS )aj  Display a checklist.

        :param str message: Message to display to user
        :param list tags: `str` tags to select, len(tags) > 0
        :param dict kwargs: absorbs default_status arg

        :returns: tuple of (`code`, `tags`) where
            `code` - str display exit code
            `tags` - list of selected tags
        :rtype: tuple

        z? ú?)r    rn   rM   )r   r*   rf   rG   rH   rI   s         r   rt   zNoninteractiveDisplay.checklistü  s5   € ð ˆ?Ø×(Ñ(¨°(¸D¿I¹IÀd»OÈcÑ<QÓRÐRÜ�7ˆ{Ðr   c                 ó(   — | j                  |||«      S )a“  Simulate prompting the user for a directory.

        This function returns default if it is not ``None``, otherwise,
        an exception is raised explaining the problem. If cli_flag is
        not ``None``, the error message will include the flag that can
        be used to set this value with the CLI.

        :param str message: prompt to give the user
        :param default: default value to return (if one exists)
        :param str cli_flag: option used to set this value with the CLI

        :returns: tuple of the form (`code`, `string`) where
            `code` - int display exit code
            `string` - input entered by the user

        )r[   r¥   s        r   r€   z&NoninteractiveDisplay.directory_select  s   € ð$ �z‰z˜' 7¨HÓ5Ð5r   )r1   )FTT)NNNNN)NN)NNNN)r   r   r   r”   r   r   r   ri   r   r   rŸ   r    r•   rB   r
   r   r   r‚   rT   r[   re   r   rt   r€   r–   r—   s   @r   r™   r™   —  sh  ø„ ÙUð ð °cð ÈCð ÐTXõ ð
 (*ñ	2¨ð 	2¸À¹ð 	2Ø!$ð	2Ø.4×.KÑ.Kó	2ð LPØ&*ñ Cð °ð ÀDð Ø#ðØ=@ðØEIóð0 LPØHLØ'+ñ˜Cð ¨%°°U¸3À¸8±_Ñ0EÀtÈCÁyÐ0PÑ*Qð Ø ‘}ðØ;CÀC¹=ðà! #™ðà8@À¹ðð   ‘}ðð ?Bðð GLÈCÐQTÈHÁoóñ4˜Sð ¨8°C©=ð È8ÐTWÉ=ð Ø"ðØ',¨S°#¨X¡óð" ^bØHLñ˜Sð ¨X°c©]ð ÈXÐVYÉ]ð Ø ‘~ðØ8@À¹ðà"ðà'+óð" [_Ø,0ñ ð ¨H°S©Mð ÀHÈTÐRUÉYÑDWð Ø$ S™MðØCFðØKPÐQTÐVZÐ[^ÑV_ÐQ_ÑK`óð$ GKØ37ñ6¨ð 6°h¸s±mð 6Ø#+¨C¡=ð6ØJMð6ØRWÐX[Ð]`ÐX`ÑRa÷6r   r™   r   c                  óX   — t         j                  st        d«      ‚t         j                  S )z»Get the display utility.

    :return: the display utility
    :rtype: Union[FileDisplay, NoninteractiveDisplay]
    :raise: ValueError if the display utility is not configured yet.

    zlThis function was called too early in Certbot's execution as the display utility hasn't been configured yet.)Ú_SERVICEr   rƒ   r    r   r   Úget_displayr¬   #  s.   € ô ×ÒÜð Nó Oð 	Oä×ÑÐr   r   c                 ó   — | t         _        y)zqSet the display service.

    :param Union[FileDisplay, NoninteractiveDisplay] display: the display service

    N)r«   r   r   s    r   Úset_displayr®   1  s   € ð „HÕr   )"r”   Úloggingry   Útypingr   r   r   r   r   r   r	   r
   Úcertbotr   Úcertbot._internalr   Úcertbot._internal.displayr   r   Úcertbot.compatr   Ú	getLoggerr   r9   rM   rY   r>   r   r«   r!   r#   r™   r¬   r®   r    r   r   ú<module>r¶      sÓ   ðÙ LÛ Û 
Ý Ý Ý Ý Ý Ý Ý Ý å Ý 'Ý /Ý *Ý à	ˆ×	Ñ	˜8Ó	$€ð 
€Ø 3à	€Ø 9ð €
ð÷Qñ Qñ
 Ó€áˆCƒL€÷bñ b÷JI6ñ I6ðX�U˜;Ð(=Ð=Ñ>ó ð˜˜{Ð,AÐAÑBð Àtô r   