+
    :O|jZg  ã                  óŒ  a € 0 t $ ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RI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 ]P.                  '       d   ^ R	IHt ^R
IHt ]P8                  R8X  d   ]P:                  R,          tR]R&   M]P:                  R",          tR]R&   ] ]!]",          ]"]3,          t#R]R&    ! R R4      t$]PJ                  R R l4       t& ! R R4      t' ! R R]PP                  4      t) ! R R4      t* ! R R]PV                  4      t,R R lt- ! R R4      t. ! R  R!4      t/R# )#é    )ÚannotationsN)ÚTracebackType)Ú_compat)Ú
formatting)Útermui)Úutils)Ú_find_binary_reader)ÚReadableBuffer)ÚCommandÚwin32Úsyszt.TypeAliasÚCaptureModeÚExceptionInfoc                  ó®   € ] tR t^ t$ R]R&   R]R&   R]R&   R R ltR R	 ltR
 R ltRR R lltRR R llt	RR R llt
R R ltR R ltR R ltRtR# )ÚEchoingStdinú
t.BinaryIOÚ_inputÚ_outputÚboolÚ_pausedc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úinputr   ÚoutputÚreturnÚNone© )Úformats   "ÚFC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\click/testing.pyÚ__annotate__ÚEchoingStdin.__annotate__%   s!   € ÷ ñ ˜jð °*ð Àñ ó    c                	ó,   € Wn         W n        R V n        R# )FN©r   r   r   )Úselfr   r   s   &&&r   Ú__init__ÚEchoingStdin.__init__%   s   € ØŒØŒØˆŽr"   c               ó    € V ^8„  d   QhRRRR/# )r   ÚxÚstrr   út.Anyr   )r   s   "r   r    r!   *   s   € ÷ 'ñ '˜Sð ' Uñ 'r"   c                	ó.   € \        V P                  V4      # ©N)Úgetattrr   ©r%   r)   s   &&r   Ú__getattr__ÚEchoingStdin.__getattr__*   s   € Ü�t—{‘{ AÓ&Ð&r"   c               ó    € V ^8„  d   QhRRRR/# )r   ÚrvÚbytesr   r   )r   s   "r   r    r!   -   s   € ÷ ñ ˜ð  %ñ r"   c                	ó`   € V P                   '       g   V P                  P                  V4       V# r-   )r   r   Úwrite)r%   r3   s   &&r   Ú_echoÚEchoingStdin._echo-   s"   € Ø�|�|ˆ|Ø�L‰L×Ñ˜rÔ"àˆ	r"   c               ó    € V ^8„  d   QhRRRR/# ©r   ÚnÚintr   r4   r   )r   s   "r   r    r!   3   s   € ÷ /ñ /�cð / 5ñ /r"   c                	óV   € V P                  V P                  P                  V4      4      # r-   )r7   r   Úread©r%   r;   s   &&r   r>   ÚEchoingStdin.read3   s    € Ø�z‰z˜$Ÿ+™+×*Ñ*¨1Ó-Ó.Ð.r"   c               ó    € V ^8„  d   QhRRRR/# r:   r   )r   s   "r   r    r!   6   s   € ÷ 0ñ 0�sð 0 Eñ 0r"   c                	óV   € V P                  V P                  P                  V4      4      # r-   )r7   r   Úread1r?   s   &&r   rC   ÚEchoingStdin.read16   s    € Ø�z‰z˜$Ÿ+™+×+Ñ+¨AÓ.Ó/Ð/r"   c               ó    € V ^8„  d   QhRRRR/# r:   r   )r   s   "r   r    r!   9   s   € ÷ 3ñ 3˜#ð 3 uñ 3r"   c                	óV   € V P                  V P                  P                  V4      4      # r-   )r7   r   Úreadliner?   s   &&r   rG   ÚEchoingStdin.readline9   s    € Ø�z‰z˜$Ÿ+™+×.Ñ.¨qÓ1Ó2Ð2r"   c               ó   € V ^8„  d   QhRR/# )r   r   zlist[bytes]r   )r   s   "r   r    r!   <   s   € ÷ @ñ @˜;ñ @r"   c                	ó|   € V P                   P                  4        Uu. uF  qP                  V4      NK  	  up# u upi r-   )r   Ú	readlinesr7   r/   s   & r   rK   ÚEchoingStdin.readlines<   s/   € Ø'+§{¡{×'<Ñ'<Ô'>Ó?Ñ'> !—
‘
˜1–Ñ'>Ñ?Ð?ùÒ?s   �9c               ó   € V ^8„  d   QhRR/# )r   r   zcabc.Iterator[bytes]r   )r   s   "r   r    r!   ?   s   € ÷ 8ñ 8Ð.ñ 8r"   c                	óB   a € \        V 3R  lS P                   4       4      # )c              3  óF   <"  € T F  pSP                  V4      x € K  	  R # 5ir-   )r7   )Ú.0r)   r%   s   & €r   Ú	<genexpr>Ú(EchoingStdin.__iter__.<locals>.<genexpr>@   s   øé € Ð7©; a�D—J‘J˜q—M�M«;ùs   ƒ!)Úiterr   ©r%   s   fr   Ú__iter__ÚEchoingStdin.__iter__?   s   ø€ ÜÔ7¨4¯;ª;Ó7Ó7Ð7r"   c               ó   € V ^8„  d   QhRR/# ©r   r   r*   r   )r   s   "r   r    r!   B   s   € ÷ !ñ !˜#ñ !r"   c                	ó,   € \        V P                  4      # r-   )Úreprr   rT   s   &r   Ú__repr__ÚEchoingStdin.__repr__B   s   € Ü�D—K‘KÓ Ð r"   r$   N)éÿÿÿÿ)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__r&   r0   r7   r>   rC   rG   rK   rU   r[   Ú__static_attributes__r   r"   r   r   r       sF   ‡ ØÓØÓØƒMõõ
'õ÷/÷0÷3õ@õ8÷!ñ !r"   r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚstreamzEchoingStdin | Noner   zcabc.Generator[None]r   )r   s   "r   r    r    G   s   € ÷ ñ Ð+ð Ð0Dñ r"   c              #  óF   "  € V f   R x € R # RV n         R x € RV n         R # 5i)NTF)r   )re   s   &r   Ú_pause_echorg   F   s   é € à‚~ÝàˆŒÛØˆŽùs   ‚!c                  ó^   € ] tR t^Pt$ RtR]R&   R]R&   R]R&   R R ltR	 R
 ltR R ltRt	R# )Ú
