Ńň
4×ŰQc           @   s=   d  d k  Z  d  d k Z d  d k Z d  d k Z d   Z d S(   i˙˙˙˙Nc         C   s¸   t  i d |  f d d d g  } t i   } h d d	 6} t i d
  } | i d d | |  | i   } | i   } | i   | i	 d  o t
 |   n d t i   | GH| S(   Nt   js_codet   compilation_levelt   SIMPLE_OPTIMIZATIONSt   output_formatt   textt   output_infot   compiled_codes!   application/x-www-form-urlencodeds   Content-types   closure-compiler.appspot.comt   POSTs   /compilet   Errors   %.3f seconds to compile(   R   R   (   R   s   text(   R   R   (   t   urllibt	   urlencodet   timet   httplibt   HTTPConnectiont   requestt   getresponset   readt   closet
   startswitht	   Exception(   t   codet   paramst   tt   headerst   connt   responset   data(    (    s   ../tools\closure_ws.pyt   minimize   s     	
(   R   R	   t   sysR   R   (    (    (    s   ../tools\closure_ws.pyt   <module>   s   $