+
    ¾¾jÛ'  ã                  óð   € ^ RI Ht ^ RIHt ^ RIHtHtHt ^ RIH	t	 ]'       d	   ^ RI
HtHt  ^ RIHt ]! R4      t]! R4      tRR
 R lltRR R llt ! R R]4      t. ROtR	#   ] d
    ^ RIHt  L@i ; i)é    )Úannotations)ÚOrderedDict)ÚTYPE_CHECKINGÚAnyÚTypeVar)Ú
to_unicode)ÚIterableÚMapping)ÚSelfÚKTÚVTNc               ó$   € V ^8„  d   QhRRRRRR/# )é   ÚkeyszIterable[KT]Úcanonical_orderúIterable[KT] | NoneÚreturnzlist[KT]© )Úformats   "ÚU/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/caselessdict.pyÚ__annotate__r      s)   € ÷ Gñ GØ
ðGØ)<ðGàñGó    c                ó  a€ \        T;'       g    . 4       UUu/ uF  w  r#W2bK	  	  uppoV  Uu. uF  q3S9   g   K  VNK  	  ppV  Uu. uF  q3S9  g   K  VNK  	  pp\        VV3R lR7      \        V4      ,           # u uppi u upi u upi )a¬  Sort leading keys according to a canonical order.

Keys specified in ``canonical_order`` appear first in that order.
Remaining keys appear alphabetically at the end.

Parameters:
    keys: The keys to sort.
    canonical_order: The preferred order for leading keys.
        Keys not in this sequence are sorted alphabetically after
        the canonical ones. If ``None``, all keys are sorted
        alphabetically.

Returns:
    A new list of keys sorted by canonical order first, then alphabetically.

Example:
    ..  code-block:: pycon

        >>> from icalendar.caselessdict import canonsort_keys
        >>> canonsort_keys(["C", "A", "B"], ["B", "C"])
        ['B', 'C', 'A']
c                ó   <€ SV ,          # ©Nr   )ÚkÚcanonical_maps   &€r   Ú<lambda>Ú canonsort_keys.<locals>.<lambda>0   s
   ø€  m°AÖ&6r   )Úkey)Ú	enumerateÚsorted)r   r   Úir   ÚheadÚtailr   s   &&    @r   Úcanonsort_keysr&      s…   ø€ ô2 '0°×0EÐ0EÀ2Ô&FÔGÑ&F™d˜a�Q’TÑ&FÒG€MÙÓ2‘t�! MÑ1�AˆA‘t€DÐ2ÙÓ6‘t�!¨Ñ5�AˆA‘t€DÐ6Ü�$Ô6Ô7¼&À»,ÕFÐFùó HùÚ2ùÚ6s   šA>¯B¼BÁB	ÁB	c               ó$   € V ^8„  d   QhRRRRRR/# )r   Údict1zMapping[KT, VT]r   r   r   zlist[tuple[KT, VT]]r   )r   s   "r   r   r   3   s)   € ÷ Rñ RØðRØ-@ðRàñRr   c                ón   € \        V P                  4       V4       Uu. uF  q"W,          3NK  	  up# u upi )a  Sort items from a mapping according to a canonical key order.

Parameters:
    dict1: The mapping whose items to sort.
    canonical_order: The preferred order for leading keys.
        If ``None``, all keys are sorted alphabetically.

Returns:
    A list of ``(key, value)`` tuples sorted by canonical order.

