ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ qDYc@sldZddlZddlmZmZddlZddlZddlZddlm Z m Z ddl Z ddl mZeZdZejdejZdZejd Zd d Zd Zd ejfdYZddddZdefdYZdefdYZe jZej Z ej!Z!ej"Z"ej#Z#ej$Z$ej%Z%dS(s babel.util ~~~~~~~~~~ Various utility classes and functions. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. iN(t timedeltattzinfo(tiziptimap(t localtimeccsEt}x5t|D]'}||kr|V|j|qqWdS(sYield all items in an iterable collection that are distinct. Unlike when using sets for a similar effect, the original ordering of the items in the collection is preserved by this function. >>> print(list(distinct([1, 2, 1, 3, 4, 4]))) [1, 2, 3, 4] >>> print(list(distinct('foobar'))) ['f', 'o', 'b', 'a', 'r'] :param iterable: the iterable collection providing the data N(tsettitertadd(titerabletseentitem((s./usr/lib/python2.7/site-packages/babel/util.pytdistincts  s([ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)cCsQ|j}|jdz#|j}|jtj}|rV|ttj}ntj|}|sy&ddl }|j |j dWnt t tfk rqX|j}tj|}n|r|r|jdj d}|dkrt dj|qndS|r7|jdj dSdSWd|j|XdS(s/Deduce the encoding of a source file from magic comment. It does this in the same way as the `Python interpreter`__ .. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations The ``fp`` argument should be a seekable file object. (From Jeff Dairiki) iiNslatin-1isutf-8sencoding problem: {0} with BOM(ttelltseektreadlinet startswithtcodecstBOM_UTF8tlentPYTHON_MAGIC_COMMENT_retmatchtparsertsuitetdecodet ImportErrort SyntaxErrortUnicodeEncodeErrortgrouptformattNone(tfptpostline1thas_bomtmRtline2tmagic_comment_encoding((s./usr/lib/python2.7/site-packages/babel/util.pytparse_encoding0s8      s'from\s+__future__\s+import\s+\(*(.+)\)*slatin-1c Cs%ddl}|j}|jdd}z|jj|}tjdd|}tjdd|}tjdd |}xtj|D]y}g|j d j d D]}|j j d ^q}x6|D].} t || d} | r|| jO}qqWqWWd|j|X|S( sRParse the compiler flags by :mod:`__future__` from the given Python code. iNisimport\s*\([\r\n]+simport (s ,\s*[\r\n]+s, s \\\s*[\r\n]+t it,s()(t __future__R R treadRtretsubtPYTHON_FUTURE_IMPORT_retfinditerRtsplittstriptgetattrRt compiler_flag( RtencodingR(RtflagstbodyR"txtnamestnametfeature((s./usr/lib/python2.7/site-packages/babel/util.pytparse_future_flagsfs"   : cCsidd6dd6dd6dd6d d 6d d 6}g}xcttjd |D]I\}}|dry|j||qO|rO|jtj|qOqOWtjdj|d|jtj d}|dk S(sExtended pathname pattern matching. This function is similar to what is provided by the ``fnmatch`` module in the Python standard library, but: * can match complete (relative or absolute) path names, and not just file names, and * also supports a convenience pattern ("**") to match files at any directory level. Examples: >>> pathmatch('**.py', 'bar.py') True >>> pathmatch('**.py', 'foo/bar/baz.py') True >>> pathmatch('**.py', 'templates/index.html') False >>> pathmatch('**/templates/*.html', 'templates/index.html') True >>> pathmatch('**/templates/*.html', 'templates/foo/bar.html') False :param pattern: the glob pattern :param filename: the path name of the file to match against s[^/]t?s[^/]/s?/s[^/]+t*s[^/]+/s*/s (?:.+/)*?s**/s(?:.+/)*?[^/]+s**s ([?*]+/?)itt$t/N( t enumerateR*R.tappendtescapeRtjointreplacetostsepR(tpatterntfilenametsymbolstbuftidxtpartR((s./usr/lib/python2.7/site-packages/babel/util.pyt pathmatchs % .t TextWrappercBseZejdZRS(s((\s+|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))(t__name__t __module__R*tcompilet wordsep_re(((s./usr/lib/python2.7/site-packages/babel/util.pyRMsiFR<c Cs.td|d|d|dt}|j|S(sSimple wrapper around the ``textwrap.wrap`` function in the standard library. This version does not wrap lines on hyphens in words. :param text: the text to wrap :param width: the maximum line width :param initial_indent: string that will be prepended to the first line of wrapped output :param subsequent_indent: string that will be prepended to all lines save the first of wrapped output twidthtinitial_indenttsubsequent_indenttbreak_long_words(RMtFalsetwrap(ttextRRRSRTtwrapper((s./usr/lib/python2.7/site-packages/babel/util.pytwraptexts  todictcBseZdZddZdZdZdZeZdZ dZ dZ dZ d Z ed Zd Zdd Zd ZdZdZRS(skOrdered dict implementation. :see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747 cCs2tj||pittj||_dS(N(tdictt__init__tlisttkeyst_keys(tselftdata((s./usr/lib/python2.7/site-packages/babel/util.pyR]scCs$tj|||jj|dS(N(R\t __delitem__R`tremove(Ratkey((s./usr/lib/python2.7/site-packages/babel/util.pyRcscCs<||k}tj||||r8|jj|ndS(N(R\t __setitem__R`R@(RaReR tnew_key((s./usr/lib/python2.7/site-packages/babel/util.pyRfs cCs t|jS(N(RR`(Ra((s./usr/lib/python2.7/site-packages/babel/util.pyt__iter__scCstj|g|_dS(N(R\tclearR`(Ra((s./usr/lib/python2.7/site-packages/babel/util.pyRis cCst}|j||S(N(R[tupdate(Ratd((s./usr/lib/python2.7/site-packages/babel/util.pytcopys  cCst|j|jS(N(tzipR`tvalues(Ra((s./usr/lib/python2.7/site-packages/babel/util.pytitemsscCst|j|jS(N(RR`t itervalues(Ra((s./usr/lib/python2.7/site-packages/babel/util.pyt iteritemsscCs|jS(N(R`(Ra((s./usr/lib/python2.7/site-packages/babel/util.pyR_scCs]y*tj||}|jj||SWn,tk rX}|tkrQ|qY|SnXdS(N(R\tpopR`RdtKeyErrortmissing(RaRetdefaulttvaluete((s./usr/lib/python2.7/site-packages/babel/util.pyRrs  cCs|jj|tj|S(N(R`RdR\tpopitem(RaRe((s./usr/lib/python2.7/site-packages/babel/util.pyRxscCs9tj|||||jkr5|jj|ndS(N(R\t setdefaultR`R@(RaRetfailobj((s./usr/lib/python2.7/site-packages/babel/util.pyRyscCs+x$|jD]\}}|||(RR(Ra((s./usr/lib/python2.7/site-packages/babel/util.pyt__repr__!scCs|jS(N(R(Ratdt((s./usr/lib/python2.7/site-packages/babel/util.pyt utcoffset$scCs|jS(N(R(RaR((s./usr/lib/python2.7/site-packages/babel/util.pyttzname'scCstS(N(tZERO(RaR((s./usr/lib/python2.7/site-packages/babel/util.pytdst*sN( RNROR~RR]RRRRR(((s./usr/lib/python2.7/site-packages/babel/util.pyRs     (&R~RtdatetimeRRRDR*ttextwrapt babel._compatRRtpytzt_pytztbabelRtobjectRtR RPtVERBOSERR%R,R9RLRMRZR\R[RtutctUTCtLOCALTZt get_localzonet STDOFFSETt DSTOFFSETtDSTDIFFR(((s./usr/lib/python2.7/site-packages/babel/util.pyt s8        2  .I