var _extends=object.assign||function(t){for(var e=1;e-1&&(n(t,e),i(t,o.class_loading)),e(t,e),a(t),c(o.callback_set,t))}var e={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},n=function(t){return _extends({},e,t)},o=function(t,e){return t.getattribute("data-"+e)},r=function(t,e,n){var o="data-"+e;null!==n?t.setattribute(o,n):t.removeattribute(o)},a=function(t){return r(t,"was-processed","true")},i=function(t){return"true"===o(t,"was-processed")},s=function(t,e){return r(t,"ll-timeout",e)},c=function(t){return o(t,"ll-timeout")},l=function(t){return t.filter(function(t){return!i(t)})},u=function(t,e){return t.filter(function(t){return t!==e})},d=function(t,e){var n,o=new t(e);try{n=new customevent("lazyload::initialized",{detail:{instance:o}})}catch(t){(n=document.createevent("customevent")).initcustomevent("lazyload::initialized",!1,!1,{instance:o})}window.dispatchevent(n)},f=function(t,e){return e?t.replace(/\.(jpe?g|png)/gi,".webp"):t},_="undefined"!=typeof window,v=_&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.useragent),g=_&&"intersectionobserver"in window,h=_&&"classlist"in document.createelement("p"),b=_&&function(){var t=document.createelement("canvas");return!(!t.getcontext||!t.getcontext("2d"))&&0===t.todataurl("image/webp").indexof("data:image/webp")}(),m=function(t,e,n,r){for(var a,i=0;a=t.children[i];i+=1)if("source"===a.tagname){var s=o(a,n);p(a,e,s,r)}},p=function(t,e,n,o){n&&t.setattribute(e,f(n,o))},y=function(t,e){var n=b&&e.to_webp,r=o(t,e.data_src),a=o(t,e.data_bg);if(r){var i=f(r,n);t.style.backgroundimage='url("'+i+'")'}if(a){var s=f(a,n);t.style.backgroundimage=s}},w={img:function(t,e){var n=b&&e.to_webp,r=e.data_srcset,a=t.parentnode;a&&"picture"===a.tagname&&m(a,"srcset",r,n);var i=o(t,e.data_sizes);p(t,"sizes",i);var s=o(t,r);p(t,"srcset",s,n);var c=o(t,e.data_src);p(t,"src",c,n)},iframe:function(t,e){var n=o(t,e.data_src);p(t,"src",n)},video:function(t,e){var n=e.data_src,r=o(t,n);m(t,"src",n),p(t,"src",r),t.load()}},e=function(t,e){var n=e._settings,o=t.tagname,r=w[o];if(r)return r(t,n),e._updateloadingcount(1),void(e._elements=u(e._elements,t));y(t,n)},i=function(t,e){h?t.classlist.add(e):t.classname+=(t.classname?" ":"")+e},l=function(t,e){h?t.classlist.remove(e):t.classname=t.classname.replace(new regexp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},c=function(t,e){t&&t(e)},o=function(t,e,n){t.addeventlistener(e,n)},k=function(t,e,n){t.removeeventlistener(e,n)},x=function(t,e,n){o(t,"load",e),o(t,"loadeddata",e),o(t,"error",n)},a=function(t,e,n){k(t,"load",e),k(t,"loadeddata",e),k(t,"error",n)},z=function(t,e,n){var o=n._settings,r=e?o.class_loaded:o.class_error,a=e?o.callback_load:o.callback_error,i=t.target;l(i,o.class_loading),i(i,r),c(a,i),n._updateloadingcount(-1)},n=function(t,e){var n=function n(r){z(r,!0,e),a(t,n,o)},o=function o(r){z(r,!1,e),a(t,n,o)};x(t,n,o)},r=["img","iframe","video"],s=function(e,n,o){t(e,o),n.unobserve(e)},m=function(t){var e=c(t);e&&(cleartimeout(e),s(t,null))},j=function(t,e,n){var o=n._settings.load_delay,r=c(t);r||(r=settimeout(function(){s(t,e,n),m(t)},o),s(t,r))},d=function(t){return t.isintersecting||t.intersectionratio>0},t=function(t){return{root:t.container===document?null:t.container,rootmargin:t.thresholds||t.threshold+"px"}},u=function(t,e){this._settings=n(t),this._setobserver(),this._loadingcount=0,this.update(e)};return u.prototype={_manageintersection:function(t){var e=this._observer,n=this._settings.load_delay,o=t.target;n?d(t)?j(o,e,this):m(o):d(t)&&s(o,e,this)},_onintersection:function(t){t.foreach(this._manageintersection.bind(this))},_setobserver:function(){g&&(this._observer=new intersectionobserver(this._onintersection.bind(this),t(this._settings)))},_updateloadingcount:function(t){this._loadingcount+=t,0===this._elements.length&&0===this._loadingcount&&c(this._settings.callback_finish)},update:function(t){var e=this,n=this._settings,o=t||n.container.queryselectorall(n.elements_selector);this._elements=l(array.prototype.slice.call(o)),!v&&this._observer?this._elements.foreach(function(t){e._observer.observe(t)}):this.loadall()},destroy:function(){var t=this;this._observer&&(this._elements.foreach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(e,n){t(e,this,n)},loadall:function(){var t=this;this._elements.foreach(function(e){t.load(e)})}},_&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)d(t,n);else d(t,e)}(u,window.lazyloadoptions),u});