Example:
    ..  code-block:: pycon

        >>> from icalendar.caselessdict import canonsort_items
        >>> canonsort_items({"C": 3, "A": 1, "B": 2}, ["B", "C"])
        [('B', 2), ('C', 3), ('A', 1)]
)r&   r   )r(   r   r   s   && r   Úcanonsort_itemsr*   3   s/   € ô( $2°%·*±*³,ÀÔ#PÓQÑ#P˜a�•‹MÑ#PÑQÐQùÒQs   �2c                  óB  a € ] tR t^JtRtR V 3R lltRtR V 3R lltR V 3R lltR	 V 3R
 llt	R V 3R llt
R&R V 3R llltR&R V 3R llltR&R V 3R llltR V 3R lltR V 3R lltR R ltR V 3R lltR R ltR R ltR R  ltRtR! R" ltR# R$ ltR%tV ;t# )'ÚCaselessDicta*  A case-insensitive dictionary that uses strings as keys.

All keys are stored in uppercase internally, but values retain
their original case. Keys can be provided as ``str`` or ``bytes``.
They are converted to Unicode via :func:`~icalendar.parser_tools.to_unicode`,
then uppercased before storage.
c               ó$   € V ^8„  d   QhRRRRRR/# ©r   Úargsr   Úkwargsr   ÚNoner   )r   s   "r   r   ÚCaselessDict.__annotate__S   s!   € ÷ (ñ (˜cð (¨Sð (°Tñ (r   c                óÂ   <€ \         SV `  ! V/ VB  V P                  4        F9  w  r4\        V4      P	                  4       pW58w  g   K&  \         SV `  V4       W@V&   K;  	  R# )aÙ  Parameters:
    *args: Positional arguments passed to :class:`~collections.OrderedDict`.
    **kwargs: Keyword arguments passed to :class:`~collections.OrderedDict`.

Example:

    Create a new ``CaselessDict`` and normalize existing keys to uppercase.

    ..  code-block:: pycon

        >>> from icalendar.caselessdict import CaselessDict
        >>> d = CaselessDict(summary="Meeting")
        >>> d["SUMMARY"]
        'Meeting'
        >>> "summary" in d
        True
N)ÚsuperÚ__init__Úitemsr   ÚupperÚ__delitem__)Úselfr/   r0   r    ÚvalueÚ	key_upperÚ	__class__s   &*,   €r   r5   ÚCaselessDict.__init__S   sU   ø€ ô$ 	‰Ò˜$Ð) &Ò)ØŸ*™*ž,‰JˆCÜ" 3›×-Ñ-Ó/ˆIØÖÜ‘Ñ# CÔ(Ø"'�Y“ó	 'r   Nc               ó    € V ^8„  d   QhRRRR/# )r   r    r   r   r   )r   s   "r   r   r2   n   s   € ÷ 0ñ 0˜sð 0 sñ 0r   c                óT   <€ \        V4      p\        SV `	  VP                  4       4      # )a  Get the item from the ``CaselessDict`` instance by
``key``, case-insensitively.

Parameters:
    key: The key to look up, case-insensitively.

Returns:
    The (key, value) pair associated with the uppercased key.

Raises:
    KeyError: If the key is not found.
)r   r4   Ú__getitem__r7   ©r9   r    r<   s   &&€r   r@   ÚCaselessDict.__getitem__n   s$   ø€ ô ˜‹oˆÜ‰wÑ" 3§9¡9£;Ó/Ð/r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r    r   r:   r   r1   r   )r   s   "r   r   r2   ~   s!   € ÷ 0ñ 0˜sð 0¨3ð 0°4ñ 0r   c                óZ   <€ \        V4      p\        SV `	  VP                  4       V4       R# )z¤Set a (key, value) pair, storing the key in uppercase.

Parameters:
    key: The key of the pair, case-insensitive.
    value: The value to associate with the key.
N)r   r4   Ú__setitem__r7   ©r9   r    r:   r<   s   &&&€r   rE   ÚCaselessDict.__setitem__~   s#   ø€ ô ˜‹oˆÜ‰Ñ˜CŸI™I›K¨Ö/r   c               ó    € V ^8„  d   QhRRRR/# )r   r    r   r   r1   r   )r   s   "r   r   r2   ˆ   s   € ÷ 
)ñ 
)˜sð 
) tñ 
)r   c                óX   <€ \        V4      p\        SV `	  VP                  4       4       R# )z¥Delete a (key, value) pair by its case-insensitive key.

Parameters:
    key: The key to delete, case-insensitively.

Raises:
    KeyError: If the key is not found.
N)r   r4   r8   r7   rA   s   &&€r   r8   ÚCaselessDict.__delitem__ˆ   s!   ø€ ô ˜‹oˆÜ‰Ñ˜CŸI™I›KÖ(r   c               ó    € V ^8„  d   QhRRRR/# ©r   r    r   r   Úboolr   )r   s   "r   r   r2   ”   s   € ÷ 
1ñ 
1 ð 
1¨ñ 
1r   c                óT   <€ \        V4      p\        SV `	  VP                  4       4      # )z¿Check whether a key exists in the mapping, case-insensitively.

Parameters:
    key: The key to check case-insensitively.

Returns:
    ``True`` if the uppercased key exists, else ``False``.
©r   r4   Ú__contains__r7   rA   s   &&€r   rP   ÚCaselessDict.__contains__”   s$   ø€ ô ˜‹oˆÜ‰wÑ# C§I¡I£KÓ0Ð0r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r    r   Údefaultr   r   )r   s   "r   r   r2       ó!   € ÷ 1ñ 1�sð 1 Sð 1°Cñ 1r   c                óV   <€ \        V4      p\        SV `	  VP                  4       V4      # )a  Return the ``key``, optionally with a ``default`` value.

Parameters:
    key: The key to look up, case-insensitively.
    default: The value to return if the key is not found.

Returns:
    The value for the key, if present, else the value specified by ``default``.
)r   r4   Úgetr7   ©r9   r    rT   r<   s   &&&€r   rW   ÚCaselessDict.get    ó%   ø€ ô ˜‹oˆÜ‰w‰{˜3Ÿ9™9›;¨Ó0Ð0r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r    r   r:   r   r   )r   s   "r   r   r2   ­   s!   € ÷ 6ñ 6˜cð 6¨#ð 6¸ñ 6r   c                óV   <€ \        V4      p\        SV `	  VP                  4       V4      # )a  Create the (key, value) pair, optionally with a ``value``.

