Ë
    nûàgçE  ã            	      óè  — d Z ddlmZ ddlZddlZddlZddlZddlmZ ddl	m
Z
 ddlmZmZ dZ ej                  d	e› d
�«      Z ej                  de› de› d�«      Zej'                  dd«      Z G d„ d«      Zdd„Zej.                  D � ci c]  }  e| «      d“Œ c} Zd„ Zd„ Z G d„ d«      Zedk(  r:dZdD ]2  Z e de› �«        e djC                   eee«      «      «        e «        Œ4 yyc c} w )a6  distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
é    )ÚannotationsN)ÚSequence)ÚAnyé   )ÚDistutilsArgErrorÚDistutilsGetoptErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)ú^ú$z^(z)=!(z)$ú-Ú_c                  óp   — e Zd ZdZdd„Zd„ Zd„ Zdd„Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zddd„Zd„ Zdd„Zdd„Zy)ÚFancyGetoptaÕ  Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    Nc                óÈ   — || _         i | _        | j                   r| j                  «        i | _        i | _        g | _        g | _        i | _        i | _        i | _	        g | _
        y ©N)Úoption_tableÚoption_indexÚ_build_indexÚaliasÚnegative_aliasÚ
short_optsÚ	long_optsÚ
short2longÚ	attr_nameÚ	takes_argÚoption_order©Úselfr   s     ú`/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/setuptools/_distutils/fancy_getopt.pyÚ__init__zFancyGetopt.__init__1   sm   € ð )ˆÔð ˆÔØ×ÒØ×ÑÔð ˆŒ
ð !ˆÔð ˆŒØˆŒØˆŒØˆŒØˆŒð
 ˆÕó    c                ó~   — | j                   j                  «        | j                  D ]  }|| j                   |d   <   Œ y )Nr   )r   Úclearr   )r   Úoptions     r   r   zFancyGetopt._build_indexY   s=   € Ø×Ñ×ÑÔ!Ø×'Ñ'ò 	2ˆFØ+1ˆD×Ñ˜f Q™iÒ(ñ	2r    c                ó2   — || _         | j                  «        y r   )r   r   r   s     r   Úset_option_tablezFancyGetopt.set_option_table^   s   € Ø(ˆÔØ×ÑÕr    c                óœ   — || j                   v rt        d|› d�«      ‚|||f}| j                  j                  |«       || j                   |<   y )Nz$option conflict: already an option 'ú')r   r   r   Úappend)r   Úlong_optionÚshort_optionÚhelp_stringr#   s        r   Ú
add_optionzFancyGetopt.add_optionb   s[   € Ø˜$×+Ñ+Ñ+Ü&Ø6°{°mÀ1ÐEóð ð " <°Ð=ˆFØ×Ñ×$Ñ$ VÔ,Ø-3ˆD×Ñ˜kÒ*r    c                ó   — || j                   v S )zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r   ©r   r)   s     r   Ú
has_optionzFancyGetopt.has_optionl   s   € ð ˜d×/Ñ/Ð/Ð/r    c                ó,   — |j                  t        «      S )z’Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.©Ú	translateÚlongopt_xlater.   s     r   Úget_attr_namezFancyGetopt.get_attr_nameq   s   € ð ×$Ñ$¤]Ó3Ð3r    c           
     óä   — t        |t        «      sJ ‚|j                  «       D ]K  \  }}|| j                  vrt	        d|› d|› d|› d�«      ‚|| j                  vsŒ8t	        d|› d|› d|› d�«      ‚ y )Nzinvalid z 'z': option 'z' not definedú': aliased option ')Ú
isinstanceÚdictÚitemsr   r   )r   ÚaliasesÚwhatr   Úopts        r   Ú_check_alias_dictzFancyGetopt._check_alias_dictw   s”   € Ü˜'¤4Ô(Ð(Ð(Ø!Ÿ-™-›/ò 	‰JˆE�3Ø˜D×-Ñ-Ñ-Ü*Ø˜t˜f B u g¨[¸¸¸}ÐMóð ð ˜$×+Ñ+Ò+Ü*Ø˜t˜f B u gÐ-@ÀÀÀ]ÐSóð ñ	r    c                ó6   — | j                  |d«       || _        y)z'Set the aliases for this option parser.r   N)r=   r   )r   r   s     r   Úset_aliaseszFancyGetopt.set_aliasesƒ   s   € à×Ñ˜u gÔ.Øˆ�
r    c                ó6   — | j                  |d«       || _        y)zÚSet the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r=   r   )r   r   s     r   Úset_negative_aliasesz FancyGetopt.set_negative_aliasesˆ   s   € ð
 	×Ñ˜~Ð/?Ô@Ø,ˆÕr    c                óŒ  — g | _         g | _        | j                  j                  «        i | _        | j
                  D �]  }t        |«      dk(  r	|\  }}}d}n$t        |«      dk(  r|\  }}}}nt        d|›�«      ‚t        |t        «      rt        |«      dk  rt        d|› d�«      ‚|�-t        |t        «      rt        |«      d	k(  st        d
|› d�«      ‚|| j                  |<   | j                   j                  |«       |d   dk(  r|r|dz   }|dd }d| j                  |<   n\| j                  j                  |«      }|�0| j                  |   rt        d|› d|› d�«      ‚|| j                   d<   d| j                  |<   | j                  j                  |«      }|�1| j                  |   | j                  |   k7  rt        d|› d|› d�«      ‚t         j#                  |«      st        d|› d�«      ‚| j%                  |«      | j&                  |<   |s�ŒÙ| j                  j                  |«       || j                  |d   <   �Œ y)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        é   r   é   zinvalid option tuple: é   zinvalid long option 'z"': must be a string of length >= 2Nr   zinvalid short option 'z"': must a single character or Noneéÿÿÿÿú=ú:Tzinvalid negative alias 'r6   z' takes a valueFzinvalid alias 'z%': inconsistent with aliased option 'z/' (one of them takes a value, the other doesn'tzinvalid long option name 'z)' (must be letters, numbers, hyphens only)r   r   r   r"   Úrepeatr   ÚlenÚ
ValueErrorr7   Ústrr   r(   r   r   Úgetr   Ú
longopt_reÚmatchr4   r   )r   r#   ÚlongÚshortÚhelprI   Úalias_tos          r   Ú_grok_option_tablezFancyGetopt._grok_option_table�   s~  € ð
 ˆŒØˆŒØ�‰×ÑÔØˆŒà×'Ñ'ó D	1ˆFÜ�6‹{˜aÒØ$*Ñ!��e˜TØ‘Ü�V“ Ò!Ø,2Ñ)��e˜T¡6ô !Ð#9¸&¸Ð!DÓEÐEô ˜d¤CÔ(¬C°«I¸ªMÜ*Ø+¨D¨6Ð1SÐTóð ð �]¬
°5¼#Ô(>Ä3ÀuÃ:ÐQRÂ?Ü*Ø,¨U¨GÐ3UÐVóð ð !'ˆD�K‰K˜ÑØ�N‰N×!Ñ! $Ô'à�B‰x˜3ŠÙØ! C™K�EØ˜A˜b�z�Ø'+�—‘˜tÒ$ð  ×.Ñ.×2Ñ2°4Ó8�ØÐ'Ø—~‘~ hÒ/Ü2Ø6°t°fð =/Ø/7¨j¸ðIóð ð
 *.�D—N‘N 2Ñ&Ø',�—‘˜tÑ$ð —z‘z—~‘~ dÓ+ˆHØÐ#Ø—>‘> $Ñ'¨4¯>©>¸(Ñ+CÒCÜ.Ø)¨$¨ð 0+Ø+3¨*ð 5,ð,óð ô ×#Ñ# DÔ)Ü*Ø0°°ð 7>ð >óð ð
 $(×#5Ñ#5°dÓ#;ˆD�N‰N˜4Ñ ÛØ—‘×&Ñ& uÔ-Ø,0�—‘  a¡Ó)ñID	1r    c                óv  — |€t         j                  dd }|€t        «       }d}nd}| j                  «        dj	                  | j
                  «      }	 t        j                  ||| j                  «      \  }}|D �]  \  }}t        |«      dk(  r|d   dk(  r| j                  |d      }nt        |«      dkD  r|dd d	k(  sJ ‚|dd }| j                  j                  |«      }	|	r|	}| j                  |   s0|d
k(  sJ d«       ‚| j                  j                  |«      }	|	r|	}d}nd}| j                   |   }
|r+| j"                  j                  |
«      �t%        ||
d«      dz   }t'        ||
|«       | j(                  j+                  ||f«       �Œ |r||fS |S # t        j                  $ r}t        |«      ‚d}~ww xY w)a  Parse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr   TFú rE   r   r   z--Ú zboolean option can't have value)ÚsysÚargvÚOptionDummyrT   Újoinr   Úgetoptr   Úerrorr   rJ   r   r   rM   r   r   r   rI   ÚgetattrÚsetattrr   r(   )r   ÚargsÚobjectÚcreated_objectr   ÚoptsÚmsgr<   Úvalr   Úattrs              r   r\   zFancyGetopt.getoptà   sÁ  € ð ˆ<Ü—8‘8˜A˜B�<ˆDØˆ>Ü “]ˆFØ!‰Nà"ˆNà×ÑÔ!à—X‘X˜dŸo™oÓ.ˆ
ð	)ÜŸ™ t¨Z¸¿¹ÓH‰JˆD�$ð ó 	1‰HˆC�Ü�3‹x˜1Š}  Q¡¨3¢Ø—o‘o c¨!¡fÑ-‘ä˜3“x !’|¨¨B¨Q¨°4ªÐ7Ð7Ø˜!˜"�g�à—J‘J—N‘N 3Ó'ˆEÙØ�à—>‘> #Ò&Ø˜b’yÐCÐ"CÓC�yØ×+Ñ+×/Ñ/°Ó4�ÙØ�CØ‘Cà�Cà—>‘> #Ñ&ˆDñ �t—{‘{—‘ tÓ,Ð8Ü˜f d¨AÓ.°Ñ2�Ü�F˜D #Ô&Ø×Ñ×$Ñ$ c¨3 ZÖ0ð5	1ñ: Ø˜�<ÐàˆKøôG �|‰|ò 	)Ü# CÓ(Ð(ûð	)ús   Á$F ÆF8Æ(F3Æ3F8c                óH   — | j                   €t        d«      ‚| j                   S )z«Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        z!'getopt()' hasn't been called yet)r   ÚRuntimeError)r   s    r   Úget_option_orderzFancyGetopt.get_option_order  s(   € ð
 ×ÑÐ$ÜÐBÓCÐCà×$Ñ$Ð$r    c                ór  — d}| j                   D ]3  }|d   }|d   }t        |«      }|d   dk(  r|dz
  }|�|dz   }||kD  sŒ2|}Œ5 |dz   dz   dz   }d}||z
  }	d	|z  }
|r|g}nd
g}| j                   D ]Ã  }|dd \  }}}t        ||	«      }|d   dk(  r|dd }|€<|r |j                  d|d|› d�›d|d   › �«       n]|j                  d|d|› d�›�«       nC|› d|› d�}|r |j                  d|d|› d�›d|d   › �«       n|j                  d|d|› d�›�«       |dd D ]  }|j                  |
|z   «       Œ ŒÅ |S )zŒGenerate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        r   r   rF   rG   Né   rE   éN   rV   zOption summary:rC   z  --ú<rW   z  z (-ú))r   rJ   Ú	wrap_textr(   )r   ÚheaderÚmax_optr#   rP   rQ   ÚellÚ	opt_widthÚ
line_widthÚ
text_widthÚ
big_indentÚlinesrR   ÚtextÚ	opt_namess                  r   Úgenerate_helpzFancyGetopt.generate_help'  sË  € ð ˆØ×'Ñ'ò 		ˆFØ˜!‘9ˆDØ˜1‘IˆEÜ�d“)ˆCØ�B‰x˜3ŠØ˜A‘g�ØÐ Ø˜A‘g�Ø�W‹}Ø‘ð		ð ˜a‘K !‘O aÑ'ˆ	ð0 ˆ
Ø )Ñ+ˆ
Ø˜9‘_ˆ
ÙØ�H‰Eà&Ð'ˆEà×'Ñ'ò 	/ˆFØ & r¨ 
ÑˆD�%˜Ü˜T :Ó.ˆDØ�B‰x˜3ŠØ˜A˜b�z�ð ˆ}ÙØ—L‘L 4¨¨Q¨w¨i°p¨KÐ'8¸¸4À¹7¸)Ð!DÕEà—L‘L 4¨¨Q¨w¨i°p¨KÐ'8Ð!9Õ:ð
  $˜f C¨ w¨aÐ0�	ÙØ—L‘L 4¨	°!°G°9¸@°Ð'=¸RÀÀQÁ¸yÐ!IÕJà—L‘L 4¨	°!°G°9¸@°Ð'=Ð!>Ô?à˜A˜B�xò /�Ø—‘˜Z¨#Ñ-Õ.ñ/ð-	/ð0 ˆr    c                ó|   — |€t         j                  }| j                  |«      D ]  }|j                  |dz   «       Œ y )Nú
)rX   Ústdoutrz   Úwrite)r   rp   ÚfileÚlines       r   Ú
print_helpzFancyGetopt.print_helpu  s:   € Øˆ<Ü—:‘:ˆDØ×&Ñ& vÓ.ò 	$ˆDØ�J‰J�t˜d‘{Õ#ñ	$r    r   )NN©r`   zSequence[str] | None)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r%   r,   r/   r4   r=   r?   rA   rT   r\   ri   rz   r�   © r    r   r   r   %   sS   „ ñ	ó&òP2ò
ó4ò0ò
4ò
òò
-òN1ô`;òz%óLô\$r    r   c                ó^   — t        | «      }|j                  |«       |j                  ||«      S r   )r   rA   r\   )ÚoptionsÚnegative_optra   r`   Úparsers        r   Úfancy_getoptrŒ   |  s+   € Ü˜Ó!€FØ
×Ñ Ô-Ø�=‰=˜˜vÓ&Ð&r    rV   c                ó*  — | €g S t        | «      |k  r| gS | j                  «       } | j                  t        «      } t	        j
                  d| «      }|D �cg c]  }|sŒ|‘Œ	 }}g }|r§g }d}|rGt        |d   «      }||z   |k  r|j                  |d   «       |d= ||z   }n|r|d   d   dk(  r|d= n|rŒG|r5|dk(  r"|j                  |d   d| «       |d   |d |d<   |d   d   dk(  r|d= |j                  dj                  |«      «       |rŒ§|S c c}w )z¶wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)r   rF   rV   rW   )rJ   Ú
expandtabsr2   ÚWS_TRANSÚreÚsplitr(   r[   )rx   ÚwidthÚchunksÚchrw   Úcur_lineÚcur_lenrr   s           r   ro   ro   …  sN  € ð €|Øˆ	Ü
ˆ4ƒy�EÒØˆvˆà�?‰?Ó€DØ�>‰>œ(Ó#€DÜ�X‰X�j $Ó'€FØ!Ö(�R¢RŠbÐ(€FÐ(Ø€Eá
ØˆØˆáÜ�f˜Q‘i“.ˆCØ˜‰} Ò%Ø—‘  q¡	Ô*Ø˜1�IØ! C™-‘ñ  ¨¡¨Q¡°3Ò 6Ø  ˜Øò ñ ð ˜!Š|Ø—‘  q¡	¨!¨EÐ 2Ô3Ø" 1™I e fÐ-��q‘	ð
 �a‰y˜‰|˜sÒ"Ø˜1�Ið 	�‰�R—W‘W˜XÓ&Ô'òA ðD €LùòK )s   ÁDÁDc                ó,   — | j                  t        «      S )zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    r1   )r<   s    r   Útranslate_longoptr˜   »  s   € ð �=‰=œÓ'Ð'r    c                  ó   — e Zd ZdZg fdd„Zy)rZ   z_Dummy class just used as a place to hold command-line option
    values as instance attributes.c                ó,   — |D ]  }t        | |d«       Œ y)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)r_   )r   r‰   r<   s      r   r   zOptionDummy.__init__Æ  s   € ð ò 	%ˆCÜ�D˜#˜tÕ$ñ	%r    N)r‰   zSequence[Any])rƒ   r„   r…   r†   r   r‡   r    r   rZ   rZ   Â  s   „ ñ&ð 13õ %r    rZ   Ú__main__z¢Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))é
   é   é   é(   zwidth: r|   r‚   )"r†   Ú
__future__r   r\   r�   ÚstringrX   Úcollections.abcr   Útypingr   Úerrorsr   r   Úlongopt_patÚcompilerN   Úneg_alias_rerL   Ú	maketransr3   r   rŒ   Ú
whitespaceÚordr�   ro   r˜   rZ   rƒ   rx   ÚwÚprintr[   )Ú_wschars   0r   ú<module>r®      s  ðñõ #ã Û 	Û Û 
Ý $Ý ç ;ð +€ØˆR�Z‰Z˜1˜[˜M¨Ð+Ó,€
ð ˆr�z‰z˜B˜{˜m¨4°¨}¸BÐ?Ó@€ð —‘˜c 3Ó'€÷T$ñ T$ón
'ð .4×->Ñ->Ö? '‰C�‹L˜#ÑÒ?€ò3òl(÷%ñ %ð ˆzÒð €Dð ò ˆÙ�˜�sˆmÔÙˆd�i‰i™	 $¨Ó*Ó+Ô,Ù�ñð ùòW @s   ÂC/