
Ԑ\c        C   @@  s  d  Z  d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d Z d Z	 e j
 d d k Z e j
 d d k Z e j
 d d !dpk Z e r e f Z e f Z e f Z e Z e Z e j Z n e f Z e e f Z e e j f Z e Z e Z e j j d	  r$e dr Z nV d e f d     YZ  y e! e     Wn e" k
 rje dt Z n Xe dv Z [  d   Z# d   Z$ d e f d     YZ% d e% f d     YZ& d e j' f d     YZ( d e% f d     YZ) d e f d     YZ* e* e+  Z, d e( f d     YZ- e) d d d d  e) d  d! d" d# d   e) d$ d! d! d% d$  e) d& d' d" d( d&  e) d) d' d*  e) d+ d! d" d, d+  e) d- d. d. d/ d-  e) d0 d. d. d- d0  e) d1 d2 d3  e) d4 d' d" d5 d4  e) d6 d' e rd7 n d8 d9  e) d: d' d;  e) d< d= d> d?  e) d d d  e) d@ d@ dA  e) dB dB dA  e) dC dC dA  e) d5 d' d" d5 d4  e) dD d! d" dE dD  e) dF d! d! dG dF  e& d" d'  e& dH dI  e& dJ dK  e& dL dM dN  e& dO dP dO  e& dQ dR dS  e& dT dU dV  e& dW dX dY  e& dZ d[ d\  e& d] d^ d_  e& d` da db  e& dc dd de  e& df dg dh  e& di dj dk  e& dl dm dn  e& do do dp  e& dq dq dp  e& dr dr dp  e& ds ds dt  e& du dv  e& dw dx  e& dy dz  e& d{ d| d{  e& d} d~  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d d d  e& d e+ d d  e& d e+ d d  e& d e+ d e+ d  e& d d d  e& d d d  e& d d d  g@ Z. e j d k rYe. e& d d  g 7Z. n  xJ e. D]B Z/ e0 e- e/ j1 e/  e2 e/ e&  r`e, j3 e/ d e/ j1  q`q`W[/ e. e- _. e- e+ d  Z4 e, j3 e4 d  d e( f d     YZ5 e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d? d d  e) d d d  e) d d d  e) d d d  e) d d d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  g Z6 x! e6 D] Z/ e0 e5 e/ j1 e/  qrW[/ e6 e5 _. e, j3 e5 e+ d  d d  d e( f d     YZ7 e) d d d  e) d d d  e) d d d  g Z8 x! e8 D] Z/ e0 e7 e/ j1 e/  q	W[/ e8 e7 _. e, j3 e7 e+ d  d d  d e( f d     YZ9 e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) d d d  e) dd d  e) dd d  e) dd d  e) dd d  e) dd d  e) dd d  e) dd d  e) dd d  g# Z: x! e: D] Z/ e0 e9 e/ j1 e/  q~W[/ e: e9 _. e, j3 e9 e+ d	 d
d de( f d    YZ; e) dd d e) dd d e) dd d e) dd d g Z< x! e< D] Z/ e0 e; e/ j1 e/  q#W[/ e< e; _. e, j3 e; e+ d dd de( f d    YZ= e) dd d  g Z> x! e> D] Z/ e0 e= e/ j1 e/  qW[/ e> e= _. e, j3 e= e+ d dd de j' f d    YZ? e, j3 e? e+ d  d d  Z@ d   ZA e rSd!ZB d"ZC d#ZD d$ZE d%ZF d&ZG n$ d'ZB d(ZC d)ZD d*ZE d+ZF d,ZG y
 eH ZI Wn eJ k
 rd-  ZI n XeI ZH y
 eK ZK Wn eJ k
 rd.  ZK n Xe rd/  ZL e jM ZN d0  ZO e ZP n7 d1  ZL d2  ZN d3  ZO d4e f d5    YZP eK ZK e# eL d6 e jQ eB  ZR e jQ eC  ZS e jQ eD  ZT e jQ eE  ZU e jQ eF  ZV e jQ eG  ZW e rd7  ZX d8  ZY d9  ZZ d:  Z[ e j\ d; Z] e j\ d< Z^ e j\ d= Z_ nQ d>  ZX d?  ZY d@  ZZ dA  Z[ e j\ dB Z] e j\ dC Z^ e j\ dD Z_ e# eX dE e# eY dF e# eZ dG e# e[ dH e r$dI  Z` dJ  Za eb Zc d d ld Zd ed je dK jf Zg [d e jh d  Zi e jj Zk el Zm d d ln Zn en jo Zo en jp Zp dLZq e j
 d
 d
 k rdMZr dNZs qdOZr dPZs np dQ  Z` dR  Za ec Zc eb Zg dS  Zi dT  Zk e jt e ju ev  Zm d d lo Zo eo jo Zo Zp dUZq dMZr dNZs e# e` dV e# ea dW dX  Zw dY  Zx dZ  Zy e rez e4 j{ d[ Z| d d\ Z~ n d d d] Z| e| d^ e j
 d  dwk r)e| d_ n) e j
 d  dxk rIe| d` n	 da  Z ez e4 j{ dbd  Z e d k rdc  Z n  e j
 d  dyk  re Z dd  Z n  e# e~ de e j
 d d !dzk  re j e j df Z n	 e j Z dg  Z dh  Z didjdk Z didjdl Z didjdm Z dn  Z g  Z e+ Z e   j do d k	 r`g  e _ n  e j rxO e e j  D]> \ Z Z e e  j+ d k rye j1 e+ k rye j e =PqyqyW[ [ n  e j j e,  d S({  s6   Utilities for writing code that runs on Python 2 and 3i    (   t   absolute_importNs'   Benjamin Peterson <benjamin@python.org>s   1.11.0i   i   i   t   javai   i   t   Xc           B@  s   e  Z d    Z RS(   c         C@  s   d S(   Ni   i   I       (    (   t   self(    (    s   renpy/six.pyt   __len__>   s    (   t   __name__t
   __module__R   (    (    (    s   renpy/six.pyR   <   s   i?   c         C@  s   | |  _  d S(   s    Add documentation to a function.N(   t   __doc__(   t   funct   doc(    (    s   renpy/six.pyt   _add_docK   s    c         C@  s   t  |   t j |  S(   s7   Import module, returning the module after the last dot.(   t
   __import__t   syst   modules(   t   name(    (    s   renpy/six.pyt   _import_moduleP   s    
t
   _LazyDescrc           B@  s   e  Z d    Z d   Z RS(   c         C@  s   | |  _  d  S(   N(   R   (   R   R   (    (    s   renpy/six.pyt   __init__X   s    c         C@  sN   |  j    } t | |  j |  y t | j |  j  Wn t k
 rI n X| S(   N(   t   _resolvet   setattrR   t   delattrt	   __class__t   AttributeError(   R   t   objt   tpt   result(    (    s   renpy/six.pyt   __get__[   s    (   R   R   R   R   (    (    (    s   renpy/six.pyR   V   s   	t   MovedModulec           B@  s&   e  Z d d   Z d   Z d   Z RS(   c         C@  sJ   t  t |   j |  t r= | d  k r1 | } n  | |  _ n	 | |  _ d  S(   N(   t   superR   R   t   PY3t   Nonet   mod(   R   R   t   oldt   new(    (    s   renpy/six.pyR   i   s    	c         C@  s   t  |  j  S(   N(   R   R   (   R   (    (    s   renpy/six.pyR   r   s    c         C@  s/   |  j    } t | |  } t |  | |  | S(   N(   R   t   getattrR   (   R   t   attrt   _modulet   value(    (    s   renpy/six.pyt   __getattr__u   s    N(   R   R   R   R   R   R&   (    (    (    s   renpy/six.pyR   g   s   		t   _LazyModulec           B@  s    e  Z d    Z d   Z g  Z RS(   c         C@  s)   t  t |   j |  |  j j |  _ d  S(   N(   R   R'   R   R   R   (   R   R   (    (    s   renpy/six.pyR   ~   s    c         C@  s3   d d g } | g  |  j  D] } | j ^ q 7} | S(   NR   R   (   t   _moved_attributesR   (   R   t   attrsR#   (    (    s   renpy/six.pyt   __dir__   s    #(   R   R   R   R*   R(   (    (    (    s   renpy/six.pyR'   |   s   		t   MovedAttributec           B@  s    e  Z d d d   Z d   Z RS(   c         C@  s   t  t |   j |  t rp | d  k r1 | } n  | |  _ | d  k rd | d  k r[ | } qd | } n  | |  _ n' | |  _ | d  k r | } n  | |  _ d  S(   N(   R   R+   R   R   R   R   R#   (   R   R   t   old_modt   new_modt   old_attrt   new_attr(    (    s   renpy/six.pyR      s    						c         C@  s   t  |  j  } t | |  j  S(   N(   R   R   R"   R#   (   R   t   module(    (    s   renpy/six.pyR      s    N(   R   R   R   R   R   (    (    (    s   renpy/six.pyR+      s   t   _SixMetaPathImporterc           B@  s_   e  Z d  Z d   Z d   Z d   Z d	 d  Z d   Z d   Z	 d   Z
 d   Z e Z RS(
   s   
    A meta path importer to import six.moves and its submodules.

    This class implements a PEP302 finder and loader. It should be compatible
    with Python 2.5 and all existing versions of Python3
    c         C@  s   | |  _  i  |  _ d  S(   N(   R   t   known_modules(   R   t   six_module_name(    (    s   renpy/six.pyR      s    	c         G@  s-   x& | D] } | |  j  |  j d | <q Wd  S(   Nt   .(   R2   R   (   R   R   t	   fullnamest   fullname(    (    s   renpy/six.pyt   _add_module   s    c         C@  s   |  j  |  j d | S(   NR4   (   R2   R   (   R   R6   (    (    s   renpy/six.pyt   _get_module   s    c         C@  s   | |  j  k r |  Sd  S(   N(   R2   R   (   R   R6   t   path(    (    s   renpy/six.pyt   find_module   s    c         C@  s7   y |  j  | SWn! t k
 r2 t d |   n Xd  S(   Ns!   This loader does not know module (   R2   t   KeyErrort   ImportError(   R   R6   (    (    s   renpy/six.pyt   __get_module   s    c         C@  sj   y t  j | SWn t k
 r" n X|  j |  } t | t  rP | j   } n	 |  | _ | t  j | <| S(   N(   R   R   R;   t    _SixMetaPathImporter__get_modulet
   isinstanceR   R   t
   __loader__(   R   R6   R   (    (    s   renpy/six.pyt   load_module   s    	c         C@  s   t  |  j |  d  S(   s   
        Return true, if the named module is a package.

        We need this method to get correct spec objects with
        Python 3.4 (see PEP451)
        t   __path__(   t   hasattrR>   (   R   R6   (    (    s   renpy/six.pyt
   is_package   s    c         C@  s   |  j  |  d S(   s;   Return None

        Required, if is_package is implementedN(   R>   R   (   R   R6   (    (    s   renpy/six.pyt   get_code   s    N(   R   R   R   R   R7   R8   R   R:   R>   RA   RD   RE   t
   get_source(    (    (    s   renpy/six.pyR1      s   								t   _MovedItemsc           B@  s   e  Z d  Z g  Z RS(   s   Lazy loading of moved objects(   R   R   R   RB   (    (    (    s   renpy/six.pyRG      s   t	   cStringIOt   iot   StringIOt   filtert	   itertoolst   builtinst   ifiltert   filterfalset   ifilterfalset   inputt   __builtin__t	   raw_inputt   internR   t   mapt   imapt   getcwdt   ost   getcwdut   getcwdbt	   getoutputt   commandst
   subprocesst   ranget   xranget   reload_modulet	   importlibt   impt   reloadt   reducet	   functoolst   shlex_quotet   pipest   shlext   quotet   UserDictt   collectionst   UserListt
   UserStringt   zipt   izipt   zip_longestt   izip_longestt   configparsert   ConfigParsert   copyregt   copy_regt   dbm_gnut   gdbms   dbm.gnut   _dummy_threadt   dummy_threadt   http_cookiejart	   cookielibs   http.cookiejart   http_cookiest   Cookies   http.cookiest   html_entitiest   htmlentitydefss   html.entitiest   html_parsert
   HTMLParsers   html.parsert   http_clientt   httplibs   http.clientt   email_mime_bases   email.MIMEBases   email.mime.baset   email_mime_images   email.MIMEImages   email.mime.imaget   email_mime_multiparts   email.MIMEMultiparts   email.mime.multipartt   email_mime_nonmultiparts   email.MIMENonMultiparts   email.mime.nonmultipartt   email_mime_texts   email.MIMETexts   email.mime.textt   BaseHTTPServers   http.servert   CGIHTTPServert   SimpleHTTPServert   cPicklet   picklet   queuet   Queuet   reprlibt   reprt   socketservert   SocketServert   _threadt   threadt   tkintert   Tkintert   tkinter_dialogt   Dialogs   tkinter.dialogt   tkinter_filedialogt
   FileDialogs   tkinter.filedialogt   tkinter_scrolledtextt   ScrolledTexts   tkinter.scrolledtextt   tkinter_simpledialogt   SimpleDialogs   tkinter.simpledialogt   tkinter_tixt   Tixs   tkinter.tixt   tkinter_ttkt   ttks   tkinter.ttkt   tkinter_constantst   Tkconstantss   tkinter.constantst   tkinter_dndt   Tkdnds   tkinter.dndt   tkinter_colorchoosert   tkColorChoosers   tkinter.colorchoosert   tkinter_commondialogt   tkCommonDialogs   tkinter.commondialogt   tkinter_tkfiledialogt   tkFileDialogt   tkinter_fontt   tkFonts   tkinter.fontt   tkinter_messageboxt   tkMessageBoxs   tkinter.messageboxt   tkinter_tksimpledialogt   tkSimpleDialogt   urllib_parses   .moves.urllib_parses   urllib.parset   urllib_errors   .moves.urllib_errors   urllib.errort   urllibs   .moves.urllibt   urllib_robotparsert   robotparsers   urllib.robotparsert   xmlrpc_clientt	   xmlrpclibs   xmlrpc.clientt   xmlrpc_servert   SimpleXMLRPCServers   xmlrpc.servert   win32t   winregt   _winregs   moves.s   .movest   movest   Module_six_moves_urllib_parsec           B@  s   e  Z d  Z RS(   s7   Lazy loading of moved objects in six.moves.urllib_parse(   R   R   R   (    (    (    s   renpy/six.pyR   B  s   t   ParseResultt   urlparset   SplitResultt   parse_qst	   parse_qslt	   urldefragt   urljoint   urlsplitt
   urlunparset
   urlunsplitt
   quote_plust   unquotet   unquote_plust   unquote_to_bytest	   urlencodet
   splitqueryt   splittagt	   splitusert
   splitvaluet   uses_fragmentt   uses_netloct   uses_paramst
   uses_queryt   uses_relatives   moves.urllib_parses   moves.urllib.parset   Module_six_moves_urllib_errorc           B@  s   e  Z d  Z RS(   s7   Lazy loading of moved objects in six.moves.urllib_error(   R   R   R   (    (    (    s   renpy/six.pyR   l  s   t   URLErrort   urllib2t	   HTTPErrort   ContentTooShortErrors   .moves.urllib.errors   moves.urllib_errors   moves.urllib.errort   Module_six_moves_urllib_requestc           B@  s   e  Z d  Z RS(   s9   Lazy loading of moved objects in six.moves.urllib_request(   R   R   R   (    (    (    s   renpy/six.pyR     s   t   urlopens   urllib.requestt   install_openert   build_openert   pathname2urlt   url2pathnamet
   getproxiest   Requestt   OpenerDirectort   HTTPDefaultErrorHandlert   HTTPRedirectHandlert   HTTPCookieProcessort   ProxyHandlert   BaseHandlert   HTTPPasswordMgrt   HTTPPasswordMgrWithDefaultRealmt   AbstractBasicAuthHandlert   HTTPBasicAuthHandlert   ProxyBasicAuthHandlert   AbstractDigestAuthHandlert   HTTPDigestAuthHandlert   ProxyDigestAuthHandlert   HTTPHandlert   HTTPSHandlert   FileHandlert
   FTPHandlert   CacheFTPHandlert   UnknownHandlert   HTTPErrorProcessort   urlretrievet
   urlcleanupt	   URLopenert   FancyURLopenert   proxy_bypasst   parse_http_listt   parse_keqv_lists   .moves.urllib.requests   moves.urllib_requests   moves.urllib.requestt    Module_six_moves_urllib_responsec           B@  s   e  Z d  Z RS(   s:   Lazy loading of moved objects in six.moves.urllib_response(   R   R   R   (    (    (    s   renpy/six.pyR    s   t   addbases   urllib.responset   addclosehookt   addinfot
   addinfourls   .moves.urllib.responses   moves.urllib_responses   moves.urllib.responset#   Module_six_moves_urllib_robotparserc           B@  s   e  Z d  Z RS(   s=   Lazy loading of moved objects in six.moves.urllib_robotparser(   R   R   R   (    (    (    s   renpy/six.pyR    s   t   RobotFileParsers   .moves.urllib.robotparsers   moves.urllib_robotparsers   moves.urllib.robotparsert   Module_six_moves_urllibc           B@  sh   e  Z d  Z g  Z e j d  Z e j d  Z e j d  Z e j d  Z	 e j d  Z
 d   Z RS(   sI   Create a six.moves.urllib namespace that resembles the Python 3 namespaces   moves.urllib_parses   moves.urllib_errors   moves.urllib_requests   moves.urllib_responses   moves.urllib_robotparserc         C@  s   d d d d d g S(   Nt   parset   errort   requestt   responseR   (    (   R   (    (    s   renpy/six.pyR*     s    (   R   R   R   RB   t	   _importerR8   R  R  R  R  R   R*   (    (    (    s   renpy/six.pyR
    s   s   moves.urllibc         C@  s   t  t |  j |   d S(   s   Add an item to six.moves.N(   R   RG   R   (   t   move(    (    s   renpy/six.pyt   add_move  s    c         C@  s^   y t  t |   WnF t k
 rY y t j |  =WqZ t k
 rU t d |  f   qZ Xn Xd S(   s   Remove item from six.moves.s   no such move, %rN(   R   RG   R   R   t   __dict__R;   (   R   (    (    s   renpy/six.pyt   remove_move  s    t   __func__t   __self__t   __closure__t   __code__t   __defaults__t   __globals__t   im_funct   im_selft   func_closuret	   func_codet   func_defaultst   func_globalsc         C@  s
   |  j    S(   N(   t   next(   t   it(    (    s   renpy/six.pyt   advance_iterator  s    c         C@  s   t  d   t |   j D  S(   Nc         s@  s   |  ] } d  | j  k Vq d S(   t   __call__N(   R  (   t   .0t   klass(    (    s   renpy/six.pys	   <genexpr>  s    (   t   anyt   typet   __mro__(   R   (    (    s   renpy/six.pyt   callable  s    c         C@  s   |  S(   N(    (   t   unbound(    (    s   renpy/six.pyt   get_unbound_function  s    c         C@  s   |  S(   N(    (   R   t   cls(    (    s   renpy/six.pyt   create_unbound_method#  s    c         C@  s   |  j  S(   N(   R  (   R*  (    (    s   renpy/six.pyR+  (  s    c         C@  s   t  j |  | | j  S(   N(   t   typest
   MethodTypeR   (   R   R   (    (    s   renpy/six.pyt   create_bound_method+  s    c         C@  s   t  j |  d  |  S(   N(   R.  R/  R   (   R   R,  (    (    s   renpy/six.pyR-  .  s    t   Iteratorc           B@  s   e  Z d    Z RS(   c         C@  s   t  |   j |   S(   N(   R'  t   __next__(   R   (    (    s   renpy/six.pyR   3  s    (   R   R   R   (    (    (    s   renpy/six.pyR1  1  s   s3   Get the function out of a possibly unbound functionc         K@  s   t  |  j |    S(   N(   t   itert   keys(   t   dt   kw(    (    s   renpy/six.pyt   iterkeysD  s    c         K@  s   t  |  j |    S(   N(   R3  t   values(   R5  R6  (    (    s   renpy/six.pyt
   itervaluesG  s    c         K@  s   t  |  j |    S(   N(   R3  t   items(   R5  R6  (    (    s   renpy/six.pyt	   iteritemsJ  s    c         K@  s   t  |  j |    S(   N(   R3  t   lists(   R5  R6  (    (    s   renpy/six.pyt	   iterlistsM  s    R4  R8  R:  c         K@  s   |  j  |   S(   N(   R7  (   R5  R6  (    (    s   renpy/six.pyR7  V  s    c         K@  s   |  j  |   S(   N(   R9  (   R5  R6  (    (    s   renpy/six.pyR9  Y  s    c         K@  s   |  j  |   S(   N(   R;  (   R5  R6  (    (    s   renpy/six.pyR;  \  s    c         K@  s   |  j  |   S(   N(   R=  (   R5  R6  (    (    s   renpy/six.pyR=  _  s    t   viewkeyst
   viewvaluest	   viewitemss1   Return an iterator over the keys of a dictionary.s3   Return an iterator over the values of a dictionary.s?   Return an iterator over the (key, value) pairs of a dictionary.sB   Return an iterator over the (key, [values]) pairs of a dictionary.c         C@  s   |  j  d  S(   Ns   latin-1(   t   encode(   t   s(    (    s   renpy/six.pyt   bq  s    c         C@  s   |  S(   N(    (   RB  (    (    s   renpy/six.pyt   ut  s    s   >Bt   assertCountEqualt   assertRaisesRegexpt   assertRegexpMatchest   assertRaisesRegext   assertRegexc         C@  s   |  S(   N(    (   RB  (    (    s   renpy/six.pyRC    s    c         C@  s   t  |  j d d  d  S(   Ns   \\s   \\\\t   unicode_escape(   t   unicodet   replace(   RB  (    (    s   renpy/six.pyRD    s    c         C@  s   t  |  d  S(   Ni    (   t   ord(   t   bs(    (    s   renpy/six.pyt   byte2int  s    c         C@  s   t  |  |  S(   N(   RM  (   t   buft   i(    (    s   renpy/six.pyt
   indexbytes  s    t   assertItemsEquals   Byte literals   Text literalc         O@  s   t  |  t  | |   S(   N(   R"   t   _assertCountEqual(   R   t   argst   kwargs(    (    s   renpy/six.pyRE    s    c         O@  s   t  |  t  | |   S(   N(   R"   t   _assertRaisesRegex(   R   RU  RV  (    (    s   renpy/six.pyRH    s    c         O@  s   t  |  t  | |   S(   N(   R"   t   _assertRegex(   R   RU  RV  (    (    s   renpy/six.pyRI    s    t   execc         C@  sW   zC | d  k r |    } n  | j | k	 r< | j |   n  |  Wd  d  } d  } Xd  S(   N(   R   t   __traceback__t   with_traceback(   R   R%   t   tb(    (    s   renpy/six.pyt   reraise  s    
c         B@  sc   | d k rB e j d  } | j } | d k r< | j } n  ~ n | d k rW | } n  d d Ud S(   s   Execute code in a namespace.i   s   exec _code_ in _globs_, _locs_N(   R   R   t	   _getframet	   f_globalst   f_locals(   t   _code_t   _globs_t   _locs_t   frame(    (    s   renpy/six.pyt   exec_  s    		se   def reraise(tp, value, tb=None):
    try:
        raise tp, value, tb
    finally:
        tb = None
s   def raise_from(value, from_value):
    try:
        if from_value is None:
            raise value
        raise value from from_value
    finally:
        value = None
sr   def raise_from(value, from_value):
    try:
        raise value from from_value
    finally:
        value = None
c         C@  s
   |   d  S(   N(    (   R%   t
   from_value(    (    s   renpy/six.pyt
   raise_from  s    t   printc    
      @  s  | j  d t j      d k r% d S  f d   } t } | j  d d  } | d k	 r t | t  rp t } q t | t  s t	 d   q n  | j  d d  } | d k	 r t | t  r t } q t | t  s t	 d   q n  | r t	 d   n  | s0x* |  D] } t | t  r
t } Pq
q
Wn  | rQt d	  } t d
  } n d	 } d
 } | d k rr| } n  | d k r| } n  x7 t
 |   D]) \ }	 } |	 r| |  n  | |  qW| |  d S(   s4   The new-style print function for Python 2.4 and 2.5.t   fileNc         @  s   t  |  t  s t |   }  n  t    t  r t  |  t  r   j d  k	 r t   d d   } | d  k rr d } n  |  j   j |  }  n    j	 |   d  S(   Nt   errorst   strict(
   R?   t
   basestringt   strRi  RK  t   encodingR   R"   RA  t   write(   t   dataRj  (   t   fp(    s   renpy/six.pyRo    s    	t   seps   sep must be None or a stringt   ends   end must be None or a strings$   invalid keyword arguments to print()s   
t    (   t   popR   t   stdoutR   t   FalseR?   RK  t   TrueRm  t	   TypeErrort	   enumerate(
   RU  RV  Ro  t   want_unicodeRr  Rs  t   argt   newlinet   spaceRQ  (    (   Rq  s   renpy/six.pyt   print_  sL    				c          O@  sW   | j  d t j  } | j d t  } t |  |   | rS | d  k	 rS | j   n  d  S(   NRi  t   flush(   t   getR   Rv  Ru  Rw  t   _printR   R  (   RU  RV  Rq  R  (    (    s   renpy/six.pyR    s
    s   Reraise an exception.c         @  s       f d   } | S(   Nc         @  s(   t  j      |   }   |  _ |  S(   N(   Re   t   wrapst   __wrapped__(   t   f(   t   assignedt   updatedt   wrapped(    s   renpy/six.pyt   wrapper*  s    	(    (   R  R  R  R  (    (   R  R  R  s   renpy/six.pyR  (  s    c         @  s5   d t  f    f d     Y} t  j | d d i   S(   s%   Create a base class with a metaclass.t	   metaclassc           @  s2   e  Z    f d    Z e    f d    Z RS(   c         @  s    |   |  S(   N(    (   R,  R   t
   this_basesR5  (   t   basest   meta(    s   renpy/six.pyt   __new__:  s    c         @  s    j  |    S(   N(   t   __prepare__(   R,  R   R  (   R  R  (    s   renpy/six.pyR  =  s    (   R   R   R  t   classmethodR  (    (   R  R  (    s   renpy/six.pyR  8  s   t   temporary_class(    (   R'  R  (   R  R  R  (    (   R  R  s   renpy/six.pyt   with_metaclass3  s    c         @  s     f d   } | S(   s6   Class decorator for creating a class with a metaclass.c         @  s   |  j  j   } | j d  } | d  k	 rf t | t  rE | g } n  x | D] } | j |  qL Wn  | j d d   | j d d   t |  d  r |  j | d <n    |  j	 |  j
 |  S(   Nt	   __slots__R  t   __weakref__t   __qualname__(   R  t   copyR  R   R?   Rm  Ru  RC   R  R   t	   __bases__(   R,  t	   orig_varst   slotst	   slots_var(   R  (    s   renpy/six.pyR  E  s    (    (   R  R  (    (   R  s   renpy/six.pyt   add_metaclassC  s    s   utf-8Rk  c         C@  sL   t  |  t  r |  j | |  St  |  t  r2 |  St d t |     d S(   s   Coerce **s** to six.binary_type.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> encoded to `bytes`
      - `bytes` -> `bytes`
    s   not expecting type '%s'N(   R?   t	   text_typeRA  t   binary_typeRy  R'  (   RB  Rn  Rj  (    (    s   renpy/six.pyt   ensure_binaryU  s
    c         C@  s   t  |  t t f  s. t d t |     n  t rX t  |  t  rX |  j | |  }  n* t r t  |  t  r |  j | |  }  n  |  S(   s   Coerce *s* to `str`.

    For Python 2:
      - `unicode` -> encoded to `str`
      - `str` -> `str`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    s   not expecting type '%s'(	   R?   R  R  Ry  R'  t   PY2RA  R   t   decode(   RB  Rn  Rj  (    (    s   renpy/six.pyt
   ensure_strh  s    c         C@  sL   t  |  t  r |  j | |  St  |  t  r2 |  St d t |     d S(   s   Coerce *s* to six.text_type.

    For Python 2:
      - `unicode` -> `unicode`
      - `str` -> `unicode`

    For Python 3:
      - `str` -> `str`
      - `bytes` -> decoded to `str`
    s   not expecting type '%s'N(   R?   R  R  R  Ry  R'  (   RB  Rn  Rj  (    (    s   renpy/six.pyt   ensure_text|  s
    c         C@  sJ   t  rF d |  j k r+ t d |  j   n  |  j |  _ d   |  _ n  |  S(   s   
    A decorator that defines __unicode__ and __str__ methods under Python 2.
    Under Python 3 it does nothing.

    To support Python 2 and 3 with a single code base, define a __str__ method
    returning text and apply this decorator to the class.
    t   __str__sY   @python_2_unicode_compatible cannot be applied to %s because it doesn't define __str__().c         S@  s   |  j    j d  S(   Ns   utf-8(   t   __unicode__RA  (   R   (    (    s   renpy/six.pyt   <lambda>  s    (   R  R  t
   ValueErrorR   R  R  (   R%  (    (    s   renpy/six.pyt   python_2_unicode_compatible  s    t   __spec__(   i   i   I       iI       il            l    (   i   i   (   i   i   (   i   i   (   i   i   (   R   t
   __future__R    Re   RL   t   operatorR   R.  t
   __author__t   __version__t   version_infoR  R   t   PY34Rm  t   string_typest   intt   integer_typesR'  t   class_typesR  t   bytesR  t   maxsizet   MAXSIZERl  t   longt	   ClassTypeRK  t   platformt
   startswitht   objectR   t   lent   OverflowErrorR
   R   R   R   t
   ModuleTypeR'   R+   R1   R   R  RG   R(   R#   R   R   R?   R7   R   R   t   _urllib_parse_moved_attributesR   t   _urllib_error_moved_attributesR   t    _urllib_request_moved_attributesR  t!   _urllib_response_moved_attributesR  t$   _urllib_robotparser_moved_attributesR
  R  R  t
   _meth_funct
   _meth_selft   _func_closuret
   _func_codet   _func_defaultst   _func_globalsR   R"  t	   NameErrorR)  R+  R/  R0  R-  R1  t
   attrgettert   get_method_functiont   get_method_selft   get_function_closuret   get_function_codet   get_function_defaultst   get_function_globalsR7  R9  R;  R=  t   methodcallerR>  R?  R@  RC  RD  t   chrt   unichrt   structt   Structt   packt   int2bytet
   itemgetterRO  t   getitemRR  R3  t	   iterbytesRI   RJ   t   BytesIORT  RW  RX  t   partialRV   RM  RE  RH  RI  R"   RM   Re  R   R]  Rg  R  R  t   WRAPPER_ASSIGNMENTSt   WRAPPER_UPDATESR  R  R  R  R  R  R  RB   t   __package__t   globalsR  R  t   submodule_search_locationst	   meta_pathRz  RQ  t   importert   append(    (    (    s   renpy/six.pyt   <module>   s  						>					
	
	
	
	
			

																													

	5					
	