Once set, to change default value use :meth:`update`.

Parameters:
    key: The key to look up or create, case-insensitively.
    value: The default value to set, if given, else ``None``.

Returns:
    The value for the key.
)r   r4   Ú
setdefaultr7   rF   s   &&&€r   r]   ÚCaselessDict.setdefault­   s&   ø€ ô ˜‹oˆÜ‰wÑ! #§)¡)£+¨uÓ5Ð5r   c               ó$   € V ^8„  d   QhRRRRRR/# rS   r   )r   s   "r   r   r2   ¼   rU   r   c                óV   <€ \        V4      p\        SV `	  VP                  4       V4      # )zûRemove and return the value for ``key``, or ``default`` if not found.

Parameters:
    key: The key to remove, case-insensitively.
    default: The value to return if the key is not found.

Returns:
    The removed value, or the value of ``default``.
)r   r4   Úpopr7   rX   s   &&&€r   ra   ÚCaselessDict.pop¼   rZ   r   c               ó   € V ^8„  d   QhRR/# )r   r   ztuple[Any, Any]r   )r   s   "r   r   r2   É   s   € ÷ 	!ñ 	!˜ñ 	!r   c                ó    <€ \         SV `  4       # )zŽRemove and return the last inserted (key, value) pair.

Returns:
    A (key, value) tuple.

Raises:
    KeyError: If the dictionary is empty.
)r4   Úpopitem©r9   r<   s   &€r   re   ÚCaselessDict.popitemÉ   s   ø€ ô ‰w‰Ó Ð r   c               ó    € V ^8„  d   QhRRRR/# rL   r   )r   s   "r   r   r2   Ô   s   € ÷ 1ñ 1˜3ð 1 4ñ 1r   c                óT   <€ \        V4      p\        SV `	  VP                  4       4      # )zÝCheck whether a key exists, case-insensitively.

This is a legacy method. Use ``key in dict`` instead.

Parameters:
    key: The key to check, case-insensitively.

Returns:
    ``True`` if the key exists, else ``False``.
rO   rA   s   &&€r   Úhas_keyÚCaselessDict.has_keyÔ   s$   ø€ ô ˜‹oˆÜ‰wÑ# C§I¡I£KÓ0Ð0r   c               ó$   € V ^8„  d   QhRRRRRR/# r.   r   )r   s   "r   r   r2   â   s!   € ÷ "ñ "˜Cð "¨3ð "°4ñ "r   c                ó²   € \        V4      V.,           pV F=  p\        VR4      '       d   \        VP                  4       4      pV F	  w  rVW`V&   K  	  K?  	  R# )a$  Update the dictionary with (key, value) pairs, normalizing keys to uppercase.

Multiple keys that differ only in case will overwrite each other.
Only the last value is retained.

Parameters:
    *args: Mappings or iterables of (key, value) pairs.
    **kwargs: Additional (key, value) pairs.
