o
    ÌÄ.j  ã                   @  sü   d Z ddlmZ ddlmZ ddlZddlmZmZm	Z	m
Z
mZ ddlmZmZmZmZ ddlmZmZmZ ddlmZ dd	lmZmZ dd
lmZmZmZmZ ddlm Z m!Z!m"Z" ddl#m$Z$m%Z%m&Z&m'Z' ernddl(m)Z) dddefddd„Z*g d¢Z+dS )z.Calculate repetitions of icalendar components.é    )Úannotations)ÚTYPE_CHECKINGN)ÚAbsoluteAlarmAdapterÚComponentAdapterÚEventAdapterÚJournalAdapterÚTodoAdapter)ÚDATE_MAXÚDATE_MAX_DTÚDATE_MINÚDATE_MIN_DT)ÚBadRuleStringFormatÚInvalidCalendarÚPeriodEndBeforeStart)Úexample_calendar)ÚT_COMPONENTSÚCalendarQuery)ÚAlarmsÚAllKnownComponentsÚComponentsWithNameÚSelectComponentsé   )ÚAlarmOccurrenceÚ
OccurrenceÚOccurrenceID)ÚAbsoluteAlarmSeriesÚAlarmSeriesRelativeToEndÚAlarmSeriesRelativeToStartÚSeries)Ú	ComponentF)ÚVEVENTÚ
a_calendarr   Ú
componentsr   Úskip_bad_seriesÚboolÚcalendar_queryútype[CalendarQuery]Úreturnr   c                 C  s   t  | ¡} || |||ƒS )a½  Create a query for recurring components in a_calendar.

    If the argument is a calendar, this will also correct
    times according to ``X-WR-TIMEZONE``.

    Arguments:
        a_calendar: an :class:`icalendar.cal.calendar.Calendar` component like
            :class:`icalendar.cal.calendar.Calendar`.
        keep_recurrence_attributes: Whether to keep attributes that are only used
            to calculate the recurrence (``RDATE``, ``EXDATE``, ``RRULE``).
        components: A list of component type names of which the recurrences
            should be returned. This can also be instances of :class:`SelectComponents`.
            Examples: ``("VEVENT", "VTODO", "VJOURNAL", "VALARM")``
        skip_bad_series: Whether to skip series of components that contain
            errors. You can use :attr:`CalendarQuery.suppressed_errors` to
            specify which errors to skip.
        calendar_query: The :class:`CalendarQuery` class to use.
    )Úx_wr_timezoneÚto_standard)r!   Úkeep_recurrence_attributesr"   r#   r%   © r+   úS/home/thesage/.local/lib/python3.10/site-packages/recurring_ical_events/__init__.pyÚof7   s   
ÿr-   )r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r-   )
r!   r   r"   r   r#   r$   r%   r&   r'   r   ),Ú__doc__Ú
__future__r   Útypingr   r(   Úrecurring_ical_events.adaptersr   r   r   r   r   Úrecurring_ical_events.constantsr	   r
   r   r   Úrecurring_ical_events.errorsr   r   r   Úrecurring_ical_events.examplesr   Úrecurring_ical_events.queryr   r   Úrecurring_ical_events.selectionr   r   r   r   Ú
occurrencer   r   r   Úseriesr   r   r   r   Úicalendar.calr   r-   Ú__all__r+   r+   r+   r,   Ú<module>   s(   û