ó
³Ebc           @   sn  d  d l  Z  d  d l Z d  d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d	 l m	 Z	 d d
 l m
 Z
 d d l m Z d d l m Z d d l m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d  e f d! „  ƒ  YZ d" e f d# „  ƒ  YZ d$ e f d% „  ƒ  YZ d& e f d' „  ƒ  YZ d( e f d) „  ƒ  YZ d* e f d+ „  ƒ  YZ d, e f d- „  ƒ  YZ  d d. „ Z" e ƒ  Z# e ƒ  Z$ e ƒ  Z% e ƒ  Z& e ƒ  Z' e ƒ  Z( d S(/   iÿÿÿÿN(   t   datetimei   (   t   _get_argv_encoding(   t   filename_to_ui(   t   get_filesystem_encoding(   t   get_streerror(   t   open_stream(   t   PY2(   t	   text_type(   t   BadParameter(   t   LazyFile(   t   safecallt	   ParamTypec           B   sb   e  Z d  Z e Z d Z d Z d d d „ Z d „  Z	 d „  Z
 d „  Z d „  Z d d d „ Z RS(   sÒ  Helper for converting values through types.  The following is
    necessary for a valid type:

    *   it needs a name
    *   it needs to pass through None unchanged
    *   it needs to convert from a string
    *   it needs to convert its result type through unchanged
        (eg: needs to be idempotent)
    *   it needs to be able to deal with param and context being `None`.
        This can be the case when the object is used with prompt
        inputs.
    c         C   s#   | d  k	 r |  j | | | ƒ Sd  S(   N(   t   Nonet   convert(   t   selft   valuet   paramt   ctx(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   __call__,   s    c         C   s   d S(   s>   Returns the metavar default for this param if it provides one.N(    (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   get_metavar0   t    c         C   s   d S(   st   Optionally might return extra information about a missing
        parameter.

        .. versionadded:: 2.0
        N(    (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   get_missing_message3   R   c         C   s   | S(   si   Converts the value.  This is not invoked for values that are
        `None` (the missing value).
        (    (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   :   s    c         C   s   | p	 d j  |  j ƒ S(   su  Given a value from an environment variable this splits it up
        into small chunks depending on the defined envvar list splitter.

        If the splitter is set to `None`, which means that whitespace splits,
        then leading and trailing whitespace is ignored.  Otherwise, leading
        and trailing splitters usually lead to empty items being included.
        R   (   t   splitt   envvar_list_splitter(   R   t   rv(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   split_envvar_value@   s    c         C   s   t  | d | d | ƒ‚ d S(   s4   Helper method to fail with an invalid value message.R   R   N(   R   (   R   t   messageR   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   failJ   s    N(   t   __name__t
   __module__t   __doc__t   Falset   is_compositeR   t   nameR   R   R   R   R   R   R   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR      s   				
t   CompositeParamTypec           B   s   e  Z e Z e d  „  ƒ Z RS(   c         C   s   t  ƒ  ‚ d  S(   N(   t   NotImplementedError(   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   arityR   s    (   R   R   t   TrueR    t   propertyR$   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR"   O   s   t   FuncParamTypec           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   | j  |  _ | |  _ d  S(   N(   R   R!   t   func(   R   R(   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   __init__X   s    c         C   sx   y |  j  | ƒ SWn` t k
 rs y t | ƒ } Wn) t k
 r\ t | ƒ j d d ƒ } n X|  j | | | ƒ n Xd  S(   Ns   utf-8t   replace(   R(   t
   ValueErrorR   t   UnicodeErrort   strt   decodeR   (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   \   s    (   R   R   R)   R   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR'   W   s   	t   UnprocessedParamTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   t   textc         C   s   | S(   N(    (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   j   s    c         C   s   d S(   Nt   UNPROCESSED(    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   __repr__m   s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR/   g   s   	t   StringParamTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   R0   c         C   sª   t  | t ƒ r¦ t ƒ  } y | j | ƒ } Wnt t k
 r¡ t ƒ  } | | k rŒ y | j | ƒ } Wqž t k
 rˆ | j d d ƒ } qž Xq¢ | j d d ƒ } n X| S| S(   Ns   utf-8R*   (   t
   isinstancet   bytesR   R.   R,   R   (   R   R   R   R   t   enct   fs_enc(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   t   s    		c         C   s   d S(   Nt   STRING(    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   …   s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR3   q   s   	t   Choicec           B   sD   e  Z d  Z d Z e d „ Z d „  Z d „  Z d „  Z d „  Z	 RS(   s>  The choice type allows a value to be checked against a fixed set
    of supported values. All of these values have to be strings.

    You should only pass a list or tuple of choices. Other iterables
    (like generators) may lead to surprising results.

    The resulting value will always be one of the originally passed choices
    regardless of ``case_sensitive`` or any ``ctx.token_normalize_func``
    being specified.

    See :ref:`choice-opts` for an example.

    :param case_sensitive: Set to false to make choices case
        insensitive. Defaults to true.
    t   choicec         C   s   | |  _  | |  _ d  S(   N(   t   choicest   case_sensitive(   R   R;   R<   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   œ   s    	c         C   s   d j  d j |  j ƒ ƒ S(   Ns   [{}]t   |(   t   formatt   joinR;   (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR       s    c         C   s   d j  d j |  j ƒ ƒ S(   Ns   Choose from:
	{}.s   ,
	(   R>   R?   R;   (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   £   s    c            sô   | } d „  |  j  Dƒ } ˆ  d  k	 rb ˆ  j d  k	 rb ˆ  j | ƒ } ‡  f d †  | j ƒ  Dƒ } n  |  j s± t r} t j ‰ n	 t j ‰ ˆ | ƒ } ‡ f d †  | j ƒ  Dƒ } n  | | k rÅ | | S|  j	 d j
 | d j |  j  ƒ ƒ | ˆ  ƒ d  S(   Nc         S   s   i  |  ] } | | “ q S(    (    (   t   .0R:   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pys
   <dictcomp>¬   s   	 c            s(   i  |  ] \ } } | ˆ  j  | ƒ “ q S(    (   t   token_normalize_func(   R@   t   normed_choicet   original(   R   (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pys
   <dictcomp>±   s   	c            s%   i  |  ] \ } } | ˆ  | ƒ “ q S(    (    (   R@   RB   RC   (   t   lower(    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pys
   <dictcomp>½   s   	s$   invalid choice: {}. (choose from {})s   , (   R;   R   RA   t   itemsR<   R   R-   RD   t   casefoldR   R>   R?   (   R   R   R   R   t   normed_valuet   normed_choices(    (   R   RD   sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   ¦   s(    		c         C   s   d j  t |  j ƒ ƒ S(   Ns   Choice('{}')(   R>   t   listR;   (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   Ì   s    (
   R   R   R   R!   R%   R)   R   R   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR9   ‰   s   			&t   DateTimec           B   sD   e  Z d  Z d Z d d „ Z d „  Z d „  Z d „  Z d „  Z	 RS(   sK  The DateTime type converts date strings into `datetime` objects.

    The format strings which are checked are configurable, but default to some
    common (non-timezone aware) ISO 8601 formats.

    When specifying *DateTime* formats, you should only pass a list or a tuple.
    Other iterables, like generators, may lead to surprising results.

    The format strings are processed using ``datetime.strptime``, and this
    consequently defines the format strings which are allowed.

    Parsing is tried using each format, in order, and the first format which
    parses successfully is used.

    :param formats: A list or tuple of date format strings, in the order in
                    which they should be tried. Defaults to
                    ``'%Y-%m-%d'``, ``'%Y-%m-%dT%H:%M:%S'``,
                    ``'%Y-%m-%d %H:%M:%S'``.
    R    c         C   s   | p d d d g |  _  d  S(   Ns   %Y-%m-%ds   %Y-%m-%dT%H:%M:%Ss   %Y-%m-%d %H:%M:%S(   t   formats(   R   RK   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   ç   s    c         C   s   d j  d j |  j ƒ ƒ S(   Ns   [{}]R=   (   R>   R?   RK   (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   ê   s    c         C   s-   y t  j | | ƒ SWn t k
 r( d  SXd  S(   N(   R    t   strptimeR+   R   (   R   R   R>   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   _try_to_convert_dateí   s    c         C   sY   x- |  j  D]" } |  j | | ƒ } | r
 | Sq
 W|  j d j | d j |  j  ƒ ƒ ƒ d  S(   Ns-   invalid datetime format: {}. (choose from {})s   , (   RK   RM   R   R>   R?   (   R   R   R   R   R>   t   dtime(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   ó   s    c         C   s   d S(   NRJ   (    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2      s    N(
   R   R   R   R!   R   R)   R   RM   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRJ   Ð   s   			t   IntParamTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   t   integerc         C   sB   y t  | ƒ SWn- t k
 r= |  j d j | ƒ | | ƒ n Xd  S(   Ns   {} is not a valid integer(   t   intR+   R   R>   (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR     s    c         C   s   d S(   Nt   INT(    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2     s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRO     s   	t   IntRangec           B   s8   e  Z d  Z d Z d d e d „ Z d „  Z d „  Z RS(   s  A parameter that works similar to :data:`click.INT` but restricts
    the value to fit into a range.  The default behavior is to fail if the
    value falls outside the range, but it can also be silently clamped
    between the two edges.

    See :ref:`ranges` for an example.
    s   integer rangec         C   s   | |  _  | |  _ | |  _ d  S(   N(   t   mint   maxt   clamp(   R   RT   RU   RV   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)     s    		c         C   sA  t  j |  | | | ƒ } |  j rn |  j d  k	 rF | |  j k  rF |  j S|  j d  k	 rn | |  j k rn |  j Sn  |  j d  k	 rŒ | |  j k  sª |  j d  k	 r=| |  j k r=|  j d  k rÞ |  j d j | |  j ƒ | | ƒ q=|  j d  k r|  j d j | |  j ƒ | | ƒ q=|  j d j | |  j |  j ƒ | | ƒ n  | S(   Ns-   {} is bigger than the maximum valid value {}.s.   {} is smaller than the minimum valid value {}.s)   {} is not in the valid range of {} to {}.(   RO   R   RV   RT   R   RU   R   R>   (   R   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   !  s8    	



c         C   s   d j  |  j |  j ƒ S(   Ns   IntRange({}, {})(   R>   RT   RU   (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   H  s    N(	   R   R   R   R!   R   R   R)   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRS     s
   	't   FloatParamTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   t   floatc         C   sB   y t  | ƒ SWn- t k
 r= |  j d j | ƒ | | ƒ n Xd  S(   Ns&   {} is not a valid floating point value(   RX   R+   R   R>   (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   O  s
    c         C   s   d S(   Nt   FLOAT(    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   W  s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRW   L  s   	t
   FloatRangec           B   s8   e  Z d  Z d Z d d e d „ Z d „  Z d „  Z RS(   s  A parameter that works similar to :data:`click.FLOAT` but restricts
    the value to fit into a range.  The default behavior is to fail if the
    value falls outside the range, but it can also be silently clamped
    between the two edges.

    See :ref:`ranges` for an example.
    s   float rangec         C   s   | |  _  | |  _ | |  _ d  S(   N(   RT   RU   RV   (   R   RT   RU   RV   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   f  s    		c         C   sA  t  j |  | | | ƒ } |  j rn |  j d  k	 rF | |  j k  rF |  j S|  j d  k	 rn | |  j k rn |  j Sn  |  j d  k	 rŒ | |  j k  sª |  j d  k	 r=| |  j k r=|  j d  k rÞ |  j d j | |  j ƒ | | ƒ q=|  j d  k r|  j d j | |  j ƒ | | ƒ q=|  j d j | |  j |  j ƒ | | ƒ n  | S(   Ns-   {} is bigger than the maximum valid value {}.s.   {} is smaller than the minimum valid value {}.s)   {} is not in the valid range of {} to {}.(   RW   R   RV   RT   R   RU   R   R>   (   R   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   k  s8    	



c         C   s   d j  |  j |  j ƒ S(   Ns   FloatRange({}, {})(   R>   RT   RU   (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   ’  s    N(	   R   R   R   R!   R   R   R)   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRZ   [  s
   	't   BoolParamTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   t   booleanc         C   se   t  | t ƒ r t | ƒ S| j ƒ  } | d k r5 t S| d k rE t S|  j d j | ƒ | | ƒ d  S(   Nt   truet   tt   1t   yest   yt   falset   ft   0t   not   ns   {} is not a valid boolean(   R]   R^   R_   R`   Ra   (   Rb   Rc   Rd   Re   Rf   (   R4   t   boolRD   R%   R   R   R>   (   R   R   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   ™  s    
c         C   s   d S(   Nt   BOOL(    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   £  s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR[   –  s   	
t   UUIDParameterTypec           B   s    e  Z d  Z d „  Z d „  Z RS(   t   uuidc         C   sx   d d  l  } y8 t r6 t | t ƒ r6 | j d ƒ } n  | j | ƒ SWn- t k
 rs |  j d j | ƒ | | ƒ n Xd  S(   Niÿÿÿÿt   asciis   {} is not a valid UUID value(	   Rj   R   R4   R   t   encodet   UUIDR+   R   R>   (   R   R   R   R   Rj   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   ª  s    c         C   s   d S(   NRm   (    (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR2   ´  s    (   R   R   R!   R   R2   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRi   §  s   	
t   Filec           B   sJ   e  Z d  Z d Z e j j Z d d d d e	 d „ Z
 d „  Z d „  Z RS(   sÿ  Declares a parameter to be a file for reading or writing.  The file
    is automatically closed once the context tears down (after the command
    finished working).

    Files can be opened for reading or writing.  The special value ``-``
    indicates stdin or stdout depending on the mode.

    By default, the file is opened for reading text data, but it can also be
    opened in binary mode or for writing.  The encoding parameter can be used
    to force a specific encoding.

    The `lazy` flag controls if the file should be opened immediately or upon
    first IO. The default is to be non-lazy for standard input and output
    streams as well as files opened for reading, `lazy` otherwise. When opening a
    file lazily for reading, it is still opened temporarily for validation, but
    will not be held open until first IO. lazy is mainly useful when opening
    for writing to avoid creating the file until it is needed.

    Starting with Click 2.0, files can also be opened atomically in which
    case all writes go into a separate file in the same folder and upon
    completion the file will be moved over to the original location.  This
    is useful if a file regularly read by other users is modified.

    See :ref:`file-args` for more information.
    t   filenamet   rt   strictc         C   s1   | |  _  | |  _ | |  _ | |  _ | |  _ d  S(   N(   t   modet   encodingt   errorst   lazyt   atomic(   R   Rr   Rs   Rt   Ru   Rv   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   Ö  s
    				c         C   s=   |  j  d  k	 r |  j  S| d k r& t Sd |  j k r9 t St S(   Nt   -t   w(   Ru   R   R   Rr   R%   (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   resolve_lazy_flagß  s    c         C   sE  yú t  | d ƒ s! t  | d ƒ r% | S|  j | ƒ } | r„ t | |  j |  j |  j d |  j ƒ} | d  k	 r€ | j | j	 ƒ n  | St
 | |  j |  j |  j d |  j ƒ\ } } | d  k	 rõ | rÜ | j t | j ƒ ƒ qõ | j t | j ƒ ƒ n  | SWnD t t f k
 r@} |  j d j t | ƒ t | ƒ ƒ | | ƒ n Xd  S(   Nt   readt   writeRv   s   Could not open file: {}: {}(   t   hasattrRy   R	   Rr   Rs   Rt   Rv   R   t   call_on_closet   close_intelligentlyR   R
   t   closet   flusht   IOErrort   OSErrorR   R>   R   R   (   R   R   R   R   Ru   Rc   t   should_closet   e(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   è  s.    $*N(   R   R   R   R!   t   ost   patht   pathsepR   R   R   R)   Ry   R   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRn   ¸  s   		t   Pathc        	   B   sM   e  Z d  Z e j j Z e e e e e e e d d „ Z
 d „  Z d „  Z RS(   s†  The path type is similar to the :class:`File` type but it performs
    different checks.  First of all, instead of returning an open file
    handle it returns just the filename.  Secondly, it can perform various
    basic checks about what the file or directory should be.

    .. versionchanged:: 6.0
       `allow_dash` was added.

    :param exists: if set to true, the file or directory needs to exist for
                   this value to be valid.  If this is not required and a
                   file does indeed not exist, then all further checks are
                   silently skipped.
    :param file_okay: controls if a file is a possible value.
    :param dir_okay: controls if a directory is a possible value.
    :param writable: if true, a writable check is performed.
    :param readable: if true, a readable check is performed.
    :param resolve_path: if this is true, then the path is fully resolved
                         before the value is passed onwards.  This means
                         that it's absolute and symlinks are resolved.  It
                         will not expand a tilde-prefix, as this is
                         supposed to be done by the shell only.
    :param allow_dash: If this is set to `True`, a single dash to indicate
                       standard streams is permitted.
    :param path_type: optionally a string type that should be used to
                      represent the path.  The default is `None` which
                      means the return value will be either bytes or
                      unicode depending on what makes most sense given the
                      input data Click deals with.
    c	   	      C   s®   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ |  j rp |  j rp d |  _ d |  _	 n: |  j r˜ |  j r˜ d |  _ d |  _	 n d |  _ d |  _	 d  S(   Nt   fileRn   t	   directoryt	   DirectoryR†   Rˆ   (
   t   existst	   file_okayt   dir_okayt   writablet   readablet   resolve_patht
   allow_dasht   typeR!   t	   path_type(	   R   RŒ   R   RŽ   R   R   R‘   R’   R”   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   0  s     											c         C   s_   |  j  d  k	 r[ t | |  j  ƒ r[ |  j  t k rF | j t ƒ  ƒ } q[ | j t ƒ  ƒ } n  | S(   N(   R“   R   R4   R   R.   R   Rl   (   R   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   coerce_path_resultN  s
    "c         C   sß  | } |  j  o! |  j o! | d k } | sÒ|  j rH t j j | ƒ } n  y t j | ƒ } WnO t k
 r¬ |  j s |  j	 | ƒ S|  j
 d j |  j t | ƒ ƒ | | ƒ n X|  j  rô t j | j ƒ rô |  j
 d j |  j t | ƒ ƒ | | ƒ n  |  j r;t j | j ƒ r;|  j
 d j |  j t | ƒ ƒ | | ƒ n  |  j r…t j | t j ƒ r…|  j
 d j |  j t | ƒ ƒ | | ƒ n  |  j rÒt j | t j ƒ rÒ|  j
 d j |  j t | ƒ ƒ | | ƒ qÒn  |  j	 | ƒ S(   NRw   s   {} '{}' does not exist.s   {} '{}' is a file.s   {} '{}' is a directory.s   {} '{}' is not writable.s   {} '{}' is not readable.(   Rw   Rw   (   R   R’   R‘   R…   R†   t   realpatht   statR‚   RŒ   R•   R   R>   R”   R   t   S_ISREGt   st_modeRŽ   t   S_ISDIRR   t   accesst   W_OKR   t   R_OK(   R   R   R   R   R   t   is_dasht   st(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   V  sN    		


N(   R   R   R   R…   R†   R‡   R   R   R%   R   R)   R•   R   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyRˆ     s   	t   Tuplec           B   s>   e  Z d  Z d „  Z e d „  ƒ Z e d „  ƒ Z d „  Z RS(   s  The default behavior of Click is to apply a type on a value directly.
    This works well in most cases, except for when `nargs` is set to a fixed
    count and different types should be used for different items.  In this
    case the :class:`Tuple` type can be used.  This type can only be used
    if `nargs` is set to a fixed number.

    For more information see :ref:`tuple-type`.

    This can be selected by using a Python tuple literal as a type.

    :param types: a list of types that should be used for the tuple items.
    c         C   s&   g  | D] } t  | ƒ ^ q |  _ d  S(   N(   t   convert_typet   types(   R   R¢   t   ty(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR)   œ  s    c         C   s#   d j  d j d „  |  j Dƒ ƒ ƒ S(   Ns   <{}>t    c         s   s   |  ] } | j  Vq d  S(   N(   R!   (   R@   R£   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pys	   <genexpr>¡  s    (   R>   R?   R¢   (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR!   Ÿ  s    c         C   s   t  |  j ƒ S(   N(   t   lenR¢   (   R   (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR$   £  s    c            sS   t  | ƒ t  |  j ƒ k r* t d ƒ ‚ n  t ‡  ‡ f d †  t |  j | ƒ Dƒ ƒ S(   NsL   It would appear that nargs is set to conflict with the composite type arity.c         3   s'   |  ] \ } } | | ˆ ˆ  ƒ Vq d  S(   N(    (   R@   R£   t   x(   R   R   (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pys	   <genexpr>­  s    (   R¥   R¢   t	   TypeErrort   tuplet   zip(   R   R   R   R   (    (   R   R   sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR   §  s    (   R   R   R   R)   R&   R!   R$   R   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR    Ž  s
   	c         C   s8  t  } |  d k rZ | d k	 rZ t | t ƒ rE t t t | ƒ ƒ }  n t | ƒ }  t } n  t |  t ƒ rs t |  ƒ St |  t ƒ r† |  S|  t	 k sª |  t
 k sª |  d k r® t S|  t k r¾ t S|  t k rÕ | rÕ t S|  t k rå t S| rï t Sy+ t |  t ƒ rt d j |  ƒ ƒ ‚ n  Wn t k
 r-n Xt |  ƒ S(   sQ   Converts a callable or python type into the most appropriate
    param type.
    s7   Attempted to use an uninstantiated parameter type ({}).N(   R   R   R4   R¨   t   mapR“   R%   R    R   R   R-   R8   RQ   RR   Rg   Rh   RX   RY   t
   issubclasst   AssertionErrorR>   R§   R'   (   R£   t   defaultt   guessed_type(    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyR¡   °  s6    	
$()   R…   R—   R    t   _compatR   R   R   R   R   R   R   t
   exceptionsR   t   utilsR	   R
   t   objectR   R"   R'   R/   R3   R9   RJ   RO   RS   RW   RZ   R[   Ri   Rn   Rˆ   R    R   R¡   R1   R8   RR   RY   Rh   Rm   (    (    (    sc   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/types.pyt   <module>   sF   >
G4;;W"7					