r6   N)ÚlistÚhasattrÚiterr6   )r9   r/   r0   ÚmappingsÚmappingr    r:   s   &*,    r   ÚupdateÚCaselessDict.updateâ   sN   € ô ˜“:  Õ(ˆÛˆGÜ�w ×(Ò(Ü˜wŸ}™}›Ó/�Û%‘
�Ø!�S“	ó &ó  r   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r2   ô   s   € ÷ *ñ *�dñ *r   c                ó>   <€ \        V 4      ! \        SV `	  4       4      # )zoReturn a shallow copy of the dictionary.

Returns:
    A new instance of the same type with the same contents.
)Útyper4   Úcopyrf   s   &€r   rx   ÚCaselessDict.copyô   s   ø€ ô �DŒzœ%™'™,›.Ó)Ð)r   c               ó   € V ^8„  d   QhRR/# )r   r   Ústrr   )r   s   "r   r   r2   ü   s   € ÷ 6ñ 6˜#ñ 6r   c                óJ   € \        V 4      P                   R\        V 4       R2# )znReturn a string representation of the dictionary.

Returns:
    A string in the form ``CaselessDict({...})``.
Ú(Ú))rw   Ú__name__Údict©r9   s   &r   Ú__repr__ÚCaselessDict.__repr__ü   s&   € ô �t“*×%Ñ%Ð& a¬¨T«
 |°1Ð5Ð5r   c               ó    € V ^8„  d   QhRRRR/# ©r   ÚotherÚobjectr   rM   r   )r   s   "r   r   r2     s   € ÷ Jñ J˜Fð J tñ Jr   c                ó¶   € \        V\        4      '       g   \        # WJ ;'       g4    \        V P                  4       4      \        VP                  4       4      8H  # )aH  Check equality with another dictionary.

Two ``CaselessDict`` instances are equal if they contain the same
(key, value) pairs after uppercasing keys. Comparison with a regular
``dict`` also works.

Parameters:
    other: The object to compare.

Returns:
    ``True`` if equal, ``NotImplemented`` if ``other`` is not a ``dict``.
)Ú
isinstancer€   ÚNotImplementedr6   ©r9   r†   s   &&r   Ú__eq__ÚCaselessDict.__eq__  sB   € ô ˜%¤×&Ò&Ü!Ð!Øˆ}×IÐI¤ T§Z¡Z£\Ó 2´d¸5¿;¹;»=Ó6IÑ IÐIr   c               ó    € V ^8„  d   QhRRRR/# r…   r   )r   s   "r   r   r2     s   € ÷ 	!ñ 	!˜Fð 	! tñ 	!r   c                ó   € W8X  * # )zŽCheck inequality with another dictionary.

Parameters:
    other: The object to compare.

Returns:
    ``True`` if not equal, else ``False``.
r   r‹   s   &&r   Ú__ne__ÚCaselessDict.__ne__  s   € ð Ò Ð r   c               ó   € V ^8„  d   QhRR/# )r   r   z	list[str]r   )r   s   "r   r   r2   $  s   € ÷ 	Añ 	A˜Yñ 	Ar   c                óJ   € \        V P                  4       V P                  4      # )zÕSort keys according to the canonical order for this class.

Keys listed in :attr:`canonical_order` appear first in that order.
Remaining keys appear alphabetically at the end.

Returns:
    A sorted list of keys.
)r&   r   r   r�   s   &r   Úsorted_keysÚCaselessDict.sorted_keys$  s   € ô ˜dŸi™i›k¨4×+?Ñ+?Ó@Ð@r   c               ó   € V ^8„  d   QhRR/# )r   r   zlist[tuple[Any, Any]]r   )r   s   "r   r   r2   /  s   € ÷ 	;ñ 	;Ð3ñ 	;r   c                ó,   € \        W P                  4      # )zòSort items according to the canonical order for this class.

Items whose keys are listed in :attr:`canonical_order` appear first
in that order. Remaining items appear alphabetically by key.

Returns:
    A sorted list of (key, value) tuples.
)r*   r   r�   s   &r   Úsorted_itemsÚCaselessDict.sorted_items/  s   € ô ˜t×%9Ñ%9Ó:Ð:r   r   r   )r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r5   Ú__hash__r@   rE   r8   rP   rW   r]   ra   re   rj   rs   rx   r‚   rŒ   r�   r   r”   r˜   Ú__static_attributes__Ú__classcell__)r<   s   @r   r,   r,   J   s©   ø† ñ÷(ð (ð2 €H÷0ð 0÷ 0ð 0÷
)ð 
)÷
1ð 
1÷1ò 1÷6ò 6÷1ò 1÷	!ð 	!÷1ð 1õ"÷$*ð *õ6õJõ"	!ð €Oõ	A÷	;ó 	;r   r,   r   )r,   r*   r&   )Ú
__future__r   Úcollectionsr   Útypingr   r   r   Úicalendar.parser_toolsr   Úcollections.abcr	   r
   r   ÚImportErrorÚtyping_extensionsr   r   r&   r*   r,   Ú__all__r   r   r   Ú<module>r©      sn   ðÝ "å #ß .Ñ .å -çß1ð'Ýñ ˆTƒ]€ÙˆTƒ]€÷G÷>Rô.n;�;ô n;òb @‚øð]	 ô 'ß&ð'ús   ®A% Á%A5Á4A5