_FDCapturea>  Redirect a file descriptor to a temporary file for capture.

Saves the current target of *targetfd* via :func:`os.dup`, then
redirects it to a temporary file via :func:`os.dup2`. On
:meth:`stop`, restores the original ``fd`` and returns the captured
bytes. Inspired by Pytest's ``FDCapture``.

.. versionadded:: 8.4.0
r<   Ú	_targetfdÚsaved_fdzt.BinaryIO | NoneÚ_tmpfilec               ó    € V ^8„  d   QhRRRR/# )r   Útargetfdr<   r   r   r   )r   s   "r   r    Ú_FDCapture.__annotate___   s   € ÷ ñ  ð ¨ñ r"   c                	ó.   € Wn         RV n        RV n        R# ©é   Nr]   )rj   rk   rl   )r%   rn   s   &&r   r&   Ú_FDCapture.__init___   s   € Ø!ŒØˆŒØˆŽr"   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r    ro   d   s   € ÷ 8ñ 8�tñ 8r"   c                	óú   € \         P                  ! V P                  4      V n        \        P
                  ! ^ R7      V n        \         P                  ! V P                  P                  4       V P                  4       R# )r   )Ú	bufferingN)	ÚosÚduprj   rk   ÚtempfileÚTemporaryFilerl   Údup2ÚfilenorT   s   &r   ÚstartÚ_FDCapture.startd   sG   € ÜŸš˜tŸ~™~Ó.ˆŒÜ ×.Ò.¸Ô;ˆŒÜ
�Š�—‘×$Ñ$Ó&¨¯©Ö7r"   c               ó   € V ^8„  d   QhRR/# )r   r   r4   r   )r   s   "r   r    ro   i   s   € ÷ 	ñ 	�eñ 	r"   c                	ó€  € V P                   f   Q R4       h\        P                  ! V P                  V P                  4       \        P
                  ! V P                  4       RV n        V P                   P                  ^ 4       V P                   P                  4       pV P                   P                  4        R V n         V# )Nz!_FDCapture.start() was not calledr]   )rl   rx   r|   rk   rj   ÚcloseÚseekr>   )r%   Údatas   & r   ÚstopÚ_FDCapture.stopi   s…   € Ø�}‰}Ò(ÐMÐ*MÓMÐ(Ü
�Š�—‘˜tŸ~™~Ô.Ü
�Š�—‘ÔØˆŒØ�‰×Ñ˜1ÔØ�}‰}×!Ñ!Ó#ˆØ�‰×ÑÔØˆŒØˆr"   )rj   rl   rk   N)
r^   r_   r`   ra   Ú__doc__rb   r&   r~   r…   rc   r   r"   r   ri   ri   P   s-   ‡ ñð ƒNØƒMØÓõõ
8÷
	ñ 	r"   ri   c                  ób   a € ] tR t^ut$ RtR]R&   R V 3R lltR V 3R lltR V 3R	 lltR
t	V ;t
# )ÚBytesIOCopyz\Patch ``io.BytesIO`` to let the written stream be copied to another.

.. versionadded:: 8.2
ú
io.BytesIOÚcopy_toc               ó    € V ^8„  d   QhRRRR/# )r   r‹   rŠ   r   r   r   )r   s   "r   r    ÚBytesIOCopy.__annotate__}   s   € ÷ ñ  
ð ¨tñ r"   c                	ó0   <€ \         SV `  4        Wn        R # r-   )Úsuperr&   r‹   )r%   r‹   Ú	__class__s   &&€r   r&   ÚBytesIOCopy.__init__}   s   ø€ Ü‰ÑÔØŽr"   c               ó   € V ^8„  d   QhRR/# ru   r   )r   s   "r   r    r�   �   s   € ÷ ñ �tñ r"   c                	óX   <€ \         SV `  4        V P                  P                  4        R # r-   )r�   Úflushr‹   ©r%   r�   s   &€r   r”   ÚBytesIOCopy.flush�   s   ø€ Ü‰‰ŒØ�‰×ÑÖr"   c               ó    € V ^8„  d   QhRRRR/# )r   Úbr
   r   r<   r   )r   s   "r   r    r�   …   s   € ÷  ñ  �~ð  ¨#ñ  r"   c                	óX   <€ V P                   P                  V4       \        SV `  V4      # r-   )r‹   r6   r�   )r%   r˜   r�   s   &&€r   r6   ÚBytesIOCopy.write…   s$   ø€ Ø�‰×Ñ˜1ÔÜ‰w‰}˜QÓÐr"   ©r‹   )r^   r_   r`   ra   r‡   rb   r&   r”   r6   rc   Ú__classcell__©r�   s   @r   r‰   r‰   u   s.   ø‡ ñð
 Ó÷ð ÷ð ÷ ö  r"   r‰   c                  óF   € ] tR t^Št$ RtR]R&   R]R&   R]R&   R R ltR	tR
# )ÚStreamMixerzvMixes `<stdout>` and `<stderr>` streams.

The result is available in the ``output`` attribute.

