Ë
     \;jÝ  ã                   ó€   — d dl Z d dlmZ d dl mZ d dlZd dlZd„ Zd„ Zed„ «       Zd„ Z	 G d„ d	«      Z
 G d
„ de«      Zy)é    N)Úentry_points)Úcachec                  óP   — t         j                  j                  dd«      } | dk(  ryy)z7Determine if dispatching has been disabled by the user.ÚSKIMAGE_NO_DISPATCHINGFÚ1T)ÚosÚenvironÚget)Úno_dispatchings    ú_G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/util/_backends.pyÚdispatching_disabledr      s%   € ä—Z‘Z—^‘^Ð$<¸eÓD€NØ˜ÒØàó    c                 óv  — | j                   }dg}|D �cg c]  }|j                  |«      sŒ|‘Œ }}t        |«      dk(  rP|j                  d«      }t        |«      dk  rd| j                   ›d�}t	        |«      ‚dj                  |dd «      }|S t        |«      dk(  r|d   }|S | ›d	|›�}t	        |«      ‚c c}w )
zŸGet the name of the public module for a scikit-image function.

    This computes the name of the public submodule in which the function can
    be found.
    zskimage.filters.rankr   Ú.é   zexpected func.__module__=z% with more than 2 dot-delimited partsNé   z& matches more than one sub-submodule: )Ú
__module__Ú
startswithÚlenÚsplitÚ
ValueErrorÚjoin)ÚfuncÚ	full_nameÚsub_submodulesÚnameÚ
candidatesÚpartsÚmsgÚpublic_names           r   Úpublic_api_moduler!      sÙ   € ð —‘€Ið -Ð-€NÙ#1ÓP¡>˜4°Y×5IÑ5IÈ$Õ5O’$ >€JÐPÜ
ˆ:ƒ˜!Òà—‘ Ó$ˆÜˆu‹:˜Š?Ø.˜dŸo™oÐ/Ð/TÐUˆCÜ˜S“/Ð!Ø—h‘h˜u R a˜yÓ)ˆð Ðô 
ˆZ‹˜AÒ	Ø  ‘mˆð Ðð �Ð>¸z¸nÐMˆÜ˜‹oÐùò Qs
   ”B6«B6c                  óò   — i } t        d¬«      }t        d¬«      }|D ]H  }d|i| |j                  <   	 ||j                     } |j                  «       «       | |j                     d<   ŒJ | S # t        $ r Y ŒXw xY w)z7List all installed backends and information about them.Úskimage_backends)ÚgroupÚskimage_backend_infosÚimplementationÚinfo)r   r   ÚloadÚKeyError)ÚbackendsÚ	backends_Úbackend_infosÚbackendr'   s        r   Úall_backendsr.   6   s‡   € ð €HÜÐ#5Ô6€IÜ Ð'>Ô?€MãˆØ"2°GÐ!<ˆ�—‘Ñð	Ø  §¡Ñ.ˆDà-8¨T¯Y©Y«[«]ˆH�W—\‘\Ñ" 6Ò*ð ð €Oøô ò 	Ùð	ús   ²4A*Á*	A6Á5A6c                 ó¤   ‡ ‡‡— ‰ j                   Št        ‰ «      Št        «       s
t        «       s‰ S t	        j
                  ‰ «      ˆ ˆˆfd„«       }|S )zæMark a function as dispatchable.

    When a decorated function is called, the installed backends are
    searched for an implementation. If no backend implements the function
    then the scikit-image implementation is used.
    c            
      óx  •— t        t        «       «      D ]œ  }t        «       |   }‰› d‰	› �|d   j                  vrŒ'|d   j                  «       } |j                  ‰› d‰	› �g| ¢­i |¤Ž}|sŒX|j                  ‰› d‰	› �«      }t        j                  d‰› d‰	› d|› d�t        d¬«        || i |¤Žc S   ‰| i |¤ŽS )	NÚ:r'   r&   z	Call to 'z' was dispatched to the 'z8' backend. Set SKIMAGE_NO_DISPATCHING=1 to disable this.r   )Ú
stacklevel)	Úsortedr.   Úsupported_functionsr(   Úcan_hasÚget_implementationÚwarningsÚwarnÚDispatchNotification)
ÚargsÚkwargsr   r-   Úbackend_implÚwants_itÚ	func_implr   Úfunc_moduleÚ	func_names
          €€€r   Úwrapperzdispatchable.<locals>.wrapperY   s	  ø€ ô œ<›>Ö*ˆDÜ"“n TÑ*ˆGð �˜a 	˜{Ð+°7¸6±?×3VÑ3VÑVØà"Ð#3Ñ4×9Ñ9Ó;ˆLð ,�|×+Ñ+Ø�-˜q  Ð,ðØ/3òØ7=ñˆHñ Øà$×7Ñ7¸;¸-ÀqÈÈÐ8TÓUˆIÜ�M‰MØ˜K˜=¨¨)¨ð 5Ø˜ð !ð!ô %ð
 õ
ñ ˜dÐ- fÑ-Ò-ð; +ñ@ ˜Ð( Ñ(Ð(r   )Ú__name__r!   r   r.   Ú	functoolsÚwraps)r   rA   r?   r@   s   ` @@r   ÚdispatchablerE   I   sL   ú€ ð —‘€IÜ# DÓ)€Kô
 Ô¤\¤^Øˆä‡_�_�TÓõ%)ó ð%)ðN €Nr   c                   ó   — e Zd ZdZd„ Zy)ÚBackendInformationz±Information about a backend

    A backend that wants to provide additional information about itself
    should return an instance of this from its information entry point.
    c                 ó   — || _         y )N)r4   )Úselfr4   s     r   Ú__init__zBackendInformation.__init__‹   s
   € Ø#6ˆÕ r   N)rB   r   Ú__qualname__Ú__doc__rJ   © r   r   rG   rG   „   s   „ ñó7r   rG   c                   ó   — e Zd ZdZy)r9   z?Notification issued when a function is dispatched to a backend.N)rB   r   rK   rL   rM   r   r   r9   r9   �   s   „ ÙIàr   r9   )rC   Úimportlib.metadatar   r   r   r7   r   r!   r.   rE   rG   ÚRuntimeWarningr9   rM   r   r   Ú<module>rQ      sO   ðÛ Ý +Ý Û 	Û òò"ðJ ñó ðò$8÷v7ñ 7ô	˜>õ 	r   