+
    }i                        ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHtHt ]'       d   ^ RIHt ^ R	IHt ]! ]4      t]! R
4       ! R R4      4       t]! 4       tR# )    )annotations)TYPE_CHECKING)
docs_group)Configuration)ServiceConflictError)EventManagerLocalEventManager)FileSystemStorageClientStorageClientStorageInstanceManager)	getLoggerr   c                      ] tR t^t$ RtRtR]R&   RR R l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t]R R l4       tRtR# )ServiceLocatorzvService locator for managing the services used by Crawlee.

All services are initialized to its default value lazily.
NzStorageInstanceManager | Noneglobal_storage_instance_managerc               (    V ^8  d   QhRRRRRRRR/# )	   configurationzConfiguration | Noneevent_managerzEventManager | Nonestorage_clientzStorageClient | NonereturnNone )formats   "j/Users/ahmad/.openclaw/workspace/my-crawler/.venv/lib/python3.14/site-packages/crawlee/_service_locator.py__annotate__ServiceLocator.__annotate__   s2     . .+. +. -	.
 
.    c                	*    Wn         W n        W0n        R # )N_configuration_event_manager_storage_client)selfr   r   r   s   &&&&r   __init__ServiceLocator.__init__   s     ,+-r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   &   s     # #= #r   c                ~    V P                   f%   \        P                  R4       \        4       V n         V P                   # )zGet the configuration.zJNo configuration set, implicitly creating and using default Configuration.)r!   loggerdebugr   r$   s   &r   get_configuration ServiceLocator.get_configuration&   s1    &LLef"//D"""r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   r   .   s     , ,} , ,r   c                    V P                   VJ d   R# V P                   '       d   \        \        WP                   4      hWn         R# )zSet the configuration.

Args:
    configuration: The configuration to set.

Raises:
    ServiceConflictError: If the configuration has already been retrieved before.
N)r!   r   r   )r$   r   s   &&r   set_configuration ServiceLocator.set_configuration.   s:     -/&}mEXEXYY+r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   ?   s     # #< #r   c                    V P                   fb   \        P                  R4       V P                  f   \        P                  R4       \	        4       P                  V P                  R7      V n         V P                   # )zGet the event manager.zNNo event manager set, implicitly creating and using default LocalEventManager.zImplicit creation of event manager will implicitly set configuration as side effect. It is advised to explicitly first set the configuration instead.)config)r"   r)   r*   r!   r	   from_configr+   s   &r   get_event_manager ServiceLocator.get_event_manager?   sf    &LLij""*W #4"5"A"AI\I\"A"]D"""r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   r   L   s     , ,| , ,r   c                    V P                   VJ d   R# V P                   '       d   \        \        WP                   4      hWn         R# )zSet the event manager.

Args:
    event_manager: The event manager to set.

Raises:
    ServiceConflictError: If the event manager has already been retrieved before.
N)r"   r   r   )r$   r   s   &&r   set_event_manager ServiceLocator.set_event_managerL   s:     -/&|]DWDWXX+r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   ]   s     $ $M $r   c                    V P                   fH   \        P                  R4       V P                  f   \        P	                  R4       \        4       V n         V P                   # )zGet the storage client.zUNo storage client set, implicitly creating and using default FileSystemStorageClient.zImplicit creation of storage client will implicitly set configuration as side effect. It is advised to explicitly first set the configuration instead.)r#   r)   r*   r!   warningr
   r+   s   &r   get_storage_client!ServiceLocator.get_storage_client]   sR    'LLpq""*W $;#<D ###r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   r   j   s     . . .4 .r   c                    V P                   VJ d   R# V P                   '       d   \        \        WP                   4      hWn         R# )zSet the storage client.

Args:
    storage_client: The storage client to set.

Raises:
    ServiceConflictError: If the storage client has already been retrieved before.
N)r#   r   r   )r$   r   s   &&r   set_storage_client!ServiceLocator.set_storage_clientj   s:     >1&}nFZFZ[[-r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   |   s     > >*@ >r   c                r    \         P                  f   ^ RIHp V! 4       \         n        \         P                  # )zaGet the storage instance manager. It is global manager shared by all instances of ServiceLocator.r   )r   r   *crawlee.storages._storage_instance_managerr   )r$   r   s   & r   storage_instance_manager'ServiceLocator.storage_instance_manager{   s*     99AY=S=UN:===r   r    )NNN)__name__
__module____qualname____firstlineno____doc__r   __annotations__r%   r,   r0   r6   r:   r?   rC   propertyrH   __static_attributes__r   r   r   r   r      sN    
 FJ#%BI.#,"#,"$." > >r   r   N)
__future__r   typingr   crawlee._utils.docsr   crawlee.configurationr   crawlee.errorsr   crawlee.eventsr   r	   crawlee.storage_clientsr
   r   rG   r   loggingr   rJ   r)   r   service_locatorr   r   r   <module>r[      sY    "   * / / : JQ 	8	 Op> p> p>f !"r   