Ë
    £�Dj"	  ã                   ó.   — d Z ddlZddlmZ dZd„ Zdd„Zy)zj
Provides a function to open the system browser to either search or go directly
to a function's reference
é    N)Ú	urlencodezhttps://www.statsmodels.org/c                 óP  — t         }|r|dz  }n|dz  }| €|S t        | t        «      r|dz  }|t        d| i«      z  }|dz  }|S 	 | } | j                  }| j
                  }|j                  d«      st        d«      ‚|dz  }||d	z   |z   d
z   z  }|S # t        $ r t        d«      ‚w xY w)zw
    Parse inputs and return a correctly formatted URL or raises ValueError
    if the input is not understandable
    zstable/zdevel/zsearch.html?Úqz &check_keywords=yes&area=defaultzstatsmodels.z!Function must be from statsmodelsz
generated/ú.z.htmlzInput not understood)	ÚBASE_URLÚ
isinstanceÚstrr   Ú__name__Ú
__module__Ú
startswithÚ
ValueErrorÚAttributeError)ÚfuncÚstableÚurlÚ	func_nameÚfunc_modules        úYC:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\site-packages\statsmodels\tools\web.pyÚ_generate_urlr      sß   € ô
 €CÙØˆyÑ‰àˆx‰ˆà€|Øˆ
Ü	�Dœ#Ô	Øˆ~ÑˆØŒy˜#˜t˜Ó%Ñ%ˆØÐ1Ñ1ˆð €Jð		5ØˆDØŸ™ˆIØŸ/™/ˆKØ×)Ñ)¨.Ô9Ü Ð!DÓEÐEØ�<ÑˆCØ�; Ñ$ yÑ0°7Ñ:Ñ:ˆCð €Jøô ò 	5ÜÐ3Ó4Ð4ð	5ús   ÁA	B ÂB%c                 ób   — ddl m} d|vr|n|}t        | |«      }t        j                  |«       y)ay  
    Opens a browser and displays online documentation

    Parameters
    ----------
    func : {str, callable}
        Either a string to search the documentation or a function
    stable : bool
        Flag indicating whether to use the stable documentation (True) or
        the development documentation (False).  If not provided, opens
        the stable documentation if the current version of statsmodels is a
        release

    Examples
    --------
    >>> import statsmodels.api as sm

    Documentation site

    >>> sm.webdoc()

    Search for glm in docs

    >>> sm.webdoc('glm')

    Go to current generated help for OLS

    >>> sm.webdoc(sm.OLS, stable=False)

    Notes
    -----
    By default, open stable documentation if the current version of
    statsmodels is a release.  Otherwise opens the development documentation.

    Uses the default system browser.
    r   )Ú__version__ÚdevN)Ústatsmodels._versionr   r   Ú
webbrowserÚopen)r   r   r   Úurl_or_errors       r   Úwebdocr   *   s1   € õJ 1à!¨Ñ4‰[¸&€FÜ   vÓ.€LÜ‡O�O�LÔ!Øó    )NN)Ú__doc__r   Úurllib.parser   r   r   r   © r   r   ú<module>r"      s!   ðñó Ý "à)€òô>*r   