Ë
    =Gìj4  ã                   ób  — U d Z ddlmZmZ ddlZddlZddlZddlZddlZddl	m
Z
mZ ddlmZ dZeed<   dZeed	<   d
Zeed<    ej(                  d«      Z eej.                  e   «      hZee   ed<   dZe
ed<   dZej:                  dz  ed<    G d„ de«      Zdee e
f   dedz  fd„Z!defd„Z"de fd„Z#dejH                  de de
dejJ                  fd„Z&defd„Z'de dee    de(e    fd„Z)d„ Z*	 	 	 d+d e d!edz  d"e d#e dz  de f
d$„Z+	 d,d%ee e
f   d&ee    dz  dee    fd'„Z,d(e de fd)„Z-de de fd*„Z.y)-z:Internal helper functions for Abseil Python flags library.é    )ÚIterableÚSequenceN)ÚAnyÚ
NamedTuple)ÚminidoméP   Ú_DEFAULT_HELP_WIDTHé(   Ú_MIN_HELP_WIDTHg      à?Ú _SUGGESTION_ERROR_RATE_THRESHOLDu    [ ---Â„Â†-ÂŸí €-í¿¿ï¿¾ï¿¿]Údisclaim_module_idsÚSPECIAL_FLAGSÚFLAGS_MODULEc                   ó:   — e Zd ZU dZej
                  ed<   eed<   y)Ú_ModuleObjectAndNamezkModule object and name.

  Fields:
  - module: object, module object.
  - module_name: str, module name.
  ÚmoduleÚmodule_nameN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚtypesÚ
ModuleTypeÚ__annotations__Ústr© ó    úWC:\Users\Stabi\Downloads\virtual-tryon(1)\venv\Lib\site-packages\absl/flags/_helpers.pyr   r   F   s   … ñð ×
Ñ
ÓØÔr   r   Úglobals_dictÚreturnc                 ó¢   — 	 | d   }t         j                  |   }t        ||dk(  rt         j                  d   «      S |«      S # t        $ r Y yw xY w)aF  Returns the module that defines a global environment, and its name.

  Args:
    globals_dict: A dictionary that should correspond to an environment
      providing the values of the globals.

  Returns:
    _ModuleObjectAndName - pair of module object & module name.
    Returns None if the module could not be identified.
  r   NÚ__main__r   )ÚsysÚmodulesÚKeyErrorr   Úargv)r   Únamer   s      r   Úget_module_object_and_namer(   R   sc   € ðØ˜
Ñ#€DÜ�[‰[˜Ñ€Fô 
Ø˜T ZÒ/Œc�h‰h�q‰kó
ð Ø59ó
ð øô 
ò Ùðús   ‚A Á	AÁAc                  óö   — t        dt        j                  «       «      D ]N  } t        j                  | «      j                  }t        |«      }|€Œ0t        |j                  «      t        vsŒL|c S  t        d«      ‚)a)  Returns the module that's calling into this module.

  We generally use this function to get the name of the module calling a
  DEFINE_foo... function.

  Returns:
    The module object that called into this one.

  Raises:
    AssertionError: Raised when no calling module could be identified.
  é   zNo module was found)
Úranger#   ÚgetrecursionlimitÚ	_getframeÚ	f_globalsr(   Úidr   r   ÚAssertionError)ÚdepthÚglobals_for_framer   s      r   Ú"get_calling_module_object_and_namer3   j   sj   € ô �Qœ×-Ñ-Ó/Ö0€eô Ÿ™ eÓ,×6Ñ6ÐÜ'Ð(9Ó:€FØÑœb §¡Ó/Ô7JÒJØ‚mð 1ô 	Ð,Ó-Ð-r   c                  ó*   — t        «       j                  S )z?Returns the name of the module that's calling into this module.)r3   r   r   r   r   Úget_calling_moduler5   €   s   € ä	+Ó	-×	9Ñ	9Ð9r   Údocr'   Úvaluec                 óê   — t        |«      }t        |t        «      r|j                  «       }t        j                  d|«      }| j                  |«      }|j                  | j                  |«      «       |S )aˆ  Returns an XML DOM element with name and text value.

  Args:
    doc: minidom.Document, the DOM document it should create nodes from.
    name: str, the tag of XML element.
    value: object, whose string representation will be used as the value of the
      XML element. Illegal or highly discouraged xml 1.0 characters are
      stripped.

  Returns:
    An instance of minidom.Element.
  Ú )	r   Ú
