PageSourceSearch

https://birdsend.co/wp-content/plugins/shortpixel-adaptive-images/assets/js/ai-2.0.min.js

js birdsend.co collected 2026-09-26 00:27:10 UTC 42,219 bytes, 1 lines download raw bytes

1function SPAI(){}SPAI.prototype={stop:1e5,modules:{},fancyboxId:"",fancyboxHooked:"none",mutationsCount:0,mutationsList:{},timeOutHandle:false,mutationsLastProcessed:0,updatedUrlsCount:0,mutationObserver:false,intersectionObserver:false,intersectionMargin:500,initialized:false,bodyHandled:false,bodyCount:0,conversionType:false,urlRegister:[],callbacks:[],sniperOn:false,debugInfo:{log:""},loadTs:Date.now(),NORESIZE:1,EXCLUDED:2,EAGER:4};SPAI.prototype.init=function(){if(typeof window.IntersectionObserver!=="function"){jQuery.getScript(spai_settings.plugin_url+"/assets/js/intersection.min.js?"+spai_settings.version,ShortPixelAI.setupIntersectionObserverAndParse)}else{ShortPixelAI.setupIntersectionObserverAndParse()}};function spaiSniperClick(){SpaiSniper(1)}SPAI.prototype.record=function(e,t,i){if(spai_settings.debug){switch(e){case"count":if(typeof ShortPixelAI.debugInfo[t]==="undefined")ShortPixelAI.debugInfo[t]=0;ShortPixelAI.debugInfo[t]+=i;break;case"log":case"logX":if(typeof ShortPixelAI.debugInfo[t]==="undefined")ShortPixelAI.debugInfo[t]="";ShortPixelAI.debugInfo[t]+=(new Date).getTime()+" - "+(e==="log"?i:ShortPixelAI.xpath(i))+"\n"}}};SPAI.prototype.gLog=function(e){if(arguments.length===0){return}var t=Date.now()-this.loadTs;console.groupCollapsed("🤖 SPAI Debug");console.log("%cTime after init: %c"+t+"%c ms","font-weight:bold","color:#4caf50;font-weight:bold","color:inherit;font-weight:bold");for(var i=0;i<arguments.length;i++){console.log(arguments[i])}console.groupEnd()};SPAI.prototype.getApiUrl=function(){return spai_settings.api_url};SPAI.prototype.getAjaxUrl=function(){return spai_settings.ajax_url};SPAI.prototype.log=function(e){var t=Date.now()-ShortPixelAI.loadTs;var i=t+"ms - "+e;if(t<2e3){ShortPixelAI.debugInfo["log"]+=i+"\n";return}if(ShortPixelAI.debugInfo["log"]!==""){console.log(ShortPixelAI.debugInfo["log"]);ShortPixelAI.debugInfo["log"]=""}console.log(i)};SPAI.prototype.handleBody=function(){var e={};if(spai_settings.affected_tags!=="{{SPAI-AFFECTED-TAGS}}"){try{e=JSON.parse(spai_settings.affected_tags)}catch(e){console.log(e)}}else if(typeof spai_affectedTags!=="undefined"){try{e=JSON.parse(spai_affectedTags);spai_settings.affected_tags=spai_affectedTags}catch(e){console.log(e)}}spai_settings.affected_tags_map=e;var t=jQuery("body");ShortPixelAI.bodyCount=1;try{ShortPixelAI.handleUpdatedImageUrls(true,t,true,false);ShortPixelAI.bodyHandled=true;ShortPixelAI.triggerEvent("spai-body-handled",t[0])}catch(e){if(e=="defer_all"&&ShortPixelAI.bodyCount<20){setTimeout(ShortPixelAI.handleBody,20*ShortPixelAI.bodyCount);ShortPixelAI.bodyCount++}else{spai_settings.debug&&ShortPixelAI.log("handleBody - error "+e);throw e}}};SPAI.prototype.handleUpdatedImageUrlsWithRetry=function(e,t,i,r){try{ShortPixelAI.handleUpdatedImageUrls(e,t,i,r)}catch(o){if(o=="defer_all"&&ShortPixelAI.bodyCount<30){spai_settings.debug&&ShortPixelAI.log("handleUpdatedImageUrlsWRetry - DEFER ALL");setTimeout((function(){ShortPixelAI.handleUpdatedImageUrls(e,t,i,r)}),20*ShortPixelAI.bodyCount);ShortPixelAI.bodyCount++}else{spai_settings.debug&&ShortPixelAI.log("handleUpdatedImageUrlsWRetry - error "+o.description);throw o}}};SPAI.prototype.handleUpdatedImageUrls=function(e,t,i,r){if(!e&&!ShortPixelAI.bodyHandled){return}if(t.is("img,amp-img")){ShortPixelAI.updateImageUrl(t,i,r);return}ShortPixelAI.updatedUrlsCount=0;
1if(spai_settings.method!=="srcset"){jQuery("img,amp-img",t).each((function(){var e=jQuery(this);ShortPixelAI.updateImageUrl(e,i,r)}))}if(r){for(var o in spai_settings.affected_tags_map){if(t.is(o)){ShortPixelAI.updateDivUrl(t,i,r);break}}}var a="";for(var o in spai_settings.affected_tags_map){a+=","+o}a=a.replace(/^,/,"");jQuery(a,t).each((function(){var e=jQuery(this);if(e[0].tagName==="VIDEO"||e[0].tagName==="SOURCE"){ShortPixelAI.updateVideoPoster(e,i)}else{ShortPixelAI.updateDivUrl(e,i,r)}}));ShortPixelAI.updateAHrefForIntegration("CORE",t,"a.media-gallery-link");ShortPixelAI.updateAHrefForIntegration("envira",t,"a.envira-gallery-link");ShortPixelAI.updateAHrefForIntegration("modula",t,"div.modula-gallery a[data-lightbox]");ShortPixelAI.updateAHrefForIntegration("elementor-addons",t,"div.eael-filter-gallery-wrapper a.eael-magnific-link");ShortPixelAI.updateAHrefForIntegration("elementor",t,"a[data-elementor-open-lightbox]");ShortPixelAI.updateAHrefForIntegration("viba-portfolio",t,"a.viba-portfolio-media-link");if(spai_settings.active_integrations["wp-bakery"]){jQuery("span.dima-testimonial-image",t).each((function(){ShortPixelAI.updateWpBakeryTestimonial(jQuery(this),i)}))}
1if(spai_settings.active_integrations["social-pug"]){jQuery("a.dpsp-pin-it-button",t).each((function(){var e=jQuery(this);var t=false;e.attr("href",e.attr("href").replace(/media=(data:image\/svg\+xml;.*)&url=/,(function(e,i,r){t=true;return"media="+ShortPixelAI.parsePseudoSrc(i).src+"&url="})));if(!t){var i=spai_settings.api_url.substr(0,spai_settings.api_url.lastIndexOf("/")+1).replace("/","\\/")+"[^\\/]+\\/";e.attr("href",e.attr("href").replace(new RegExp(i),""))}}))}ShortPixelAI.updateAHrefForIntegration("foo",t,"div.fg-item a.fg-thumb");if(spai_settings.active_integrations.nextgen){jQuery("a.ngg-fancybox, a.ngg-simplelightbox",t).each((function(){var e=jQuery(this);if(!ShortPixelAI.isFullPseudoSrc(e.attr("href"))){return}var t=ShortPixelAI.parsePseudoSrc(e.attr("href"));e.attr("href",ShortPixelAI.composeApiUrl(false,t.src,"DEFER",false,false));if(e.hasClass("ngg-fancybox")){e.mousedown((function(){ShortPixelAI.fancyboxUpdateWidth(e);return true}))}}))}if(ShortPixelAI.updatedUrlsCount>0){spai_settings.debug&&ShortPixelAI.log("trigger spai-block-handled event for "+ShortPixelAI.updatedUrlsCount+" URLs on "+t[0].tagName);ShortPixelAI.triggerEvent("spai-block-handled",t[0])}};SPAI.prototype.updateImageUrl=function(e,t,i){if(!ShortPixelAI.containsPseudoSrc(e[0].outerHTML)){return}if(typeof e.attr("data-spai-upd")!=="undefined"&&!ShortPixelAI.containsPseudoSrc(e.attr("src"))){return}var r=ShortPixelAI.is(e,ShortPixelAI.EXCLUDED|ShortPixelAI.EAGER|ShortPixelAI.NORESIZE);if(spai_settings.native_lazy=="1"){r|=ShortPixelAI.EAGER}if(!(r&ShortPixelAI.EAGER)&&!i&&!ShortPixelAI.elementInViewport(e[0])){ShortPixelAI.intersectionObserver.observe(e[0]);return}var o=0,a=0,n=0,s=0;if((r&(ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE))==0){try{var l=ShortPixelAI.getSizesRecursive(e,t);o=l.width;a=l.height;for(var h in spai_settings.use_first_sizes){var d=spai_settings.use_first_sizes[h];if(e.is(h)){if(d.width<o&&d.height<a){spai_settings.use_first_sizes[h]={width:o,height:a}}else{o=d.width;a=d.height}}}n=Math.round(o+l.padding);s=Math.round(a+l.padding_height)}catch(i){if(!e[0].complete){throw"defer_all"}if(typeof i.type!=="undefined"&&i.type=="defer"&&t&&!(r&ShortPixelAI.EAGER)){spai_settings.debug&&ShortPixelAI.log("Defer "+i.cause+" "+ShortPixelAI.parsePseudoSrc(e[0].src).src);if(!e.is(":visible")&&!!spai_settings.hover_handling){spai_settings.debug&&ShortPixelAI.gLog("Attach mouseover to it");e.off("mouseover",ShortPixelAI.mouseOverHandler);e.on("mouseover",ShortPixelAI.mouseOverHandler)}return}}}ShortPixelAI.record("count","modifiedImg",1);ShortPixelAI.record("logX","modifiedImgURL",e[0]);if(n&&spai_settings.alter2wh&&e.attr("width")&&n<e.attr("width")){if(e.attr("height")){e.attr("height",Math.round(e.attr("height")*n/e.attr("width")))}e.attr("width",n)}else if(s&&spai_settings.alter2wh&&e.attr("height")&&s<e.attr("height")){e.attr("height",s)}var f=ShortPixelAI.updateSrc(e,"src",o,a,(spai_settings.method=="src"||spai_settings.method=="both")&&(r&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateSrc(e,"data-src",false,false,(r&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateSrc(e,"data-large_image",false,false,(r&ShortPixelAI.EXCLUDED)==0);if(spai_settings.active_integrations.envira){ShortPixelAI.updateSrc(e,"data-envira-src",false,false,(r&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateSrc(e,"data-safe-src",o,a,(r&ShortPixelAI.EXCLUDED)==0)}if(spai_settings.active_integrations.foo){ShortPixelAI.updateSrc(e,"data-src-fg",o,a,(r&ShortPixelAI.EXCLUDED)==0)}if(spai_settings.method=="src"){ShortPixelAI.removeSrcSet(e)}else{ShortPixelAI.updateSrcSet(e,o,f)}if(spai_settings.native_lazy=="1"){e.attr("loading","lazy")}if(spai_settings.active_integrations.woocommerce&&e.hasClass("attachment-shop_thumbnail")){var p=jQuery("form.variations_form");for(var u=0;u<p.length;u++){var c=jQuery(p[u]);if(c.attr("data-product_variations")){var g=c.data("product_variations");for(var h in g){if(g[h].image.gallery_thumbnail_src.indexOf(f.src)>=0){g[h].image.gallery_thumbnail_src=f.newSrc}}c.data("product_variations",g)}}}ShortPixelAI.elementUpdated(e,o);e.off("mouseover",ShortPixelAI.mouseOverHandler)};SPAI.prototype.mouseOverHandler=function(){var e=jQuery(this);spai_settings.debug&&ShortPixelAI.log("Mouseover triggered on "+ShortPixelAI.parsePseudoSrc(this.src).src);if(e.is(":visible")){spai_settings.debug&&ShortPixelAI.log("updateImageURL");var t=e.width(),i=e.height();ShortPixelAI.updateImageUrl(e,true,true)}};SPAI.prototype.updateWpBakeryTestimonial=function(e,t){if(typeof e.attr("data-spai-upd")!=="undefined"){return}ShortPixelAI.updateAttr(e,"data-element-bg");var i=0,r=0,o=[];var a=ShortPixelAI.is(e,ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE|ShortPixelAI.EAGER);if((a&(ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE))==0){try{o=ShortPixelAI.getSizesRecursive(e,t);i=o.width;r=o.height}catch(e){if(typeof e.type!=="undefined"&&e.type=="defer"&&t&&!(a&ShortPixelAI.EAGER)){return}}}ShortPixelAI.updateInlineStyle(e,i,r,(a&ShortPixelAI.EXCLUDED)==0,false);ShortPixelAI.elementUpdated(e,i)};SPAI.prototype.updateVideoPoster=function(e,t){if(typeof e.attr("data-spai-upd")!=="undefined"){return}var i=0,r=0,o=[];var a=ShortPixelAI.is(e,ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE|ShortPixelAI.EAGER);if((a&(ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE))==0){try{o=ShortPixelAI.getSizesRecursive(e[0].tagName==="VIDEO"?e:e.getParent(),t);i=o.width;r=o.height}catch(e){if(typeof e.type!=="undefined"&&e.type=="defer"&&t&&!(a&ShortPixelAI.EAGER)){return}}}ShortPixelAI.updateSrc(e,"poster",i,r,(a&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.elementUpdated(e,i)};SPAI.prototype.updateDivUrl=function(e,t,i){if(typeof e.attr("data-spai-upd")!=="undefined"){return}if(typeof e.attr("src")==="undefined"&&typeof e.attr("data-src")==="undefined"&&typeof e.attr("data-thumb")==="undefined"&&!ShortPixelAI.getBackgroun
1dPseudoImages(e.attr("style"))){return}if(!i&&!ShortPixelAI.elementInViewport(e[0])){ShortPixelAI.intersectionObserver.observe(e[0]);return}var r=0,o=0,a=0,n=0,s=[];var l=ShortPixelAI.is(e,ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE|ShortPixelAI.EAGER);if((l&(ShortPixelAI.EXCLUDED|ShortPixelAI.NORESIZE))==0){try{s=ShortPixelAI.getSizesRecursive(e,t);r=s.width;o=s.height;a=Math.round(r+s.padding);n=Math.round(o+s.padding_height)}catch(e){if(typeof e.type!=="undefined"&&e.type=="defer"&&t&&!(l&ShortPixelAI.EAGER)){return}}}ShortPixelAI.updateSrc(e,"src",r,o,(l&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateSrc(e,"data-src",r,o,(l&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateSrc(e,"data-thumb",false,false,(l&ShortPixelAI.EXCLUDED)==0);ShortPixelAI.updateInlineStyle(e,a,n,(l&ShortPixelAI.EXCLUDED)==0,spai_settings.crop?ShortPixelAI.spaiCalculateBgClipResize(e[0]):false);ShortPixelAI.elementUpdated(e,r)};SPAI.prototype.updateAHref=function(e,t,i){ShortPixelAI.updateAttr(e,"href")};SPAI.prototype.updateAttr=function(e,t){if(typeof e.attr("data-spai-upd")!=="undefined"){return}if(typeof e.attr(t)==="undefined"){return}var i=ShortPixelAI.updateSrc(e,t,window.screen.availWidth,window.screen.availHeight,!ShortPixelAI.is(e,ShortPixelAI.EXCLUDED),true);ShortPixelAI.elementUpdated(e,i.newWidth)};SPAI.prototype.is=function(e,t){var i=0;if(t&ShortPixelAI.EAGER){for(var r=0;r<spai_settings.eager_selectors.length;r++){var o=spai_settings.eager_selectors[r];try{if(e.is(o))i|=ShortPixelAI.EAGER}catch(e){spai_settings.debug&&ShortPixelAI.log("eager:"+e.message)}}}if(t&ShortPixelAI.EXCLUDED){for(var r=0;r<spai_settings.excluded_selectors.length;r++){var o=spai_settings.excluded_selectors[r];try{if(e.is(o))i|=ShortPixelAI.EXCLUDED}catch(e){spai_settings.debug&&ShortPixelAI.log("excluded:"+e.message)}}}if(t&ShortPixelAI.NORESIZE){for(var r=0;r<spai_settings.noresize_selectors.length;r++){var o=spai_settings.noresize_selectors[r];try{if(e.is(o))i|=ShortPixelAI.NORESIZE}catch(e){spai_settings.debug&&ShortPixelAI.log("noresize:"+e.message)}}}return i};SPAI.prototype.updateAHrefForIntegration=function(e,t,i){if(e=="CORE"||spai_settings.active_integrations[e]){jQuery(i,t).each((function(){var e=jQuery(this);ShortPixelAI.updateAHref(e)}))}};SPAI.prototype.setupDOMChangeObserver=function(){ShortPixelAI.mutationObserver=new MutationObserver((function(e){if(ShortPixelAI.sniperOn)return;e.forEach((function(e){if(e.type==="attributes"&&e.attributeName==="id"){return}if(e.addedNodes.length){for(var t=0;t<e.addedNodes.length;t++){try{ShortPixelAI.handleUpdatedImageUrls(false,jQuery(e.addedNodes[t]),true,false)}catch(e){if(e=="defer_all"){setTimeout(ShortPixelAI.handleBody,20*ShortPixelAI.bodyCount)}else{throw e}}}}if(e.type=="attributes"){var i=e.target.getAttribute("class");i=typeof i==="undefined"||i===null?"":i;if(e.target.nodeName==="BODY"&&ShortPixelAI.containsPseudoSrc(i)>0){return}if(jQuery(e.target).attr("id")=="fancybox-wrap"&&ShortPixelAI.fancyboxId!=ShortPixelAI.fancyboxHooked){ShortPixelAI.hookIntoFancybox(e.target)}else{if(ShortPixelAI.timeOutHandle){clearTimeout(ShortPixelAI.timeOutHandle);if((new Date).getTime()-ShortPixelAI.mutationsLastProcessed>100){ShortPixelAI.processMutations()}}else{ShortPixelAI.mutationsLastProcessed=(new Date).getTime()}ShortPixelAI.observedMutations++;ShortPixelAI.mutationsList[ShortPixelAI.xpath(e.target)]={target:e.target,time:(new Date).getTime()};ShortPixelAI.timeOutHandle=setTimeout(ShortPixelAI.processMutations,50)}}}))}));var e=document.querySelector("body");var t={attributes:true,childList:true,subtree:true,characterData:true};ShortPixelAI.mutationObserver.observe(e,t)};SPAI.prototype.processMutations=function(){var e=0;for(var t in ShortPixelAI.mutationsList){var i=jQuery(ShortPixelAI.mutationsList[t].target);if(ShortPixelAI.mutationsList[t].time+50>(new Date).getTime()){e++;continue}var r=i[0].outerHTML;if(i.length&&(typeof spai_settings.affected_tags_map.script!=="undefined"||ShortPixelAI.containsPseudoSrc(r)>0)){ShortPixelAI.handleUpdatedImageUrlsWithRetry(false,i,true,false);if(r.indexOf("background")>0){ShortPixelAI.updateInlineStyle(i,false,false,!ShortPixelAI.is(i,ShortPixelAI.EXCLUDED),false)}}delete ShortPixelAI.mutationsList[t]}ShortPixelAI.mutationsLastProcessed=(new Date).getTime();if(e>0){ShortPixelAI.timeOutHandle=setTimeout(ShortPixelAI.processMutations,50)}};SPAI.prototype.setupIntersectionObserverAndParse=function(){var e={rootMargin:ShortPixelAI.intersectionMargin+"px",threshold:0};ShortPixelAI.intersectionObserver=new IntersectionObserver((function(e,t){e.forEach((function(e){if(e.isIntersecting){var i=jQuery(e.target);ShortPixelAI.handleUpdatedImageUrlsWithRetry(false,i,true,true);if(window.getComputedStyle(e.target)["background-image"]){ShortPixelAI.calcSizeAndUpdateInlineStyle(i)}t.unobserve(e.target);ShortPixelAI.triggerEvent("spai-element-handled",e.target)}else if(spai_settings.debug){var i=jQuery(e.target);ShortPixelAI.log(i[0].nodeName+" is NOT intersecting - "+ShortPixelAI.parsePseudoSrc(i[0].src).src)}}))}),e);function t(e){var t=/([^{}]*?)\s*{.*background(-image|)\s*:([^;]*[,\s]|\s*)url\(['"]?(data:image\/svg\+xml[^'"\)]*?)(['"]?)\)/m;var i=e.match(t);if(!i||i.length<2){return false}return document.querySelectorAll(i[1])}function i(e,i){if(typeof e.cssText!=="undefined"&&ShortPixelAI.containsPseudoSrc(e.cssText)>0){var r=t(e.cssText);if(r&&r.length>0){for(var o=0;o<r.length;o++){var a=r[o];if(ShortPixelAI.elementInViewport(a)){ShortPixelAI.calcSizeAndUpdateInlineStyle(jQuery(a))}else{ShortPixelAI.intersectionObserver.observe(a)}}}else{i.push(e)}}}function r(e){if(e.length){var t="";for(var i=0;i<e.length;i++){let o=e[i];
1var r=ShortPixelAI.replaceBackgroundPseudoSrc(o.cssText,false);if(r.replaced){t+=r.text}}var o=document.createElement("style");o.type="text/css";o.innerText=t;document.getElementsByTagName("head")[0].appendChild(o)}}function o(e){var t=0;var o=0;var a=[];var n=setInterval((function(){var e=document.styleSheets[t];if(typeof e==="undefined"){clearInterval(n);r(a);return}try{for(var s=o*1e3;s<(o+1)*1e3;s++){var l=e.rules[s];if(typeof l==="undefined"){t++;o=0;return}if(l instanceof CSSStyleRule){i(l,a)}else if(typeof l.cssRules!=="undefined"){for(var h in l.cssRules){var d=l.cssRules[h];i(d)}}}o++}catch(e){t++}}),0)}ShortPixelAI.handleBody();if(spai_settings.lazy_bg_style||!!spai_settings.affected_tags_map.div&&spai_settings.affected_tags_map.div&2){o()}if(typeof window.MutationObserver!=="function"){jQuery.getScript(spai_settings.plugin_url+"/assets/js/MutationObserver.min.js?"+spai_settings.version,ShortPixelAI.setupDOMChangeObserver)}else{ShortPixelAI.setupDOMChangeObserver()}};SPAI.prototype.replaceBackgroundPseudoSrc=function(e,t){var i=false;e.replace(/background(-image|)\s*:([^;]*[,\s]|\s*)url\(['"]?(data:image\/svg\+xml[^'"\)]*?)(['"]?)\)/gm,(function(r){var o=/background(-image|)\s*:([^;]*[,\s]|\s*)url\(['"]?(data:image\/svg\+xml[^'"\)]*?)(['"]?)\)/m;var a=o.exec(r);var n=ShortPixelAI.parsePseudoSrc(a[3]);if(!n.src)return;var s=window.screen.width;var l=spai_settings.backgrounds_max_width?spai_settings.backgrounds_max_width:99999;var h;if(t!==false&&n.src.indexOf("../")===0){var d=t.substr(0,t.lastIndexOf("/"))+"/"+n.src;var f=document.createElement("a");f.href=d;n.src=f.href}h=ShortPixelAI.composeApiUrl(false,n.src,Math.min(n.origWidth,s,l),false,false);e=e.replace(a[3],h);i=true}));return{text:e,replaced:i}};SPAI.prototype.elementInViewport=function(e){if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)){return false}var t=e.getBoundingClientRect();var i=ShortPixelAI.intersectionMargin;return t.bottom+i>=0&&t.right+i>=0&&t.top-i<=(window.innerHeight||document.documentElement.clientHeight)&&t.left-i<=(window.innerWidth||document.documentElement.clientWidth)};SPAI.prototype.hookIntoFancybox=function(e){if(ShortPixelAI.fancyboxId.length==0||ShortPixelAI.fancyboxHooked!=="none"){return}var t=jQuery(e);var i=jQuery("a#fancybox-right",t);i.mousedown((function(e){var t=ShortPixelAI.fancyboxChangeId(1);var i=jQuery("div#"+t+" a.ngg-fancybox");if(i.length){ShortPixelAI.fancyboxUpdateWidth(i)}}));var i=jQuery("a#fancybox-left",t);i.mousedown((function(e){var t=ShortPixelAI.fancyboxChangeId(-1);var i=jQuery("div#"+t+" a.ngg-fancybox");if(i.length){ShortPixelAI.fancyboxUpdateWidth(i)}}));ShortPixelAI.fancyboxHooked=ShortPixelAI.fancyboxId};SPAI.prototype.fancyboxChangeId=function(e){var t=ShortPixelAI.fancyboxId.match(/(.*)([0-9]+)$/);return t[1]+(parseInt(t[2])+e)};SPAI.prototype.prepareUrl=function(e){if(!e.match(/^http[s]{0,1}:\/\/|^\/\//)){if(e.startsWith("/")){if(typeof ShortPixelAI.aHref==="undefined"){ShortPixelAI.aHref=document.createElement("a")}ShortPixelAI.aHref.href=spai_settings.site_url;e=ShortPixelAI.aHref.protocol+"//"+ShortPixelAI.aHref.hostname+e}else{var t=window.location.href.split("#")[0].split("?")[0];if(!t.endsWith("/")){var i=t.split("/");i.pop();t=i.join("/")+"/"}e=t+e;if(e.indexOf("../")>0){var r=document.createElement("a");r.href=e;e=r.protocol+"//"+r.hostname+(r.pathname.startsWith("/")?"":"/")+r.pathname+r.search+r.hash}}}return e};SPAI.prototype.composeApiUrl=function(e,t,i,r,o){t=this.prepareUrl(t);var a=/(?:\.([^.\/\?]+))(?:$|\?.*)/;a.lastIndex=0;var n=a.exec(t);var s=typeof n==="object"&&n!==null&&typeof n[1]==="string"&&n[1]!==""?n[1]:"jpg";s=s==="jpeg"?"jpg":s;if(s==="svg"||s==="webp"||s==="avif"){i=r=0}var l=spai_settings.api_url;if(i>1&&i<99999){var h=typeof window.devicePixelRatio==="undefined"?1:window.devicePixelRatio;if(spai_settings.size_breakpoints.on){let e=ShortPixelAI.getSizeBreakpoint(i,spai_settings.size_breakpoints.base,1+spai_settings.size_breakpoints.rate/100);if(r){r=Math.round(e/i*r)}i=e}i=Math.round(i*h);r=r?Math.round(r*h):undefined;if(ShortPixelAI.urlRegister[t]===undefined||ShortPixelAI.urlRegister[t].width<i){if(e){ShortPixelAI.urlRegister[t]={width:i,height:r}}}else if(!ShortPixelAI.urlRegister[t].height&&!r||!!ShortPixelAI.urlRegister[t].height&&!!r&&Math.abs(1-i*ShortPixelAI.urlRegister[t].height/r/ShortPixelAI.urlRegister[t].width)<.005){r=ShortPixelAI.urlRegister[t].height;i=ShortPixelAI.urlRegister[t].width}if(!o){l=l.replace("%WIDTH%",""+i+(r?"+h_"+r:""))}}else if(!o){l=l.replace("w_%WIDTH%"+spai_settings.sep,"");l=l.replace("w_%WIDTH%","")}let d=ShortPixelAI.conversionType;
1let f=spai_settings.extensions_to_nextgenimg;let p=t.split("://")[0];let u=(p=="https"?"":"+p_h")+"/"+t.replace(/^https?:\/\//,"");switch(s){case"svg":case"webp":case"avif":l=spai_settings.serve_svg?spai_settings.api_short_url+u:t;break;case"png":l=l+(d&&f.png?spai_settings.sep+d:"")+u;break;case"jpg":l=l+(d&&f.jpg?spai_settings.sep+d:"")+u;break;case"gif":l=l+(d&&f.gif?spai_settings.sep+d:"")+u;break;default:l=l+(d?spai_settings.sep+d:"")+u;break}if(o){var c="sc_"+o.clip.offsetX+"x"+o.clip.offsetY+":"+o.clip.width+"x"+o.clip.height+":"+o.viewport.width*h+"x"+o.viewport.height*h;l=l.replace("w_%WIDTH%",c)}return l};SPAI.prototype.getSizeBreakpoint=function(e,t,i){if(e<=t)return t;let r=Math.floor(Math.log(e/t)/Math.log(i));if(e<=Math.ceil(t*Math.pow(i,r)))return Math.ceil(e);return Math.ceil(t*Math.pow(i,r+1))};SPAI.prototype.isFullPseudoSrc=function(e){return this.parsePseudoSrc(e).full};SPAI.prototype.containsPseudoSrc=function(e){return typeof e==="string"?e.indexOf("data:image/svg+xml;base64")>=0:false};SPAI.prototype.parsePseudoSrc=function(e){var t={src:false,bip:true,full:false,origWidth:0,origHeight:0},i=/([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/;if(typeof e==="undefined"||!this.containsPseudoSrc(e)){return t}var r,o,a;e=e.trim();if(typeof e==="string"){a=e.match(i);a=a.length>0?a[0]:undefined;if(typeof a==="string"){o=atob(a)}}try{if(typeof o==="string"){r=jQuery(o)}}catch(e){spai_settings.debug&&ShortPixelAI.log("svgDecoded: "+o);return t}if(r instanceof jQuery){var n={url:r.data("u"),bip:r.data("bip"),width:r.data("w"),height:r.data("h")};t.src=n.url===undefined||n.url===""?t.src:ShortPixelAI.urldecode(n.url);t.bip=typeof n.bip!=="undefined";if(t.src!==""&&typeof t.src==="string"){var s=t.src;if(t.src.lastIndexOf("//",0)===0){t.src=window.location.protocol+t.src}if(!!window.spai_settings.lqip&&typeof this.modules.lqip==="object"&&!!t.bip){this.modules.lqip.add(this.prepareUrl(t.src),s)}}t.origWidth=n.width===undefined||n.width===""?t.origWidth:n.width;t.origHeight=n.height===undefined||n.height===""?t.origHeight:n.height;t.full=typeof t.src==="string"&&t.src!==""}return t};SPAI.prototype.updateSrc=function(e,t,i,r,o,a){var n=e.attr("data-spai-"+t+"-meta");if(typeof n==="undefined"){var n=e.attr(t);if(typeof n==="undefined"){return false}}var s=ShortPixelAI.parsePseudoSrc(n);var l=s?s.src:false;if(!l){return false}s.crop=false;var h=e.attr("data-spai-crop");if(typeof h!=="undefined"&&h==="true"){s.crop=true}if(typeof a==="undefined"||!a){if(r>s.origHeight*i/s.origWidth){if(spai_settings.crop==="1"){s.crop=true}else{i=Math.round(s.origWidth*r/s.origHeight)}}}else{if(r<s.origHeight*i/s.origWidth){i=Math.round(s.origWidth*r/s.origHeight)}}s.newWidth=s.origWidth>1?Math.min(s.origWidth,i):i;
1var d=o?ShortPixelAI.composeApiUrl(t=="src"&&e.is("img"),l,s.newWidth,s.crop?r:false,false):l;s.newSrc=d;e.attr(t,d);e.removeAttr("data-spai-"+t+"-meta");return s};SPAI.prototype.updateSrcSet=function(e,t,i){var r=e.attr("srcset");var o=e.attr("sizes");var a=ShortPixelAI.parsePseudoSrcSet(r,o,t,i);if(a.srcSet.length){e.attr("srcset",a.srcSet)}if(a.sizes.length){e.attr("sizes",a.sizes)}};SPAI.prototype.parsePseudoSrcSet=function(e,t,i,r){var o="";var a="";if(e){var n=e.match(/[^\s,][^\s]+(\s+[0-9wpx]+\s*,?|\s*,|\s*$)/g);for(var s=0;s<n.length;s++){var l=n[s].replace(/,$/,"").trim();var h="";var d=l.split(/\s+/);if(this.isFullPseudoSrc(d[0])){var d=l.split(/\s+/);if(d.length>=2){var f=ShortPixelAI.parsePseudoSrc(d[0]);if(f.src){h=ShortPixelAI.composeApiUrl(false,f.src,false,false,false)+" "+d[1]}if(i==parseInt(d[1])){r=false}else if(r&&i<parseInt(d[1])){o+=ShortPixelAI.composeApiUrl(false,r.src,i,false,false)+" "+i+"w,";r=false}}}if(!h.length){h=l}o+=h+", "}o=o.replace(/,+\s+$/,"")}else if(r&&spai_settings.method=="srcset"&&i<r.origWidth*.9){o=ShortPixelAI.composeApiUrl(false,r.src,i,false,false)+" "+i+"w, "+r.src+" "+r.origWidth+"w";a=Math.round(100*i/r.origWidth)+"vw, 100vw"}return{srcSet:o,sizes:a}};SPAI.prototype.removeSrcSet=function(e){var t=e.attr("srcset");if(typeof t!=="undefined"&&t.length){e.attr("srcset","");e.attr("sizes","")}};SPAI.prototype.calcSizeAndUpdateInlineStyle=function(e){var t=ShortPixelAI.spaiCalculateBgClipResize(e[0]);for(var i in t){var r=!!t[i].viewport?t[i].viewport.width:t[i].width;var o=!!t[i].viewport?t[i].viewport.height:t[i].height;ShortPixelAI.updateInlineStyle(e,r,o,!ShortPixelAI.is(e,ShortPixelAI.EXCLUDED),!!t[i].viewport?t:false)}};SPAI.prototype.updateInlineStyle=function(e,t,i,r,o){var a=window.getComputedStyle(e[0])["backgroundImage"];var n=a;var s=o?Object.keys(o):ShortPixelAI.getBackgroundPseudoImages("background-image:"+a);var l=[];if(!s)return;for(var h=0;h<s.length;h++){var d=s[h];var f=o&&!!o[d]&&!!o[d].originalUrl?{src:o[d].originalUrl,origWidth:o[d].originalWidth,origHeight:o[d].originalHeight}:ShortPixelAI.parsePseudoSrc(d);var p=f?f.src:false;if(p){while(p.charAt(0)=='"'){p=p.substring(1)}while(p.charAt(p.length-1)=='"'){p=p.substring(0,p.length-1)}}else{return false}var u=spai_settings.backgrounds_max_width?spai_settings.backgrounds_max_width:99999;var c=f.origWidth>0?f.origWidth:99999;var g=f.origHeight>0?f.origHeight:99999;var A=Math.min(c,window.screen.width,t?t:99999,u);var x=g<99999?Math.min(g,window.screen.height,i?i:99999):99999;var I=false;if(spai_settings.crop=="1"){for(var S in o){if(!!o[S].originalWidth&&o[S].viewport&&(o[S].originalWidth!=o[S].viewport.width||o[S].originalHeight!=o[S].viewport.height)){I={alterCss:o[S].alterCss,clip:o[S].clip,viewport:o[S].viewport};if(o[S].alterCss)e.css(o[S].alterCss)}}}var P=r?ShortPixelAI.composeApiUrl(false,p,A<99999?A:false,!!spai_settings.crop&&x<99999?x:false,I):p;a=a.replace(s[h],P);l.push(f)}e[0].style.setProperty("background-image",a);if(n===getComputedStyle(e[0])["backgroundImage"]){e[0].style.setProperty("background-image",a,"important")}return l.length>0?l:false};SPAI.prototype.getBackgroundPseudoImages=function(e){if(typeof e==="undefined"||e.indexOf("background")<0){return false}var t=/(background-image|background)\s*:([^;]*[,\s]|\s*)url\(['"]?([^'"\)]*?)(['"]?)\)/gm,i,r=[];while((i=t.exec(e))!==null){if(!i||i.length<3){return false}if(i[3].indexOf("data:image")>=0){r.push(i[3])}}return r.length>0?r:false};SPAI.prototype.urldecode=function(e){return decodeURIComponent((e+"").replace(/\+/g,"%20"))};SPAI.prototype.getSizesRecursive=function(e,t){if(!e.is(":visible")&&t){throw{type:"defer",cause:"invisible"}}var i=window.getComputedStyle(e[0]);var r=i["width"];var o=i["height"];var a=parseFloat(r);var n=parseFloat(o);if(r=="0px"&&e[0].nodeName!=="A"){throw{type:"defer",cause:"width 0"}}if(r.slice(-1)=="%"){if(typeof e.parent()==="undefined")return{width:-1};var s=ShortPixelAI.getSizesRecursive(e.parent(),t);if(s==-1)return{width:-1,padding:0};a=s.width*a/100;if(o.slice(-1)=="%"){n=s.height*n/100}}else if(a<=1){if(e[0].tagName==="IMG"&&typeof e.attr("width")!=="undefined"&&typeof e.attr("height")!=="undefined"){a=parseInt(e.attr("width"));n=parseInt(e.attr("height"))}else{if(typeof e.parent()==="undefined")return{width:-1,padding:0};var s=ShortPixelAI.getSizesRecursive(e.parent(),t);if(s.width==-1)return{width:-1,padding:0};a=s.width;n=s.height}a-=ShortPixelAI.percent2px(i["margin-left"],a)+ShortPixelAI.percent2px(i["margin-right"],a);n-=ShortPixelAI.percent2px(i["margin-top"],n)+ShortPixelAI.percent2px(i["margin-bottom"],n)}var l=ShortPixelAI.percent2px(i["padding-left"],a)+ShortPixelAI.percent2px(i["padding-right"],a)+ShortPixelAI.percent2px(i["border-left-width"],a)+ShortPixelAI.percent2px(i["border-right-width"],a);var h=ShortPixelAI.percent2px(i["padding-top"],n)+ShortPixelAI.percent2px(i["padding-bottom"],n)+ShortPixelAI.percent2px(i["border-top-width"],n)+ShortPixelAI.percent2px(i["border-bottom-width"],n);return{status:"success",width:a-l,height:n-h,padding:l,padding_height:h}};SPAI.prototype.spaiCalculateBgClipResize=function(e){var t=getComputedStyle(e);
1if(t.backgroundRepeat.indexOf("round")>=0){throw"Unsupported background-repeat: round"}var i=e.offsetWidth,r=e.offsetHeight,o=t.backgroundImage;if(o==="none"){o=e.style.backgroundImage}if(!o.match(/url\s*\(/))return[];for(var a=0,n={};a<o.length;a++){var s=o.match(/\w*-gradient\s*\((?:[^\(\)]+|\([^\(\)]+\))*\)|none|initial|inherit|url\s*\(["'](.+?)["']\)/);if(s==null)break;if(s[0].substr(0,3)!=="url"){o=o.substr(s.index+s[0].length);continue}var l=ShortPixelAI.parsePseudoSrc(s[1]);if(l.origWidth===false||l.origHeight===false||l.origWidth==1||l.origHeight==1){n[s[1]]={width:i&&(P(t.backgroundSize,a)=="cover"||P(t.backgroundSize,a)=="contain")?i:false,height:false,originalUrl:l.src}}else{var h={width:0,height:0};h.originalUrl=l.src;h.originalWidth=h.width=l.origWidth;h.originalHeight=h.height=l.origHeight;var d=f(a,e,h,t);if(h.width==h.originalWidth&&h.height==h.originalHeight){h.width=h.height=false}if(d.clip.offsetX==0&&d.clip.offsetY==0&&d.clip.width==h.originalWidth&&d.clip.height==h.originalHeight&&Math.abs(h.originalHeight*d.clip.width/d.clip.height-h.originalWidth)<=2){h.width=d.viewport.width;h.height=false}else{h.clip=d.clip;h.viewport=d.viewport;h.alterCss=d.alterCss}n[s[1]]=h}o=o.substr(s.index+s[0].length)}return n;function f(e,t,i,r){var o={clip:{width:i.width,height:i.height,offsetX:0,offsetY:0},viewport:{width:Math.min(t.offsetWidth,i.width),height:Math.min(t.offsetHeight,i.height)},alterCss:{}};var a=p(e,t,i,r);w(e,t,i,a,r);var n=_(e,t,i,a,r);a=m(e,a,n);var s=y(e,a,n);o.clip.width=Math.round(s.width/a.scalex);o.clip.height=Math.round(s.height/a.scaley);o.clip.offsetX=s.width<a.width&&b(r,e,"x")||a.offsetx<s.x&&!b(r,e,"x")?Math.round(Math.max(0,(s.x-a.offsetx)/a.scalex)):0;o.clip.offsetY=s.height<a.height&&b(r,e,"y")||a.offsety<s.y&&!b(r,e,"y")?Math.round(Math.max(0,(s.y-a.offsety)/a.scaley)):0;o.viewport.width=Math.round(s.width/Math.max(1,a.scalex));o.viewport.height=Math.round(s.height/Math.max(1,a.scaley));o.alterCss=s.alterCss;return o}function p(e,t,i,r){var o=P(r.backgroundSize,e),a=c(e,t,r,"x"),n=c(e,t,r,"y"),s=i.width/i.height,l=r.backgroundAttachment==="fixed"?s:a/n,h={src:i.src,width:i.width,height:i.height,scalex:1,scaley:1};switch(o){case"contain":case"cover":if(o==="contain"&&l<=s||o==="cover"&&l>=s){h.width=a;h.height=a/s}else{h.height=n;h.width=n*s}h.scalex=h.scaley=h.width/i.width;return h;case"auto, auto":case"auto":return h;default:var d=o.split(" ");var f=false;if(d[0]!=="auto"){h.width=u(e,d[0],t,false,"x");h.scalex=h.width/i.width;f=true}if(typeof d[1]!=="undefined"){h.height=u(e,d[1],t,false,"y");if(!f){h.width=i.width*h.height/i.height;h.scalex=h.width/i.width}}else{h.height=i.height*h.width/i.width}h.scaley=h.height/i.height;return h}}function u(e,i,r,o,a){var n=C(i),s=n.val,l=n.type,h=o===false?0:o[A(a)];if(l=="%"){s=(c(e,r,t,a)-h)*s/100;if(h>0){s%=h}return s}else if(l=="em"){return s*u(e,t.fontSize,r.parentElement,false,a)}else if(l=="rem"){return s*parseFloat(getComputedStyle(document.documentElement).fontSize)}else if(l=="vw"){return s*window.innerWidth/100}else if(l=="vh"){return s*window.innerHeight/100}else if(l=="vmin"){return s*Math.min(window.innerWidth,window.innerHeight)/100}else if(l=="vmax"){return s*Math.max(window.innerWidth,window.innerHeight)/100}else if(l=="px"){return s}else if(l=="in"){return s*96}else if(l=="pt"){return s*4/3}else if(l=="pc"){return s*16}else if(l=="mm"){return s*3.7795275591}else if(l=="cm"){return s*37.795275591}else{throw"Unsupported unit"}}function c(e,t,i,r){var o=P(i.backgroundOrigin,e);return t[(o=="border-box"?"offset":"client")+x(r)]-(o=="content-box"?u(e,i["padding"+I(r)],t,false,r)+u(e,i["padding"+S(r)],t,false,r):0)}function g(e,t,i,r){var o=P(i.backgroundOrigin,e);return(o=="padding-box"||o=="content-box"?u(e,i["border"+I(r)+"-width"],t,false,r):0)+(o=="content-box"?u(e,i["padding"+I(r)],t,false,r):0)}function A(e){return e=="x"?"width":"height"}function x(e){return e=="x"?"Width":"Height"}function I(e){return e=="x"?"-left":"-top"}function S(e){return e=="x"?"-right":"-bottom"}function P(e,t){if(typeof e==="undefined")return e;e=e.split(",");return e[Math.min(t,e.length-1)].trim()}function v(e,t,i){e=e.split(",");var t=Math.min(t,e.length);e[t]=i;return e.join(", ")}function b(e,t,i){return P(e.backgroundRepeat,t)=="repeat"||P(e["background-repeat-"+i],t)=="repeat"}function m(e,i,r){var o=i.offsetx,a=i.offsety;i.isRepeatX=b(t,e,"x");
1i.isRepeatY=b(t,e,"y");if(i.isRepeatX)o%=i.width;if(i.isRepeatY)a%=i.height;if(o>=r.width){if(i.isRepeatX)o-=i.width;else{i.width=i.height=false}}if(a>=r.height){if(i.isRepeatY)a-=i.height;else{i.width=i.height=false}}i.offsetx=o;i.offsety=a;return i}function y(e,i,r){var o=Math.max(i.offsetx,r.x),a=Math.max(i.offsety,r.y),n=Math.min(i.width+i.offsetx,r.width+r.x)-o,s=Math.min(i.height+i.offsety,r.height+r.y)-a,l={};if(i.isRepeatX&&(i.offsetx>0||i.offsetx+i.width<r.width)){n=i.width}else if(P(t.backgroundPositionX,e).match(/^[0-9]+%$/)===null&&i.offsetx<r.x){l["background-position-x"]=v(t.backgroundPositionX,e,r.x>0?r.x+"px":"0%")}if(i.isRepeatY&&(i.offsety>0||i.offsety+i.height<r.height)){s=i.height}else if(P(t.backgroundPositionY,e).match(/^[0-9]+%$/)===null&&i.offsety<r.y){l["background-position-y"]=v(t.backgroundPositionY,e,r.y>0?r.y+"px":"0%")}var h=P(t.backgroundSize,e);if(h!=="auto"&&h!=="100%"&&h!=="cover"&&h!=="contain"){l["background-size"]=v(t.backgroundSize,e,"auto")}return{x:o,y:a,width:n,height:s,alterCss:l}}function w(e,t,i,r,o){var a=P(o.backgroundSize,e);r.offsetx=r.offsety=0;if(a==="contain"){return r}r.offsetx=E(e,t,r,o,"x");r.offsety=E(e,t,r,o,"y");return r}function _(e,t,i,r,o){if(P(o.backgroundAttachment,e)=="fixed"){return{x:0,y:0,width:screen.width,height:99999}}else{var a=P(o.backgroundClip,e);var n=u(e,o.paddingLeft,t,false,"w"),s=u(e,o.paddingTop,t,false,"h");return{x:a=="border-box"?0:u(e,o.borderLeftWidth,t,false,"w")+(a=="content-box"?n:0),y:a=="border-box"?0:u(e,o.borderTopWidth,t,false,"w")+(a=="content-box"?s:0),width:a=="border-box"?t.offsetWidth:t.clientWidth-(a=="content-box"?n+u(e,o.paddingRight,t,false,"w"):0),height:a=="border-box"?t.offsetHeight:t.clientHeight-(a=="content-box"?s+u(e,o.paddingBottom,t,false,"h"):0)}}}function E(e,t,i,r,o){var a=P(r["background-position-"+o],e);return g(e,t,r,o)+(parseInt(a)!==0?u(e,a,t,i,o):0)}function C(e){var t=parseFloat(e),i=e.substr((""+t).length);return{val:t,type:i}}};SPAI.prototype.percent2px=function(e,t){return e.slice(-1)=="%"?t*parseFloat(e)/100:parseFloat(e)};SPAI.prototype.fancyboxUpdateWidth=function(e){var t=jQuery.extend({},jQuery.fn.fancybox.defaults,typeof e.data("fancybox")=="undefined"?{}:e.data("fancybox"));var i=[jQuery(window).width()-t.margin*2,jQuery(window).height()-t.margin*2,jQuery(document).scrollLeft()+t.margin,jQuery(document).scrollTop()+t.margin];var r=t.padding*2;var o=i[0]-r;var a=i[1]-r;var n=t.width/t.height;var s=o/a;var l=0;var h=0;if(n>s){l=o}else{h=a;l=Math.round(a*n)}l=l<700?Math.floor((l+49)/50)*50:Math.floor((l+99)/100)*100;var d=e.attr("href");if(d.indexOf("w_DEFER")>0){var f=d.replace("w_DEFER","w_"+l);e.attr("href",f)}else{var p=d.match(/\/w_([0-9]+),._/g);if(p!==null&&p[2]<l){var f=d.replace(/\/w_[0-9]+,/,"/w_"+l+",");e.attr("href",f)}else{return}}ShortPixelAI.fancyboxId=e.parent().parent().attr("id")};SPAI.prototype.xpath=function(e){if(typeof e=="string")return document.evaluate(e,document,null,0,null);if(!e||e.nodeType!=1)return"";if(e.id)return"//*[@id='"+e.id+"']";var t=[];try{t=e.parentNode===null||typeof e.parentNode.children==="undefined"?[]:[].filter.call(e.parentNode.children,(function(t){return t.tagName==e.tagName}))}catch(e){}return(e.parentNode===null?"":ShortPixelAI.xpath(e.parentNode)+"/")+e.tagName.toLowerCase()+(t.length>1?"["+([].indexOf.call(t,e)+1)+"]":"")};SPAI.prototype.registerCallback=function(e,t){ShortPixelAI.callbacks[e]=t};SPAI.prototype.elementUpdated=function(e,t){e.attr("data-spai-upd",Math.round(t));ShortPixelAI.updatedUrlsCount++;if(typeof ShortPixelAI.callbacks["element-updated"]!=="undefined"){ShortPixelAI.callbacks["element-updated"](e)}};SPAI.prototype.triggerEvent=function(e,t){const i=document.createEvent("Event");i.initEvent(e,true,true);spai_settings.debug&&console.log("Event "+e+" triggered on "+t.tagName);t.dispatchEvent(i)};if(!String.prototype.startsWith){String.prototype.startsWith=function(e,t){t=t||0;return this.substr(t,e.length)===e}}var shortPixelAIonDOMLoadedTimeout=false;var shortPixelAIonDOMLoadedCounter=0;window.ShortPixelAI=new SPAI;function shortPixelAIonDOMLoaded(){if(ShortPixelAI.initialized)return;if(typeof spai_settings==="undefined"){if(shortPixelAIonDOMLoadedCounter>50){throw"The ShortPixel settings are missing. Do you use a plugin that defers the inline JS?"}clearTimeout(shortPixelAIonDOMLoadedTimeout);shortPixelAIonDOMLoadedTimeout=setTimeout(shortPixelAIonDOMLoaded,10+shortPixelAIonDOMLoadedCounter+(shortPixelAIonDOMLoadedCounter>40?100:0));shortPixelAIonDOMLoadedCounter++;return}spai_settings.excluded_paths=spai_settings.excluded_paths.map(atob);if(spai_settings.native_lazy!="1"){var e="(googlebot/|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)";var t=new RegExp(e,"i");var i=navigator.userAgent;if(t.test(i)){spai_settings.native_lazy="1"}}else if(!("loading"in document.createElement("img"))){spai_settings.native_lazy=""}if(!!window.spai_settings.lqip&&typeof LQIP==="function"){ShortPixelAI.modules.lqip=new LQIP}if(!!window.spai_settings.lazy_threshold){var r=parseInt(spai_settings.lazy_threshold,10);ShortPixelAI.intersectionMargin=!isNaN(r)&&r>=0?r:ShortPixelAI.intersectionMargin}ShortPixelAI.initialized=true;if(spai_settings.webp_detect&&(spai_settings.webp=="1"||spai_settings.avif=="1")&&self.createImageBitmap){var o=function(){var e={
1webp:"data:image/webp;base64,UklGRjIAAABXRUJQVlA4ICYAAACyAgCdASoCAAEALmk0mk0iIiIiIgBoSygABc6zbAAA/v56QAAAAA==",losslessWebp:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=",avif:"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="};return function(t){function i(){this._done=[];this._fail=[]}i.prototype={execute:function(e,t){var i=e.length;t=Array.prototype.slice.call(t);while(i--)e[i].apply(null,t)},promise:function(){return this},resolve:function(){this.execute(this._done,arguments)},reject:function(){this.execute(this._fail,arguments)},then:function(e,t){this._done.push(e);this._fail.push(t)},done:function(e){this._done.push(e);return this},fail:function(e){this._fail.push(e);return this}};var r=new i;var o=new Image;o.onload=function(){if(this.width===2&&this.height>0){r.resolve()}else{r.reject()}};o.onerror=function(){r.reject()};o.src=e[t||"webp"];return r.promise()}}();o("webp").then((function(){ShortPixelAI.conversionType=spai_settings.webp=="1"?"to_webp":"";if(spai_settings.avif=="1"){o("avif").then((function(){ShortPixelAI.conversionType="to_avif";ShortPixelAI.init()}),(function(){ShortPixelAI.init()}))}else{ShortPixelAI.init()}}),(function(){ShortPixelAI.init()}))}else{if((spai_settings.webp=="1"||spai_settings.avif=="1")&&self.createImageBitmap){if(spai_settings.webp=="1"&&spai_settings.avif=="1"){ShortPixelAI.conversionType="to_auto"}else{ShortPixelAI.conversionType=spai_settings.webp=="1"?"to_webp":"to_avif"}}ShortPixelAI.init()}}if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",(function(){shortPixelAIonDOMLoaded()}))}else{shortPixelAIonDOMLoaded()}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.