+
    ¾¾j­+  ã                  óª   € R t ^ RIHt ^ RIHtHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHt ]'       d   ^ RIHtHt ^ RIHt ^ R	IHtHt  ! R
 R4      tR# )z%Parsing a component's iCalendar data.)Úannotations)ÚTYPE_CHECKINGÚClassVar)ÚContentlineÚContentlines)Úsplit_on_unescaped_comma)ÚvBroken)Útzp)Ú	ComponentÚComponentFactory)Ú
Parameters)Ú	VPROPERTYÚTypesFactoryc                  óú   € ] tR t^t$ RtR'tR]R&    R R ltR]R&   R R	 ltR
 R lt	R t
R R ltR R ltR R ltR R ltR R ltR R lt]R R l4       tR R ltR R ltR R  ltR! R" ltR# R$ ltR%tR&# )(ÚComponentIcalParserzŽA parser for a component's iCalendar data.

This uses the template method pattern, where the main parsing
logic can be refined in subclasses.
zClassVar[tuple[str, ...]]Údatetime_namesc               ó(   € V ^8„  d   QhRRRRRRRR/# )	é   Údatazbytes | str | list[Contentline]Úcomponent_factoryr   Útypes_factoryr   ÚreturnÚNone© )Úformats   "Ú^/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/parser/ical/component.pyÚ__annotate__Ú ComponentIcalParser.__annotate__'   s2   € ÷ ñ à-ðð ,ðð $ð	ð
 
ñó    c                ó@   € Wn         W n        W0n        \        V n        R# )a  Initialize the parser with the raw data.

Parameters:
    data: The raw iCalendar data to parse, either as bytes
        or a list of content lines.
    component_factory: The factory to use for creating components.
    types_factory: The factory to use for creating property values.
N)Ú_dataÚ_component_factoryÚ_types_factoryr	   Ú_tzp)Úselfr   r   r   s   &&&&r   Ú__init__ÚComponentIcalParser.__init__'   s   € ð Œ
Ø"3ÔØ+ÔÜˆŽ	r   zlist[Contentline]Ú_content_linesc               ó    € V ^8„  d   QhRRRR/# )r   ÚnameÚstrr   Úboolr   )r   s   "r   r   r   <   s   € ÷ 
ñ 
 sð 
¨tñ 
r   c                óî   a€ V P                  4        RVP                  4       ,           o\        ;QJ d)    V3R lV P                   4       F  '       g   K   R# 	  R# ! V3R lV P                   4       4      # )z)Check if the parser contains a component.zBEGIN:c              3  óˆ   <"  € T F7  p\        V4      \        S4      8H  ;'       d    VP                  4       S8H  x € K9  	  R # 5i©N)ÚlenÚupper)Ú.0Úcontent_lineÚ
begin_lines   & €r   Ú	<genexpr>Ú9ComponentIcalParser.contains_component.<locals>.<genexpr>@   s?   øé € ð 
á 3�ô �Ó¤ Z£Ñ0×WÐW°\×5GÑ5GÓ5IÈZÑ5WÔWÛ 3ùs
   ƒ"A¦ATF)Úinitialize_parsingr0   Úanyr'   )r$   r)   r3   s   &&@r   Úcontains_componentÚ&ComponentIcalParser.contains_component<   sf   ø€ à×ÑÔ!Ø §
¡
£Õ,ˆ
ß‹sô 
à $× 3Ò 3ó
�sŒsð 	
Šsð 	
ˆsô 
à $× 3Ò 3ó
ó 
ð 	
r   c               ó    € V ^8„  d   QhRRRR/# )r   Úuidr*   r   r+   r   )r   s   "r   r   r   E   s   € ÷ @ñ @ ð @¨ñ @r   c                óÀ   a€ V P                  4        \        ;QJ d)    V3R lV P                   4       F  '       g   K   R# 	  R# ! V3R lV P                   4       4      # )z�Determines whether the component contains a ``uid``.

Returns:
    ``True`` if the component contains a ``uid``, else ``False``.
c              3  ó.   <"  € T F
  pSV9   x € K  	  R # 5ir.   r   )r1   Úliner;   s   & €r   r4   Ú3ComponentIcalParser.contains_uid.<locals>.<genexpr>L   s   øé € Ð?Ñ+> 4�3˜$–;Ó+>ùs   ƒTF)r6   r7   r'   )r$   r;   s   &fr   Úcontains_uidÚ ComponentIcalParser.contains_uidE   sF   ø€ ð 	×ÑÔ!ß‹sÔ?¨4×+>Ò+>Ó?�sŒsÐ?ŠsÐ?ˆsÔ?¨4×+>Ò+>Ó?Ó?Ð?r   c                	ó  € . V n         . V n        \        V P                  \        4      '       d   V P                  M\
        P                  ! V P                  4      ;V n        V n        \        V P                  4      V n	        R # r.   )