isinstanceÚboolÚlowerÚ_ILLEGAL_XML_CHARS_REGEXÚsubÚcreateElementÚappendChildÚcreateTextNode)r6   r'   r7   ÚsÚes        r   Úcreate_xml_dom_elementrD   …   s`   € ô  
ˆ%ƒj€!Ü�”tÔà	�‰‹	€Aä×"Ñ" 2 qÓ)€!à	×Ñ˜Ó€!Ø‡-�-�×"Ñ" 1Ó%Ô&Ø	
€(r   c                  óR   — t        j                  t        df¬«      } | j                  S )zAReturns the integer width of help lines that is used in TextWrap.r*   )Úfallback)ÚshutilÚget_terminal_sizer	   Úcolumns)Úsizes    r   Úget_help_widthrK   ¡   s"   € ä	×	!Ñ	!Ô,?ÀÐ+CÔ	D€$Ø	�‰Ðr   ÚattemptÚlongopt_listc                 óv  — t        | «      dk  s|sg S |D �cg c]  }|j                  d«      d   ‘Œ }}|D �cg c]  }t        | |dt        | «       «      |f‘Œ }}|j                  «        |d   \  }}|t        t        | «      z  k\  rg S g }|D ]  \  }	}
|	|k(  r|j                  |
«       Œ |S  |S c c}w c c}w )z4Returns helpful similar matches for an invalid flag.é   Ú=r   )ÚlenÚsplitÚ_damerau_levenshteinÚsortr   Úappend)rL   rM   ÚvÚoption_namesÚoptionÚ	distancesÚleast_errorsÚ_ÚsuggestionsÚerrorsr'   s              r   Úget_flag_suggestionsr^   §   sä   € ô
 	ˆƒ\�QÒ™lØ€Iá+7Ó8©< a�!—'‘'˜#“,˜q“/¨<€,Ð8ñ !óá ˆ&ô ˜G V¨A´°G³Ð%=Ó>ÀÒGØ ð ð ð
 ‡.�.Ôà˜a‘L�/€,�àÔ5¼¸G»ÑDÒDØ€Ià€+Û�l€fˆdØ�ÒØ×Ñ˜ÕàØ	Ðð  ð
 
Ðùò- 9ùòs
   —B1¸!B6c                 ó(   ‡‡— i Šˆˆfd„Š ‰| |«      S )z6Returns Damerau-Levenshtein edit distance from a to b.c           
      ó~  •— | |f‰v r‰| |f   S | st        |«      }n™|st        | «      }n‹t         ‰| dd |«      dz    ‰| |dd «      dz    ‰| dd |dd «      | d   |d   k7  z   «      }t        | «      dk\  r=t        |«      dk\  r/| d   |d   k(  r$| d   |d   k(  r ‰| dd |dd «      dz   }||kD  r|}|‰| |f<   |S )z5Recursively defined string distance with memoization.r*   Nr   rO   )rQ   Úmin)ÚxÚyÚdÚtÚdistanceÚmemos       €€r   rf   z&_damerau_levenshtein.<locals>.distanceÌ   sý   ø€ à	ˆ1€v��~Ø�!�Q�$‰ZÐÙÜ
ˆa‹&�aÙÜ
ˆa‹&�aä
Ù
�1�Q�R�5˜!Ó
˜qÑ
 Ù
�1�a˜˜�eÓ
˜qÑ
 Ù
�1�Q�R�5˜!˜A˜B˜%Ó
  A a¡D¨A¨a©D¡LÑ
1ó€aô
 
