var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!(function(t,e){"function"==typeof define&&define.amd?define(e):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e():t.Blazy=e()})(void 0,(function(){"use strict";function t(t){var o=t._util;o.elements=r(t.options.selector),o.count=o.elements.length,o.destroyed&&(o.destroyed=!1,t.options.container&&f(t.options.container,(function(t){c(t,"scroll",o.validateT)})),c(window,"resize",o.saveViewportOffsetT),c(window,"resize",o.validateT),c(window,"scroll",o.validateT)),e(t)}function e(t){for(var e=t._util,n=0;n=p.left&&e.bottom>=p.top&&e.left<=p.right&&e.top<=p.bottom}function n(t,e,o){if(!s(t,o.successClass)&&(e||o.loadInvisible||t.offsetWidth>0&&t.offsetHeight>0)){var n=t.getAttribute(d)||t.getAttribute(o.src);if(n){var r=n.split(o.separator),a=r[v&&r.length>1?1:0],c="img"===t.nodeName.toLowerCase();if(f(o.breakpoints,(function(e){t.removeAttribute(e.src)})),t.removeAttribute(o.src),c||void 0===t.src){var l=new Image;l.onerror=function(){o.error&&o.error(t,"invalid"),i(t,o.errorClass)},l.onload=function(){c?t.src=a:t.style.backgroundImage='url("'+a+'")',i(t,o.successClass),o.success&&o.success(t)},l.src=a}else t.src=a,i(t,o.successClass)}else o.error&&o.error(t,"missing"),s(t,o.errorClass)||i(t,o.errorClass)}}function s(t,e){return(" "+t.className+" ").indexOf(" "+e+" ")!==-1}function i(t,e){t.className=t.className+" "+e}function r(t){for(var e=[],o=document.querySelectorAll(t),n=o.length;n--;e.unshift(o[n]));return e}function a(t){p.bottom=(window.innerHeight||document.documentElement.clientHeight)+t,p.right=(window.innerWidth||document.documentElement.clientWidth)+t}function c(t,e,o){t.attachEvent?t.attachEvent&&t.attachEvent("on"+e,o):t.addEventListener(e,o,!1)}function l(t,e,o){t.detachEvent?t.detachEvent&&t.detachEvent("on"+e,o):t.removeEventListener(e,o,!1)}function f(t,e){if(t&&e)for(var o=t.length,n=0;n1,p={},p.top=0-i.options.offset,p.left=0-i.options.offset,i.revalidate=function(){t(this)},i.load=function(t,e){var o=this.options;void 0===t.length?n(t,e,o):f(t,(function(t){n(t,e,o)}))},i.destroy=function(){var t=this,e=t._util;t.options.container&&f(t.options.container,(function(t){l(t,"scroll",e.validateT)})),l(window,"scroll",e.validateT),l(window,"resize",e.validateT),l(window,"resize",e.saveViewportOffsetT),e.count=0,e.elements.length=0,e.destroyed=!0},r.validateT=u((function(){e(i)}),i.options.validateDelay,i),r.saveViewportOffsetT=u((function(){a(i.options.offset)}),i.options.saveViewportOffsetDelay,i),a(i.options.offset),f(i.options.breakpoints,(function(t){if(t.width>=window.screen.width)return d=t.src,!1})),t(i)}})); //# sourceMappingURL=bLazy-ff72535614.min.js.map