
    i                     R    d Z ddlZddlmZ dddddddZd	d
gZdZdZdZdZ	d Z
d Zy)zMaterial Icons (icons)    N)loadszhttps://fonts.google.com/icons
Q107315222FJSON)websitewikidata_idofficial_api_documentationuse_official_apirequire_api_keyresultsimagesiconszLhttps://fonts.google.com/metadata/icons?key=material_symbols&incomplete=truezhttps://fonts.google.com/icons?icon.query={query}&selected=Material+Symbols+Outlined:{icon_name}:FILL@0{fill};wght@400;GRAD@0;opsz@24zhhttps://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/{icon_name}/{svg_type}/24px.svgz(fill)(ed)?c                 "    t         |d<   | |d<   |S )Nurlquery)
search_url)r   paramss     -/root/searxng/searx/engines/material_icons.pyrequestr      s    F5MF7OM    c                 8   g }| j                   d   j                         }t        | j                  dd        }t	        j
                  t        |       }t	        j                  t        d|      j                         }|sdnd}|j                  d      }|d   D ]  }|D ]  }||d   v s||d	   v s||d
   v s n "|d	   D 	cg c]  }	|	j                          }
}	|d
   D cg c]  }|j                          }}|j                  dt        j                  |d   |d   |rdnd      t        j                  |d   |      |d   j                  dd      j                         dj!                  |
      dz   dj!                  |      z   d        |S c c}	w c c}w )Nr       fill1default r   nametags
categorieszimages.htmlr      )	icon_namer   fill)r    svg_type_z, z / )templater   img_srctitlecontent)search_paramslowerr   textrefindallfilled_regexsubstripsplitr&   append
result_urlformatimg_src_urlreplacejoin)respr   r   json_resultsoutlinedr"   query_partsresultparttagr   categoryicon_categoriess                r   responser@      s   Gw'--/E12'L::lE22HFF<U+113E&wIH++c"Kw' 
 	Dvf~%)?46R^K_C_	 '-f~6		66<B<<PQ8>>+QQ)!((6&>PVck^_qr(s&--vQY-Z//R8>>@99T?U2TYY5OO	

( N 7Qs   F!F)__doc__r+   jsonr   aboutr   r   r2   r4   r-   r   r@    r   r   <module>rE      sV     	  0"&	  
[
 U
x r   