ˆQ‹�1Šœ˜Q› 1š¨¨1©°°1±ª¸!¸A¹$À!ÀAÁ$º,á�Q�q�r�U˜A˜a˜b˜EÓ" QÑ&ˆØˆqŠ5Øˆ!à€DˆˆAˆ�JØ€Hr   r   )ÚaÚbrf   rg   s     @@r   rS   rS   È   s   ù€ à	€$õñ. 
�!�Q‹Ðr   ÚtextÚlengthÚindentÚfirstline_indentc                 óÚ  — |€
t        «       }|€d}|€|}t        |«      |k\  rt        d«      ‚t        |«      |k\  rt        d«      ‚| j                  d«      } g }t	        j
                  |||¬«      }t	        j
                  |||¬«      }d„ | j                  «       D «       D ]8  }|r!|j                  |j                  |«      «       n|j                  d«       |}Œ: dj                  |«      S )a:  Wraps a given text to a maximum line length and returns it.

  It turns lines that only contain whitespace into empty lines, keeps new lines,
  and expands tabs using 4 spaces.

  Args:
    text: Text to wrap.
    length: Maximum length of a line, includes indentation. If this is `None`
      then use `get_help_width()`.
    indent: Indent for all but first line.
    firstline_indent: Indent for first line. If `None`, fall back to `indent`.

  Returns:
    The wrapped text.

  Raises:
    ValueError: Raised if indent or firstline_indent not shorter than length.
  r9   zLength of indent exceeds lengthz*Length of first line indent exceeds lengthé   )ÚwidthÚinitial_indentÚsubsequent_indentc              3   ó<   K  — | ]  }|j                  «       –— Œ y ­w©N)Ústrip)Ú.0Úps     r   Ú	<genexpr>ztext_wrap.<locals>.<genexpr>  s   è ø€ Ð9Ñ'8 !�A—G‘G—IÑ'8ùs   ‚Ú
)rK   rQ   Ú
ValueErrorÚ
expandtabsÚtextwrapÚTextWrapperÚ
splitlinesÚextendÚwraprU   Újoin)rj   rk   rl   rm   ÚresultÚwrapperÚsubsequent_wrapperÚ	paragraphs           r   Ú	text_wrapr†   æ   sò   € ð2 €^ÜÓ€FØ€^Ø€FØÐØÐäˆƒ[�FÒÜ
Ð6Ó
7Ð7ÜÐ	Ó˜fÒ$Ü
ÐAÓ
BÐBà	�‰˜Ó	€$à€&ô × Ñ ØÐ#3Àvô€'ô  ×+Ñ+Ø 6¸VôÐñ : t§¡Ô'8Ö9€iÙØ‡m�m�G—L‘L Ó+Õ,à‡m�m�BÔà �Gð :ð 
�‰�6Ó	Ðr   Úflag_mapÚmulti_flagsc              #   óz  K  — | j                  «       D ]‹  \  }}|€d|› �–— Œt        |t        «      r|rd|› �–— Œ*d|› �–— Œ2t        |t        t        f«      rd|› d|› �–— ŒS	 |r||v r|D ]  }d|› d|› �–— Œ n d|› ddj                  d„ |D «       «      › �–— Œ� y# t        $ r d|› d|› �–— Y Œ¤w xY w­w)a2  Convert a dict of values into process call parameters.

  This method is used to convert a dictionary into a sequence of parameters
  for a binary that parses arguments using this module.

  Args:
    flag_map: dict, a mapping where the keys are flag names (strings).
        values are treated according to their type:

        * If value is ``None``, then only the name is emitted.
        * If value is ``True``, then only the name is emitted.
        * If value is ``False``, then only the name prepended with 'no' is
          emitted.
        * If value is a string then ``--name=value`` is emitted.
        * If value is a collection, this will emit
          ``--name=value1,value2,value3``, unless the flag name is in
          ``multi_flags``, in which case this will emit
          ``--name=value1 --name=value2 --name=value3``.
        * Everything else is converted to string an passed as such.

    multi_flags: set, names (strings) of flags that should be treated as
      multi-flags.

  Yields:
    sequence of string suitable for a subprocess execution.
  Nz--z--norP   Ú,c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wrt   )r   )rv   Úitems     r   rx   z$flag_dict_to_args.<locals>.<genexpr>W  s   è ø€ Ð#@¹%°$¤C¨§I¹%ùs   ‚)Úitemsr:   r;   Úbytesr   r�   Ú	TypeError)r‡   rˆ   Úkeyr7   rŒ   s        r   Úflag_dict_to_argsr‘   &  sé   è ø€ ð> —N‘NÖ$�j€cˆ5Ø€}Ø��ˆJÓÜ	�Eœ4Ô	 Ù	Ø�3�%ˆjÓà�S�EˆlÓÜ	�EœE¤3˜<Ô	(à���Q�u�gÐÓð!Ù˜3 +Ñ-ÛˆdØ�s�e˜1˜T˜FÐ#Ó#ñ ð �S�E˜˜3Ÿ8™8Ñ#@¹%Ó#@Ó@ÐAÐBÒ
