ó
Xé?_c           @   sd  d  Z  d Z d d l m Z m Z d d l m Z m Z d d l	 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 e j Z e j Z d d	 l m Z d d
 l m Z d d l m Z e j ƒ  Z d d l m Z d d l m  Z! d d l m" Z" y5 d d l# m$ Z$ e$ j% ƒ  Z& e$ j' e& ƒ e& _( [$ Wn e) k
 r_e" j* Z& n Xe+ ƒ  e& j, d <e+ ƒ  e& j, d <d e" j- j. f d „  ƒ  YZ/ e/ e& ƒ e& _0 e& j0 j1 ƒ  e" j- j2 e& ƒ e& _3 e& j3 j1 ƒ  e" j- j4 e& ƒ e& _5 e& j5 j1 ƒ  e" j- j6 e& ƒ e& _7 d e8 f d „  ƒ  YZ9 e9 e& ƒ e& _: d d l m; Z; e; j< ƒ  Z= e= j1 ƒ  d$ d d$ d „ Z? d d l m@ ZA d eA f d „  ƒ  YZB eB ƒ  ZC d e8 f d „  ƒ  YZD eD d ƒ ZE eD d ƒ ZF d  eA f d! „  ƒ  YZG eG ƒ  ZH d" d# „ ZI y% d d$ lJ ZK eK jL eK _M eI eK _L Wn e) k
 r.n Xd d% l mN ZN d& eN jO f d' „  ƒ  YZP eP ƒ  ZQ eR eQ _S d eQ _T d eQ _U d( „  ZV e& j1 d) eV ƒ d$ d$ d* „ ZW d+ „  ZX d d d$ d$ d$ d, „ ZY d d- l mZ ZZ eZ j[ ƒ  Z\ Z] i eR d. 6eR d/ 6eR d0 6eR d1 6e\ _^ d2 „  e\ j_ d) <d3 „  e\ j_ d4 <e\ j` ƒ  d d5 l ma Za ea jb ƒ  Zc e& j1 d6 ec ƒ d$ S(7   s©  CherryPy is a pythonic, object-oriented HTTP framework.


CherryPy consists of not one, but four separate API layers.

The APPLICATION LAYER is the simplest. CherryPy applications are written as
a tree of classes and methods, where each branch in the tree corresponds to
a branch in the URL path. Each method is a 'page handler', which receives
GET and POST params as keyword arguments, and returns or yields the (HTML)
body of the response. The special method name 'index' is used for paths
that end in a slash, and the special method name 'default' is used to
handle multiple paths via a single handler. This layer also includes:

 * the 'exposed' attribute (and cherrypy.expose)
 * cherrypy.quickstart()
 * _cp_config attributes
 * cherrypy.tools (including cherrypy.session)
 * cherrypy.url()

The ENVIRONMENT LAYER is used by developers at all levels. It provides
information about the current request and response, plus the application
and server environment, via a (default) set of top-level objects:

 * cherrypy.request
 * cherrypy.response
 * cherrypy.engine
 * cherrypy.server
 * cherrypy.tree
 * cherrypy.config
 * cherrypy.thread_data
 * cherrypy.log
 * cherrypy.HTTPError, NotFound, and HTTPRedirect
 * cherrypy.lib

The EXTENSION LAYER allows advanced users to construct and share their own
plugins. It consists of:

 * Hook API
 * Tool API
 * Toolbox API
 * Dispatch API
 * Config Namespace API

Finally, there is the CORE LAYER, which uses the core API's to construct
the default components which are available at higher layers. You can think
of the default components as the 'reference implementation' for CherryPy.
Megaframeworks (and advanced users) may replace the default components
with customized or extended components. The core API's are:

 * Application API
 * Engine API
 * Request API
 * Server API
 * WSGI API

