ó
    ¶'Ôi]Ÿ  ã                  óh  • S r SSKJr  SSKrSSKrSSKrSSKJrJrJ	r	J
r
JrJr  SSKJr  SSKJrJr  \\\4   r\" S\S	9r\\\/\4   rSS
 jrSS jrSS jr " S S\5      r " S S\R8                  S9r " S S\5      r\R>                  " S5      r SS jr!SS jr"SS jr#S S jr$ " S S\5      r%g)!zŠ
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
é    )ÚannotationsN)ÚCallableÚFinalÚIterableÚIteratorÚTypeVarÚUnioné   )Úcanonicalize_version)ÚInvalidVersionÚVersionÚUnparsedVersionVar)Úboundc                ól   • [        U [        5      (       d   [        U 5      n U $ U $ ! [         a     g f = f©N)Ú
isinstancer   r   ©Úversions    ÚS/var/www/surfInsights/venv3-11/lib/python3.13/site-packages/packaging/specifiers.pyÚ_coerce_versionr      s=   € Ü�gœw×'Ñ'ð	Ü˜gÓ&ˆGð €Nˆ7€Nøô ó 	Ùð	ús   —& ¦
3²3c                ó    • U R                  S S9$ )N)Úlocal©Ú__replace__r   s    r   Ú_public_versionr   #   s   € Ø×Ñ TÐÐ*Ð*ó    c                ó&   • U R                  S S S S S9$ )N)ÚpreÚpostÚdevr   r   r   s    r   Ú_base_versionr!   '   s   € Ø×Ñ 4¨d¸ÀDÐÐIÐIr   c                  ó   • \ rS rSrSrSrg)ÚInvalidSpecifieré+   zç
Raised when attempting to create a :class:`Specifier` with a specifier
string that is invalid.

>>> Specifier("lolwat")
Traceback (most recent call last):
    ...
packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r%   r   r   r#   r#   +   s   † ôr   r#   c                  óf  • \ rS rSrSrSr\SS j5       r\R                  SS j5       r
\R                  SS j5       r\R                  SS j5       r\\R                  SS j5       5       r\R                  SS	 j5       r\R                  SSS jj5       r\R                   S     SS jj5       rSrg
)ÚBaseSpecifieré7   r%   )Ú_strc                ó   • [        U 5      $ )z Internal property for match_args©Ústr©Úselfs    r   r/   ÚBaseSpecifier._str;   s   € ô �4‹yÐr   c                ó   • g)zv
Returns the str representation of this Specifier-like object. This
should be representative of the Specifier itself.
Nr%   r3   s    r   Ú__str__ÚBaseSpecifier.__str__@   ó   � r   c                ó   • g)z6
Returns a hash value for this Specifier-like object.
Nr%   r3   s    r   Ú__hash__ÚBaseSpecifier.__hash__G   r9   r   c                ó   • g)z‹
Returns a boolean representing whether or not the two Specifier-like
objects are equal.

:param other: The other object to check against.
Nr%   ©r4   Úothers     r   Ú__eq__ÚBaseSpecifier.__eq__M   r9   r   c                ó   • g)zÖWhether or not pre-releases as a whole are allowed.

This can be set to either ``True`` or ``False`` to explicitly enable or disable
prereleases or it can be set to ``None`` (the default) to use default semantics.
Nr%   r3   s    r   ÚprereleasesÚBaseSpecifier.prereleasesV   r9   r   c                ó   • g)zASetter for :attr:`prereleases`.

:param value: The value to set.
Nr%   ©r4   Úvalues     r   rC   rD   _   r9   r   Nc                ó   • g)zB
Determines if the given item is contained within this specifier.
Nr%   ©r4   ÚitemrC   s      r   ÚcontainsÚBaseSpecifier.containsf   r9   r   c                ó   • g)z}
Takes an iterable of items and filters them so that only items which
are contained within this specifier are allowed in it.
Nr%   )r4   ÚiterablerC   s      r   ÚfilterÚBaseSpecifier.filterl   r9   r   ©Úreturnr2   ©rR   Úint©r?   ÚobjectrR   Úbool©rR   úbool | None)rG   rW   rR   ÚNoner   )rJ   r2   rC   rY   rR   rW   ©rN   zIterable[UnparsedVersionVar]rC   rY   rR   zIterator[UnparsedVersionVar])r&   r'   r(   r)   Ú	__slots__Ú__match_args__Úpropertyr/   ÚabcÚabstractmethodr7   r;   r@   rC   ÚsetterrK   rO   r+   r%   r   r   r-   r-   7   s÷   † Ø€IØ€Nàóó ðð 	×Ñóó ðð 	×Ñóó ðð
 	×Ñóó ðð Ø×Ñóó ó ðð ×Ñóó ðð 	×Ñõó ðð
 	×ÑàQUðØ4ðØCNðà	%ôó ór   r-   )Ú	metaclassc            	      óú  • \ rS rSr% SrSrSrSr\R                  " S\-   \-   S-   \R                  \R                  -  5      rSSS	S