Bøñ% %øô& ò !à�3�%�q˜˜Ð Ô ð!üs*   ‚A$B;Á'8B"ÂB;Â"B8Â5B;Â7B8Â8B;Ú	docstringc                 óò  — | syd}| j                  «       j                  «       }|}|dd D ]6  }|j                  «       }|sŒt        |t	        |«      t	        |«      z
  «      }Œ8 |d   j                  «       g}||k  r,|dd D ]$  }|j                  ||d j                  «       «       Œ& |r|d   s|j                  «        |r|d   sŒ|r|d   s|j                  d«       |r|d   sŒdj                  |«      S )a  Removes indentation from triple-quoted strings.

  This is the function specified in PEP 257 to handle docstrings:
  https://www.python.org/dev/peps/pep-0257/.

  Args:
    docstring: str, a python docstring.

  Returns:
    str, docstring with indentation removed.
  r9   i    r*   Nr   éÿÿÿÿry   )
r{   r~   Úlstripra   rQ   ru   rU   ÚrstripÚpopr�   )r’   Ú
max_indentÚlinesrl   ÚlineÚstrippedÚtrimmeds          r   Útrim_docstringr�   ]  sÿ   € ñ 
Øð €*ð ×
Ñ
Ó
 ×
+Ñ
+Ó
-€%ð €&Ø�A�B‹i€dØ�{‰{‹}€HÚÜ�6œ3˜t›9¤s¨8£}Ñ4Ó5�fð ð
 �1‰X�^‰^ÓÐ€'ØˆjÒØ�a�b“	ˆØ‡n�n�T˜&˜'�]×)Ñ)Ó+Õ,ð ñ 	˜ šØ‡K�K„Mñ 	˜ ›á˜ š
Ø‡K�K�„Nñ 	˜ ›
ð 
�‰�7Ó	Ðr   c                 óö   — | j                  «       } t        j                  dt        j                  «      }|j	                  d| «      } t        | «      } t        j                  dd| t        j                  ¬«      } | S )z0Takes a __doc__ string and reformats it as help.z^[ 	]+$r9   z(?<=\S)\n(?=\S)Ú )Úflags)ru   ÚreÚcompileÚMr>   r�   )r6   Úwhitespace_only_lines     r   Údoc_to_helpr¥   ‡  sd   € ð 	�	‰	‹€#ô Ÿ™ J´·±Ó5ÐØ× Ñ   SÓ)€#ô 	�sÓ€#ô 	�‰Ð! 3¨´2·4±4Ô8€#à	€*r   )Nr9   Nrt   )/r   Úcollections.abcr   r   r¡   rG   r#   r|   r   Útypingr   r   Úxml.domr   r	   Úintr   r   r   Úfloatr¢   r=   r/   r$   r   r   Úsetr   r   r   r   Údictr   r(   r3   r5   ÚDocumentÚElementrD   rK   Úlistr^   rS   r†   r‘   r�   r¥   r   r   r   Ú<module>r°      sø  ðò Aç .Û 	Û Û 
Û Û ß "Ý ð Ð �SÓ ð €�Ó ð +/Ð   %Ó .ð
 &˜2Ÿ:™:ØMóÐ ñ "$ C§K¡K°Ñ$9Ó!:Ð ;Ð �S˜‘XÓ ;ð €ˆsÓ ð )-€ˆe×Ñ Ñ%Ó ,ô	˜:ô 	ðØ�s˜C�x‘.ðà˜DÑ óð0.Ð,@ó .ð,:˜Có :ð
Ø	×	Ñ	ðØ!$ðØ-0ðà‡_�_óð8˜ó ðØðØ (¨¡ðà	ˆ#�YóòBð@ ØØ#'ñ	=Ø
ð=à�$‰Jð=ð ð=ð ˜D‘jð	=ð
 	ó=ðB >Bñ4!Ø�3˜�8‰nð4!Ø+.¨s©8°d©?ð4!àˆc�]ó4!ðn'˜cð ' có 'ðT�Sð ˜Sô r   