Ú_stackÚ_componentsÚ
isinstancer    Úlistr   Ú	from_icalr'   ÚiterÚ_content_lines_iterator©r$   s   &r   r6   Ú&ComponentIcalParser.initialize_parsingN   sb   € Ø')ˆŒØ,.ˆÔô ˜$Ÿ*™*¤d×+Ò+ð �JŠJä×'Ò'¨¯
©
Ó3ð	
ˆŒ
�TÔ(ô
 (,¨D×,?Ñ,?Ó'@ˆÖ$r   c               ó   € V ^8„  d   QhRR/# )r   Ú	exceptionÚ	Exceptionr   )r   s   "r   r   r   X   s   € ÷ 8ñ 8°ñ 8r   c                ó¢   € V P                   pV'       d   VP                  '       g   VhVP                  P                  R\	        V4      34       R# )zHandle a line parsing error.N)Ú	componentÚignore_exceptionsÚerrorsÚappendr*   )r$   rM   rP   s   && r   Úhandle_line_parse_errorÚ+ComponentIcalParser.handle_line_parse_errorX   s=   € ð
 —N‘Nˆ	ß 	× ;× ;Ð ;ØˆOØ×Ñ×Ñ ¤s¨9£~Ð 6Ö7r   c               ó    € V ^8„  d   QhRRRR/# ©r   Úvalsr*   r   r   r   )r   s   "r   r   r   b   s   € ÷ &ñ &¨3ð &°4ñ &r   c                óÒ   € VP                  4       pV P                  P                  V4      pV! 4       p\        VRR4      '       g   W$n        V P
                  P                  V4       R# )z$Handle the beginning of a component.r)   Ú N)r0   r!   Úget_component_classÚgetattrr)   rC   rS   )r$   rX   Úc_nameÚc_classrP   s   &&   r   Úhandle_begin_componentÚ*ComponentIcalParser.handle_begin_componentb   sT   € ð —‘“ˆØ×)Ñ)×=Ñ=¸fÓEˆñ
 “Iˆ	Ü�y &¨"×-Ò-Ø#ŒNØ�‰×Ñ˜9Ö%r   c               ó    € V ^8„  d   QhRRRR/# rW   r   )r   s   "r   r   r   q   s   € ÷ 4ñ 4¨ð 4°ñ 4r   c                ó€  € V P                   '       g   \        R4      hV P                   P                  4       pV P                   '       g   V P                  P	                  V4       M"V P                   R,          P                  V4       VP                  4       R8X  d"   RV9   d   \        P                  ! V4       R# R# R# )zHandle the end of a component.z.END encountered without an accompanying BEGIN!Ú	VTIMEZONEÚTZIDNéÿÿÿÿ)	rC   Ú
ValueErrorÚpoprD   rS   Úadd_componentr0   r	   Úcache_timezone_component)r$   rX   rP   s   && r   Úhandle_end_componentÚ(ComponentIcalParser.handle_end_componentq   s‡   € ð �{�{ˆ{äÐMÓNÐNà—K‘K—O‘OÓ%ˆ	Ø�{�{ˆ{Ø×Ñ×#Ñ# IÕ.à�K‰K˜�O×)Ñ)¨)Ô4Ø�:‰:‹<˜;Ô&¨6°YÔ+>Ü×(Ò(¨Ö3ñ ,?Ñ&r   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   r   �   s   € ÷ ñ  Dñ r   c                ó   € R# )zOPrepare the parsed components.

This is called when all components are parsed.
Nr   rJ   s   &r   Úprepare_componentsÚ&ComponentIcalParser.prepare_components�   s   ‚ r   c               ó   € V ^8„  d   QhRR/# )r   r   zlist[Component]r   )r   s   "r   r   r   ‡   s   € ÷  ñ  �ñ  r   c                óz   € V P                  4        V P                  4        V P                  4        V P                  # )zParse the raw data.)r6   Úparse_content_linesro   rD   rJ   s   &r   ÚparseÚComponentIcalParser.parse‡   s2   € à×ÑÔ!Ø× Ñ Ô"Ø×ÑÔ!Ø×ÑÐr   c               ó   € V ^8„  d   QhRR/# rm   r   )r   s   "r   r   r   Ž   s   € ÷ @ñ @ Tñ @r   c                óh  € V P                    Fw  pV'       g   K   VP                  4       w  r#pTP	                  4       pTR8X  d   T P                  T4       KK  TR8X  d   T P                  T4       Ke  T P                  YcYA4       Ky  	  R#   \         d   pT P                  T4        Rp?KŸ  Rp?ii ; i)zParse the content lines.NÚBEGINÚEND)rI   Úpartsrf   rT   r0   r_   rj   Úhandle_property)r$   r>   r)   ÚparamsrX   ÚeÚunames   &      r   rs   Ú'ComponentIcalParser.parse_content_linesŽ   s˜   € à×0Ô0ˆDßÙðØ%)§Z¡Z£\Ñ"�˜dð
 —J‘J“LˆEØ˜ÔØ×+Ñ+¨DÖ1Ø˜%”Ø×)Ñ)¨$Ö/à×$Ñ$ U°DÖ?ó 1øô
 ô Ø×,Ñ,¨QÔ/Ýûðús   ›B
Â
B1ÂB,Â,B1c               ó   € V ^8„  d   QhRR/# )r   r   zComponent | Noner   )r   s   "r   r   r   ¢   s   € ÷ 8ñ 8Ð+ñ 8r   c                	óP   € V P                   '       d   V P                   R,          # R# )é   Nre   )rC   rJ   s   &r   rP   ÚComponentIcalParser.component¡   s   € à"&§+§+ +ˆt�{‰{˜2�Ð7°4Ð7r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r)   r*   r|   r   r   r   r   )r   s   "r   r   r   ¥   s&   € ÷ Dñ D¨Sð D¸*ð DÈñ Dr   c                óL   € V P                   P                  WP                  4      # )zGet the factory for a property.)r"   Úfor_propertyÚvalue)r$   r)   r|   s   &&&r   Úget_factory_for_propertyÚ,ComponentIcalParser.get_factory_for_property¥   s   € à×"Ñ"×/Ñ/°·l±lÓCÐCr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   r)   r*   r|   r   rX   r>   r   r   r   r   )r   s   "r   r   r   ©   s;   € ÷ 0Gñ 0GØð0GØ!+ð0GØ36ð0GØ>Ið0Gà	ñ0Gr   c                óà  € V P                   '       g   VR8X  d   R# \        RV R24      hV'       d"   WP                  9   d   VP                  R4      MRpVR8X  d   V P	                  W#V4      '       d   R# V.pMWVR8X  d   VP                  R4      pM>VR	8X  d   VR
8X  d   . pM-V P                  W4      p\        VRR4      pVe	   V! V4      pV.pV F  p	V P                  WW•V4       K  	  R# )züHandle a property line.

Add properties to the top of the current stack.

Parameters:
    name: The name of the property, uppercased.
    params: The parameters of the property.
    vals: The value of the property.
    line: The original content line.
z	X-COMMENTNz
Property "z#" does not have a parent component.rd   Ú
CATEGORIESÚFREEBUSYÚ,ÚRDATErZ   Úget_value_from_content_line)	rP   rf   r   ÚgetÚhandle_categoriesÚsplitrˆ   r\   Úparse_and_add_property)
r$   r)   r|   rX   r>   ÚtzidÚ	vals_listÚfactoryr�   Úvals
   &&&&&     r   r{   Ú#ComponentIcalParser.handle_property©   s÷   € ð �~�~ˆ~ð �{Ô"ÙÜ˜z¨$¨Ð/RÐSÓTÐTç%+°×8KÑ8KÔ0Kˆv�z‰z˜&Ô!ÐQUˆð �<ÔØ×%Ñ% f°D×9Ò9Ùà˜‰IØ�ZÔàŸ
™
 3›‰Ið �WŒ_ ¨¤Ø‰Ià×3Ñ3°DÓAˆGä*1ØÐ6¸ó+Ð'ð +Ò6Ù2°4Ó8�Ø˜ˆIó ˆCØ×'Ñ'¨°cÀÖFó r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   r)   r*   r|   r   r˜   r•   z
str | Noner>   r   r   )r   s   "r   r   r   Û   s<   € ÷ >ñ >àð>ð ð>ð ð	>ð
 ð>ð ñ>r   c                ó:  € V P                  W4      p V'       d   VP                  W44      pMVP                  V4      pV! V4      pW(n        V P                  P	                  WRR7       R#   \
        \        3 d   p	T P                  Y‘Y#T4        Rp	?	R# Rp	?	ii ; i)z;Parse a property value and add it to the current component.F©ÚencodeN)rˆ   rG   r|   rP   Úaddrf   Ú	TypeErrorÚhandle_property_parse_error)
r$   r)   r|   r˜   r•   r>   r—   Ú
parsed_valÚ	vals_instr}   s
   &&&&&&    r   r”   Ú*ComponentIcalParser.parse_and_add_propertyÛ   s“   € ð ×/Ñ/°Ó=ˆð
	>ßØ$×.Ñ.¨sÓ9‘
à$×.Ñ.¨sÓ3�
ñ   
Ó+ˆIØ%ÔØ�N‰N×Ñ˜t°uÐÖ=øô œIÐ&ô 	IØ×,Ñ,¨Q°fÀ4×HÒHûð	Iús   “+A+ Á+BÁ<BÂBc          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   rM   rN   r)   r*   r|   r   r˜   r>   r   r   )r   s   "r   r   r   ñ   s<   € ÷ 8ñ 8àð8ð ð8ð ð	8ð
 ð8ð ñ8r   c                ó†  € V P                   P                  '       g   VR,          P                  4       R8X  g   VhV P                  W#4      p\	        VRR4      p\
        P                  ! VVVVVR7      pV P                   P                  P                  V\        V4      34       V P                   P                  W(^ R7       R# )z&Handle the parse error for a property.:Nr   NzX-Ú__name__Úunknown)Ú	raw_valuer|   Úproperty_nameÚexpected_typeÚerrorrœ   N)rP   rQ   r0   rˆ   r\   r   Úfrom_parse_errorrR   rS   r*   rž   )	r$   rM   r)   r|   r˜   r>   r—   rª   Úbroken_props	   &&&&&&   r   r    Ú/ComponentIcalParser.handle_property_parse_errorñ   s¢   € ð �~‰~×/×/Ð/¸¸R½¿¹Ó8HÈDÔ8PØˆOà×/Ñ/°Ó=ˆÜ ¨°YÓ?ˆÜ×.Ò.ØØØØ'Øô