These API's are described in the `CherryPy specification <https://bitbucket.org/cherrypy/cherrypy/wiki/CherryPySpec>`_.
s   4.0.0iÿÿÿÿ(   t   urljoint	   urlencode(   t
   basestringt
   unicodestr(   t	   HTTPErrort   HTTPRedirectt   InternalRedirect(   t   NotFoundt   CherryPyExceptiont   TimeoutError(   t   _cpdispatch(   t   _cptools(   t
   _cprequest(   t   httputil(   t   _cptree(   t   Application(   t   _cpwsgi(   t   process(   t   win32t   before_requestt   after_requestt   _TimeoutMonitorc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s)   g  |  _  t j j j |  | |  j ƒ d  S(   N(   t   servingsR   t   pluginst   Monitort   __init__t   run(   t   selft   bus(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   c   s    	c         C   s    |  j  j t j t j f ƒ d  S(   N(   R   t   appendt   servingt   requestt   response(   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   g   s    c         C   s8   y  |  j  j t j t j f ƒ Wn t k
 r3 n Xd  S(   N(   R   t   removeR   R   R    t
   ValueError(   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   j   s     c         C   s(   x! |  j  D] \ } } | j ƒ  q
 Wd S(   s*   Check timeout on all responses. (Internal)N(   R   t   check_timeout(   R   t   reqt   resp(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   p   s    (   t   __name__t
   __module__R   R   R   R   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   a   s   			t   _HandleSignalsPluginc           B   s    e  Z d  Z d „  Z d „  Z RS(   sX   Handle signals from other processes based on the configured
    platform handlers above.c         C   s   | |  _  d  S(   N(   R   (   R   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   …   s    c         C   sN   t  |  j d ƒ r% |  j j j ƒ  n  t  |  j d ƒ rJ |  j j j ƒ  n  d S(   s&   Add the handlers based on the platformt   signal_handlert   console_control_handlerN(   t   hasattrR   R)   t	   subscribeR*   (   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR,   ˆ   s    (   R&   R'   t   __doc__R   R,   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR(   €   s   	(   t	   _cpservert    c         C   sN   | r t  j | ƒ n  t j |  | | ƒ t j j ƒ  t j ƒ  t j ƒ  d S(   sn  Mount the given root, start the builtin server (and engine), then block.

    root: an instance of a "controller class" (a collection of page handler
        methods) which represents the root of the application.
    script_name: a string containing the "mount point" of the application.
        This should start with a slash, and be the path portion of the URL
        at which to mount the given root. For example, if root.index() will
        handle requests to "http://www.example.com:8080/dept/app1/", then
        the script_name argument would be "/dept/app1".

        It MUST NOT end in a slash. If the script_name refers to the root
        of the URI, it MUST be an empty string (not "/").
    config: a file or dict containing application config. If this contains
        a [global] section, those entries will be used in the global
        (site-wide) config.
    N(	   t   _global_conf_aliast   updatet   treet   mountt   enginet   signalsR,   t   startt   block(   t   roott   script_namet   config(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt
   quickstart—   s    
(   t   threadlocalt   _Servingc           B   sV   e  Z d  Z e j e j d d ƒ e j d d ƒ ƒ Z e j ƒ  Z	 d „  Z
 d „  Z RS(   sÂ  An interface for registering request and response objects.

    Rather than have a separate "thread local" object for the request and
    the response, this class works as a single threadlocal container for
    both objects (and any others which developers wish to define). In this
    way, we can easily dump those objects when we stop/start a new HTTP
    conversation, yet still refer to them as module-level globals in a
    thread-safe way.
    s	   127.0.0.1iP   iW  c         C   s   | |  _  | |  _ d  S(   N(   R   R    (   R   R   R    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   loadÌ   s    	c         C   s   |  j  j ƒ  d S(   s   Remove all attributes of self.N(   t   __dict__t   clear(   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR@   Ð   s    (   R&   R'   R-   R   t   Requestt	   _httputilt   HostR   t   ResponseR    R>   R@   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR=   µ   s   
	t   _ThreadLocalProxyc           B   s‰   e  Z d  d g Z d „  Z d „  Z d „  Z d „  Z d „  Z e e ƒ Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z e Z RS(   t   __attrname__R?   c         C   s   | |  _  d  S(   N(   RF   (   R   t   attrname(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR   Û   s    c         C   s   t  t |  j ƒ } t  | | ƒ S(   N(   t   getattrR   RF   (   R   t   namet   child(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __getattr__Þ   s    c         C   sH   | d k r" t  j |  | | ƒ n" t t |  j ƒ } t | | | ƒ d  S(   NRF   (   s   __attrname__(   t   objectt   __setattr__RH   R   RF   t   setattr(   R   RI   t   valueRJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyRM   â   s    c         C   s#   t  t |  j ƒ } t | | ƒ d  S(   N(   RH   R   RF   t   delattr(   R   RI   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __delattr__é   s    c         C   s8   t  t |  j ƒ } | j j j ƒ  } | j | j ƒ | S(   N(   RH   R   RF   t	   __class__R?   t   copyR1   (   R   RJ   t   d(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt	   _get_dictí   s    c         C   s   t  t |  j ƒ } | | S(   N(   RH   R   RF   (   R   t   keyRJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __getitem__ô   s    c         C   s    t  t |  j ƒ } | | | <d  S(   N(   RH   R   RF   (   R   RV   RO   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __setitem__ø   s    c         C   s   t  t |  j ƒ } | | =d  S(   N(   RH   R   RF   (   R   RV   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __delitem__ü   s    c         C   s   t  t |  j ƒ } | | k S(   N(   RH   R   RF   (   R   RV   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __contains__   s    c         C   s   t  t |  j ƒ } t | ƒ S(   N(   RH   R   RF   t   len(   R   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __len__  s    c         C   s   t  t |  j ƒ } t | ƒ S(   N(   RH   R   RF   t   bool(   R   RJ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __nonzero__  s    (   R&   R'   t	   __slots__R   RK   RM   RQ   RU   t   propertyR?   RW   RX   RY   RZ   R\   R^   t   __bool__(    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyRE   ×   s   											R   R    t   _ThreadDatac           B   s   e  Z d  Z RS(   s%   A container for thread-specific data.(   R&   R'   R-   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyRb     s   i    c         C   s4   t  |  t ƒ r$ t t |  j ƒ }  n  t j |  | ƒ S(   sD   Given an object or a path to an object, get the object and its name.(   t
   isinstanceRE   RH   R   RF   t   _pydoct   _builtin_resolve(   t   thingt	   forceload(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   _cherrypy_pydoc_resolve!  s    N(   t
   _cploggingt   _GlobalLogManagerc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  A site-wide LogManager; routes to app.log or global log as appropriate.

    This :class:`LogManager<cherrypy._cplogging.LogManager>` implements
    cherrypy.log() and cherrypy.log.access(). If either
    function is called during a request, the message will be sent to the
    logger for the current Application. If they are called outside of a
    request, the message will be sent to the site-wide logger.
    c         O   sF   t  t d ƒ r0 t  t j d ƒ r0 t j j } n |  } | j | | Ž  S(   sK   Log the given message to the app.log or global log as appropriate.
        t   appt   log(   R+   R   Rk   Rl   t   error(   R   t   argst   kwargsRl   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   __call__=  s    !c         C   s9   y t  j j j ƒ  SWn t k
 r4 t j j |  ƒ SXd S(   sK   Log an access message to the app.log or global log as appropriate.
        N(   R   Rk   Rl   t   accesst   AttributeErrorRi   t
   LogManager(   R   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyRq   H  s    (   R&   R'   R-   Rp   Rq   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyRj   2  s   		c         C   s   t  j |  d d | ƒd  S(   Nt   ENGINEt   severity(   Rl   Rm   (   t   msgt   level(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   _buslogY  s    Rl   c            sä   ‡  ‡ f d †  } d d l  } d d l } t |  | j | j f ƒ r} ˆ  d k r^ t |  _ |  S| j d ƒ j	 ‰ | |  ƒ Snc |  d k rÄ ˆ  d k r« | j d ƒ j	 ‰ | S| j d ƒ j	 ‰ | Sn | j d ƒ j	 ‰ |  ‰  | Sd S(   sE   Expose the function, optionally providing an alias or set of aliases.c            sk   t  |  _ ˆ  d  k	 rg t ˆ  t ƒ r= |  ˆ ˆ  j d d ƒ <qg x' ˆ  D] } |  ˆ | j d d ƒ <qD Wn  |  S(   Nt   .t   _(   t   Truet   exposedt   NoneRc   R   t   replace(   t   funct   a(   t   aliast   parents(    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   expose_b  s    	iÿÿÿÿNi   (
   t   syst   typesRc   t   FunctionTypet
   MethodTypeR}   R{   R|   t	   _getframet   f_locals(   R   R   Rƒ   R„   R…   (    (   R   R‚   sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   expose`  s$    
	c             s·   d ‰ t ‰ xD | j ƒ  D]6 \ } } | d k r: | ‰ q t d j | ƒ ƒ ‚ q Wd d l ‰ ˆ d k	 r’ t ˆ d ƒ s‰ ˆ j ˆ ƒ r’ t ‰ n  d d ‡  ‡ ‡ ‡ ‡ f d † ‰ ˆ S(   s¥  A decorator for _cp_dispatch
    (cherrypy.dispatch.Dispatcher.dispatch_method_name).

    Optional keyword argument: handler=(Object or Function)

    Provides a _cp_dispatch function that pops off path segments into
    cherrypy.request.params under the names specified.  The dispatch
    is then forwarded on to the next vpath element.

    Note that any existing (and exposed) member function of the class that
    popargs is applied to will override that value of the argument.  For
    instance, if you have a method named "list" on the class decorated with
    popargs, then accessing "/list" will call that function instead of popping
    it off as the requested parameter.  This restriction applies to all
    _cp_dispatch functions.  The only way around this restriction is to create
    a "blank class" whose only function is to provide _cp_dispatch.

    If there are path elements after the arguments, or more arguments
    are requested than are available in the vpath, then the 'handler'
    keyword argument specifies the next object to handle the parameterized
    request.  If handler is not specified or is None, then self is used.
    If handler is a function rather than an instance, then that function
    will be called with the args specified and the return value from that
    function used as the next object INSTEAD of adding the parameters to
    cherrypy.request.args.

    This decorator may be used in one of two ways:

    As a class decorator:
    @cherrypy.popargs('year', 'month', 'day')
    class Blog:
        def index(self, year=None, month=None, day=None):
            #Process the parameters here; any url like
            #/, /2009, /2009/12, or /2009/12/31
            #will fill in the appropriate parameters.

        def create(self):
            #This link will still be available at /create.  Defined functions
            #take precedence over arguments.

    Or as a member of a class:
    class Blog:
        _cp_dispatch = cherrypy.popargs('year', 'month', 'day')
        #...

    The handler argument may be used to mix arguments with built in functions.
    For instance, the following setup allows different activities at the
    day, month, and year level:

    class DayHandler:
        def index(self, year, month, day):
            #Do something with this day; probably list entries

        def delete(self, year, month, day):
            #Delete all entries for this day

    @cherrypy.popargs('day', handler=DayHandler())
    class MonthHandler:
        def index(self, year, month):
            #Do something with this month; probably list entries

        def delete(self, year, month):
            #Delete all entries for this month

    @cherrypy.popargs('month', handler=MonthHandler())
    class YearHandler:
        def index(self, year):
            #Do something with this year

        #...

    @cherrypy.popargs('year', handler=YearHandler())
    class Root:
        def index(self):
            #...

    t   handlers;   cherrypy.popargs() got an unexpected keyword argument '{0}'iÿÿÿÿNRp   c            sÓ   ˆ j  |  ƒ r/ |  } t | t j j ˆ ƒ | S|  } i  } x+ ˆ  D]# } | sR Pn  | j d ƒ | | <qB Wˆ d  k	 rœ ˆ r… ˆ |   St j j	 | ƒ ˆ Sn  t j j	 | ƒ | rË t
 | | j d ƒ d  ƒ S| Sd  S(   Ni    (   t   isclassRN   t   dispatcht
   Dispatchert   dispatch_method_namet   popR}   R   t   paramsR1   RH   (   t   cls_or_selft   vpatht   clsR   t   parmst   arg(   Rn   t	   decoratedR‹   t   handler_callt   inspect(    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR—   ì  s&    
(	   R}   t   Falset   itemst	   TypeErrort   formatR™   R+   RŒ   R{   (   Rn   Ro   t   kt   v(    (   Rn   R—   R‹   R˜   R™   sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   popargs‰  s    R		! c         C   sá  t  | t t t f ƒ r' t | ƒ } n  | r: d | } n  t j r/|  j d ƒ sê t j } t j	 t
 k r‰ | j d ƒ sÃ | d } qÃ n: t j	 t k rÃ | j d ƒ rÃ | d k rÃ | d  } qÃ n  |  d k rØ | }  qê t | |  ƒ }  n  | d k rt j } n  | d k rt j } n  | | |  | } n9 | d k rJt j ƒ  } n  | pSd |  }  | |  | } d | k rÛg  } xL | j d ƒ D]; } | d k rŸqŠ| d k r¸| j ƒ  qŠ| j | ƒ qŠWd j | ƒ } n  | d k rÿt t j d t ƒ } n  | d	 k r1d d j | j d d
 ƒ d
 ƒ } n¬ | rÝt d t ƒ j d ƒ d  }	 | j d ƒ }
 xO |	 r³|
 r³|	 d |
 d } } | | k r–Pn  |	 j d ƒ |
 j d ƒ qeWd g t |	 ƒ |
 }
 d j |
 ƒ } n  | S(   sÿ  Create an absolute URL for the given path.

    If 'path' starts with a slash ('/'), this will return
        (base + script_name + path + qs).
    If it does not start with a slash, this returns
        (base + script_name [+ request.path_info] + path + qs).

    If script_name is None, cherrypy.request will be used
    to find a script_name, if available.

    If base is None, cherrypy.request.base will be used (if available).
    Note that you can use cherrypy.tools.proxy to change this.

    Finally, note that this function can be used to obtain an absolute URL
    for the current request path (minus the querystring) by passing no args.
    If you call url(qs=cherrypy.request.query_string), you should get the
    original browser URL (assuming no internal redirections).

    If relative is None or not provided, request.app.relative_urls will
    be used (if available, else False). If False, the output will be an
    absolute URL (including the scheme, host, vhost, and script_name).
    If True, the output will instead be a URL that is relative to the
    current request path, perhaps including '..' atoms. If relative is
    the string 'server', the output will instead be a URL that is
    relative to the server root; i.e., it will start with a slash.
    t   ?t   /iÿÿÿÿR/   s   ./Ry   s   ..t   relative_urlst   serveri   t   relativei    N(   Rc   t   tuplet   listt   dictt
   _urlencodeR   Rk   t
   startswitht	   path_infot   is_indexR{   t   endswithRš   t   _urljoinR}   R9   t   baseR¤   t   splitR   R   t   joinRH   t   urlR[   (   t   patht   qsR9   R¯   R¥   t   pit   newurlt   atomst   atomt   oldt   newR€   t   b(    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR²     sd    			&(   t	   _cpconfigs   tools.log_tracebacks.ons   tools.log_headers.ons   tools.trailing_slash.ons   tools.encode.onc         C   s   t  t |  | ƒ S(   N(   RN   Rl   (   Rž   RŸ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   <lambda>…  s    c         C   s   t  t |  | ƒ S(   N(   RN   t   checker(   Rž   RŸ   (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyR½   †  s    R¾   (   t
   _cpcheckerR6   (d   R-   t   __version__t   cherrypy._cpcompatR    R®   R   R©   R   R   t   cherrypy._cperrorR   R   R   R   R   R	   t   cherrypyR
   R   R   t   default_toolboxt   toolst   ToolR   t   cherrypy.libR   RB   R   t   TreeR2   t   cherrypy._cptreeR   R   t   wsgiR   t   cherrypy.processR   t   Win32BusR4   t   ConsoleCtrlHandlerR*   t   ImportErrorR   t   sett	   listenersR   R   R   t   timeout_monitorR,   t   Autoreloadert
   autoreloadt   ThreadManagert   thread_managert   SignalHandlerR)   RL   R(   R5   R.   t   ServerR¤   R}   R;   R<   t   _localR=   R   RE   R   R    Rb   t   thread_dataRh   t   pydocRd   t   resolveRe   Ri   Rs   Rj   Rl   R{   t   screent
   error_filet   access_fileRx   RŠ   R    R²   R¼   t   ConfigR:   R0   t   defaultst
   namespacest   resetR¿   t   CheckerR¾   (    (    (    sx   /local/mnt/workspace/CRMBuilds/Saipan.LA.2.0-00145-STD.PROD-1_20200821_083004/b/common/sectools/ext/cherrypy/__init__.pyt   <module>9   sœ   		
	:						)	†l
