window.searxng=function(t,i){"use strict";if(t.Element){(function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){vart=this,n=(t.parentNode||t.document).querySelectorAll(e),r=-1;while(n[++r]&&n[r]!=t);return!!n[r]}})(Element.prototype)}functions(e,t,n){try{e.call(t,n)}catch(e){console.log(e)}}vara=window.searxng||{};a.on=function(r,e,o,t){t=t||false;if(typeofr!=="string"){r.addEventListener(e,o,t)}else{i.addEventListener(e,function(e){vart=e.target||e.srcElement,n=false;while(t&&t.matches&&t!==i&&!(n=t.matches(r)))t=t.parentElement;if(n)s(o,t,e)},t)}};a.ready=function(e){if(document.readyState!="loading"){e.call(t)}else{t.addEventListener("DOMContentLoaded",e.bind(t))}};a.http=function(r,o,i=null){returnnewPromise(function(e,t){try{varn=newXMLHttpRequest;n.open(r,o,true);n.timeout=2e4;n.onload=function(){if(n.status==200){e(n.response,n.responseType)}else{t(Error(n.statusText))}};n.onerror=function(){t(Error("Network Error"))};n.onabort=function(){t(Error("Transaction is aborted"))};n.ontimeout=function(){t(Error("Timeout"))};if(i){n.send(i)}else{n.send()}}catch(e){t(e)}})};a.loadStyle=function(e){vart=a.settings.theme_static_path+"/"+e,n="style_"+e.replace(".","_"),r=i.getElementById(n);if(r===null){r=i.createElement("link");r.setAttribute("id",n);r.setAttribute("rel","stylesheet");r.setAttribute("type","text/css");r.setAttribute("href",t);i.body.appendChild(r)}};a.loadScript=function(e,t){varn=a.settings.theme_static_path+"/"+e,r="script_"+e.replace(".","_"),o=i.getElementById(r);if(o===null){o=i.createElement("script");o.setAttribute("id",r);o.setAttribute("src",n);o.onload=t;o.onerror=function(){o.setAttribute("error","1")};i.body.appendChild(o)}elseif(!o.hasAttribute("error")){try{t.apply(o,[])}catch(e){console.log(e)}}else{console.log("callback not executed : script '"+n+"' not loaded.")}};a.insertBefore=function(e,t){t.parentNode.insertBefore(e,t)};a.insertAfter=function(e,t){t.parentNode.insertAfter(e,t.nextSibling)};a.on(".close","click",function(){this.parentNode.classList.add("invisible")});functione(){for(vareofi.getElementsByTagName("body")[0].classList.values()){if(e.endsWith("_endpoint")){returne.split("_")[0]}}return""}a.endpoint=e();returna}(window,document);searxng.ready(function(){"use strict";searxng.infinite_scroll_supported="IntersectionObserver"inwindow&&"IntersectionObserverEntry"inwindow&&"intersectionRatio"inwindow.IntersectionObserverEntry.prototype;if(searxng.endpoint!=="results"){return}if(!searxng.infinite_scroll_supported){console.log("IntersectionObserver not supported");return}leti=document;vars=i.getElementById("results").classList.contains("only_template_images");functionn(){vare=i.createElement("div");e.classList.add("loader");returne}functionr(t,e){t.textContent="";e.forEach(e=>t.appendChild(e))}functiono(o){vare=i.querySelector("#pagination form.next_page");if(!e){return}r(i.querySelector("#pagination"),[n()]);vart=newFormData(e);searxng.http("POST",i.querySelector("#search").getAttribute("action"),t).then(function(e){vart=(newDOMParser).parseFromString(e,"text/html");varn=t.querySelectorAll("#urls article");varr=t.querySelector("#pagination");i.querySelector("#pagination").remove();if(n.length>0&&!s){i.querySelector("#urls").appendChild(i.createElement("hr"))}n.forEach(e=>{i.querySelector("#urls").appendChild(e)});if(r){i.querySelector("#results").appendChild(r);o()}}).catch(function(e){console.log(e);vart=i.createElement("div");t.textContent=searxng.settings.translations.error_loading_next_page;t.classList.add("dialog-error");t.setAttribute("role","alert");r(i.querySelector("#pagination"),[t])})}if(searxng.settings.infinite_scroll&&searxng.infinite_scroll_supported){consta={rootMargin:"20rem"};constl="article.result:last-child";constu=newIntersectionObserver(e=>{constt=e[0];if(t.isIntersecting){u.unobserve(t.target);o(()=>u.observe(i.querySelector(l),a))}});u.observe(i.querySelector(l),a)}});searxng.ready(function(){functione(e){while(e!==undefined){if(e.classList.contains("detail")){ret
"use strict";varl;(function(e){e[e["AND"]=0]="AND";e[e["OR"]=1]="OR"})(l||(l={}));vari;(function(e){e[e["KEYDOWN"]=0]="KEYDOWN";e[e["KEYUP"]=1]="KEYUP"})(i||(i={}));varr=function(){functiona(t,e){if(t===void0){t={}}if(e===void0){e="[data-autocomplete]"}if(Array.isArray(e)){e.forEach(function(e){newa(t,e)})}elseif(typeofe=="string"){varn=document.querySelectorAll(e);Array.prototype.forEach.call(n,function(e){newa(t,e)})}else{varr=a.merge(a.defaults,t,{DOMResults:document.createElement("div")});a.prototype.create(r,e);returnr}}a.prototype.create=function(e,t){e.Input=t;if(e.Input.nodeName.match(/^INPUT$/i)&&(e.Input.hasAttribute("type")===false||e.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))){e.Input.setAttribute("autocomplete","off");e._Position(e);e.Input.parentNode.appendChild(e.DOMResults);e.$Listeners={blur:e._Blur.bind(e),destroy:a.prototype.destroy.bind(null,e),focus:e._Focus.bind(e),keyup:a.prototype.event.bind(null,e,i.KEYUP),keydown:a.prototype.event.bind(null,e,i.KEYDOWN),position:e._Position.bind(e)};for(varnine.$Listeners){e.Input.addEventListener(n,e.$Listeners[n])}}};a.prototype.getEventsByType=function(e,t){varn={};for(varrine.KeyboardMappings){varo=i.KEYUP;if(e.KeyboardMappings[r].Event!==undefined){o=e.KeyboardMappings[r].Event}if(o==t){n[r]=e.KeyboardMappings[r]}}returnn};a.prototype.event=function(e,t,n){varr=function(e){if(s===true&&i.Operator==l.AND||s===false&&i.Operator==l.OR){e=a.merge({Not:false},e);if(e.hasOwnProperty("Is")){if(e.Is==n.keyCode){s=!e.Not}else{s=e.Not}}elseif(e.hasOwnProperty("From")&&e.hasOwnProperty("To")){if(n.keyCode>=e.From&&n.keyCode<=e.To){s=!e.Not}else{s=e.Not}}}};for(varoina.prototype.getEventsByType(e,t)){vari=a.merge({Operator:l.AND},e.KeyboardMappings[o]),s=l.AND==i.Operator;i.Conditions.forEach(r);if(s===true){i.Callback.call(e,n)}}};a.prototype.makeRequest=function(e,t,n){varr=Object.getOwnPropertyNames(e.HttpHeaders),o=newXMLHttpRequest,i=e._HttpMethod(),s=e._Url(),a=e._Pre(),l=encodeURIComponent(e._QueryArg())+"="+encodeURIComponent(a);if(i.match(/^GET$/i)){if(s.indexOf("?")!==-1){s+="&"+l}else{s+="?"+l}}o.open(i,s,true);for(varu=r.length-1;u>=0;u--){o.setRequestHeader(r[u],e.HttpHeaders[r[u]])}o.onreadystatechange=function(){if(o.readyState==4&&o.status==200){e.$Cache[a]=o.response;t(o.response)}elseif(o.status>=400){n()}};returno};a.prototype.ajax=function(e,t,n){if(n===void0){n=true}if(e.$AjaxTimer){window.clearTimeout(e.$AjaxTimer)}if(n===true){e.$AjaxTimer=window.setTimeout(a.prototype.ajax.bind(null,e,t,false),e.Delay)}else{if(e.Request){e.Request.abort()}e.Request=t;e.Request.send(e._QueryArg()+"="+e._Pre())}};a.prototype.cache=function(e,t,n){varr=e._Cache(e._Pre());if(r===undefined){varo=a.prototype.makeRequest(e,t,n);a.prototype.ajax(e,o)}else{t(r)}};a.prototype.destroy=function(e){for(vartine.$Listeners){e.Input.removeEventListener(t,e.$Listeners[t])}e.DOMResults.parentNode.removeChild(e.DOMResults)};a.merge=function(){vare={},t;for(varn=0;n<arguments.length;n++){for(tinarguments[n]){e[t]=arguments[n][t]}}returne};a.defaults={Delay:150,EmptyMessage:"No result here",Highlight:{getRegex:function(e){returnnewRegExp(e,"ig")},transform:function(e){return"<strong>"+e+"</strong>"}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:false}],Callback:function(e){if(this.DOMResults.getAttribute("class").indexOf("open")!=-1){vart=this.DOMResults.querySelector("li.active");if(t!==null){e.preventDefault();this._Select(t);this.DOMResults.setAttribute("class","autocomplete")}}},Operator:l.AND,Event:i.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault()},Operator:l.OR,Event:i.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault();vart=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),r=this.DOMResults.que