From f087d01e245239285880b2a15563dcf0f97aaf83 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 29 Dec 2021 14:33:54 +0100 Subject: [PATCH] [build] /static --- searx/static/themes/oscar/js/searxng.min.js | 2 +- searx/static/themes/oscar/js/searxng.min.js.map | 2 +- searx/static/themes/simple/js/searxng.min.js | 2 +- searx/static/themes/simple/js/searxng.min.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/static/themes/oscar/js/searxng.min.js b/searx/static/themes/oscar/js/searxng.min.js index 9da3a8b75..c835d8129 100644 --- a/searx/static/themes/oscar/js/searxng.min.js +++ b/searx/static/themes/oscar/js/searxng.min.js @@ -4,7 +4,7 @@ * (C) Copyright Contributors to the searx project (2014 - 2021). * SPDX-License-Identifier: AGPL-3.0-or-later */ -window.searxng=function(t){"use strict";t.getElementsByTagName("html")[0].className="js";var e,e=t.currentScript||(e=t.getElementsByTagName("script"))[e.length-1];return{autocompleter:"true"===e.getAttribute("data-autocompleter"),method:e.getAttribute("data-method"),translations:JSON.parse(e.getAttribute("data-translations"))}}(document), +window.searxng=function(t){"use strict";t.getElementsByTagName("html")[0].className="js";var e=t.currentScript||(e=t.getElementsByTagName("script"))[e.length-1];return{autocompleter:"true"===e.getAttribute("data-autocompleter"),method:e.getAttribute("data-method"),translations:JSON.parse(e.getAttribute("data-translations"))}}(document), /** * @license * (C) Copyright Contributors to the SearXNG project. diff --git a/searx/static/themes/oscar/js/searxng.min.js.map b/searx/static/themes/oscar/js/searxng.min.js.map index 1a95d2e2a..66ba6aa2b 100644 --- a/searx/static/themes/oscar/js/searxng.min.js.map +++ b/searx/static/themes/oscar/js/searxng.min.js.map @@ -1 +1 @@ -{"version":3,"file":"searxng.min.js","sources":["searxng.js"],"names":["window","searxng","d","getElementsByTagName","className","scripts","script","currentScript","length","autocompleter","getAttribute","method","translations","JSON","parse","document","$","ready","searchResults","original_search_value","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","wildcard","initialize","on","e","which","val","typeahead","name","highlight","hint","displayKey","result","classNames","input","menu","dataset","source","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","image_thumbnail_layout","ImageLayout","watch","addEventListener","each","infobox_body","find","height","css","hide","event","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","control","layers","OSM Mapnik","addTo","geoJson","off","let","engine_descriptions","querySelector","hover","ajax","dataType","done","engine_name","description","Object","entries","element","Source","innerHTML","w","container_selector","results_selector","img_selector","verticalMargin","horizontalMargin","maxHeight","isAlignDone","prototype","_getHeigth","images","width","img","r","i","naturalWidth","naturalHeight","_setSize","imgWidth","resultNode","imagesLength","style","marginLeft","marginTop","marginRight","marginBottom","parentNode","classList","contains","add","_alignImgs","imgGroup","isSearching","slice","h","containerElement","containerCompStyles","getComputedStyle","containerPaddingLeft","parseInt","getPropertyValue","containerPaddingRight","containerWidth","clientWidth","Math","min","align","results_selectorNode","querySelectorAll","results_length","previous","current","previousElementSibling","push","results_nodes","img_load_error","originalTarget","src","static_path","theme","throttleAlign","once"],"mappings":";;;;;GAOAA;OAAOC,QAAU,SAAUC,gBAIvBA,EAAEC,qBAAqB,QAAQ,GAAGC,UAAY,KAG9C,IACQC,EADJC,EAASJ,EAAEK,gBACPF,EAAUH,EAAEC,qBAAqB,WACtBE,EAAQG,OAAS,GAGpC,MAAO,CACHC,cAA6D,SAA9CH,EAAOI,aAAa,sBACnCC,OAAQL,EAAOI,aAAa,eAC5BE,aAAcC,KAAKC,MAAMR,EAAOI,aAAa,uBAfpC,CAiBdK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AEzI,QAAQiF,YAAcA,EAjK1B,CAmKElF,OAAQe"} \ No newline at end of file +{"version":3,"file":"searxng.min.js","sources":["searxng.js"],"names":["window","searxng","d","getElementsByTagName","className","script","currentScript","scripts","length","autocompleter","getAttribute","method","translations","JSON","parse","document","$","ready","searchResults","original_search_value","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","wildcard","initialize","on","e","which","val","typeahead","name","highlight","hint","displayKey","result","classNames","input","menu","dataset","source","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","image_thumbnail_layout","ImageLayout","watch","addEventListener","each","infobox_body","find","height","css","hide","event","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","control","layers","OSM Mapnik","addTo","geoJson","off","let","engine_descriptions","querySelector","hover","ajax","dataType","done","engine_name","description","Object","entries","element","Source","innerHTML","w","container_selector","results_selector","img_selector","verticalMargin","horizontalMargin","maxHeight","isAlignDone","prototype","_getHeigth","images","width","img","r","i","naturalWidth","naturalHeight","_setSize","imgWidth","resultNode","imagesLength","style","marginLeft","marginTop","marginRight","marginBottom","parentNode","classList","contains","add","_alignImgs","imgGroup","isSearching","slice","h","containerElement","containerCompStyles","getComputedStyle","containerPaddingLeft","parseInt","getPropertyValue","containerPaddingRight","containerWidth","clientWidth","Math","min","align","results_selectorNode","querySelectorAll","results_length","previous","current","previousElementSibling","push","results_nodes","img_load_error","originalTarget","src","static_path","theme","throttleAlign","once"],"mappings":";;;;;GAOAA;OAAOC,QAAU,SAAUC,gBAIvBA,EAAEC,qBAAqB,QAAQ,G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nC,IAE1BF,OADJA,EAAM0C,EAAcxC,GAAG1B,cAAczE,KAAKwF,iBAExCS,EAAIlE,iBAAiB,OAAQkH,GAE7BhD,EAAIlE,iBAAiB,QAASkH,GAC1B5D,EAAEzI,QAAQoM,MAAMJ,gBAClB3C,EAAIlE,iBAAiB,QAAS6G,EAAgB,CAACM,MAAM,MAM7D7D,EAAEzI,QAAQiF,YAAcA,EAjK1B,CAmKElF,OAAQe"} \ No newline at end of file diff --git a/searx/static/themes/simple/js/searxng.min.js b/searx/static/themes/simple/js/searxng.min.js index b8b42d34b..a504a4e4e 100644 --- a/searx/static/themes/simple/js/searxng.min.js +++ b/searx/static/themes/simple/js/searxng.min.js @@ -4,7 +4,7 @@ * (C) Copyright Contributors to the searx project (2014 - 2021). * SPDX-License-Identifier: AGPL-3.0-or-later */ -window.searxng=function(t,o){"use strict";if(t.Element){(function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){var t=this,n=(t.parentNode||t.document).querySelectorAll(e),i=-1;while(n[++i]&&n[i]!=t);return!!n[i]}})(Element.prototype)}function a(e,t,n){try{e.call(t,n)}catch(e){console.log(e)}}var s=window.searxng||{};s.on=function(i,e,r,t){t=t||false;if(typeof i!=="string"){i.addEventListener(e,r,t)}else{o.addEventListener(e,function(e){var t=e.target||e.srcElement,n=false;while(t&&t.matches&&t!==o&&!(n=t.matches(i)))t=t.parentElement;if(n)a(r,t,e)},t)}};s.ready=function(e){if(document.readyState!="loading"){e.call(t)}else{t.addEventListener("DOMContentLoaded",e.bind(t))}};s.http=function(e,t){var n=new XMLHttpRequest,i=function(){},r=function(){},o={then:function(e){i=e;return o},catch:function(e){r=e;return o}};try{n.open(e,t,true);n.onload=function(){if(n.status==200){i(n.response,n.responseType)}else{r(Error(n.statusText))}};n.onerror=function(){r(Error("Network Error"))};n.onabort=function(){r(Error("Transaction is aborted"))};n.send()}catch(e){r(e)}return o};s.loadStyle=function(e){var t=s.static_path+e,n="style_"+e.replace(".","_"),i=o.getElementById(n);if(i===null){i=o.createElement("link");i.setAttribute("id",n);i.setAttribute("rel","stylesheet");i.setAttribute("type","text/css");i.setAttribute("href",t);o.body.appendChild(i)}};s.loadScript=function(e,t){var n=s.static_path+e,i="script_"+e.replace(".","_"),r=o.getElementById(i);if(r===null){r=o.createElement("script");r.setAttribute("id",i);r.setAttribute("src",n);r.onload=t;r.onerror=function(){r.setAttribute("error","1")};o.body.appendChild(r)}else if(!r.hasAttribute("error")){try{t.apply(r,[])}catch(e){console.log(e)}}else{console.log("callback not executed : script '"+n+"' not loaded.")}};s.insertBefore=function(e,t){t.parentNode.insertBefore(e,t)};s.insertAfter=function(e,t){t.parentNode.insertAfter(e,t.nextSibling)};s.on(".close","click",function(){this.parentNode.classList.add("invisible")});return s}(window,document);searxng.ready(function(){function e(e){while(e!==undefined){if(e.classList.contains("detail")){return true}if(e.classList.contains("result")){return false}e=e.parentNode}return false}function n(e){while(e!==undefined){if(e.classList.contains("result")){return e}e=e.parentNode}return undefined}function i(e){return e&&e.classList.contains("result-images")}searxng.on(".result","click",function(t){if(!e(t.target)){r(this)(true);let e=n(t.target);if(i(e)){t.preventDefault();searxng.selectImage(e)}}});searxng.on(".result a","focus",function(t){if(!e(t.target)){let e=n(t.target);if(e&&e.getAttribute("data-vim-selected")===null){r(e)(true)}if(i(e)){searxng.selectImage(e)}}},true);var d={27:{key:"Escape",fun:o,des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:p,des:"focus on the search input",cat:"Control"},66:{key:"b",fun:u(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:u(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:u(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:u(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},71:{key:"g",fun:c(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},86:{key:"v",fun:c(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},75:{key:"k",fun:r("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:r("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:l(),des:"go to previous page",cat:"Results"},78:{key:"n",fun:s(),des:"go to next page",cat:"Results"},79:{key:"o",fun:h(false),des:"open search result",cat:"Results"},84:{key:"t",fun:h(true),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:t,des:"reload page from the server",cat:"Control"},72:{key:"h",fun:m,des:"toggle help window",cat:"Other"}};if(searxng.hotkeys){searxng.on(document,"keydown",function(e){if(Object.prototype.hasOwnProperty.call(d,e.keyCode)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.keyCode===27){d[e.keyCode].fun(e)}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.keyCode].fun()}}}})}function r(d){return function(e){var t=document.querySelector(".result[data-vim-selected]"),n=d;if(t===null){t=document.querySelector(".result");if(t===null){return}if(d==="down"||d==="up"){n=t}}var i,r=document.querySelectorAll(".result");if(typeof n!=="string"){i=n}else{switch(n){case"visible":var o=document.documentElement.scrollTop||document.body.scrollTop;var a=o+document.documentElement.clientHeight;for(var s=0;so){break}}break;case"down":i=t.nextElementSibling;if(i===null){i=r[0]}break;case"up":i=t.previousElementSibling;if(i===null){i=r[r.length-1]}break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}}if(i){t.removeAttribute("data-vim-selected");i.setAttribute("data-vim-selected","true");var c=i.querySelector("h3 a")||i.querySelector("a");if(c!==null){c.focus()}if(!e){f()}}}}function t(){document.location.reload(true)}function o(e){const t=e.target.tagName.toLowerCase();if(document.activeElement&&(t==="input"||t==="select"||t==="textarea")){document.activeElement.blur()}else{searxng.closeDetail()}}function a(t){return function(){var e=document.querySelector(t);if(e){e.click()}}}function s(){return a('nav#pagination .next_page button[type="submit"]')}function l(){return a('nav#pagination .previous_page button[type="submit"]')}function f(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,i=e.offsetTop,r=i+e.clientHeight,o=120;if(e.previousElementSibling===null&&ri-o){window.scroll(window.scrollX,i-o)}else{var a=t+n;if(a a")}if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function g(e){var n={};for(var t in d){var i=d[t];n[i.cat]=n[i.cat]||[];n[i.cat].push(i)}var r=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(r.length===0){return}var o='×';o+="

How to navigate searx with Vim-like hotkeys

";o+="";for(var a=0;a"}o+="";if(!u||l){o+=""}}o+="
";o+="

"+s[0].cat+"

";o+='
    ';for(var c in s){o+="
  • "+s[c].key+" "+s[c].des+"
  • "}o+="
";o+="
";e.innerHTML=o}function m(){var e=document.querySelector("#vim-hotkeys-help");if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";g(e);g(e);g(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}searxng.scrollPageToSelected=f;searxng.selectNext=r("down");searxng.selectPrevious=r("up")});(function(e,t,n){"use strict";n.ready(function(){n.on(".searxng_init_map","click",function(e){this.classList.remove("searxng_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var g=JSON.parse(this.dataset.mapBoundingbox);var m=JSON.parse(this.dataset.mapGeojson);n.loadStyle("css/leaflet.css");n.loadScript("js/leaflet.js",function(){var e=null;if(g){var t=L.latLng(g[0],g[2]);var n=L.latLng(g[1],g[3]);e=L.latLngBounds(t,n)}var i=L.map(d);var r="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var o='Map data © OpenStreetMap contributors';var a=new L.TileLayer(r,{minZoom:1,maxZoom:19,attribution:o});var s="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps | Maps data © OpenStreetMap contributors';var u=new L.TileLayer(s,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){i.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){i.setView(new L.latLng(p,f),h)}else{i.setView(new L.latLng(p,f),8)}}i.addLayer(a);var c={"OSM Mapnik":a,"OSM Wikimedia":u};L.control.layers(c).addTo(i);if(m){L.geoJson(m).addTo(i)}});e.preventDefault()})})})(window,document,window.searxng);(function(e,o,a){"use strict";a.ready(function(){let r=null;function e(){if(r==null){a.http("GET","engine_descriptions.json").then(function(e){r=JSON.parse(e);for(const[t,n]of Object.entries(r)){let e=o.querySelectorAll('[data-engine-name="'+t+'"] .engine-description');for(const i of e){let e=" ("+a.translations["Source"]+": "+n[1]+")";i.innerHTML=n[0]+e}}})}}if(o.querySelector('body[class="preferences_endpoint"]')){for(const t of o.querySelectorAll("[data-engine-name]")){a.on(t,"mouseenter",e)}}})})(window,document,window.searxng);(function(e,s,l){"use strict";l.ready(function(){l.image_thumbnail_layout=new l.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",14,6,200);l.image_thumbnail_layout.watch();l.on(".btn-collapse","click",function(){var e=this.getAttribute("data-btn-text-collapsed");var t=this.getAttribute("data-btn-text-not-collapsed");var n=this.getAttribute("data-target");var i=s.querySelector(n);var r=this.innerHTML;if(this.classList.contains("collapsed")){r=r.replace(e,t)}else{r=r.replace(t,e)}this.innerHTML=r;this.classList.toggle("collapsed");i.classList.toggle("invisible")});l.on(".media-loader","click",function(){var e=this.getAttribute("data-target");var t=s.querySelector(e+" > iframe");var n=t.getAttribute("src");if(n===null||n===undefined||n===false){t.setAttribute("src",t.getAttribute("data-src"))}});l.selectImage=function(e){if(e){const t=e.querySelector(".result-images-source img");const n=e.querySelector(".image_thumbnail");const i=e.querySelector(".detail");if(t){const r=t.getAttribute("data-src");if(r){const o=s.createElement("div");const a=new Image;o.classList.add("loader");i.appendChild(o);a.onload=e=>{t.src=r;o.remove()};a.onerror=e=>{o.remove()};a.src=r;t.src=n.src;t.removeAttribute("data-src")}}}s.getElementById("results").classList.add("image-detail-open");l.image_thumbnail_layout.align();l.scrollPageToSelected()};l.closeDetail=function(e){s.getElementById("results").classList.remove("image-detail-open");l.image_thumbnail_layout.align();l.scrollPageToSelected()};l.on(".result-detail-close","click",e=>{e.preventDefault();l.closeDetail()});l.on(".result-detail-previous","click",e=>l.selectPrevious(false));l.on(".result-detail-next","click",e=>l.selectNext(false));e.addEventListener("scroll",function(){var e=s.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop,n=s.getElementById("results");if(e!==null){if(t>=100){n.classList.add("scrolling")}else{n.classList.remove("scrolling")}}},true)})})(window,document,window.searxng);(function(t,n,i){"use strict";var r=true,o="q",a;function s(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function l(){if(a.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function u(e){var t=document.getElementById("clear_search");var n=function(){if(e.value.length===0){t.classList.add("empty")}else{t.classList.remove("empty")}};n();t.addEventListener("click",function(){e.value="";e.focus();n()});e.addEventListener("keyup",n,false)}i.ready(function(){a=n.getElementById(o);function e(){if(r){s(a);r=false}else{}}if(a!==null){u(a);if(i.autocompleter){i.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:i.translations.no_item_found,HttpMethod:i.method,HttpHeaders:{"Content-type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},MinChars:4,Delay:300,_Position:function(){this.DOMResults.setAttribute("class","autocomplete");this.DOMResults.style.top=this.Input.offsetTop+this.Input.offsetHeight+"px";this.DOMResults.style.left=this.Input.offsetLeft+"px";this.DOMResults.style.width=this.Input.clientWidth+"px"}},"#"+o);t.addEventListener("resize",function(){var e=new CustomEvent("position");a.dispatchEvent(e)})}a.addEventListener("focus",e,false);a.focus()}if(a!==null&&n.querySelector(".help")!=null&&i.search_on_category_select){n.querySelector(".help").className="invisible";i.on("#categories input","change",function(){var e,t=n.querySelectorAll('#categories input[type="checkbox"]');for(e=0;eo){break}}break;case"down":i=t.nextElementSibling;if(i===null){i=r[0]}break;case"up":i=t.previousElementSibling;if(i===null){i=r[r.length-1]}break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}}if(i){t.removeAttribute("data-vim-selected");i.setAttribute("data-vim-selected","true");var c=i.querySelector("h3 a")||i.querySelector("a");if(c!==null){c.focus()}if(!e){f()}}}}function t(){document.location.reload(true)}function o(e){const t=e.target.tagName.toLowerCase();if(document.activeElement&&(t==="input"||t==="select"||t==="textarea")){document.activeElement.blur()}else{searxng.closeDetail()}}function a(t){return function(){var e=document.querySelector(t);if(e){e.click()}}}function s(){return a('nav#pagination .next_page button[type="submit"]')}function l(){return a('nav#pagination .previous_page button[type="submit"]')}function f(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,i=e.offsetTop,r=i+e.clientHeight,o=120;if(e.previousElementSibling===null&&ri-o){window.scroll(window.scrollX,i-o)}else{var a=t+n;if(a a")}if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function g(e){var n={};for(var t in d){var i=d[t];n[i.cat]=n[i.cat]||[];n[i.cat].push(i)}var r=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(r.length===0){return}var o='×';o+="

How to navigate searx with Vim-like hotkeys

";o+="";for(var a=0;a"}o+="";if(!u||l){o+=""}}o+="
";o+="

"+s[0].cat+"

";o+='
    ';for(var c in s){o+="
  • "+s[c].key+" "+s[c].des+"
  • "}o+="
";o+="
";e.innerHTML=o}function m(){var e=document.querySelector("#vim-hotkeys-help");if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";g(e);g(e);g(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}searxng.scrollPageToSelected=f;searxng.selectNext=r("down");searxng.selectPrevious=r("up")});(function(e,t,n){"use strict";n.ready(function(){n.on(".searxng_init_map","click",function(e){this.classList.remove("searxng_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var g=JSON.parse(this.dataset.mapBoundingbox);var m=JSON.parse(this.dataset.mapGeojson);n.loadStyle("css/leaflet.css");n.loadScript("js/leaflet.js",function(){var e=null;if(g){var t=L.latLng(g[0],g[2]);var n=L.latLng(g[1],g[3]);e=L.latLngBounds(t,n)}var i=L.map(d);var r="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var o='Map data © OpenStreetMap contributors';var a=new L.TileLayer(r,{minZoom:1,maxZoom:19,attribution:o});var s="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps | Maps data © OpenStreetMap contributors';var u=new L.TileLayer(s,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){i.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){i.setView(new L.latLng(p,f),h)}else{i.setView(new L.latLng(p,f),8)}}i.addLayer(a);var c={"OSM Mapnik":a,"OSM Wikimedia":u};L.control.layers(c).addTo(i);if(m){L.geoJson(m).addTo(i)}});e.preventDefault()})})})(window,document,window.searxng);(function(e,o,a){"use strict";a.ready(function(){let r=null;function e(){if(r==null){a.http("GET","engine_descriptions.json").then(function(e){r=JSON.parse(e);for(const[t,n]of Object.entries(r)){let e=o.querySelectorAll('[data-engine-name="'+t+'"] .engine-description');for(const i of e){let e=" ("+a.translations["Source"]+": "+n[1]+")";i.innerHTML=n[0]+e}}})}}if(o.querySelector('body[class="preferences_endpoint"]')){for(const t of o.querySelectorAll("[data-engine-name]")){a.on(t,"mouseenter",e)}}})})(window,document,window.searxng);(function(e,s,l){"use strict";l.ready(function(){l.image_thumbnail_layout=new l.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",14,6,200);l.image_thumbnail_layout.watch();s.querySelectorAll("#urls img.image").forEach(e=>e.addEventListener("error",()=>{e.style.display="none";e.error=null}));l.on(".btn-collapse","click",function(){var e=this.getAttribute("data-btn-text-collapsed");var t=this.getAttribute("data-btn-text-not-collapsed");var n=this.getAttribute("data-target");var i=s.querySelector(n);var r=this.innerHTML;if(this.classList.contains("collapsed")){r=r.replace(e,t)}else{r=r.replace(t,e)}this.innerHTML=r;this.classList.toggle("collapsed");i.classList.toggle("invisible")});l.on(".media-loader","click",function(){var e=this.getAttribute("data-target");var t=s.querySelector(e+" > iframe");var n=t.getAttribute("src");if(n===null||n===undefined||n===false){t.setAttribute("src",t.getAttribute("data-src"))}});l.selectImage=function(e){if(e){const t=e.querySelector(".result-images-source img");const n=e.querySelector(".image_thumbnail");const i=e.querySelector(".detail");if(t){const r=t.getAttribute("data-src");if(r){const o=s.createElement("div");const a=new Image;o.classList.add("loader");i.appendChild(o);a.onload=e=>{t.src=r;o.remove()};a.onerror=e=>{o.remove()};a.src=r;t.src=n.src;t.removeAttribute("data-src")}}}s.getElementById("results").classList.add("image-detail-open");l.image_thumbnail_layout.align();l.scrollPageToSelected()};l.closeDetail=function(e){s.getElementById("results").classList.remove("image-detail-open");l.image_thumbnail_layout.align();l.scrollPageToSelected()};l.on(".result-detail-close","click",e=>{e.preventDefault();l.closeDetail()});l.on(".result-detail-previous","click",e=>l.selectPrevious(false));l.on(".result-detail-next","click",e=>l.selectNext(false));e.addEventListener("scroll",function(){var e=s.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop,n=s.getElementById("results");if(e!==null){if(t>=100){n.classList.add("scrolling")}else{n.classList.remove("scrolling")}}},true)})})(window,document,window.searxng);(function(t,n,i){"use strict";var r=true,o="q",a;function s(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function l(){if(a.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function u(e){var t=document.getElementById("clear_search");var n=function(){if(e.value.length===0){t.classList.add("empty")}else{t.classList.remove("empty")}};n();t.addEventListener("click",function(){e.value="";e.focus();n()});e.addEventListener("keyup",n,false)}i.ready(function(){a=n.getElementById(o);function e(){if(r){s(a);r=false}else{}}if(a!==null){u(a);if(i.autocompleter){i.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:i.translations.no_item_found,HttpMethod:i.method,HttpHeaders:{"Content-type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},MinChars:4,Delay:300,_Position:function(){this.DOMResults.setAttribute("class","autocomplete");this.DOMResults.style.top=this.Input.offsetTop+this.Input.offsetHeight+"px";this.DOMResults.style.left=this.Input.offsetLeft+"px";this.DOMResults.style.width=this.Input.clientWidth+"px"}},"#"+o);t.addEventListener("resize",function(){var e=new CustomEvent("position");a.dispatchEvent(e)})}a.addEventListener("focus",e,false);a.focus()}if(a!==null&&n.querySelector(".help")!=null&&i.search_on_category_select){n.querySelector(".help").className="invisible";i.on("#categories input","change",function(){var e,t=n.querySelectorAll('#categories input[type="checkbox"]');for(e=0;e element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n var vimKeys = {\n 27: {\n key: 'Escape',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 73: {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 66: {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 70: {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 85: {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 68: {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 71: {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 86: {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 75: {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 74: {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n 80: {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 78: {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 79: {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 84: {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n 82: {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 72: {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n }\n };\n\n if (searxng.hotkeys) {\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.keyCode === 27) {\n vimKeys[e.keyCode].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n vimKeys[e.keyCode].fun();\n }\n }\n }\n });\n }\n\n function highlightResult (which) {\n return function (noScroll) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = current.nextElementSibling;\n if (next === null) {\n next = results[0];\n }\n break;\n case 'up':\n next = current.previousElementSibling;\n if (next === null) {\n next = results[results.length - 1];\n }\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n document.querySelector('#q').focus();\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in vimKeys) {\n var key = vimKeys[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '×';\n html += '

How to navigate searx with Vim-like hotkeys

';\n html += '';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += ''; // col-sm-*\n\n if (!first || lastCategory) {\n html += ''; // row\n }\n }\n\n html += '
';\n\n html += '

' + cat[0].cat + '

';\n html += '
    ';\n\n for (var cj in cat) {\n html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • ';\n }\n\n html += '
';\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data © OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data © OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (' + searxng.translations['Source'] + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n if (d.querySelector('body[class=\"preferences_endpoint\"]')) {\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.image_thumbnail_layout = new searxng.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 14, 6, 200);\n searxng.image_thumbnail_layout.watch();\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.image_thumbnail_layout.align();\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.image_thumbnail_layout.align();\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var firstFocus = true, qinput_id = \"q\", qinput;\n\n function placeCursorAtEnd (element) {\n if (element.setSelectionRange) {\n var len = element.value.length;\n element.setSelectionRange(len, len);\n }\n }\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function () {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n function placeCursorAtEndOnce () {\n if (firstFocus) {\n placeCursorAtEnd(qinput);\n firstFocus = false;\n } else {\n // e.preventDefault();\n }\n }\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.autocompleter) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.translations.no_item_found,\n HttpMethod: searxng.method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: 4,\n Delay: 300,\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.style.top = (this.Input.offsetTop + this.Input.offsetHeight) + \"px\";\n this.DOMResults.style.left = this.Input.offsetLeft + \"px\";\n this.DOMResults.style.width = this.Input.clientWidth + \"px\";\n },\n }, \"#\" + qinput_id);\n\n // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37\n w.addEventListener('resize', function () {\n var event = new CustomEvent(\"position\");\n qinput.dispatchEvent(event);\n });\n }\n\n qinput.addEventListener('focus', placeCursorAtEndOnce, false);\n qinput.focus();\n }\n\n // vanilla js version of search_on_category_select.js\n if (qinput !== null && d.querySelector('.help') != null && searxng.search_on_category_select) {\n d.querySelector('.help').className = 'invisible';\n\n searxng.on('#categories input', 'change', function () {\n var i, categories = d.querySelectorAll('#categories input[type=\"checkbox\"]');\n for (i = 0; i < categories.length; i++) {\n if (categories[i] !== this && categories[i].checked) {\n categories[i].click();\n }\n }\n if (! this.checked) {\n this.click();\n }\n submitIfQuery();\n return false;\n });\n\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n });\n\n})(window, document, window.searxng);\n","/**\n*\n* Google Image Layout v0.0.1\n* Description, by Anh Trinh.\n* Heavily modified for searx\n* https://ptgamr.github.io/2014-09-12-google-image-layout/\n* https://ptgamr.github.io/google-image-layout/src/google-image-layout.js\n*\n* @license Free to use under the MIT License.\n*\n* @example Example usage of searxng.ImageLayout class.\n* searxng.image_thumbnail_layout = new searxng.ImageLayout(\n* '#urls', // container_selector\n* '#urls .result-images', // results_selector\n* 'img.image_thumbnail', // img_selector\n* 14, // verticalMargin\n* 6, // horizontalMargin\n* 200 // maxHeight\n* );\n* searxng.image_thumbnail_layout.watch();\n*/\n\n\n(function (w, d) {\n function ImageLayout (container_selector, results_selector, img_selector, verticalMargin, horizontalMargin, maxHeight) {\n this.container_selector = container_selector;\n this.results_selector = results_selector;\n this.img_selector = img_selector;\n this.verticalMargin = verticalMargin;\n this.horizontalMargin = horizontalMargin;\n this.maxHeight = maxHeight;\n this.isAlignDone = true;\n }\n\n /**\n * Get the height that make all images fit the container\n *\n * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...\n *\n * @param {[type]} images the images to be calculated\n * @param {[type]} width the container witdth\n * @param {[type]} margin the margin between each image\n *\n * @return {[type]} the height\n */\n ImageLayout.prototype._getHeigth = function (images, width) {\n var i, img;\n var r = 0;\n\n for (i = 0; i < images.length; i++) {\n img = images[i];\n if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {\n r += img.naturalWidth / img.naturalHeight;\n } else {\n // assume that not loaded images are square\n r += 1;\n }\n }\n\n return (width - images.length * this.verticalMargin) / r; // have to round down because Firefox will automatically roundup value with number of decimals > 3\n };\n\n ImageLayout.prototype._setSize = function (images, height) {\n var i, img, imgWidth;\n var imagesLength = images.length, resultNode;\n\n for (i = 0; i < imagesLength; i++) {\n img = images[i];\n if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {\n imgWidth = height * img.naturalWidth / img.naturalHeight;\n } else {\n // not loaded image : make it square as _getHeigth said it\n imgWidth = height;\n }\n img.style.width = imgWidth + 'px';\n img.style.height = height + 'px';\n img.style.marginLeft = this.horizontalMargin + 'px';\n img.style.marginTop = this.horizontalMargin + 'px';\n img.style.marginRight = this.verticalMargin - 7 + 'px'; // -4 is the negative margin of the inline element\n img.style.marginBottom = this.verticalMargin - 7 + 'px';\n resultNode = img.parentNode.parentNode;\n if (!resultNode.classList.contains('js')) {\n resultNode.classList.add('js');\n }\n }\n };\n\n ImageLayout.prototype._alignImgs = function (imgGroup) {\n var isSearching, slice, i, h;\n var containerElement = d.querySelector(this.container_selector);\n var containerCompStyles = window.getComputedStyle(containerElement);\n var containerPaddingLeft = parseInt(containerCompStyles.getPropertyValue('padding-left'), 10);\n var containerPaddingRight = parseInt(containerCompStyles.getPropertyValue('padding-right'), 10);\n var containerWidth = containerElement.clientWidth - containerPaddingLeft - containerPaddingRight;\n\n while (imgGroup.length > 0) {\n isSearching = true;\n for (i = 1; i <= imgGroup.length && isSearching; i++) {\n slice = imgGroup.slice(0, i);\n h = this._getHeigth(slice, containerWidth);\n if (h < this.maxHeight) {\n this._setSize(slice, h);\n // continue with the remaining images\n imgGroup = imgGroup.slice(i);\n isSearching = false;\n }\n }\n if (isSearching) {\n this._setSize(slice, Math.min(this.maxHeight, h));\n break;\n }\n }\n };\n\n ImageLayout.prototype.align = function () {\n var i;\n var results_selectorNode = d.querySelectorAll(this.results_selector);\n var results_length = results_selectorNode.length;\n var previous = null;\n var current = null;\n var imgGroup = [];\n\n for (i = 0; i < results_length; i++) {\n current = results_selectorNode[i];\n if (current.previousElementSibling !== previous && imgGroup.length > 0) {\n // the current image is not connected to previous one\n // so the current image is the start of a new group of images.\n // so call _alignImgs to align the current group\n this._alignImgs(imgGroup);\n // and start a new empty group of images\n imgGroup = [];\n }\n // add the current image to the group (only the img tag)\n imgGroup.push(current.querySelector(this.img_selector));\n // update the previous variable\n previous = current;\n }\n // align the remaining images\n if (imgGroup.length > 0) {\n this._alignImgs(imgGroup);\n }\n };\n\n ImageLayout.prototype.watch = function () {\n var i, img;\n var obj = this;\n var results_nodes = d.querySelectorAll(this.results_selector);\n var results_length = results_nodes.length;\n\n function img_load_error (event) {\n // console.log(\"ERROR can't load: \" + event.originalTarget.src);\n event.originalTarget.src = w.searxng.static_path + w.searxng.theme.img_load_error;\n }\n\n function throttleAlign () {\n if (obj.isAlignDone) {\n obj.isAlignDone = false;\n setTimeout(function () {\n obj.align();\n obj.isAlignDone = true;\n }, 100);\n }\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event\n w.addEventListener('pageshow', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/FileReader/load_event\n w.addEventListener('load', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event\n w.addEventListener('resize', throttleAlign);\n\n for (i = 0; i < results_length; i++) {\n img = results_nodes[i].querySelector(this.img_selector);\n if (img !== null && img !== undefined) {\n img.addEventListener('load', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror\n img.addEventListener('error', throttleAlign);\n if (w.searxng.theme.img_load_error) {\n img.addEventListener('error', img_load_error, {once: true});\n }\n }\n }\n };\n\n w.searxng.ImageLayout = ImageLayout;\n\n}(window, document));\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i @baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n var first = this.DOMResults.querySelector(\"li:first-child:not(.locked)\"), last = this.DOMResults.querySelector(\"li:last-child:not(.locked)\"), active = this.DOMResults.querySelector(\"li.active\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","req","XMLHttpRequest","resolve","reject","promise","then","catch","open","onload","status","response","responseType","Error","statusText","onerror","onabort","send","ex","loadStyle","src","path","static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","isElementInDetail","undefined","contains","getResultElement","isImageResult","resultElement","highlightResult","let","preventDefault","selectImage","getAttribute","vimKeys","27","key","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","GoToPreviousPage","78","GoToNextPage","79","openResult","84","82","reloadPage","72","toggleHelp","hotkeys","Object","hasOwnProperty","keyCode","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","current","querySelector","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","length","etop","offsetTop","ebot","nextElementSibling","previousElementSibling","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","newTab","href","initHelpContent","divElement","categories","k","push","sorted","keys","sort","a","b","html","lastCategory","first","cj","innerHTML","helpPanel","className","getElementsByTagName","toggle","selectNext","selectPrevious","event","remove","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","entries","elements","element","source","translations","image_thumbnail_layout","ImageLayout","watch","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","imgElement","thumbnailElement","detailElement","imgSrc","loader","imgLoader","Image","align","firstFocus","qinput_id","qinput","placeCursorAtEnd","setSelectionRange","len","value","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","placeCursorAtEndOnce","autocompleter","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","HttpHeaders","Content-type","X-Requested-With","MinChars","Delay","_Position","DOMResults","style","Input","offsetHeight","left","offsetLeft","width","clientWidth","CustomEvent","dispatchEvent","search_on_category_select","checked","container_selector","results_selector","img_selector","verticalMargin","horizontalMargin","maxHeight","isAlignDone","_getHeigth","images","img","r","naturalWidth","naturalHeight","_setSize","height","imgWidth","imagesLength","resultNode","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","isSearching","slice","h","containerElement","containerCompStyles","getComputedStyle","containerPaddingLeft","parseInt","getPropertyValue","containerPaddingRight","containerWidth","Math","min","results_selectorNode","results_length","previous","results_nodes","img_load_error","originalTarget","theme","throttleAlign","once","f","exports","module","define","amd","g","global","self","n","t","o","c","require","u","code","p","1","ConditionOperator","EventType","params","Array","isArray","forEach","input","specificParams","merge","defaults","create","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","KeyboardMappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","Not","Is","From","To","name","Conditions","Callback","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","request","_HttpMethod","_Url","queryParams","_Pre","queryParamsStringify","encodeURIComponent","_QueryArg","indexOf","setRequestHeader","onreadystatechange","$Cache","ajax","timeout","$AjaxTimer","clearTimeout","Request","abort","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","Enter","liActive","_Select","KeyUpAndDown_down","KeyUpAndDown_up","last","active","currentIndex","children","lisCount","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","minchars","_Highlight","label","now","li","onclick","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,gBAQ7B,GAAID,EAAEE,QAAS,EACb,SAAWC,GACTA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAAUC,GACR,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EAC7F,MAAOJ,IAAQI,IAAMJ,EAAMI,IAAMN,GACjC,QAASE,EAAMI,KARnB,CAUGb,QAAQc,WAGb,SAASC,EAAcC,EAAUC,EAAIC,GACnC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAIhB,IAAIvB,EAAUD,OAAOC,SAAW,GAEhCA,EAAQ0B,GAAK,SAAUC,EAAKC,EAAWT,EAAUU,GAC/CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,CAEL3B,EAAE4B,iBAAiBF,EAAW,SAAUP,GACtC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SA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,CAC/Cud,EAAeA,EAAerV,QAAU,CAAEoV,MAASE,EAAKxd,GAAIqd,MAAS1d,KAAK8c,WAAWe,EAAKxd,UAG7F,CACD,IAAK,IAAIsQ,KAASkN,EAAM,CACpBD,EAAehT,KAAK,CAChB+S,MAAShN,EACT+M,MAAS1d,KAAK8c,WAAWe,EAAKlN,OAI1C,OAAOiN,EAEX,MAAO/R,GAEH,OAAOrJ,IAMfkX,KAAM,WACF,OAAO1Z,KAAKkS,MAAMvB,OAKtB2K,QAAS,SAAUQ,GACf,GAAIA,EAAKjY,aAAa,2BAA4B,CAC9C7D,KAAKkS,MAAMvB,MAAQmL,EAAK9W,aAAa,+BAEpC,CACDhF,KAAKkS,MAAMvB,MAAQmL,EAAKxQ,UAE5BtL,KAAKkS,MAAMzO,aAAa,8BAA+BzD,KAAKkS,MAAMvB,QAKtE2L,OAAQ,aAERlC,WAAY,KACZH,OAAQ,GACRzC,WAAY,IAEhB,OAAOnG,EA3fsB,GA6fjCuE,EAAOD,QAAUtE,GAEf,KAAK,GAAG,CAAC,GA1hByW,CA0hBrW"} \ No newline at end of file +{"version":3,"file":"searxng.min.js","sources":["../src/js/main/00_toolkit.js","../src/js/main/keyboard.js","../src/js/main/mapresult.js","../src/js/main/preferences.js","../src/js/main/results.js","../src/js/main/search.js","../../__common__/js/image_layout.js","../node_modules/autocomplete-js/dist/autocomplete.js"],"sourcesContent":["/**\n * @license\n * (C) Copyright Contributors to the SearXNG project.\n * (C) Copyright Contributors to the searx project (2014 - 2021).\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nwindow.searxng = (function (w, d) {\n\n 'use strict';\n\n // not invented here tookit with bugs fixed elsewhere\n // purposes : be just good enough and as small as possible\n\n // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/\n if (w.Element) {\n (function (ElementPrototype) {\n ElementPrototype.matches = ElementPrototype.matches ||\n ElementPrototype.matchesSelector ||\n ElementPrototype.webkitMatchesSelector ||\n ElementPrototype.msMatchesSelector ||\n function (selector) {\n var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;\n while (nodes[++i] && nodes[i] != node);\n return !!nodes[i];\n };\n })(Element.prototype);\n }\n\n function callbackSafe (callback, el, e) {\n try {\n callback.call(el, e);\n } catch (exception) {\n console.log(exception);\n }\n }\n\n var searxng = window.searxng || {};\n\n searxng.on = function (obj, eventType, callback, useCapture) {\n useCapture = useCapture || false;\n if (typeof obj !== 'string') {\n // obj HTMLElement, HTMLDocument\n obj.addEventListener(eventType, callback, useCapture);\n } else {\n // obj is a selector\n d.addEventListener(eventType, function (e) {\n var el = e.target || e.srcElement, found = false;\n while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;\n if (found) callbackSafe(callback, el, e);\n }, useCapture);\n }\n };\n\n searxng.ready = function (callback) {\n if (document.readyState != 'loading') {\n callback.call(w);\n } else {\n w.addEventListener('DOMContentLoaded', callback.bind(w));\n }\n };\n\n searxng.http = function (method, url) {\n var req = new XMLHttpRequest(),\n resolve = function () {},\n reject = function () {},\n promise = {\n then: function (callback) { resolve = callback; return promise; },\n catch: function (callback) { reject = callback; return promise; }\n };\n\n try {\n req.open(method, url, true);\n\n // On load\n req.onload = function () {\n if (req.status == 200) {\n resolve(req.response, req.responseType);\n } else {\n reject(Error(req.statusText));\n }\n };\n\n // Handle network errors\n req.onerror = function () {\n reject(Error(\"Network Error\"));\n };\n\n req.onabort = function () {\n reject(Error(\"Transaction is aborted\"));\n };\n\n // Make the request\n req.send();\n } catch (ex) {\n reject(ex);\n }\n\n return promise;\n };\n\n searxng.loadStyle = function (src) {\n var path = searxng.static_path + src,\n id = \"style_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('link');\n s.setAttribute('id', id);\n s.setAttribute('rel', 'stylesheet');\n s.setAttribute('type', 'text/css');\n s.setAttribute('href', path);\n d.body.appendChild(s);\n }\n };\n\n searxng.loadScript = function (src, callback) {\n var path = searxng.static_path + src,\n id = \"script_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('script');\n s.setAttribute('id', id);\n s.setAttribute('src', path);\n s.onload = callback;\n s.onerror = function () {\n s.setAttribute('error', '1');\n };\n d.body.appendChild(s);\n } else if (!s.hasAttribute('error')) {\n try {\n callback.apply(s, []);\n } catch (exception) {\n console.log(exception);\n }\n } else {\n console.log(\"callback not executed : script '\" + path + \"' not loaded.\");\n }\n };\n\n searxng.insertBefore = function (newNode, referenceNode) {\n referenceNode.parentNode.insertBefore(newNode, referenceNode);\n };\n\n searxng.insertAfter = function (newNode, referenceNode) {\n referenceNode.parentNode.insertAfter(newNode, referenceNode.nextSibling);\n };\n\n searxng.on('.close', 'click', function () {\n this.parentNode.classList.add('invisible');\n });\n\n return searxng;\n})(window, document);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global searxng */\n\nsearxng.ready(function () {\n\n function isElementInDetail (el) {\n while (el !== undefined) {\n if (el.classList.contains('detail')) {\n return true;\n }\n if (el.classList.contains('result')) {\n // we found a result, no need to go to the root of the document:\n // el is not inside a
element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n var vimKeys = {\n 27: {\n key: 'Escape',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 73: {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 66: {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 70: {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 85: {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 68: {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 71: {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 86: {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 75: {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 74: {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n 80: {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 78: {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 79: {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 84: {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n 82: {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 72: {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n }\n };\n\n if (searxng.hotkeys) {\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.keyCode === 27) {\n vimKeys[e.keyCode].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n vimKeys[e.keyCode].fun();\n }\n }\n }\n });\n }\n\n function highlightResult (which) {\n return function (noScroll) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = current.nextElementSibling;\n if (next === null) {\n next = results[0];\n }\n break;\n case 'up':\n next = current.previousElementSibling;\n if (next === null) {\n next = results[results.length - 1];\n }\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n document.querySelector('#q').focus();\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in vimKeys) {\n var key = vimKeys[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '×';\n html += '

How to navigate searx with Vim-like hotkeys

';\n html += '';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += ''; // col-sm-*\n\n if (!first || lastCategory) {\n html += ''; // row\n }\n }\n\n html += '
';\n\n html += '

' + cat[0].cat + '

';\n html += '
    ';\n\n for (var cj in cat) {\n html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • ';\n }\n\n html += '
';\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data © OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data © OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (' + searxng.translations['Source'] + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n if (d.querySelector('body[class=\"preferences_endpoint\"]')) {\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.image_thumbnail_layout = new searxng.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 14, 6, 200);\n searxng.image_thumbnail_layout.watch();\n\n d.querySelectorAll('#urls img.image').forEach(\n img =>\n img.addEventListener(\n 'error', () => {\n img.style.display = 'none';\n img.error = null;\n }\n ));\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.image_thumbnail_layout.align();\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.image_thumbnail_layout.align();\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var firstFocus = true, qinput_id = \"q\", qinput;\n\n function placeCursorAtEnd (element) {\n if (element.setSelectionRange) {\n var len = element.value.length;\n element.setSelectionRange(len, len);\n }\n }\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function () {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n function placeCursorAtEndOnce () {\n if (firstFocus) {\n placeCursorAtEnd(qinput);\n firstFocus = false;\n } else {\n // e.preventDefault();\n }\n }\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.autocompleter) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.translations.no_item_found,\n HttpMethod: searxng.method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: 4,\n Delay: 300,\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.style.top = (this.Input.offsetTop + this.Input.offsetHeight) + \"px\";\n this.DOMResults.style.left = this.Input.offsetLeft + \"px\";\n this.DOMResults.style.width = this.Input.clientWidth + \"px\";\n },\n }, \"#\" + qinput_id);\n\n // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37\n w.addEventListener('resize', function () {\n var event = new CustomEvent(\"position\");\n qinput.dispatchEvent(event);\n });\n }\n\n qinput.addEventListener('focus', placeCursorAtEndOnce, false);\n qinput.focus();\n }\n\n // vanilla js version of search_on_category_select.js\n if (qinput !== null && d.querySelector('.help') != null && searxng.search_on_category_select) {\n d.querySelector('.help').className = 'invisible';\n\n searxng.on('#categories input', 'change', function () {\n var i, categories = d.querySelectorAll('#categories input[type=\"checkbox\"]');\n for (i = 0; i < categories.length; i++) {\n if (categories[i] !== this && categories[i].checked) {\n categories[i].click();\n }\n }\n if (! this.checked) {\n this.click();\n }\n submitIfQuery();\n return false;\n });\n\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n });\n\n})(window, document, window.searxng);\n","/**\n*\n* Google Image Layout v0.0.1\n* Description, by Anh Trinh.\n* Heavily modified for searx\n* https://ptgamr.github.io/2014-09-12-google-image-layout/\n* https://ptgamr.github.io/google-image-layout/src/google-image-layout.js\n*\n* @license Free to use under the MIT License.\n*\n* @example Example usage of searxng.ImageLayout class.\n* searxng.image_thumbnail_layout = new searxng.ImageLayout(\n* '#urls', // container_selector\n* '#urls .result-images', // results_selector\n* 'img.image_thumbnail', // img_selector\n* 14, // verticalMargin\n* 6, // horizontalMargin\n* 200 // maxHeight\n* );\n* searxng.image_thumbnail_layout.watch();\n*/\n\n\n(function (w, d) {\n function ImageLayout (container_selector, results_selector, img_selector, verticalMargin, horizontalMargin, maxHeight) {\n this.container_selector = container_selector;\n this.results_selector = results_selector;\n this.img_selector = img_selector;\n this.verticalMargin = verticalMargin;\n this.horizontalMargin = horizontalMargin;\n this.maxHeight = maxHeight;\n this.isAlignDone = true;\n }\n\n /**\n * Get the height that make all images fit the container\n *\n * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...\n *\n * @param {[type]} images the images to be calculated\n * @param {[type]} width the container witdth\n * @param {[type]} margin the margin between each image\n *\n * @return {[type]} the height\n */\n ImageLayout.prototype._getHeigth = function (images, width) {\n var i, img;\n var r = 0;\n\n for (i = 0; i < images.length; i++) {\n img = images[i];\n if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {\n r += img.naturalWidth / img.naturalHeight;\n } else {\n // assume that not loaded images are square\n r += 1;\n }\n }\n\n return (width - images.length * this.verticalMargin) / r; // have to round down because Firefox will automatically roundup value with number of decimals > 3\n };\n\n ImageLayout.prototype._setSize = function (images, height) {\n var i, img, imgWidth;\n var imagesLength = images.length, resultNode;\n\n for (i = 0; i < imagesLength; i++) {\n img = images[i];\n if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {\n imgWidth = height * img.naturalWidth / img.naturalHeight;\n } else {\n // not loaded image : make it square as _getHeigth said it\n imgWidth = height;\n }\n img.style.width = imgWidth + 'px';\n img.style.height = height + 'px';\n img.style.marginLeft = this.horizontalMargin + 'px';\n img.style.marginTop = this.horizontalMargin + 'px';\n img.style.marginRight = this.verticalMargin - 7 + 'px'; // -4 is the negative margin of the inline element\n img.style.marginBottom = this.verticalMargin - 7 + 'px';\n resultNode = img.parentNode.parentNode;\n if (!resultNode.classList.contains('js')) {\n resultNode.classList.add('js');\n }\n }\n };\n\n ImageLayout.prototype._alignImgs = function (imgGroup) {\n var isSearching, slice, i, h;\n var containerElement = d.querySelector(this.container_selector);\n var containerCompStyles = window.getComputedStyle(containerElement);\n var containerPaddingLeft = parseInt(containerCompStyles.getPropertyValue('padding-left'), 10);\n var containerPaddingRight = parseInt(containerCompStyles.getPropertyValue('padding-right'), 10);\n var containerWidth = containerElement.clientWidth - containerPaddingLeft - containerPaddingRight;\n\n while (imgGroup.length > 0) {\n isSearching = true;\n for (i = 1; i <= imgGroup.length && isSearching; i++) {\n slice = imgGroup.slice(0, i);\n h = this._getHeigth(slice, containerWidth);\n if (h < this.maxHeight) {\n this._setSize(slice, h);\n // continue with the remaining images\n imgGroup = imgGroup.slice(i);\n isSearching = false;\n }\n }\n if (isSearching) {\n this._setSize(slice, Math.min(this.maxHeight, h));\n break;\n }\n }\n };\n\n ImageLayout.prototype.align = function () {\n var i;\n var results_selectorNode = d.querySelectorAll(this.results_selector);\n var results_length = results_selectorNode.length;\n var previous = null;\n var current = null;\n var imgGroup = [];\n\n for (i = 0; i < results_length; i++) {\n current = results_selectorNode[i];\n if (current.previousElementSibling !== previous && imgGroup.length > 0) {\n // the current image is not connected to previous one\n // so the current image is the start of a new group of images.\n // so call _alignImgs to align the current group\n this._alignImgs(imgGroup);\n // and start a new empty group of images\n imgGroup = [];\n }\n // add the current image to the group (only the img tag)\n imgGroup.push(current.querySelector(this.img_selector));\n // update the previous variable\n previous = current;\n }\n // align the remaining images\n if (imgGroup.length > 0) {\n this._alignImgs(imgGroup);\n }\n };\n\n ImageLayout.prototype.watch = function () {\n var i, img;\n var obj = this;\n var results_nodes = d.querySelectorAll(this.results_selector);\n var results_length = results_nodes.length;\n\n function img_load_error (event) {\n // console.log(\"ERROR can't load: \" + event.originalTarget.src);\n event.originalTarget.src = w.searxng.static_path + w.searxng.theme.img_load_error;\n }\n\n function throttleAlign () {\n if (obj.isAlignDone) {\n obj.isAlignDone = false;\n setTimeout(function () {\n obj.align();\n obj.isAlignDone = true;\n }, 100);\n }\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event\n w.addEventListener('pageshow', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/FileReader/load_event\n w.addEventListener('load', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event\n w.addEventListener('resize', throttleAlign);\n\n for (i = 0; i < results_length; i++) {\n img = results_nodes[i].querySelector(this.img_selector);\n if (img !== null && img !== undefined) {\n img.addEventListener('load', throttleAlign);\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror\n img.addEventListener('error', throttleAlign);\n if (w.searxng.theme.img_load_error) {\n img.addEventListener('error', img_load_error, {once: true});\n }\n }\n }\n };\n\n w.searxng.ImageLayout = ImageLayout;\n\n}(window, document));\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i @baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n var first = this.DOMResults.querySelector(\"li:first-child:not(.locked)\"), last = this.DOMResults.querySelector(\"li:last-child:not(.locked)\"), active = this.DOMResults.querySelector(\"li.active\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","req","XMLHttpRequest","resolve","reject","promise","then","catch","open","onload","status","response","responseType","Error","statusText","onerror","onabort","send","ex","loadStyle","src","path","static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","isElementInDetail","undefined","contains","getResultElement","isImageResult","resultElement","highlightResult","let","preventDefault","selectImage","getAttribute","vimKeys","27","key","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","GoToPreviousPage","78","GoToNextPage","79","openResult","84","82","reloadPage","72","toggleHelp","hotkeys","Object","hasOwnProperty","keyCode","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","current","querySelector","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","length","etop","offsetTop","ebot","nextElementSibling","previousElementSibling","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","newTab","href","initHelpContent","divElement","categories","k","push","sorted","keys","sort","a","b","html","lastCategory","first","cj","innerHTML","helpPanel","className","getElementsByTagName","toggle","selectNext","selectPrevious","event","remove","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","entries","elements","element","source","translations","image_thumbnail_layout","ImageLayout","watch","forEach","img","style","display","error","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","imgElement","thumbnailElement","detailElement","imgSrc","loader","imgLoader","Image","align","firstFocus","qinput_id","qinput","placeCursorAtEnd","setSelectionRange","len","value","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","placeCursorAtEndOnce","autocompleter","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","HttpHeaders","Content-type","X-Requested-With","MinChars","Delay","_Position","DOMResults","Input","offsetHeight","left","offsetLeft","width","clientWidth","CustomEvent","dispatchEvent","search_on_category_select","checked","container_selector","results_selector","img_selector","verticalMargin","horizontalMargin","maxHeight","isAlignDone","_getHeigth","images","r","naturalWidth","naturalHeight","_setSize","height","imgWidth","imagesLength","resultNode","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","isSearching","slice","h","containerElement","containerCompStyles","getComputedStyle","containerPaddingLeft","parseInt","getPropertyValue","containerPaddingRight","containerWidth","Math","min","results_selectorNode","results_length","previous","results_nodes","img_load_error","originalTarget","theme","throttleAlign","once","f","exports","module","define","amd","g","global","self","n","t","o","c","require","u","code","p","1","ConditionOperator","EventType","params","Array","isArray","input","specificParams","merge","defaults","create","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","KeyboardMappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","Not","Is","From","To","name","Conditions","Callback","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","request","_HttpMethod","_Url","queryParams","_Pre","queryParamsStringify","encodeURIComponent","_QueryArg","indexOf","setRequestHeader","onreadystatechange","$Cache","ajax","timeout","$AjaxTimer","clearTimeout","Request","abort","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","Enter","liActive","_Select","KeyUpAndDown_down","KeyUpAndDown_up","last","active","currentIndex","children","lisCount","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","minchars","_Highlight","label","now","li","onclick","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,gBAQ7B,GAAID,EAAEE,QAAS,EACb,SAAWC,GACTA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAAUC,GACR,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EAC7F,MAAOJ,IAAQI,IAAMJ,EAAMI,IAAMN,GACjC,QAASE,EAAMI,KARnB,CAUGb,QAAQc,WAGb,SAASC,EAAcC,EAAUC,EAAIC,GACnC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAIhB,IAAIvB,EAAUD,OAAOC,SAAW,GAEhCA,EAAQ0B,GAAK,SAAUC,EAAKC,EAAWT,EAAUU,GAC/CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,C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