ˆð 	�‰×Ñ×$Ñ$ d¬C°	«NÐ%;Ô<Ø�‰×Ñ˜4°QÐÖ7r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r|   r   rX   r*   r>   r   r   r+   r   )r   s   "r   r   r   	  s,   € ÷ ñ Ø ðØ(+ðØ3>ðà	ñr   c                óR  € \        V4      pVP                  4       pV^ 8”  dX   WE^,           R p \        V4      pV P                  RV4      pV! V4      p	Wn        V P
                  P                  RV	^ R7       R# R#   \         d    p
T P                  T
RYT4        Rp
?
R# Rp
?
ii ; i)zcHandle the special case of CATEGORIES property.

Returns:
    ``True`` if handled, else ``False``.
NrŒ   rœ   TF)	r*   Úvalue_separator_indexr   rˆ   r|   rP   rž   rf   r    )r$   r|   rX   r>   Úline_strÚ	colon_idxr¨   Úcategory_listr—   r¢   r}   s   &&&&       r   r’   Ú%ComponentIcalParser.handle_categories	  s·   € ô �t“9ˆð ×.Ñ.Ó0ˆ	Ø�qŒ=Ø ¨Q¥ Ð1ˆIð	Ü 8¸Ó C�Ø×7Ñ7¸ÀfÓM�Ù# MÓ2�	Ø#)Ô Ø—‘×"Ñ" <°À1Ð"ÔEñ
 Ùøô ô Ø×0Ñ0Ø�| V¸÷ð ñ ûð	ús   ¯A	A< Á<B&ÂB!Â!B&)r!   rD   r'   rI   r    rC   r"   r#   N)ÚDTSTARTÚDTENDzRECURRENCE-IDÚDUEr�   ÚEXDATE)r¦   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__annotations__r%   r8   r@   r6   rT   r_   rj   ro   rt   rs   ÚpropertyrP   rˆ   r{   r”   r    r’   Ú__static_attributes__r   r   r   r   r      s�   ‡ ñð1€NÐ-ó ðõð& &Ó%õ
õ@òAõ8õ&õ4õ õ õ@ð& ô8ó ð8õDõ0Gõd>õ,8÷0ñ r   r   N)r½   Ú
__future__r   Útypingr   r   Úicalendar.parser.content_liner   r   Úicalendar.parser.propertyr   Úicalendar.propr   Úicalendar.timezoner	   Úicalendar.calr
   r   Úicalendar.parser.parameterr   r   r   r   r   r   r   Ú<module>rÉ      s2   ðÙ +å "ç *ç CÝ >Ý "Ý "çß9Ý5ß6÷Vó Vr   