SSSSS.rS\S'   S+S,S jjrS-S jrS.S jr\S/S j5       r\R(                  S0S j5       r\S1S j5       r\S1S j5       rS1S jrS1S jr\S2S j5       rS3S jrS4S jrS5S jrS6S  jrS6S! jrS6S" jrS6S# jr S6S$ jr!S7S% jr"S7S& jr#S8S' jr$S9S( jr%S:S;S) jjr& S:     S<S* jjr'Sr(g)=Ú	Specifierév   a+  This class abstracts handling of version specifiers.

.. tip::

    It is generally not required to instantiate this manually. You should instead
    prefer to work with :class:`SpecifierSet` instead, which can parse
    comma-separated version specifiers (which is what package metadata contains).
)Ú_prereleasesÚ_specÚ_spec_versionz8
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        aÈ  
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z\s*Ú
compatibleÚequalÚ	not_equalÚless_than_equalÚgreater_than_equalÚ	less_thanÚgreater_thanÚ	arbitrary)ú~=ú==ú!=z<=ú>=Ú<Ú>ú===r   Ú
_operatorsNc                ó  • U R                   R                  U5      nU(       d  [        SU< 35      eUR                  S5      R	                  5       UR                  S5      R	                  5       4U l        X l        SU l        g)a   Initialize a Specifier instance.

:param spec:
    The string representation of a specifier which will be parsed and
    normalized before use.
:param prereleases:
    This tells the specifier if it should accept prerelease versions if
    applicable or not. The default of ``None`` will autodetect it from the
    given specifiers.
:raises InvalidSpecifier:
    If the given specifier is invalid (i.e. bad syntax).
zInvalid specifier: Úoperatorr   N)Ú_regexÚ	fullmatchr#   ÚgroupÚstriprg   rf   rh   )r4   ÚspecrC   Úmatchs       r   Ú__init__ÚSpecifier.__init__ó   su   € ð —‘×%Ñ% dÓ+ˆÞÜ"Ð%8¸¹Ð#AÓBÐBð �K‰K˜
Ó#×)Ñ)Ó+Ø�K‰K˜	Ó"×(Ñ(Ó*ð'
ˆŒ
ð (Ôð :>ˆÕr   c                ó’   • U R                   b"  U R                   S   U:X  a  U R                   S   $ [        U5      nUc  gX4U l         U$ )zDOne element cache, as only one spec Version is needed per Specifier.Nr   r
   )rh   r   )r4   r   Úversion_specifiers      r   Ú_get_spec_versionÚSpecifier._get_spec_version  sV   € à×ÑÑ)¨d×.@Ñ.@ÀÑ.CÀwÓ.NØ×%Ñ% aÑ(Ð(ä+¨GÓ4ÐØÑ$Øà%Ð9ˆÔØ Ð r   c                ó2   • U R                  U5      nUc   eU$ )z½Get spec version, asserting it's valid (not for === operator).

This method should only be called for operators where version
strings are guaranteed to be valid PEP 440 versions (not ===).
)r…   )r4   r   Úspec_versions      r   Ú_require_spec_versionÚSpecifier._require_spec_version  s&   € ð ×-Ñ-¨gÓ6ˆØÑ'Ð'Ð'ØÐr   c                óæ   • U R                   b  U R                   $ U R                  u  pUS:w  aD  US:X  a  UR                  S5      (       a  gU R                  U5      nUc  g UR                  (       a  gg)Nrs   rr   ú.*FT)rf   rg   Úendswithr…   Úis_prerelease)r4   rz   Úversion_strr   s       r   rC   ÚSpecifier.prereleases%  sz   € ð ×ÑÑ(Ø×$Ñ$Ð$ð !%§
¡
ÑˆØ�tÓð ˜4Ó K×$8Ñ$8¸×$>Ñ$>Øð ×,Ñ,¨[Ó9ˆGØ‰Øð ×$×$Øàr   c                ó   • Xl         g r   ©rf   rF   s     r   rC   r�   B  ó   € à!Õr   c                ó    • U R                   S   $ )zHThe operator of this specifier.

>>> Specifier("==1.2.3").operator
'=='
r   ©rg   r3   s    r   rz   ÚSpecifier.operatorF  ó   € ð �z‰z˜!‰}Ðr   c                ó    • U R                   S   $ )zIThe version of this specifier.

>>> Specifier("==1.2.3").version
'1.2.3'
r
   r•   r3   s    r   r   ÚSpecifier.versionO  r—   r   c                ó’   • U R                   b  SU R                  < 3OSnSU R                  R                   S[	        U 5      < U S3$ )a  A representation of the Specifier that shows all internal state.