.. versionadded:: 8.2
rŠ   r   r‰   ÚstdoutÚstderrc               ó   € V ^8„  d   QhRR/# ru   r   )r   s   "r   r    ÚStreamMixer.__annotate__–   s   € ÷ 7ñ 7˜$ñ 7r"   c                	ó¦   € \         P                  ! 4       V n        \        V P                  R 7      V n        \        V P                  R 7      V n        R# )r›   N)ÚioÚBytesIOr   r‰   r    r¡   rT   s   &r   r&   ÚStreamMixer.__init__–   s/   € Ü—j’j“lˆŒÜ!¨$¯+©+Ô6ˆŒÜ!¨$¯+©+Ô6ˆŽr"   )r   r¡   r    N)r^   r_   r`   ra   r‡   rb   r&   rc   r   r"   r   rŸ   rŸ   Š   s%   ‡ ñð ÓØÓØÓ÷7ñ 7r"   rŸ   c                  óœ   a € ] tR t^œt$ RtR]R&   R]R&   R]R&   R V 3R lltR	 R
 ltR V 3R llt]	R R l4       t
]	R R l4       tRtV ;t# )Ú_NamedTextIOWrapperaá  A :class:`~io.TextIOWrapper` with custom ``name`` and ``mode``
that does not close its underlying buffer.

When ``CliRunner`` runs in ``fd`` mode, ``_original_fd`` is patched to
point at the saved (pre-redirection) ``fd``, so C-level consumers that call
:meth:`fileno` (like ``faulthandler`` or ``subprocess``) keep working. In
the default ``sys`` mode ``_original_fd`` stays at ``-1`` and
:meth:`fileno` raises :exc:`io.UnsupportedOperation`, matching the
pre-``8.3.3`` behavior.
r*   Ú_nameÚ_moder<   Ú_original_fdc          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   Úbufferr   Únamer*   ÚmodeÚkwargsr+   r   r   r   )r   s   "r   r    Ú _NamedTextIOWrapper.__annotate__¬   s<   € ÷ 
ñ 
àð
ð ð
ð ð	
ð
 ð
ð 
ñ
r"   c                	óP   <€ \         SV `  ! V3/ VB  W n        W0n        RV n        R# rq   )r�   r&   rª   r«   r¬   )r%   r®   r¯   r°   r±   r�   s   &&&&,€r   r&   Ú_NamedTextIOWrapper.__init__¬   s)   ø€ ô 	‰Ò˜Ñ* 6Ò*ØŒ
ØŒ
ØˆÖr"   c               ó   € V ^8„  d   QhRR/# ru   r   )r   s   "r   r    r²   ¸   s   € ÷ ñ �tñ r"   c                ó   € R# )z£The buffer this object contains belongs to some other object,
so prevent the default ``__del__`` implementation from closing
that buffer.

.. versionadded:: 8.3.2
Nr   rT   s   &r   r‚   Ú_NamedTextIOWrapper.close¸   s   ‚ r"   c               ó   € V ^8„  d   QhRR/# )r   r   r<   r   )r   s   "r   r    r²   À   s   € ÷  ñ  ˜ñ  r"   c                óZ   <€ V P                   ^ 8¼  d   V P                   # \        SV `	  4       # )zßReturn the file descriptor of the saved original stream when
``CliRunner`` runs in ``fd`` mode. Otherwise delegate to
:class:`~io.TextIOWrapper`, which raises
:exc:`io.UnsupportedOperation` for a ``BytesIO``-backed buffer.
)r¬   r�   r}   r•   s   &€r   r}   Ú_NamedTextIOWrapper.filenoÀ   s,   ø€ ð ×Ñ Ô!Ø×$Ñ$Ð$Ü‰w‰~ÓÐr"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    r²   Ë   ó   € ÷ ñ �cñ r"   c                	ó   € V P                   # r-   )rª   rT   s   &r   r¯   Ú_NamedTextIOWrapper.nameÊ   ó   € à�z‰zÐr"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    r²   Ï   r¼   r"   c                	ó   € V P                   # r-   )r«   rT   s   &r   r°   Ú_NamedTextIOWrapper.modeÎ   r¿   r"   )r«   rª   r¬   )r^   r_   r`   ra   r‡   rb   r&   r‚   r}   Úpropertyr¯   r°   rc   rœ   r�   s   @r   r©   r©   œ   s[   ø‡ ñ	ð ƒJØƒJØÓ÷
ð 
õ÷ ð  ð ôó ðð ôó ör"   r©   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   ú str | bytes | t.IO[t.Any] | NoneÚcharsetr*   r   r   r   )r   s   "r   r    r    Ó   s$   € ÷ ñ Ø+ðØ69ðàñr"   c                ó  € \        V R 4      '       d2   \        \        P                  ! RV 4      4      pVe   V# \	        R4      hV f   Rp M'\        V \        4      '       d   V P                  V4      p \        P                  ! V 4      # )r>   zt.IO[t.Any]z.Could not find binary reader for input stream.r"   )
Úhasattrr	   ÚtÚcastÚ	TypeErrorÚ
isinstancer*   Úencoder¥   r¦   )r   rÆ   r3   s   && r   Úmake_input_streamrÎ   Ó   sp   € ô ˆu�f×ÒÜ ¤§¢¨°uÓ!=Ó>ˆàŠ>ØˆIäÐHÓIÐIà‚}Ø‰Ü	�Eœ3×	Ò	Ø—‘˜WÓ%ˆä�:Š:�eÓÐr"   c                  óÊ   € ] tR t^çt$ RtR]R&   R]R&   R]R&   R]R&   R]R	&   R
]R&   R]R&   R]R&   RR R llt]R R l4       t]R R l4       t	]R R l4       t
R R ltRtR# )ÚResulta  Holds the captured result of an invoked CLI script.

:param runner: The runner that created the result
:param stdout_bytes: The standard output as bytes.
:param stderr_bytes: The standard error as bytes.
:param output_bytes: A mix of ``stdout_bytes`` and ``stderr_bytes``, as the
    user would see  it in its terminal.
:param return_value: The value returned from the invoked command.
:param exit_code: The exit code as integer.
:param exception: The exception that happened if one did.
:param exc_info: Exception information (exception type, exception instance,
    traceback type).

.. versionchanged:: 8.2
    ``stderr_bytes`` no longer optional, ``output_bytes`` introduced and
    ``mix_stderr`` has been removed.

.. versionadded:: 8.0
    Added ``return_value``.
Ú	CliRunnerÚrunnerr4   Ústdout_bytesÚstderr_bytesÚoutput_bytesr+   Úreturn_valuer<   Ú	exit_codeúBaseException | NoneÚ	exceptionúExceptionInfo | NoneÚexc_infoNc               ó<   € 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Ó   r4   rÔ   rÕ   rÖ   r+   r×   r<   rÙ   rØ   rÛ   rÚ   r   r   r   )r   s   "r   r    ÚResult.__annotate__  sd   € ÷ !ñ !àð!ð ð!ð ð	!ð
 ð!ð ð!ð ð!ð (ð!ð 'ð!ð 
ñ!r"   c	                	óf   € Wn         W n        W0n        W@n        WPn        W`n        Wpn        W€n        R # r-   ©rÒ   rÓ   rÔ   rÕ   rÖ   r×   rÙ   rÛ   )	r%   rÒ   rÓ   rÔ   rÕ   rÖ   r×   rÙ   rÛ   s	   &&&&&&&&&r   r&   ÚResult.__init__  s0   € ð ŒØ(ÔØ(ÔØ(ÔØ(ÔØ"ŒØ"ŒØ Žr"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    rÝ     s   € ÷ 	
ñ 	
˜ñ 	
r"   c                ó‚   € V P                   P                  V P                  P                  R4      P	                  RR4      # )zöThe terminal output as unicode string, as the user would see it.

.. versionchanged:: 8.2
    No longer a proxy for ``self.stdout``. Now has its own independent stream
    that is mixing `<stdout>` and `<stderr>`, in the order they were written.
Úreplaceú
Ú
)rÕ   ÚdecoderÒ   rÆ   rã   rT   s   &r   r   ÚResult.output  s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    rÝ   '  s   € ÷ 
ñ 
˜ñ 
r"   c                ó‚   € V P                   P                  V P                  P                  R4      P	                  RR4      # )z&The standard output as unicode string.rã   rä   rå   )rÓ   ræ   rÒ   rÆ   rã   rT   s   &r   r    ÚResult.stdout&  s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    rÝ   .  s   € ÷ 
ñ 
˜ñ 
r"   c                ó‚   € V P                   P                  V P                  P                  R4      P	                  RR4      # )z‡The standard error as unicode string.

.. versionchanged:: 8.2
    No longer raise an exception, always returns the `<stderr>` string.
rã   rä   rå   )rÔ   ræ   rÒ   rÆ   rã   rT   s   &r   r¡   ÚResult.stderr-  s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r"   c               ó   € V ^8„  d   QhRR/# rX   r   )r   s   "r   r    rÝ   8  s   € ÷ 4ñ 4˜#ñ 4r"   c                	óŒ   € V P                   '       d   \        V P                   4      MR pR\        V 4      P                   RV R2# )ÚokayÚ<Ú Ú>)rÙ   rZ   Útyper^   )r%   Úexc_strs   & r   r[   ÚResult.__repr__8  s:   € Ø*.¯.¯.¨.”$�t—~‘~Ô&¸fˆØ”4˜“:×&Ñ&Ð' q¨¨	°Ð3Ð3r"   )rÛ   rÙ   r×   rÕ   rÖ   rÒ   rÔ   rÓ   r-   )r^   r_   r`   ra   r‡   rb   r&   rÃ   r   r    r¡   r[   rc   r   r"   r   rÐ   rÐ   ç   sƒ   ‡ ñð* ÓØÓØÓØÓØÓØƒNØ#Ó#Ø"Ó"÷!ð( ô	
ó ð	
ð ô
ó ð
ð ô
ó ð
÷4ñ 4r"   rÐ   c                  óæ   € ] tR tRt$ RtR]R&   R]R&   R]R&   R]R	&   R
]R&   RR R lltR R ltRR R llt]	P                  RR R ll4       tRR R llt]	P                  RR R ll4       tRtR# )rÑ   i=  a  The CLI runner provides functionality to invoke a Click command line
script for unittesting purposes in a isolated environment.  This only
works in single-threaded systems without any concurrency as it changes the
global interpreter state.

:param charset: the character set for the input and output data.
:param env: a dictionary with environment variables for overriding.
:param echo_stdin: if this is set to `True`, then reading from `<stdin>` writes
                   to `<stdout>`.  This is useful for showing examples in
                   some circumstances.  Note that regular prompts
                   will automatically echo the input.
:param catch_exceptions: Whether to catch any exceptions other than
                         ``SystemExit`` when running :meth:`~CliRunner.invoke`.
:param capture: Selects the output capture strategy. ``sys`` (default)
    captures Python-level writes only and leaves
    :meth:`sys.stdout.fileno` raising :exc:`io.UnsupportedOperation`, so
    user code that calls :func:`os.dup2` on ``sys.stdout.fileno()`` cannot
    clobber the host runner's stdout. ``fd`` redirects file descriptors
    ``1`` and ``2`` via :func:`os.dup2` to a temporary file, also catching
    output from stale stream references, C extensions, and subprocesses.
    ``fd`` is not supported on Windows.

.. versionchanged:: 8.4.0
    Added the ``capture`` parameter. The default ``sys`` mode no longer
    exposes the original fd through :meth:`fileno`, reverting the change
    introduced in ``8.3.3`` that broke Pytest's ``fd``-level capture
    teardown. Use ``capture="fd"`` to restore that behavior with proper
    isolation. :issue:`3384`

.. versionchanged:: 8.2
    Added the ``catch_exceptions`` parameter.

.. versionchanged:: 8.2
    ``mix_stderr`` parameter has been removed.
r*   rÆ   úcabc.Mapping[str, str | None]Úenvr   Ú
echo_stdinÚcatch_exceptionsr   ÚcaptureNc               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   rÆ   r*   rù   ú$cabc.Mapping[str, str | None] | Nonerú   r   rû   rü   r   r   r   r   )r   s   "r   r    ÚCliRunner.__annotate__h  sF   € ÷ ñ àðð 2ðð ð	ð
 ðð ðð 