>>> Specifier('>=1.0.0')
<Specifier('>=1.0.0')>
>>> Specifier('>=1.0.0', prereleases=False)
<Specifier('>=1.0.0', prereleases=False)>
>>> Specifier('>=1.0.0', prereleases=True)
<Specifier('>=1.0.0', prereleases=True)>
ú, prereleases=Ú ru   Ú(ú)>)rf   rC   Ú	__class__r&   r2   ©r4   r   s     r   Ú__repr__ÚSpecifier.__repr__X  sU   € ð × Ñ Ñ,ð ˜T×-Ñ-Ñ0Ñ1àð 	ð �4—>‘>×*Ñ*Ð+¨1¬S°«Y©M¸#¸¸bÐAÐAr   c                ó4   • SR                   " U R                  6 $ )z¨A string representation of the Specifier that can be round-tripped.

>>> str(Specifier('>=1.0.0'))
'>=1.0.0'
>>> str(Specifier('>=1.0.0', prereleases=False))
'>=1.0.0'
z{}{})Úformatrg   r3   s    r   r7   ÚSpecifier.__str__j  s   € ð �}Š}˜dŸj™jÐ)Ð)r   c                óœ   • U R                   u  pUS:X  d  UR                  S5      (       a  X4$ U R                  U5      n[        X1S:g  S9nX4$ )Nrw   rŒ   rq   ©Ústrip_trailing_zero)rg   r�   r‰   r   )r4   rz   r   rˆ   Úcanonical_versions        r   Ú_canonical_specÚSpecifier._canonical_spect  s]   € à ŸJ™JÑˆØ�uÓ × 0Ñ 0°× 6Ñ 6ØÐ$Ð$à×1Ñ1°'Ó:ˆä0Ø¸4Ñ/?ñ
Ðð Ð*Ð*r   c                ó,   • [        U R                  5      $ r   )Úhashrª   r3   s    r   r;   ÚSpecifier.__hash__‚  s   € Ü�D×(Ñ(Ó)Ð)r   c                ó  • [        U[        5      (       a   U R                  [        U5      5      nO [        XR                  5      (       d  [        $ U R
                  UR
                  :H  $ ! [         a	    [        s $ f = f)aÎ  Whether or not the two Specifier-like objects are equal.

:param other: The other object to check against.

The value of :attr:`prereleases` is ignored.

>>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
True
>>> (Specifier("==1.2.3", prereleases=False) ==
...  Specifier("==1.2.3", prereleases=True))
True
>>> Specifier("==1.2.3") == "==1.2.3"
True
>>> Specifier("==1.2.3") == Specifier("==1.2.4")
False
>>> Specifier("==1.2.3") == Specifier("~=1.2.3")
False
)r   r2   rŸ   r#   ÚNotImplementedrª   r>   s     r   r@   ÚSpecifier.__eq__…  sm   € ô& �eœS×!Ñ!ð&ØŸ™¤s¨5£zÓ2‘ô ˜E§>¡>×2Ñ2Ü!Ð!à×#Ñ# u×'<Ñ'<Ñ<Ð<øô $ó &Ü%Ò%ð&ús   —A+ Á+A>Á=A>c                ó>   • [        U SU R                  U    35      nU$ )NÚ	_compare_)Úgetattrrx   )r4   ÚopÚoperator_callables      r   Ú_get_operatorÚSpecifier._get_operator¢  s+   € Ü.5Ø�I˜dŸo™o¨bÑ1Ð2Ð3ó/
Ðð !Ð r   c           
     óè   • [        [        [        R                  " [        [        U5      5      5      S S 5      nUS-  nU R                  S5      " X5      =(       a    U R                  S5      " X5      $ )NéÿÿÿÿrŒ   rt   rr   )Ú_version_joinÚlistÚ	itertoolsÚ	takewhileÚ_is_not_suffixÚ_version_splitr·   )r4   Úprospectiver   Úprefixs       r   Ú_compare_compatibleÚSpecifier._compare_compatible¨  sn   € ô Ü”×$Ò$¤^´^ÀDÓ5IÓJÓKÈCÈRÐPó
ˆð
 	�$‰ˆà×!Ñ! $Ô'¨Ó:÷ 
¸t×?QÑ?QÐRVÔ?WØó@
ð 	
r   c                ó:  • UR                  S5      (       aU  [        [        U5      SS9n[        US S SS9n[        U5      n[        U5      n[	        Xe5      u  pxUS [        U5       n	X•:H  $ U R                  U5      n
U
R                  (       d  [        U5      nX:H  $ )NrŒ   Fr§   éþÿÿÿ)r�   r   r   rÀ   Ú_pad_versionÚlenr‰   r   )r4   rÁ   r   Únormalized_prospectiveÚnormalized_specÚ
split_specÚsplit_prospectiveÚpadded_prospectiveÚ_Úshortened_prospectiverˆ   s              r   Ú_compare_equalÚSpecifier._compare_equal¼  s³   € à�=‰=˜×Ñä%9Ü Ó,À%ñ&Ð"ô 3°4¸¸°9ÐRWÑXˆOô (¨Ó8ˆJô
 !/Ð/EÓ FÐô %1Ð1BÓ$OÑ!Ðð
 %7Ð7H¼¸Z»Ð$IÐ!à(Ñ6Ð6ð  ×5Ñ5°dÓ;ˆLð
  ×%×%Ü-¨kÓ:�àÑ.Ð.r   c                ó.   • U R                  X5      (       + $ r   )rÐ   ©r4   rÁ   r   s      r   Ú_compare_not_equalÚSpecifier._compare_not_equalä  s   € Ø×&Ñ& {Ó9Ô9Ð9r   c                ó<   • [        U5      U R                  U5      :*  $ r   ©r   r‰   rÓ   s      r   Ú_compare_less_than_equalÚ"Specifier._compare_less_than_equalç  ó   € ô ˜{Ó+¨t×/IÑ/IÈ$Ó/OÑOÐOr   c                ó<   • [        U5      U R                  U5      :¬  $ r   r×   rÓ   s      r   Ú_compare_greater_than_equalÚ%Specifier._compare_greater_than_equalí  rÚ   r   c                ó¨   • U R                  U5      nX:  d  gUR                  (       d*  UR                  (       a  [        U5      [        U5      :X  a  gg©NFT)r‰   rŽ   r!   ©r4   rÁ   Úspec_strr   s       r   Ú_compare_less_thanÚSpecifier._compare_less_thanó  sM   € ð ×)Ñ)¨(Ó3ˆð
 Ó!Øð ×"×"Ø×)×)Ü˜kÓ*¬m¸DÓ.AÓAàð
 r   c                óô   • U R                  U5      nX:”  d  gUR                  (       d*  UR                  (       a  [        U5      [        U5      :X  a  gUR                  b  [        U5      [        U5      :X  a  ggrß   )r‰   Úis_postreleaser!   r   rà   s       r   Ú_compare_greater_thanÚSpecifier._compare_greater_than  sw   € ð ×)Ñ)¨(Ó3ˆð
 Ó!Øð ×#×#Ø×*×*Ü˜kÓ*¬m¸DÓ.AÓAàð ×ÑÑ(¬]Øó.
ä˜4Ó ó.!ð ð
 r   c                óh   • [        U5      R                  5       [        U5      R                  5       :H  $ r   )r2   ÚlowerrÓ   s      r   Ú_compare_arbitraryÚSpecifier._compare_arbitrary0  s&   € Ü�;Ó×%Ñ%Ó'¬3¨t«9¯?©?Ó+<Ñ<Ð<r   c                ó$   • U R                  U5      $ )aÊ  Return whether or not the item is contained in this specifier.

:param item: The item to check for.

This is used for the ``in`` operator and behaves the same as
:meth:`contains` with no ``prereleases`` argument passed.

>>> "1.2.3" in Specifier(">=1.2.3")
True
>>> Version("1.2.3") in Specifier(">=1.2.3")
True
>>> "1.0.0" in Specifier(">=1.2.3")
False
>>> "1.3.0a1" in Specifier(">=1.2.3")
True
>>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
True
©rK   ©r4   rJ   s     r   Ú__contains__ÚSpecifier.__contains__3  ó   € ð& �}‰}˜TÓ"Ð"r   c           	     óH   • [        [        U R                  U/US95      5      $ )aÓ  Return whether or not the item is contained in this specifier.

:param item:
    The item to check for, which can be a version string or a
    :class:`Version` instance.
:param prereleases:
    Whether or not to match prereleases with this Specifier. If set to
    ``None`` (the default), it will follow the recommendation from
    :pep:`440` and match prereleases, as there are no other versions.

>>> Specifier(">=1.2.3").contains("1.2.3")
True
>>> Specifier(">=1.2.3").contains(Version("1.2.3"))
True
>>> Specifier(">=1.2.3").contains("1.0.0")
False
>>> Specifier(">=1.2.3").contains("1.3.0a1")
True
>>> Specifier(">=1.2.3", prereleases=False).contains("1.3.0a1")
False
>>> Specifier(">=1.2.3").contains("1.3.0a1")
True
©rC   )rW   r¼   rO   rI   s      r   rK   ÚSpecifier.containsH  s#   € ô2 ”D˜Ÿ™ d V¸˜ÐEÓFÓGÐGr   c              #  ó  #   • / nSnUb  UOU R                   nU R                  U R                  5      nU H«  n[        U5      nUc:  U R                  S:X  a(  U R	                  XpR
                  5      (       a  Uv •  MG  MI  MK  U" X€R
                  5      (       d  Md  UR                  (       a  U(       a  SnUv •  M„  Ub  M‰  U R                  SLd  Mš  UR                  U5        M­     U(       d  Uc  U R                  SLa  U Sh  v•N   gggg N7f)a†  Filter items in the given iterable, that match the specifier.

:param iterable:
    An iterable that can contain version strings and :class:`Version` instances.
    The items in the iterable will be filtered according to the specifier.
:param prereleases:
    Whether or not to allow prereleases in the returned iterator. If set to
    ``None`` (the default), it will follow the recommendation from :pep:`440`
    and match prereleases if there are no other versions.

>>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
['1.3']
>>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
['1.2.3', '1.3', <Version('1.4')>]
>>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
['1.5a1']
>>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
['1.3', '1.5a1']
>>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
['1.3', '1.5a1']
FNrw   T)	rC   r·   rz   r   rê   r   rŽ   rf   Úappend)	r4   rN   rC   Úprereleases_versionsÚfound_non_prereleasesÚinclude_prereleasesr¶   r   Úparsed_versions	            r   rO   ÚSpecifier.filterc  s  é € ð0  "ÐØ %Ðð 'Ñ2‰K¸×8HÑ8Hð 	ð
 !×.Ñ.¨t¯}©}Ó=Ðó  ˆGÜ,¨WÓ5ˆNØÑ%à—=‘= EÓ)¨d×.EÑ.EØŸ\™\÷/ñ /ð "”Mñ/Ñ)ñ # >·<±<×@Ó@à%×3×3Ö7JØ,0Ð)Ø!”Mà Ó(¨T×->Ñ->ÀeÔ-KØ(×/Ñ/°Ö8ñ  ö( &ØÑ#Ø×!Ñ!¨Ò.à+×+Ñ+ð /ð $ð &ñ ,ùs$   ‚BDÂ!DÂ>DÃ3DÄDÄ	D©rœ   N)r   r2   rC   rY   rR   rZ   )r   r2   rR   úVersion | None)r   r2   rR   r   rX   ©rG   rY   rR   rZ   rQ   )rR   ztuple[str, str]rS   rU   )rµ   r2   rR   ÚCallableOperator)rÁ   r   r   r2   rR   rW   )rÁ   r   rá   r2   rR   rW   )rÁ   zVersion | strr   r2   rR   rW   )rJ   zstr | VersionrR   rW   r   )rJ   ÚUnparsedVersionrC   rY   rR   rW   r[   ))r&   r'   r(   r)   r*   r\   Ú_operator_regex_strÚ_version_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASEr{   rx   Ú__annotations__r�   r…   r‰   r^   rC   ra   rz   r   r¡   r7   rª   r;   r@   r·   rÃ   rÐ   rÔ   rØ   rÜ   râ   ræ   rê   rï   rK   rO   r+   r%   r   r   rd   rd   v   so  ‡ ñð ;€IðÐð\Ðð| �ZŠZØÐ$Ñ$Ð'9Ñ9¸FÑBØ
�
‰
�R—]‘]Ñ"ó€Fð ØØØØ"ØØØñ	€J�ó 	ö>ô8
!ôð óó ðð8 ×Ñó"ó ð"ð óó ðð óó ðôBô$*ð ó+ó ð+ô*ô=ô:!ô
ô(&/ôP:ôPôPôô6 ôD=ô#ö*Hð8 RVð<,Ø4ð<,ØCNð<,à	%÷<,ð <,r   rd   z([0-9]+)((?:a|b|c|rc)[0-9]+)c                ó2  • / nU R                  S5      u  p#nUR                  U=(       d    S5        UR                  S5       HQ  n[        R	                  U5      nU(       a!  UR                  UR                  5       5        M@  UR                  U5        MS     U$ )a  Split version into components.

The split components are intended for version comparison. The logic does
not attempt to retain the original version string, so joining the
components back with :func:`_version_join` may not produce the original
version string.
Ú!Ú0Ú.)Ú
rpartitionrö   ÚsplitÚ_prefix_regexr|   ÚextendÚgroups)r   ÚresultÚepochrÎ   ÚrestrJ   r€   s          r   rÀ   rÀ   ¥  sw   € ð €Fà×'Ñ'¨Ó,�N€EˆdØ
‡M�M�%—,˜3Ôà—
‘
˜3–ˆÜ×'Ñ'¨Ó-ˆÞØ�M‰M˜%Ÿ,™,›.Ö)à�M‰M˜$Öñ  ð €Mr   c                ó4   • U tpU SSR                  U5       3$ )záJoin split version components into a version string.

This function assumes the input came from :func:`_version_split`, where the
first component must be the epoch (either empty or numeric), and all other
components numeric.
r	  r  )Újoin)Ú
componentsr  r  s      r   r»   r»   »  s%   € ð €L€EØˆW�A�c—h‘h˜t“nÐ%Ð&Ð&r   c                ó8   ^ • [        U 4S jS 5       5      (       + $ )Nc              3  óF   >#   • U  H  nTR                  U5      v •  M     g 7fr   )Ú
startswith)Ú.0rÂ   Úsegments     €r   Ú	<genexpr>Ú!_is_not_suffix.<locals>.<genexpr>Ç  s#   øé € ð Ú1P vˆ×Ñ˜6×"Ð"Ò1Pùs   ƒ!)r    ÚaÚbÚrcr   )Úany)r  s   `r   r¿   r¿   Æ  s"   ø€ Üô Ù1Póó ô ð r   c                óÔ  • / / p2UR                  [        [        R                  " S U 5      5      5        UR                  [        [        R                  " S U5      5      5        UR                  U [	        US   5      S  5        UR                  U[	        US   5      S  5        UR                  SS/[        S[	        US   5      [	        US   5      -
  5      -  5        UR                  SS/[        S[	        US   5      [	        US   5      -
  5      -  5        [        [        R                  R                  U5      5      [        [        R                  R                  U5      5      4$ )Nc                ó"   • U R                  5       $ r   ©Úisdigit©Úxs    r   Ú<lambda>Ú_pad_version.<locals>.<lambda>Ð  s
   € ¸¿¹¼r   c                ó"   • U R                  5       $ r   r$  r&  s    r   r(  r)  Ñ  s
   € ¸!¿)¹)¼+r   r   r
   r
  )	rö   r¼   r½   r¾   rÈ   ÚinsertÚmaxÚchainÚfrom_iterable)ÚleftÚrightÚ
left_splitÚright_splits       r   rÇ   rÇ   Ì  s3  € Ø  "�ð ×Ñ”dœ9×.Ò.Ñ/DÀdÓKÓLÔMØ×Ñ”tœI×/Ò/Ñ0EÀuÓMÓNÔOð ×Ñ�dœ3˜z¨!™}Ó-Ð/Ð0Ô1Ø×Ñ�uœS ¨Q¡Ó0Ð2Ð3Ô4ð ×Ñ�a˜#˜¤ Q¬¨K¸©NÓ(;¼cÀ*ÈQÁ-Ó>PÑ(PÓ!QÑQÔRØ×Ñ�q˜3˜%¤# a¬¨Z¸©]Ó);¼cÀ+ÈaÁ.Ó>QÑ)QÓ"RÑRÔSô 	ŒY�_‰_×*Ñ*¨:Ó6Ó7ÜŒY�_‰_×*Ñ*¨;Ó7Ó8ðð r   c                  óþ   • \ rS rSrSrSr  S     SS jjr\SS j5       r\R                  SS j5       rSS jr
SS	 jrSS
 jrSS jrSS jrSS jrSS jrSS jr  S       SS jjr S     SS jjrSrg) ÚSpecifierSetiá  zÀThis class abstracts handling of a set of version specifiers.

It can be passed a single specifier (``>=3.0``), a comma-separated list of
specifiers (``>=3.0,!=3.1``), or no specifier at all.
)rf   Ú_specsNc                ó,  • [        U[        5      (       ad  UR                  S5       Vs/ s H)  o3R                  5       (       d  M  UR                  5       PM+     nn[	        [        [        U5      5      U l        O[	        U5      U l        X l        gs  snf )aL  Initialize a SpecifierSet instance.

:param specifiers:
    The string representation of a specifier or a comma-separated list of
    specifiers which will be parsed and normalized before use.
    May also be an iterable of ``Specifier`` instances, which will be used
    as is.
:param prereleases:
    This tells the SpecifierSet if it should accept prerelease versions if
    applicable or not. The default of ``None`` will autodetect it from the
    given specifiers.

:raises InvalidSpecifier:
    If the given ``specifiers`` are not parseable than this exception will be
    raised.
Ú,N)	r   r2   r  r~   Ú	frozensetÚmaprd   r5  rf   )r4   Ú
specifiersrC   ÚsÚsplit_specifierss        r   r�   ÚSpecifierSet.__init__ê  su   € ô, �j¤#×&Ñ&ð 4>×3CÑ3CÀCÔ3HÓVÒ3H¨aÏGÉGÏI£	 §¡¦	Ñ3HÐÐVô $¤C¬	Ð3CÓ$DÓEˆD�Kô $ JÓ/ˆDŒKð (Õùò  Ws   ©BÁBc                óž   • U R                   b  U R                   $ U R                  (       d  g [        S U R                   5       5      (       a  gg )Nc              3  ó8   #   • U  H  oR                   v •  M     g 7fr   ró   ©r  r;  s     r   r  Ú+SpecifierSet.prereleases.<locals>.<genexpr>  s   é € Ð2¢k �}Ž}¢kùó   ‚T)rf   r5  r!  r3   s    r   rC   ÚSpecifierSet.prereleases  sE   € ð ×ÑÑ(Ø×$Ñ$Ð$ð
 �{�{Øô Ñ2 d§k¢kÓ2×2Ñ2Øàr   c                ó   • Xl         g r   r’   rF   s     r   rC   rC  $  r“   r   c                ód   • U R                   b  SU R                  < 3OSnS[        U 5      < U S3$ )aÆ  A representation of the specifier set that shows all internal state.

Note that the ordering of the individual specifiers within the set may not
match the input string.

>>> SpecifierSet('>=1.0.0,!=2.0.0')
<SpecifierSet('!=2.0.0,>=1.0.0')>
>>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
<SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
>>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
<SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
r›   rœ   z<SpecifierSet(rž   )rf   rC   r2   r    s     r   r¡   ÚSpecifierSet.__repr__(  sD   € ð × Ñ Ñ,ð ˜T×-Ñ-Ñ0Ñ1àð 	ð  ¤ D£	™}¨S¨E°Ð4Ð4r   c                óX   • SR                  [        S U R                   5       5      5      $ )a6  A string representation of the specifier set that can be round-tripped.

Note that the ordering of the individual specifiers within the set may not
match the input string.

>>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
'!=1.0.1,>=1.0.0'
>>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
'!=1.0.1,>=1.0.0'
r7  c              3  ó8   #   • U  H  n[        U5      v •  M     g 7fr   r1   r@  s     r   r  Ú'SpecifierSet.__str__.<locals>.<genexpr>H  s   é € Ð;ª{¨!œs 1Ÿv˜vª{ùrB  )r  Úsortedr5  r3   s    r   r7   ÚSpecifierSet.__str__=  s"   € ð �x‰xœÑ;¨t¯{ª{Ó;Ó;Ó<Ð<r   c                ó,   • [        U R                  5      $ r   )r­   r5  r3   s    r   r;   ÚSpecifierSet.__hash__J  s   € Ü�D—K‘KÓ Ð r   c                óÚ  • [        U[        5      (       a  [        U5      nO[        U[        5      (       d  [        $ [        5       n[	        U R
                  UR
                  -  5      Ul        U R                  c   UR                  b  UR                  Ul        U$ U R                  b  UR                  b  U R                  UR                  :X  a  U R                  Ul        U$ [        S5      e)aR  Return a SpecifierSet which is a combination of the two sets.

:param other: The other object to combine with.

>>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
<SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
>>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
<SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
zFCannot combine SpecifierSets with True and False prerelease overrides.)r   r2   r4  r°   r8  r5  rf   Ú
ValueError)r4   r?   Ú	specifiers      r   Ú__and__ÚSpecifierSet.__and__M  sÑ   € ô �eœS×!Ñ!Ü  Ó'‰EÜ˜E¤<×0Ñ0Ü!Ð!ä “Nˆ	Ü$ T§[¡[°5·<±<Ñ%?Ó@ˆ	Ôà×ÑÑ$¨×);Ñ);Ñ)GØ%*×%7Ñ%7ˆIÔ"ð Ðð ×ÑÑ)¨e×.@Ñ.@Ñ.HØ×Ñ %×"4Ñ"4Ó4Ø%)×%6Ñ%6ˆIÔ"ð Ðô	 ØXóð r   c                óÊ   • [        U[        [        45      (       a  [        [        U5      5      nO[        U[        5      (       d  [        $ U R
                  UR
                  :H  $ )a1  Whether or not the two SpecifierSet-like objects are equal.

:param other: The other object to check against.

The value of :attr:`prereleases` is ignored.

>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
True
>>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
True
>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
False
)r   r2   rd   r4  r°   r5  r>   s     r   r@   ÚSpecifierSet.__eq__l  sJ   € ô& �eœc¤9Ð-×.Ñ.Ü ¤ U£Ó,‰EÜ˜E¤<×0Ñ0Ü!Ð!à�{‰{˜eŸl™lÑ*Ð*r   c                ó,   • [        U R                  5      $ )z7Returns the number of specifiers in this specifier set.)rÈ   r5  r3   s    r   Ú__len__ÚSpecifierSet.__len__†  s   € ä�4—;‘;ÓÐr   c                ó,   • [        U R                  5      $ )zÈ
Returns an iterator over all the underlying :class:`Specifier` instances
in this specifier set.

>>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
[<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
)Úiterr5  r3   s    r   Ú__iter__ÚSpecifierSet.__iter__Š  s   € ô �D—K‘KÓ Ð r   c                ó$   • U R                  U5      $ )a  Return whether or not the item is contained in this specifier.

:param item: The item to check for.

This is used for the ``in`` operator and behaves the same as
:meth:`contains` with no ``prereleases`` argument passed.

>>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
False
>>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
True
rí   rî   s     r   rï   ÚSpecifierSet.__contains__”  rñ   r   c           	     ó¦   • [        U5      nUb  U(       a  UR                  (       a  SnUc  UOUn[        [        U R	                  U/US95      5      $ )aÏ  Return whether or not the item is contained in this SpecifierSet.

:param item:
    The item to check for, which can be a version string or a
    :class:`Version` instance.
:param prereleases:
    Whether or not to match prereleases with this SpecifierSet. If set to
    ``None`` (the default), it will follow the recommendation from :pep:`440`
    and match prereleases, as there are no other versions.
:param installed:
    Whether or not the item is installed. If set to ``True``, it will
    accept prerelease versions even if the specifier does not allow them.

>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
True
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
True
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
True
>>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False).contains("1.3.0a1")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
True
Tró   )r   rŽ   rW   r¼   rO   )r4   rJ   rC   Ú	installedr   Ú
check_items         r   rK   ÚSpecifierSet.contains©  sN   € ô@ " $Ó'ˆàÑ¦9°×1F×1FØˆKà$™_‘T°'ˆ
Ü”D˜Ÿ™ j \¸{˜ÐKÓLÓMÐMr   c                ó,  ^	• Uc  U R                   b  U R                   nU R                  (       a6  U R                   H  nUR                  Xc  SOUS9nM     Ub  [        U5      $ O!USL a  [        U5      $ USL a  U	4S jU 5       $ / n/ nSnU Hl  n[	        U5      nUc$  UR                  U5        UR                  U5        M5  UR                  (       a  UR                  U5        MY  UR                  U5        SnMn     [        U(       a  U5      $ U5      $ )a  Filter items in the given iterable, that match the specifiers in this set.

:param iterable:
    An iterable that can contain version strings and :class:`Version` instances.
    The items in the iterable will be filtered according to the specifier.
:param prereleases:
    Whether or not to allow prereleases in the returned iterator. If set to
    ``None`` (the default), it will follow the recommendation from :pep:`440`
    and match prereleases if there are no other versions.

>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
['1.3']
>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
['1.3', <Version('1.4')>]
>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
['1.5a1']
>>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
['1.3', '1.5a1']
>>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
['1.3', '1.5a1']

An "empty" SpecifierSet will filter items based on the presence of prerelease
versions in the set.

>>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
['1.3']
>>> list(SpecifierSet("").filter(["1.5a1"]))
['1.5a1']
>>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
['1.3', '1.5a1']
>>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
['1.3', '1.5a1']
Tró   Fc              3  ój   >#   • U  H(  n[        U5      =mb  TR                  (       a  M$  Uv •  M*     g 7fr   )r   rŽ   )r  rJ   r   s     €r   r  Ú&SpecifierSet.filter.<locals>.<genexpr>  s3   øé € ð â (˜Ü#2°4Ó#8Ð8˜ÑAØ"×0Õ0÷ ‘DÚ (ùs   ƒ#3ª	3)rC   r5  rO   rY  r   rö   rŽ   )
r4   rN   rC   r   Úfiltered_itemsÚfound_prereleasesÚfound_final_releaserJ   rú   r   s
            @r   rO   ÚSpecifierSet.filterÑ  s.  ø€ ðN Ñ 4×#3Ñ#3Ñ#?Ø×*Ñ*ˆKð
 �;�;ð Ÿœ�ØŸ;™;ØÑ2E©$È;ð 'ð ’ñ $ð
 Ñ&ô ˜H“~Ð%ð 'ð ˜dÒ"Ü˜H“~Ð%à˜eÒ#ôá (óð ð 46ˆØ68ÐØ#ÐãˆDÜ,¨TÓ2ˆNð Ñ%Ø×%Ñ% dÔ+Ø!×(Ñ(¨Ö.Ø×-×-Ø!×(Ñ(¨Ö.à×%Ñ% dÔ+Ø&*Ò#ñ ô Ö&9�NÓQÐQÐ?PÓQÐQr   rü   )r:  zstr | Iterable[Specifier]rC   rY   rR   rZ   rX   rþ   rQ   rS   )r?   zSpecifierSet | strrR   r4  rU   )rR   zIterator[Specifier])rJ   r   rR   rW   )NN)rJ   r   rC   rY   r_  rY   rR   rW   r   r[   )r&   r'   r(   r)   r*   r\   r�   r^   rC   ra   r¡   r7   r;   rQ  r@   rV  rZ  rï   rK   rO   r+   r%   r   r   r4  r4  á  sú   † ñð +€Ið 13Ø#'ð$(à-ð$(ð !ð$(ð 
õ	$(ðL óó ðð& ×Ñó"ó ð"ô5ô*=ô!ôô>+ô4 ô!ô#ð0 $(Ø!%ð	&Nàð&Nð !ð&Nð ð	&Nð
 
õ&NðR RVð[RØ4ð[RØCNð[Rà	%÷[Rð [Rr   r4  )r   r   rR   rý   )r   r   rR   r   )r   r2   rR   ú	list[str])r  ri  rR   r2   )r  r2   rR   rW   )r/  ri  r0  ri  rR   ztuple[list[str], list[str]])&r*   Ú
__future__r   r_   r½   r  Útypingr   r   r   r   r   r	   Úutilsr   r   r   r   r2   r   r   rW   rÿ   r   r   r!   rO  r#   ÚABCMetar-   rd   r  r  rÀ   r»   r¿   rÇ   r4  r%   r   r   Ú<module>rn     sÅ   ðñõ #ã 
Û Û 	ß F× Få 'ß ,à˜ ˜Ñ%€ÙÐ1¸ÑIÐ Ø˜W c˜N¨DÐ0Ñ1Ð ôô+ôJô	�zô 	ô<˜cŸk™kò <ô~i,�ô i,ðX —
’
Ð:Ó;€ôô,'ôôô*KR�=õ KRr   