ñr"   c                	óÞ   € VR9  d   \        RV: R24      hVR8X  d&   \        P                  R8X  d   \        RV: R24      hWn        T;'       g    / V n        W0n        W@n        WPn        R# )r   Úfdzcapture=z) is not valid. Choose from 'sys' or 'fd'.r   z( is not supported on Windows. Use 'sys'.N>   r  r   )Ú
ValueErrorr   ÚplatformrÆ   rù   rú   rû   rü   )r%   rÆ   rù   rú   rû   rü   s   &&&&&&r   r&   ÚCliRunner.__init__h  sx   € ð ˜-Ô'ÜØ˜7™+Ð%NÐOóð ð �dŒ?œsŸ|™|¨wÔ6ÜØ˜7™+Ð%MÐNóð ð ŒØ—9�9˜"ˆŒØ$ŒØ 0ÔØŽr"   c               ó    € V ^8„  d   QhRRRR/# )r   Úclir   r   r*   r   )r   s   "r   r    rÿ   ~  s   € ÷ "ñ "¨ð "°Sñ "r"   c                ó.   € VP                   ;'       g    R# )z†Given a command object it will return the default program name
for it.  The default is the `name` attribute or ``"root"`` if not
set.
Úroot)r¯   )r%   r  s   &&r   Úget_default_prog_nameÚCliRunner.get_default_prog_name~  s   € ð
 �x‰x×!Ð!˜6Ð!r"   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	overridesrþ   r   rø   r   )r   s   "r   r    rÿ   …  s   € ÷ ñ Ø=ðà	&ñr"   c                ób   € \        V P                  4      pV'       d   VP                  V4       V# )z8Returns the environment overrides for invoking a script.)Údictrù   Úupdate)r%   r  r3   s   && r   Úmake_envÚCliRunner.make_env…  s%   € ô �$—(‘(‹^ˆßØ�I‰I�iÔ Øˆ	r"   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   rÅ   rù   rþ   Úcolorr   r   z9cabc.Generator[tuple[io.BytesIO, io.BytesIO, io.BytesIO]]r   )r   s   "r   r    rÿ   �  s9   € ÷ C,ñ C,à/ðC,ð 2ðC,ð ð	C,ð
 
CñC,r"   c              #  ó€	  aaa"  € \        WP                  4      pRp\        P                  p\        P                  p\        P
                  p\        P                  p	^P\        n        V P                  V4      p\        4       p
V P                  '       d:   \        P                  ! \        P                  \        WJP                  4      4      ;rE\        W@P                  RRR7      ;\        n        oV P                  '       d   ^Sn        \        V
P                  V P                  RRR7      \        n        \        V
P
                  V P                  RRRR	7      \        n        \#        V4      RR
 V3R lll4       p\#        V4      RR V3R lll4       p\#        V4      R R l4       pVoRR V3R lllp\$        P&                  p\$        P(                  p\$        P*                  p\,        P.                  p\0        P.                  p\2        P4                  P6                  oV\$        n        V\$        n        V\$        n        V\,        n        V\0        n        RR V3R lllpV\2        P4                  n        / p VP9                  4        FS  w  pp\:        P<                  P?                  V4      VV&   Vf    \:        P<                  V K@  V\:        P<                  V&   KU  	  V
P                  V
P
                  V
PB                  3x € VP9                  4        F1  w  ppVf    \:        P<                  V K  V\:        P<                  V&   K3  	  V\        n        V\        n        V\        n        V\$        n        V\$        n        V\$        n        V\,        n        V\0        n        V	\        n        S\2        P4                  n        R#   \@         d     EKJ  i ; i  \@         d     KÐ  i ; i  TP9                  4        FC  w  ppTf'    \:        P<                  T K    \@         d     K,  i ; iT\:        P<                  T&   KE  	  T\        n        T\        n        T\        n        T\$        n        T\$        n        T\$        n        T\,        n        T\0        n        T	\        n        S\2        P4                  n        i ; i5i)a¼  A context manager that sets up the isolation for invoking of a
command line tool.  This sets up `<stdin>` with the given input data
and `os.environ` with the overrides from the given dictionary.
This also rebinds some internals in Click to be mocked (like the
prompt functionality).

This is automatically done in the :meth:`invoke` method.

:param input: the input stream to put into `sys.stdin`.
:param env: the environment overrides as dictionary.
:param color: whether the output should contain color codes. The
              application can still override this explicitly.

.. versionadded:: 8.2
    An additional output stream is returned, which is a mix of
    `<stdout>` and `<stderr>` streams.

.. versionchanged:: 8.2
    Always returns the `<stderr>` stream.

.. versionchanged:: 8.0
    `<stderr>` is opened with ``errors="backslashreplace"``
    instead of the default ``"strict"``.

.. versionchanged:: 4.0
    Added the ``color`` parameter.
Nz<stdin>Úr)Úencodingr¯   r°   z<stdout>Úwz<stderr>Úbackslashreplace)r  r¯   r°   Úerrorsc               ó    € V ^8„  d   QhRRRR/# ©r   Úpromptz
str | Noner   r*   r   )r   s   "r   r    Ú)CliRunner.isolation.<locals>.__annotate__Û  s   € ÷ 	ñ 	 *ð 	¸ñ 	r"   c                óL  <€ \         P                  P                  T ;'       g    R 4        \        S4      P	                  R4      p\         P                  P                  T R24       \         P                  P                  4        T#   \
         d   p\        4       ThRp?ii ; i)Ú rä   Nrå   )r   r    r6   ÚnextÚrstripÚStopIterationÚEOFErrorr”   )r  ÚvalÚeÚ
text_inputs   &  €r   Úvisible_inputÚ*CliRunner.isolation.<locals>.visible_inputÚ  s€   ø€ ä�J‰J×Ñ˜VŸ\˜\ rÔ*ð(Ü˜:Ó&×-Ñ-¨fÓ5�ô �J‰J×Ñ ˜u B˜ZÔ(Ü�J‰J×ÑÔØˆJøô	 !ô (Ü“j aÐ'ûð(ús   ¬B ÂB#ÂBÂB#c               ó    € V ^8„  d   QhRRRR/# r  r   )r   s   "r   r    r  æ  s   € ÷ 	(ñ 	( ð 	(°sñ 	(r"   c                ó
  <€ \         P                  P                  T ;'       g    R  R24       \         P                  P                  4         \	        S4      P                  R4      #   \         d   p\        4       ThRp?ii ; i)r  rå   rä   N)r   r    r6   r”   r   r!  r"  r#  )r  r%  r&  s   & €r   Úhidden_inputÚ)CliRunner.isolation.<locals>.hidden_inputå  sg   ø€ ä�J‰J×Ñ § ¨"˜~¨RÐ0Ô1Ü�J‰J×ÑÔð(Ü˜JÓ'×.Ñ.¨vÓ6Ð6øÜ ô (Ü“j aÐ'ûð(ús   ÁA' Á'BÁ2A=Á=Bc               ó    € V ^8„  d   QhRRRR/# )r   Úechor   r   r*   r   )r   s   "r   r    r  ï  s   € ÷ 	ñ 	˜4ð 	 Cñ 	r"   c                óÎ   € \         P                  P                  ^4      pV '       d    \         P                  P	                  V4       \         P                  P                  4        V# )rr   )r   Ústdinr>   r    r6   r”   )r.  Úchars   & r   Ú_getcharÚ%CliRunner.isolation.<locals>._getcharî  s>   € ä—9‘9—>‘> !Ó$ˆDçÜ—
‘
× Ñ  Ô&ä�J‰J×ÑÔØˆKr"   c               ó$   € V ^8„  d   QhRRRRRR/# )r   re   zt.IO[t.Any] | Noner  úbool | Noner   r   r   )r   s   "r   r    r  ú  s$   € ÷ 	ñ 	Ø&ð	Ø6Að	àñ	r"   c                ó(   <€ Vf   S'       * # V'       * # r-   r   )re   r  Údefault_colors   &&€r   Úshould_strip_ansiÚ.CliRunner.isolation.<locals>.should_strip_ansiú  s   ø€ ð Š}Ø(Ô(Ð(Ø”9Ðr"   c               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   r%   zpdb.PdbÚcompletekeyr*   r0  zt.IO[str] | Noner    r±   r+   r   r   r   )r   s   "r   r    r    sD   € ÷ #	ñ #	Øð#	àð#	ð $ð#	ð %ð	#	ð
 ð#	ð ñ#	r"   c           	     óv   <€ Vf   \         P                  pVf   \         P                  pS! V 3RVRVRV/VB  R# )aŠ  Default ``pdb.Pdb`` to real terminal streams during
``CliRunner`` isolation.

Without this patch, ``pdb.Pdb.__init__`` inherits from
``cmd.Cmd`` which falls back to ``sys.stdin``/``sys.stdout``
when no explicit streams are provided. During isolation
those are ``BytesIO``-backed wrappers, so the debugger
reads from an empty buffer and writes to captured output,
making interactive debugging impossible.

By defaulting to ``sys.__stdin__``/``sys.__stdout__`` (the
original terminal streams Python preserves regardless of
redirection), debuggers can interact with the user while
``click.echo`` output is still captured normally.

This covers ``pdb.set_trace()``, ``breakpoint()``,
``pdb.post_mortem()``, and debuggers that subclass
``pdb.Pdb`` (ipdb, pdbpp). Explicit ``stdin``/``stdout``
arguments are honored and not overridden. Debuggers that
do not subclass ``pdb.Pdb`` (pudb, debugpy) are not
covered.
Nr;  r0  r    )r   Ú	__stdin__Ú
__stdout__)r%   r;  r0  r    r±   Úold_pdb_inits   &&&&,€r   Ú_patched_pdb_initÚ.CliRunner.isolation.<locals>._patched_pdb_init  sL   ø€ ð: Š}ÜŸ™�ØŠ~ÜŸ™�ÙØñØ"-ðØ5:ðØCIðØMSôr"   r-   )NN)ÚtabNN)"rÎ   rÆ   r   r0  r    r¡   r   ÚFORCED_WIDTHr  rŸ   rú   rÉ   rÊ   ÚBinaryIOr   r©   Ú_CHUNK_SIZErg   r   Úvisible_prompt_funcÚhidden_prompt_funcr2  r   r8  r   ÚpdbÚPdbr&   Úitemsrx   ÚenvironÚgetÚ	Exceptionr   )r%   r   rù   r  Úbytes_inputÚ
echo_inputÚ	old_stdinÚ
old_stdoutÚ
old_stderrÚold_forced_widthÚstream_mixerr'  r+  r2  r8  Úold_visible_prompt_funcÚold_hidden_prompt_funcÚold__getchar_funcÚold_should_strip_ansiÚold__compat_should_strip_ansir@  Úold_envÚkeyÚvaluer7  r?  r&  s   &&&&                    @@@r   Ú	isolationÚCliRunner.isolationŽ  sÇ  úé € ôD (¨¯|©|Ó<ˆØˆ
ä—I‘Iˆ	Ü—Z‘Zˆ
Ü—Z‘Zˆ
Ü%×2Ñ2ÐØ"$Œ
Ôà�m‰m˜CÓ ˆä"“}ˆà�?�?ˆ?Ü'(§v¢vÜ—
‘
œL¨×6IÑ6IÓJó(ð ˆKô "5Ø§,¡,°YÀSô"
ð 	
ŒŒ	�Jð �?�?ˆ?ð &'ˆJÔ"ä(Ø×ÑØ—\‘\ØØô	
ŒŒ
ô )Ø×ÑØ—\‘\ØØØ%ô
ŒŒ
ô 
�ZÓ	 ÷	ñ 	ó 
!ð	ô 
�ZÓ	 ÷	(ñ 	(ó 
!ð	(ô 
�ZÓ	 ô	ó 
!ð	ð ˆ÷	ò 	ô #)×"<Ñ"<ÐÜ!'×!:Ñ!:ÐÜ"ŸO™OÐÜ %× 7Ñ 7ÐÜ(/×(AÑ(AÐ%Ü—w‘w×'Ñ'ˆØ%2ŒÔ"Ø$0ŒÔ!Ø"ŒŒØ"3ŒÔØ$5ŒÔ!÷#	ò #	ðJ -Œ�‰Ôàˆð	,Ø!Ÿi™ižk‘
��UÜ!Ÿz™zŸ~™~¨cÓ2�˜‘Ø’=ðÜŸJ™J sšOð ',”B—J‘J˜s“Oñ *ð  ×&Ñ&¨×(;Ñ(;¸\×=PÑ=PÐQÒQà%Ÿm™mžo‘
��UØ’=ðÜŸJ™J sšOð ',”B—J‘J˜s“Oñ .ð $ŒCŒJØ#ŒCŒJØ!ŒCŒIØ)@ŒFÔ&Ø(>ŒFÔ%Ø/ŒFŒOØ&;ŒEÔ#Ø(EŒGÔ%Ø&6ŒJÔ#Ø+ŒC�G‰GÖøô/ %ô Ûðûô %ô Úðûð	 &Ÿm™mžo‘
��UØ’=ðÜŸJ™J sšOøÜ$ô Úðúð ',”B—J‘J˜s“Oñ .ð $ŒCŒJØ#ŒCŒJØ!ŒCŒIØ)@ŒFÔ&Ø(>ŒFÔ%Ø/ŒFŒOØ&;ŒEÔ#Ø(EŒGÔ%Ø&6ŒJÔ#Ø+ŒC�G‰GÕüsŒ   …I4R>É:<O* Ê7OË>O* ÌR>Ì!OÌ2BR>ÏOÏO* ÏOÏO* ÏO'Ï#R>Ï&O'Ï'R>Ï*R;ÐPÐR;ÐP(	Ð$R;Ð'P(	Ð(BR;Ò;R>c               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# )r   r  r   Úargszstr | cabc.Sequence[str] | Noner   rÅ   rù   rþ   rû   r5  r  r   Úextrar+   r   rÐ   r   )r   s   "r   r    rÿ   T  sd   € ÷ O
ñ O
àðO
ð .ðO
ð 0ð	O
ð
 2ðO
ð &ðO
ð ðO
ð ðO
ð 
ñO
r"   c                ó´  € RpVf   V P                   pRp	Rp
V P                  R8X  d8   \        ^4      p	\        ^4      p
 V	P                  4        V
P                  4        V P                  W4VR7      ;_uu_ 4       pV	eC   V
e?   V	P                  \        P                  n	        V
P                  \        P                  n	        RpRp^ p\        V\        4      '       d   \        P                  ! V4      p VP                  R4      p VP$                  ! R	RT;'       g    R	RV/VB p\        P                  P7                  4        \        P                  P7                  4        V	ee   V
ea   V	P9                  4       pV
P9                  4       pV'       d   V^ ,          P3                  V4       V'       d   V^,          P3                  V4       V^ ,          P;                  4       pV^,          P;                  4       pV^,          P;                  4       p RRR4       \=        V XXXXXXVR7      #   \         d    R;rš ELÝi ; i  \          d    T P#                  T4      p ELZi ; i  \&         d²   p\        P(                  ! 4       p\*        P,                  ! RTP.                  4      pTf   ^ pT^ 8w  d   Tp\        T\0        4      '       gJ   \        P                  P3                  \        T4      4       \        P                  P3                  R4       ^pTp Rp?ELôRp?i\4         d.   pT'       g   h Tp^p\        P(                  ! 4       p Rp?EL*Rp?ii ; i  \        P                  P7                  4        \        P                  P7                  4        T	ee   T
ea   T	P9                  4       pT
P9                  4       pT'       d   T^ ,          P3                  T4       T'       d   T^,          P3                  T4       T^ ,          P;                  4       pT^,          P;                  4       pT^,          P;                  4       pi ; i  + '       g   i     EL?; i)
ak  Invokes a command in an isolated environment.  The arguments are
forwarded directly to the command line script, the `extra` keyword
arguments are passed to the :meth:`~clickpkg.Command.main` function of
the command.

This returns a :class:`Result` object.

:param cli: the command to invoke
:param args: the arguments to invoke. It may be given as an iterable
             or a string. When given as string it will be interpreted
             as a Unix shell command. More details at
             :func:`shlex.split`.
:param input: the input data for `sys.stdin`.
:param env: the environment overrides.
:param catch_exceptions: Whether to catch any other exceptions than
                         ``SystemExit``. If :data:`None`, the value
                         from :class:`CliRunner` is used.
:param extra: the keyword arguments to pass to :meth:`main`.
:param color: whether the output should contain color codes. The
              application can still override this explicitly.

.. versionadded:: 8.2
    The result object has the ``output_bytes`` attribute with
    the mix of ``stdout_bytes`` and ``stderr_bytes``, as the user would
    see it in its terminal.

.. versionchanged:: 8.2
    The result object always returns the ``stderr_bytes`` stream.

.. versionchanged:: 8.0
    The result object has the ``return_value`` attribute with
    the value returned from the invoked command.

.. versionchanged:: 4.0
    Added the ``color`` parameter.

.. versionchanged:: 3.0
    Added the ``catch_exceptions`` parameter.

.. versionchanged:: 3.0
    The result object has the ``exc_info`` attribute with the
    traceback if available.
Nr  )r   rù   r  Ú	prog_namer`  zint | t.Any | Nonerå   rß   r   )rû   rü   ri   r~   ÚOSErrorr]  rk   r   r    r¬   r¡   rÌ   r*   ÚshlexÚsplitÚpopÚKeyErrorr	  ÚmainÚ
SystemExitrÛ   rÉ   rÊ   Úcoder<   r6   rM  r”   r…   ÚgetvaluerÐ   )r%   r  r`  r   rù   rû   r  ra  rÛ   Úcap_outÚcap_errÚ
outstreamsrÖ   rÙ   r×   rc  r%  Úe_codeÚfd_outÚfd_errr    r¡   r   s   &&&&&&&,               r   ÚinvokeÚCliRunner.invokeT  su  € ðj ˆØÒ#Ø#×4Ñ4Ðð &*ˆØ%)ˆà�<‰<˜4ÔÜ  “mˆGÜ  “mˆGð)Ø—‘”Ø—‘”ð �^‰^ %¸ˆ^×>Ô>À*ð Ò" wÒ':Ø*1×*:Ñ*:”—
‘
Ô'Ø*1×*:Ñ*:”—
‘
Ô'àˆLØ.2ˆIØˆIä˜$¤×$Ò$Ü—{’{ 4Ó(�ð<Ø!ŸI™I kÓ2�	ð*2Ø"ŸxšxÑV¨T¯Z¨Z°RÐVÀ9ÐVÐPUÑV�ô2 —
‘
× Ñ Ô"Ü—
‘
× Ñ Ô"ð
 Ò&¨7Ò+>Ø$Ÿ\™\›^�FØ$Ÿ\™\›^�FßØ" 1�×+Ñ+¨FÔ3ßØ" 1�×+Ñ+¨FÔ3à# A�×/Ñ/Ó1�Ø# A�×/Ñ/Ó1�Ø# A�×/Ñ/Ó1‘÷} ?ô@ ØØØØØ%ØØØô	
ð 		
øôG ô )Ø$(Ð(�š'ð)ûô( ô <Ø ×6Ñ6°sÓ;“	ð<ûô
 ô #ÜŸ<š<›>�ÜŸšÐ 4°a·f±fÓ=�à’>Ø�Fà˜Q”;Ø !�Iä! &¬#×.Ò.Ü—J‘J×$Ñ$¤S¨£[Ô1Ü—J‘J×$Ñ$ TÔ*Ø�Fà"–	ûäô *ß'ØØ�	Ø�	ÜŸ<š<›>–ûð*ûô —
‘
× Ñ Ô"Ü—
‘
× Ñ Ô"ð
 Ò&¨7Ò+>Ø$Ÿ\™\›^�FØ$Ÿ\™\›^�FßØ" 1�×+Ñ+¨FÔ3ßØ" 1�×+Ñ+¨FÔ3à# A�×/Ñ/Ó1�Ø# A�×/Ñ/Ó1�Ø# A�×/Ñ/Ó1‘ú÷} ?×>Ð>ús§   ¿ H+ Á:A9QÃ4I Ä I#Ä&A+QÆQÆ2AQÈ+H=È<H=É I ÉQÉI É QÉ#MÉ.B&LÌMÌMÌ'MÌ("MÍ
MÍMÍMÍA,QÏQÏ%AQÑQÑQ	c               ó    € V ^8„  d   QhRRRR/# )r   Útemp_dirzstr | os.PathLike[str] | Noner   zcabc.Generator[str]r   )r   s   "r   r    rÿ   æ  s   € ÷ ñ Ø5ðà	ñr"   c              #  ó²  "  € \         P                  ! 4       p\        P                  ! VR7      p\         P                  ! V4        Vx € \         P                  ! V4       Vf   ^ RIp VP                  V4       R# R#   \         d     R# i ; i  \         P                  ! T4       Tf)   ^ RIp TP                  T4       i   \         d     i i ; ii ; i5i)a›  A context manager that creates a temporary directory and
changes the current working directory to it. This isolates tests
that affect the contents of the CWD to prevent them from
interfering with each other.

:param temp_dir: Create the temporary directory under this
    directory. If given, the created directory is not removed
    when exiting.

.. versionchanged:: 8.0
    Added the ``temp_dir`` parameter.
)ÚdirN)rx   Úgetcwdrz   ÚmkdtempÚchdirÚshutilÚrmtreerd  )r%   rv  ÚcwdÚdtr|  s   &&   r   Úisolated_filesystemÚCliRunner.isolated_filesystemå  s³   é € ô  �iŠi‹kˆÜ×Ò (Ô+ˆÜ
�Š�Œð	ØŠHä�HŠH�SŒMàÒÛðØ—M‘M "Ö%ñ	  øô
 ô Úðûô �HŠH�SŒMàÒÛðØ—M‘M "Õ%øÜô Ùðúð  üsf   ‚ACÁB Á
CÁ)A> Á:CÁ>BÂ	CÂBÂCÂCÂ0CÃCÃCÃCÃCÃCÃC)rü   rû   rÆ   rú   rù   )zutf-8NFTr   r-   )NNF)NNNNF)r^   r_   r`   ra   r‡   rb   r&   r	  r  Ú
contextlibÚcontextmanagerr]  rs  r€  rc   r   r"   r   rÑ   rÑ   =  st   ‡ ñ"ðH ƒLØ	&Ó&ØÓØÓØÓ÷õ,"÷ð ×ÑöC,ó ðC,÷JO
ðb ×Ñöó ôr"   rÑ   )r   r  )0Ú__conditional_annotations__Ú
__future__r   Úcollections.abcÚabcÚcabcr‚  r¥   rx   rH  re  r   rz   ÚtypingrÉ   Útypesr   r  r   r   r   r   r	   ÚTYPE_CHECKINGÚ	_typeshedr
   Úcorer   r  ÚLiteralr   rb   Útuplerô   ÚBaseExceptionr   r   rƒ  rg   ri   r¦   r‰   rŸ   ÚTextIOWrapperr©   rÎ   rÐ   rÑ   )r„  s   @r   Ú<module>r’     s  øðß "Ð "å Û Û 	Û 	Û 
Û Û 
Û Û Ý å Ý Ý Ý Ý (à‡?‡?€?Ý(åà‡<�<�7ÔØ Ÿy™y¨Õ/€K�Ô/à Ÿy™y¨Õ5€K�Ó5Ø" 4¨Õ#6¸À}Ð#TÕU€ˆ{Ó U÷#!ñ #!ðL ×Ñôó ð÷"ñ "ôJ �"—*‘*ô  ÷*7ñ 7ô$4˜"×*Ñ*ô 4õn÷(S4ñ S4÷lGó Gr"   