Lazy Load by WP Rocket - Version 2.2

Version Description

  • Enhancement: Update lazyload script to the latest version
  • Enhancement: Use the dimensions of the original image for the placeholder size when possible, to reduce content reflow
  • Enhancement: Ignore images using the new loading attribute introduce by Chrome for browser-native lazyload
Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Lazy Load by WP Rocket
Version 2.2
Comparing to
See all releases

Code changes from version 2.1.5 to 2.2

assets/js/11.0.3/lazyload.min.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["lazyload.js"],"names":["global","factory","exports","_typeof","module","define","amd","LazyLoad","this","runningOnBrowser","window","isBot","test","defaultSettings","elements_selector","threshold","thresholds","document","createElement","data_srcset","data_sizes","data_bg","class_loading","class_loaded","class_error","load_delay","auto_unobserve","callback_enter","callback_exit","callback_reveal","callback_loaded","callback_error","callback_finish","getInstanceSettings","getData","element","attribute","value","getAttribute","setData","attrName","setAttribute","processedDataName","removeAttribute","getWasProcessedData","setTimeoutData","getTimeoutData","timeoutDataName","createInstance","elementToPurge","options","event","instance","classObj","createEvent","initCustomEvent","dispatchEvent","callbackIfSet","autoInitialize","callback","argument","updateLoadingCount","plusMinus","_elements","length","_loadingCount","_settings","getSourceTags","parentTag","childTag","sourceTags","i","children","setAttributeIfValue","tagName","settings","data_src","backgroundImage","IMG","parent","parentNode","forEach","sourceTag","setImageAttributes","IFRAME","VIDEO","load","setSources","elements","setSourcesFunctions","setSourcesFunction","setSourcesVideo","filter","srcDataValue","bgDataValue","setSourcesBgImage","addClass","className","addEventListener","eventName","handler","removeEventListener","genericLoadEventName","errorHandler","removeClass","loadHandler","addEventListeners","errorEventName","success","removeEventListeners","target","supportsClassList","remove","replace","RegExp","eventHandler","addOneShotEventListeners","revealAndUnobserve","observer","unobserve","cancelDelayLoad","timeoutId","clearTimeout","loadDelay","revealElement","force","managedTags","indexOf","setTimeout","setObserver","supportsIntersectionObserver","_observer","IntersectionObserver","entries","entry","isIntersecting","intersectionRatio","delayLoad","onEnter","setWasProcessedData","root","container","rootMargin","customSettings","getObserverSettings","trueString","prototype","update","_this","nodeSet","querySelectorAll","purgeProcessedElements","Array","observe","loadAll","_this2","destroy","_this3","optionsItem","lazyLoadOptions"],"mappings":"+cAAC,SAAUA,EAAQC,GACC,YAAnB,oBAAOC,QAAP,YAAAC,QAAOD,WAA0C,oBAAXE,OAAyBA,OAAOF,QAAUD,IAC9D,mBAAXI,QAAyBA,OAAOC,IAAMD,OAAOJ,GACnDD,EAAOO,SAAWN,IAHnB,CAAAO,KAAA,WAAkBP,aAIlB,IAACQ,EAAmB,oBAAAC,OAIfC,EAFNF,KAAsB,aAAGC,SAGvBD,oBADIE,WAKN,gCAAkCC,KACjCH,UAAAA,WAKKI,EACLC,GAAiB,yBADMJ,OAGvBK,EACAC,GAJuB,cAAAC,SAAAC,cAAA,KAMvBC,EAAa,CACbC,kBAAY,MACZC,UAAOV,GARgBF,EAAAQ,SAAA,KASvBK,UAAAA,IACAC,WAAAA,KACAC,SAAAA,MACAC,YAAU,SACVC,WAAAA,QACAC,QAAAA,KACAC,cAAAA,UACAC,aAAAA,SACAC,YAAAA,QACAC,WAAAA,EACAC,gBAAAA,EAnBuBL,eAAxB,KAeCC,cAAe,KAOhBC,gBAAII,KACHH,gBAAO,KACPC,eAFD,KAHCC,gBAAiB,MAYZE,EAAU,SAACC,EAASC,GAMzB,OAAIC,EAAKC,aALMA,QAKKF,IAGnBG,EAAA,SAAAJ,EAAAC,EAAAC,GAJD,IAAIG,EAJWF,QAIaF,EAKpBK,OAARN,EAGkCA,EAAAM,aAC1BN,EAASO,GAHjBP,EAPDQ,gBAAAH,IAYMI,EAAsB,SAAAT,GAAO,MAZnB,SAehBD,EAAMW,EAnBN,kBAmBAA,EAAA,SAAAV,EAAAE,GAAA,OACCE,EAAQJ,EAvBe,aAuBWE,IAELS,EAAYX,SAAAA,GAASY,OAAAA,EAAAA,EAzB3B,eAgCOC,EAAW,SAAKC,EAAhBC,GAAA,IAAvBC,EAGRC,EAAA,IAAAC,EAA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S6B,SAAA7C,GAA/B,OAAM+D,EAAAA,OAAAA,SAAAA,GAAyB,OAAA3G,EAAzB2G,KAuSItE,CAAauE,MAAAN,UACpBX,MAAAA,KAAeD,KAKjB3H,GAAAH,KAAA2H,UAKA3H,KAAAuD,UAAKE,QAAgB,SAAA9B,GACrB8F,EAAAA,UAAYwB,QAAZtH,KAjBD3B,KAAAkJ,WAqBAnJ,QAAQ,WAAR,IAAAoJ,EAAAnJ,KACC2I,KAAMhB,YAAqB3H,KAAAuD,UAAAkB,QAAA,SAAA9C,GAuBxBwH,EAAKxB,UAAUZ,UAAUpF,KArB3B3B,KAAA2H,UACC3C,MAGsChF,KAAvCuD,UAAA,KAsBAvD,KAAK0D,UAAY,MAhBhBoB,KAAA,SAAAnD,EAAA0F,GACAD,EAAAzF,EAAA3B,KAAAqH,IAGA6B,QAAA,WAAKvB,IAAAA,EAAAA,KADN3H,KAAAuD,UAhBmBkB,QAAA,SAAA9C,GAqBpByH,EAASzH,EAAA0H,OAINpJ,GAjUmC,SAArC4C,EAAAH,GACA,GAACA,EAGDC,GAAAA,EAAMI,OAEP7C,IAAAA,IAAO8C,EAAAA,EAAAA,EAAPsG,EAAA5G,EAAAqB,GAAAA,GAAA,EAZDvB,EAAAK,EAAAyG,QAUmD9G,EAAjDK,EAAAH,GAkVDQ,CAAenD,EAAUG,OAAOqJ,iBAG1BxJ","file":"lazyload.min.js","sourcesContent":["(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.LazyLoad = factory());\n}(this, (function () { 'use strict';\n\nconst runningOnBrowser = typeof window !== \"undefined\";\n\nconst isBot =\n\t(runningOnBrowser && !(\"onscroll\" in window)) ||\n\t(typeof navigator !== \"undefined\" &&\n\t\t/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent));\n\nconst supportsIntersectionObserver =\n\trunningOnBrowser && \"IntersectionObserver\" in window;\n\nconst supportsClassList =\n\trunningOnBrowser && \"classList\" in document.createElement(\"p\");\n\nconst defaultSettings = {\n\telements_selector: \"img\",\n\tcontainer: isBot || runningOnBrowser ? document : null,\n\tthreshold: 300,\n\tthresholds: null,\n\tdata_src: \"src\",\n\tdata_srcset: \"srcset\",\n\tdata_sizes: \"sizes\",\n\tdata_bg: \"bg\",\n\tclass_loading: \"loading\",\n\tclass_loaded: \"loaded\",\n\tclass_error: \"error\",\n\tload_delay: 0,\n\tauto_unobserve: true,\n\tcallback_enter: null,\n\tcallback_exit: null,\n\tcallback_reveal: null,\n\tcallback_loaded: null,\n\tcallback_error: null,\n\tcallback_finish: null\n};\n\nvar getInstanceSettings = customSettings => {\n\treturn Object.assign({}, defaultSettings, customSettings);\n};\n\nconst dataPrefix = \"data-\";\nconst processedDataName = \"was-processed\";\nconst timeoutDataName = \"ll-timeout\";\nconst trueString = \"true\";\n\nconst getData = (element, attribute) => {\n\treturn element.getAttribute(dataPrefix + attribute);\n};\n\nconst setData = (element, attribute, value) => {\n\tvar attrName = dataPrefix + attribute;\n\tif (value === null) {\n\t\telement.removeAttribute(attrName);\n\t\treturn;\n\t}\n\telement.setAttribute(attrName, value);\n};\n\nconst setWasProcessedData = element =>\n\tsetData(element, processedDataName, trueString);\n\nconst getWasProcessedData = element =>\n\tgetData(element, processedDataName) === trueString;\n\nconst setTimeoutData = (element, value) =>\n\tsetData(element, timeoutDataName, value);\n\nconst getTimeoutData = element => getData(element, timeoutDataName);\n\nconst purgeProcessedElements = elements => {\n\treturn elements.filter(element => !getWasProcessedData(element));\n};\n\nconst purgeOneElement = (elements, elementToPurge) => {\n\treturn elements.filter(element => element !== elementToPurge);\n};\n\n/* Creates instance and notifies it through the window element */\nconst createInstance = function(classObj, options) {\n\tvar event;\n\tlet eventString = \"LazyLoad::Initialized\";\n\tlet instance = new classObj(options);\n\ttry {\n\t\t// Works in modern browsers\n\t\tevent = new CustomEvent(eventString, { detail: { instance } });\n\t} catch (err) {\n\t\t// Works in Internet Explorer (all versions)\n\t\tevent = document.createEvent(\"CustomEvent\");\n\t\tevent.initCustomEvent(eventString, false, false, { instance });\n\t}\n\twindow.dispatchEvent(event);\n};\n\n/* Auto initialization of one or more instances of lazyload, depending on the \n options passed in (plain object or an array) */\nfunction autoInitialize(classObj, options) {\n\tif (!options) {\n\t\treturn;\n\t}\n\tif (!options.length) {\n\t\t// Plain object\n\t\tcreateInstance(classObj, options);\n\t} else {\n\t\t// Array of objects\n\t\tfor (let i = 0, optionsItem; (optionsItem = options[i]); i += 1) {\n\t\t\tcreateInstance(classObj, optionsItem);\n\t\t}\n\t}\n}\n\nconst callbackIfSet = (callback, argument) => {\n\tif (callback) {\n\t\tcallback(argument);\n\t}\n};\n\nconst updateLoadingCount = (instance, plusMinus) => {\n\tinstance._loadingCount += plusMinus;\n\tif (instance._elements.length === 0 && instance._loadingCount === 0) {\n\t\tcallbackIfSet(instance._settings.callback_finish);\n\t}\n};\n\nconst getSourceTags = parentTag => {\n\tlet sourceTags = [];\n\tfor (let i = 0, childTag; (childTag = parentTag.children[i]); i += 1) {\n\t\tif (childTag.tagName === \"SOURCE\") {\n\t\t\tsourceTags.push(childTag);\n\t\t}\n\t}\n\treturn sourceTags;\n};\n\nconst setAttributeIfValue = (element, attrName, value) => {\n\tif (!value) {\n\t\treturn;\n\t}\n\telement.setAttribute(attrName, value);\n};\n\nconst setImageAttributes = (element, settings) => {\n\tsetAttributeIfValue(\n\t\telement,\n\t\t\"sizes\",\n\t\tgetData(element, settings.data_sizes)\n\t);\n\tsetAttributeIfValue(\n\t\telement,\n\t\t\"srcset\",\n\t\tgetData(element, settings.data_srcset)\n\t);\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n};\n\nconst setSourcesImg = (element, settings) => {\n\tconst parent = element.parentNode;\n\n\tif (parent && parent.tagName === \"PICTURE\") {\n\t\tlet sourceTags = getSourceTags(parent);\n\t\tsourceTags.forEach(sourceTag => {\n\t\t\tsetImageAttributes(sourceTag, settings);\n\t\t});\n\t}\n\n\tsetImageAttributes(element, settings);\n};\n\nconst setSourcesIframe = (element, settings) => {\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n};\n\nconst setSourcesVideo = (element, settings) => {\n\tlet sourceTags = getSourceTags(element);\n\tsourceTags.forEach(sourceTag => {\n\t\tsetAttributeIfValue(\n\t\t\tsourceTag,\n\t\t\t\"src\",\n\t\t\tgetData(sourceTag, settings.data_src)\n\t\t);\n\t});\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n\telement.load();\n};\n\nconst setSourcesBgImage = (element, settings) => {\n\tconst srcDataValue = getData(element, settings.data_src);\n\tconst bgDataValue = getData(element, settings.data_bg);\n\n\tif (srcDataValue) {\n\t\telement.style.backgroundImage = `url(\"${srcDataValue}\")`;\n\t}\n\n\tif (bgDataValue) {\n\t\telement.style.backgroundImage = bgDataValue;\n\t}\n};\n\nconst setSourcesFunctions = {\n\tIMG: setSourcesImg,\n\tIFRAME: setSourcesIframe,\n\tVIDEO: setSourcesVideo\n};\n\nconst setSources = (element, instance) => {\n\tconst settings = instance._settings;\n\tconst tagName = element.tagName;\n\tconst setSourcesFunction = setSourcesFunctions[tagName];\n\tif (setSourcesFunction) {\n\t\tsetSourcesFunction(element, settings);\n\t\tupdateLoadingCount(instance, 1);\n\t\tinstance._elements = purgeOneElement(instance._elements, element);\n\t\treturn;\n\t}\n\tsetSourcesBgImage(element, settings);\n};\n\nconst addClass = (element, className) => {\n\tif (supportsClassList) {\n\t\telement.classList.add(className);\n\t\treturn;\n\t}\n\telement.className += (element.className ? \" \" : \"\") + className;\n};\n\nconst removeClass = (element, className) => {\n\tif (supportsClassList) {\n\t\telement.classList.remove(className);\n\t\treturn;\n\t}\n\telement.className = element.className.\n\t\treplace(new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), \" \").\n\t\treplace(/^\\s+/, \"\").\n\t\treplace(/\\s+$/, \"\");\n};\n\nconst genericLoadEventName = \"load\";\nconst mediaLoadEventName = \"loadeddata\";\nconst errorEventName = \"error\";\n\nconst addEventListener = (element, eventName, handler) => {\n\telement.addEventListener(eventName, handler);\n};\n\nconst removeEventListener = (element, eventName, handler) => {\n\telement.removeEventListener(eventName, handler);\n};\n\nconst addEventListeners = (element, loadHandler, errorHandler) => {\n\taddEventListener(element, genericLoadEventName, loadHandler);\n\taddEventListener(element, mediaLoadEventName, loadHandler);\n\taddEventListener(element, errorEventName, errorHandler);\n};\n\nconst removeEventListeners = (element, loadHandler, errorHandler) => {\n\tremoveEventListener(element, genericLoadEventName, loadHandler);\n\tremoveEventListener(element, mediaLoadEventName, loadHandler);\n\tremoveEventListener(element, errorEventName, errorHandler);\n};\n\nconst eventHandler = function(event, success, instance) {\n\tvar settings = instance._settings;\n\tconst className = success ? settings.class_loaded : settings.class_error;\n\tconst callback = success\n\t\t? settings.callback_loaded\n\t\t: settings.callback_error;\n\tconst element = event.target;\n\n\tremoveClass(element, settings.class_loading);\n\taddClass(element, className);\n\tcallbackIfSet(callback, element);\n\n\tupdateLoadingCount(instance, -1);\n};\n\nconst addOneShotEventListeners = (element, instance) => {\n\tconst loadHandler = event => {\n\t\teventHandler(event, true, instance);\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\n\t};\n\tconst errorHandler = event => {\n\t\teventHandler(event, false, instance);\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\n\t};\n\taddEventListeners(element, loadHandler, errorHandler);\n};\n\nconst managedTags = [\"IMG\", \"IFRAME\", \"VIDEO\"];\n\nconst onEnter = (element, instance) => {\n\tconst settings = instance._settings;\n\tcallbackIfSet(settings.callback_enter, element);\n\tif (!settings.load_delay) {\n\t\trevealAndUnobserve(element, instance);\n\t\treturn;\n\t}\n\tdelayLoad(element, instance);\n};\n\nconst revealAndUnobserve = (element, instance) => {\n\tvar observer = instance._observer;\n\trevealElement(element, instance);\n\tif (observer && instance._settings.auto_unobserve) {\n\t\tobserver.unobserve(element);\n\t}\n};\n\nconst onExit = (element, instance) => {\n\tconst settings = instance._settings;\n\tcallbackIfSet(settings.callback_exit, element);\n\tif (!settings.load_delay) {\n\t\treturn;\n\t}\n\tcancelDelayLoad(element);\n};\n\nconst cancelDelayLoad = element => {\n\tvar timeoutId = getTimeoutData(element);\n\tif (!timeoutId) {\n\t\treturn; // do nothing if timeout doesn't exist\n\t}\n\tclearTimeout(timeoutId);\n\tsetTimeoutData(element, null);\n};\n\nconst delayLoad = (element, instance) => {\n\tvar loadDelay = instance._settings.load_delay;\n\tvar timeoutId = getTimeoutData(element);\n\tif (timeoutId) {\n\t\treturn; // do nothing if timeout already set\n\t}\n\ttimeoutId = setTimeout(function() {\n\t\trevealAndUnobserve(element, instance);\n\t\tcancelDelayLoad(element);\n\t}, loadDelay);\n\tsetTimeoutData(element, timeoutId);\n};\n\nconst revealElement = (element, instance, force) => {\n\tvar settings = instance._settings;\n\tif (!force && getWasProcessedData(element)) {\n\t\treturn; // element has already been processed and force wasn't true\n\t}\n\tif (managedTags.indexOf(element.tagName) > -1) {\n\t\taddOneShotEventListeners(element, instance);\n\t\taddClass(element, settings.class_loading);\n\t}\n\tsetSources(element, instance);\n\tsetWasProcessedData(element);\n\tcallbackIfSet(settings.callback_reveal, element);\n};\n\nconst isIntersecting = entry =>\n\tentry.isIntersecting || entry.intersectionRatio > 0;\n\nconst getObserverSettings = settings => ({\n\troot: settings.container === document ? null : settings.container,\n\trootMargin: settings.thresholds || settings.threshold + \"px\"\n});\n\nconst setObserver = instance => {\n\tif (!supportsIntersectionObserver) {\n\t\treturn false;\n\t}\n\tinstance._observer = new IntersectionObserver(entries => {\n\t\tentries.forEach(entry =>\n\t\t\tisIntersecting(entry)\n\t\t\t\t? onEnter(entry.target, instance)\n\t\t\t\t: onExit(entry.target, instance)\n\t\t);\n\t}, getObserverSettings(instance._settings));\n\treturn true;\n};\n\nconst LazyLoad = function(customSettings, elements) {\n\tthis._settings = getInstanceSettings(customSettings);\n\tthis._loadingCount = 0;\n\tsetObserver(this);\n\tthis.update(elements);\n};\n\nLazyLoad.prototype = {\n\tupdate: function(elements) {\n\t\tconst settings = this._settings;\n\t\tconst nodeSet =\n\t\t\telements ||\n\t\t\tsettings.container.querySelectorAll(settings.elements_selector);\n\n\t\tthis._elements = purgeProcessedElements(\n\t\t\tArray.prototype.slice.call(nodeSet) // NOTE: nodeset to array for IE compatibility\n\t\t);\n\n\t\tif (isBot || !this._observer) {\n\t\t\tthis.loadAll();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._elements.forEach(element => {\n\t\t\tthis._observer.observe(element);\n\t\t});\n\t},\n\n\tdestroy: function() {\n\t\tif (this._observer) {\n\t\t\tthis._elements.forEach(element => {\n\t\t\t\tthis._observer.unobserve(element);\n\t\t\t});\n\t\t\tthis._observer = null;\n\t\t}\n\t\tthis._elements = null;\n\t\tthis._settings = null;\n\t},\n\n\tload: function(element, force) {\n\t\trevealElement(element, this, force);\n\t},\n\n\tloadAll: function() {\n\t\tvar elements = this._elements;\n\t\telements.forEach(element => {\n\t\t\trevealAndUnobserve(element, this);\n\t\t});\n\t}\n};\n\n/* Automatic instances creation if required (useful for async script loading) */\nif (runningOnBrowser) {\n\tautoInitialize(LazyLoad, window.lazyLoadOptions);\n}\n\nreturn LazyLoad;\n\n})));\n"]}
 
assets/js/{11.0.3 → 11.0.6}/lazyload.js RENAMED
@@ -371,6 +371,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
371
  setSources(element, instance);
372
  setWasProcessedData(element);
373
  callbackIfSet(settings.callback_reveal, element);
 
374
  };
375
 
376
  var isIntersecting = function isIntersecting(entry) {
@@ -409,8 +410,10 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
409
  var _this = this;
410
 
411
  var settings = this._settings;
412
- var nodeSet = elements || settings.container.querySelectorAll(settings.elements_selector);
413
- this._elements = purgeProcessedElements(Array.prototype.slice.call(nodeSet) // NOTE: nodeset to array for IE compatibility
 
 
414
  );
415
 
416
  if (isBot || !this._observer) {
371
  setSources(element, instance);
372
  setWasProcessedData(element);
373
  callbackIfSet(settings.callback_reveal, element);
374
+ callbackIfSet(settings.callback_set, element);
375
  };
376
 
377
  var isIntersecting = function isIntersecting(entry) {
410
  var _this = this;
411
 
412
  var settings = this._settings;
413
+
414
+ var _elements = elements || settings.container.querySelectorAll(settings.elements_selector);
415
+
416
+ this._elements = purgeProcessedElements(Array.prototype.slice.call(_elements) // NOTE: nodeset to array for IE compatibility
417
  );
418
 
419
  if (isBot || !this._observer) {
assets/js/{11.0.3 → 11.0.6}/lazyload.min.js RENAMED
@@ -1,2 +1,2 @@
1
- function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function _typeof(t){return(_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})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";var t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&"IntersectionObserver"in window,o=t&&"classList"in document.createElement("p"),r={elements_selector:"img",container:e||t?document:null,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,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null},a=function(t,e){return t.getAttribute("data-"+e)},s=function(t,e,n){var o="data-"+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},i=function(t){return"true"===a(t,"was-processed")},c=function(t,e){return s(t,"ll-timeout",e)},l=function(t){return a(t,"ll-timeout")},u=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)};var d=function(t,e){t&&t(e)},f=function(t,e){t._loadingCount+=e,0===t._elements.length&&0===t._loadingCount&&d(t._settings.callback_finish)},_=function(t){for(var e,n=[],o=0;e=t.children[o];o+=1)"SOURCE"===e.tagName&&n.push(e);return n},v=function(t,e,n){n&&t.setAttribute(e,n)},g=function(t,e){v(t,"sizes",a(t,e.data_sizes)),v(t,"srcset",a(t,e.data_srcset)),v(t,"src",a(t,e.data_src))},b={IMG:function(t,e){var n=t.parentNode;n&&"PICTURE"===n.tagName&&_(n).forEach(function(t){g(t,e)});g(t,e)},IFRAME:function(t,e){v(t,"src",a(t,e.data_src))},VIDEO:function(t,e){_(t).forEach(function(t){v(t,"src",a(t,e.data_src))}),v(t,"src",a(t,e.data_src)),t.load()}},m=function(t,e){var n,o,r=e._settings,s=t.tagName,i=b[s];if(i)return i(t,r),f(e,1),void(e._elements=(n=e._elements,o=t,n.filter(function(t){return t!==o})));!function(t,e){var n=a(t,e.data_src),o=a(t,e.data_bg);n&&(t.style.backgroundImage='url("'.concat(n,'")')),o&&(t.style.backgroundImage=o)}(t,r)},h=function(t,e){o?t.classList.add(e):t.className+=(t.className?" ":"")+e},p=function(t,e,n){t.addEventListener(e,n)},y=function(t,e,n){t.removeEventListener(e,n)},E=function(t,e,n){y(t,"load",e),y(t,"loadeddata",e),y(t,"error",n)},w=function(t,e,n){var r=n._settings,a=e?r.class_loaded:r.class_error,s=e?r.callback_loaded:r.callback_error,i=t.target;!function(t,e){o?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}(i,r.class_loading),h(i,a),d(s,i),f(n,-1)},k=function(t,e){var n=function n(r){w(r,!0,e),E(t,n,o)},o=function o(r){w(r,!1,e),E(t,n,o)};!function(t,e,n){p(t,"load",e),p(t,"loadeddata",e),p(t,"error",n)}(t,n,o)},I=["IMG","IFRAME","VIDEO"],L=function(t,e){var n=e._observer;z(t,e),n&&e._settings.auto_unobserve&&n.unobserve(t)},x=function(t){var e=l(t);e&&(clearTimeout(e),c(t,null))},A=function(t,e){var n=e._settings.load_delay,o=l(t);o||(o=setTimeout(function(){L(t,e),x(t)},n),c(t,o))},z=function(t,e,n){var o=e._settings;!n&&i(t)||(I.indexOf(t.tagName)>-1&&(k(t,e),h(t,o.class_loading)),m(t,e),function(t){s(t,"was-processed","true")}(t),d(o.callback_reveal,t))},O=function(t){return!!n&&(t._observer=new IntersectionObserver(function(e){e.forEach(function(e){return function(t){return t.isIntersecting||t.intersectionRatio>0}(e)?function(t,e){var n=e._settings;d(n.callback_enter,t),n.load_delay?A(t,e):L(t,e)}(e.target,t):function(t,e){var n=e._settings;d(n.callback_exit,t),n.load_delay&&x(t)}(e.target,t)})},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}),!0);var e},N=function(t,e){this._settings=function(t){return _extends({},r,t)}(t),this._loadingCount=0,O(this),this.update(e)};return N.prototype={update:function(t){var n=this,o=this._settings,r=t||o.container.querySelectorAll(o.elements_selector);this._elements=function(t){return t.filter(function(t){return!i(t)})}(Array.prototype.slice.call(r)),!e&&this._observer?this._elements.forEach(function(t){n._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(t,e){z(t,this,e)},loadAll:function(){var t=this;this._elements.forEach(function(e){L(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)u(t,n);else u(t,e)}(N,window.lazyLoadOptions),N});
2
  //# sourceMappingURL=lazyload.min.js.map
1
+ function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function _typeof(t){return(_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})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";var t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&"IntersectionObserver"in window,o=t&&"classList"in document.createElement("p"),r={elements_selector:"img",container:e||t?document:null,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,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null},a=function(t,e){return t.getAttribute("data-"+e)},s=function(t,e,n){var o="data-"+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},i=function(t){return"true"===a(t,"was-processed")},c=function(t,e){return s(t,"ll-timeout",e)},l=function(t){return a(t,"ll-timeout")},u=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)};var d=function(t,e){t&&t(e)},f=function(t,e){t._loadingCount+=e,0===t._elements.length&&0===t._loadingCount&&d(t._settings.callback_finish)},_=function(t){for(var e,n=[],o=0;e=t.children[o];o+=1)"SOURCE"===e.tagName&&n.push(e);return n},v=function(t,e,n){n&&t.setAttribute(e,n)},b=function(t,e){v(t,"sizes",a(t,e.data_sizes)),v(t,"srcset",a(t,e.data_srcset)),v(t,"src",a(t,e.data_src))},g={IMG:function(t,e){var n=t.parentNode;n&&"PICTURE"===n.tagName&&_(n).forEach(function(t){b(t,e)});b(t,e)},IFRAME:function(t,e){v(t,"src",a(t,e.data_src))},VIDEO:function(t,e){_(t).forEach(function(t){v(t,"src",a(t,e.data_src))}),v(t,"src",a(t,e.data_src)),t.load()}},m=function(t,e){var n,o,r=e._settings,s=t.tagName,i=g[s];if(i)return i(t,r),f(e,1),void(e._elements=(n=e._elements,o=t,n.filter(function(t){return t!==o})));!function(t,e){var n=a(t,e.data_src),o=a(t,e.data_bg);n&&(t.style.backgroundImage='url("'.concat(n,'")')),o&&(t.style.backgroundImage=o)}(t,r)},h=function(t,e){o?t.classList.add(e):t.className+=(t.className?" ":"")+e},p=function(t,e,n){t.addEventListener(e,n)},y=function(t,e,n){t.removeEventListener(e,n)},E=function(t,e,n){y(t,"load",e),y(t,"loadeddata",e),y(t,"error",n)},w=function(t,e,n){var r=n._settings,a=e?r.class_loaded:r.class_error,s=e?r.callback_loaded:r.callback_error,i=t.target;!function(t,e){o?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}(i,r.class_loading),h(i,a),d(s,i),f(n,-1)},k=function(t,e){var n=function n(r){w(r,!0,e),E(t,n,o)},o=function o(r){w(r,!1,e),E(t,n,o)};!function(t,e,n){p(t,"load",e),p(t,"loadeddata",e),p(t,"error",n)}(t,n,o)},I=["IMG","IFRAME","VIDEO"],L=function(t,e){var n=e._observer;z(t,e),n&&e._settings.auto_unobserve&&n.unobserve(t)},x=function(t){var e=l(t);e&&(clearTimeout(e),c(t,null))},A=function(t,e){var n=e._settings.load_delay,o=l(t);o||(o=setTimeout(function(){L(t,e),x(t)},n),c(t,o))},z=function(t,e,n){var o=e._settings;!n&&i(t)||(I.indexOf(t.tagName)>-1&&(k(t,e),h(t,o.class_loading)),m(t,e),function(t){s(t,"was-processed","true")}(t),d(o.callback_reveal,t),d(o.callback_set,t))},O=function(t){return!!n&&(t._observer=new IntersectionObserver(function(e){e.forEach(function(e){return function(t){return t.isIntersecting||t.intersectionRatio>0}(e)?function(t,e){var n=e._settings;d(n.callback_enter,t),n.load_delay?A(t,e):L(t,e)}(e.target,t):function(t,e){var n=e._settings;d(n.callback_exit,t),n.load_delay&&x(t)}(e.target,t)})},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}),!0);var e},N=function(t,e){this._settings=function(t){return _extends({},r,t)}(t),this._loadingCount=0,O(this),this.update(e)};return N.prototype={update:function(t){var n=this,o=this._settings,r=t||o.container.querySelectorAll(o.elements_selector);this._elements=function(t){return t.filter(function(t){return!i(t)})}(Array.prototype.slice.call(r)),!e&&this._observer?this._elements.forEach(function(t){n._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(t,e){z(t,this,e)},loadAll:function(){var t=this;this._elements.forEach(function(e){L(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)u(t,n);else u(t,e)}(N,window.lazyLoadOptions),N});
2
  //# sourceMappingURL=lazyload.min.js.map
assets/js/11.0.6/lazyload.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["lazyload.js"],"names":["global","factory","exports","_typeof","module","define","amd","LazyLoad","this","runningOnBrowser","window","isBot","test","defaultSettings","elements_selector","threshold","thresholds","document","createElement","data_srcset","data_sizes","data_bg","class_loading","class_loaded","class_error","load_delay","auto_unobserve","callback_enter","callback_exit","callback_reveal","callback_loaded","callback_error","callback_finish","getInstanceSettings","getData","element","attribute","value","getAttribute","setData","attrName","setAttribute","processedDataName","removeAttribute","getWasProcessedData","setTimeoutData","getTimeoutData","timeoutDataName","createInstance","elementToPurge","options","event","instance","classObj","createEvent","initCustomEvent","dispatchEvent","callbackIfSet","autoInitialize","callback","argument","updateLoadingCount","plusMinus","_elements","length","_loadingCount","_settings","getSourceTags","parentTag","childTag","sourceTags","i","children","setAttributeIfValue","tagName","settings","data_src","backgroundImage","IMG","parent","parentNode","forEach","sourceTag","setImageAttributes","IFRAME","VIDEO","load","setSources","elements","setSourcesFunctions","setSourcesFunction","setSourcesVideo","filter","srcDataValue","bgDataValue","setSourcesBgImage","addClass","className","addEventListener","eventName","handler","removeEventListener","genericLoadEventName","errorHandler","removeClass","loadHandler","addEventListeners","errorEventName","success","removeEventListeners","target","supportsClassList","remove","replace","RegExp","eventHandler","addOneShotEventListeners","revealAndUnobserve","observer","unobserve","cancelDelayLoad","timeoutId","clearTimeout","loadDelay","revealElement","force","managedTags","indexOf","setTimeout","callback_set","setObserver","_observer","IntersectionObserver","entries","entry","setWasProcessedData","delayLoad","onEnter","root","container","rootMargin","isIntersecting","customSettings","getObserverSettings","trueString","prototype","update","_this","supportsIntersectionObserver","querySelectorAll","purgeProcessedElements","Array","observe","loadAll","_this2","_this3","optionsItem"],"mappings":"+cAAC,SAAUA,EAAQC,GACC,YAAnB,oBAAOC,QAAP,YAAAC,QAAOD,WAA0C,oBAAXE,OAAyBA,OAAOF,QAAUD,IAC9D,mBAAXI,QAAyBA,OAAOC,IAAMD,OAAOJ,GACnDD,EAAOO,SAAWN,IAHnB,CAAAO,KAAA,WAAkBP,aAIlB,IAACQ,EAAmB,oBAAAC,OAIfC,EAFNF,KAAsB,aAAGC,SAGvBD,oBADIE,WAKN,gCAAkCC,KACjCH,UAAAA,WAKKI,EACLC,GAAiB,yBADMJ,OAGvBK,EACAC,GAJuB,cAAAC,SAAAC,cAAA,KAMvBC,EAAa,CACbC,kBAAY,MACZC,UAAOV,GARgBF,EAAAQ,SAAA,KASvBK,UAAAA,IACAC,WAAAA,KACAC,SAAAA,MACAC,YAAU,SACVC,WAAAA,QACAC,QAAAA,KACAC,cAAAA,UACAC,aAAAA,SACAC,YAAAA,QACAC,WAAAA,EACAC,gBAAAA,EAnBuBL,eAAxB,K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8C,EAAAA,EAAAA,EAAPoG,EAAA1G,EAAAqB,GAAAA,GAAA,EAZDvB,EAAAK,EAAAuG,QAUmD5G,EAAjDK,EAAAH,GA6TEQ,CAAInD,EAAJG,OAAe6G,iBAEhBhH","file":"lazyload.min.js","sourcesContent":["(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.LazyLoad = factory());\n}(this, (function () { 'use strict';\n\nconst runningOnBrowser = typeof window !== \"undefined\";\n\nconst isBot =\n\t(runningOnBrowser && !(\"onscroll\" in window)) ||\n\t(typeof navigator !== \"undefined\" &&\n\t\t/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent));\n\nconst supportsIntersectionObserver =\n\trunningOnBrowser && \"IntersectionObserver\" in window;\n\nconst supportsClassList =\n\trunningOnBrowser && \"classList\" in document.createElement(\"p\");\n\nconst defaultSettings = {\n\telements_selector: \"img\",\n\tcontainer: isBot || runningOnBrowser ? document : null,\n\tthreshold: 300,\n\tthresholds: null,\n\tdata_src: \"src\",\n\tdata_srcset: \"srcset\",\n\tdata_sizes: \"sizes\",\n\tdata_bg: \"bg\",\n\tclass_loading: \"loading\",\n\tclass_loaded: \"loaded\",\n\tclass_error: \"error\",\n\tload_delay: 0,\n\tauto_unobserve: true,\n\tcallback_enter: null,\n\tcallback_exit: null,\n\tcallback_reveal: null,\n\tcallback_loaded: null,\n\tcallback_error: null,\n\tcallback_finish: null\n};\n\nvar getInstanceSettings = customSettings => {\n\treturn Object.assign({}, defaultSettings, customSettings);\n};\n\nconst dataPrefix = \"data-\";\nconst processedDataName = \"was-processed\";\nconst timeoutDataName = \"ll-timeout\";\nconst trueString = \"true\";\n\nconst getData = (element, attribute) => {\n\treturn element.getAttribute(dataPrefix + attribute);\n};\n\nconst setData = (element, attribute, value) => {\n\tvar attrName = dataPrefix + attribute;\n\tif (value === null) {\n\t\telement.removeAttribute(attrName);\n\t\treturn;\n\t}\n\telement.setAttribute(attrName, value);\n};\n\nconst setWasProcessedData = element =>\n\tsetData(element, processedDataName, trueString);\n\nconst getWasProcessedData = element =>\n\tgetData(element, processedDataName) === trueString;\n\nconst setTimeoutData = (element, value) =>\n\tsetData(element, timeoutDataName, value);\n\nconst getTimeoutData = element => getData(element, timeoutDataName);\n\nconst purgeProcessedElements = elements => {\n\treturn elements.filter(element => !getWasProcessedData(element));\n};\n\nconst purgeOneElement = (elements, elementToPurge) => {\n\treturn elements.filter(element => element !== elementToPurge);\n};\n\n/* Creates instance and notifies it through the window element */\nconst createInstance = function(classObj, options) {\n\tvar event;\n\tlet eventString = \"LazyLoad::Initialized\";\n\tlet instance = new classObj(options);\n\ttry {\n\t\t// Works in modern browsers\n\t\tevent = new CustomEvent(eventString, { detail: { instance } });\n\t} catch (err) {\n\t\t// Works in Internet Explorer (all versions)\n\t\tevent = document.createEvent(\"CustomEvent\");\n\t\tevent.initCustomEvent(eventString, false, false, { instance });\n\t}\n\twindow.dispatchEvent(event);\n};\n\n/* Auto initialization of one or more instances of lazyload, depending on the \n options passed in (plain object or an array) */\nfunction autoInitialize(classObj, options) {\n\tif (!options) {\n\t\treturn;\n\t}\n\tif (!options.length) {\n\t\t// Plain object\n\t\tcreateInstance(classObj, options);\n\t} else {\n\t\t// Array of objects\n\t\tfor (let i = 0, optionsItem; (optionsItem = options[i]); i += 1) {\n\t\t\tcreateInstance(classObj, optionsItem);\n\t\t}\n\t}\n}\n\nconst callbackIfSet = (callback, argument) => {\n\tif (callback) {\n\t\tcallback(argument);\n\t}\n};\n\nconst updateLoadingCount = (instance, plusMinus) => {\n\tinstance._loadingCount += plusMinus;\n\tif (instance._elements.length === 0 && instance._loadingCount === 0) {\n\t\tcallbackIfSet(instance._settings.callback_finish);\n\t}\n};\n\nconst getSourceTags = parentTag => {\n\tlet sourceTags = [];\n\tfor (let i = 0, childTag; (childTag = parentTag.children[i]); i += 1) {\n\t\tif (childTag.tagName === \"SOURCE\") {\n\t\t\tsourceTags.push(childTag);\n\t\t}\n\t}\n\treturn sourceTags;\n};\n\nconst setAttributeIfValue = (element, attrName, value) => {\n\tif (!value) {\n\t\treturn;\n\t}\n\telement.setAttribute(attrName, value);\n};\n\nconst setImageAttributes = (element, settings) => {\n\tsetAttributeIfValue(\n\t\telement,\n\t\t\"sizes\",\n\t\tgetData(element, settings.data_sizes)\n\t);\n\tsetAttributeIfValue(\n\t\telement,\n\t\t\"srcset\",\n\t\tgetData(element, settings.data_srcset)\n\t);\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n};\n\nconst setSourcesImg = (element, settings) => {\n\tconst parent = element.parentNode;\n\n\tif (parent && parent.tagName === \"PICTURE\") {\n\t\tlet sourceTags = getSourceTags(parent);\n\t\tsourceTags.forEach(sourceTag => {\n\t\t\tsetImageAttributes(sourceTag, settings);\n\t\t});\n\t}\n\n\tsetImageAttributes(element, settings);\n};\n\nconst setSourcesIframe = (element, settings) => {\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n};\n\nconst setSourcesVideo = (element, settings) => {\n\tlet sourceTags = getSourceTags(element);\n\tsourceTags.forEach(sourceTag => {\n\t\tsetAttributeIfValue(\n\t\t\tsourceTag,\n\t\t\t\"src\",\n\t\t\tgetData(sourceTag, settings.data_src)\n\t\t);\n\t});\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\n\telement.load();\n};\n\nconst setSourcesBgImage = (element, settings) => {\n\tconst srcDataValue = getData(element, settings.data_src);\n\tconst bgDataValue = getData(element, settings.data_bg);\n\n\tif (srcDataValue) {\n\t\telement.style.backgroundImage = `url(\"${srcDataValue}\")`;\n\t}\n\n\tif (bgDataValue) {\n\t\telement.style.backgroundImage = bgDataValue;\n\t}\n};\n\nconst setSourcesFunctions = {\n\tIMG: setSourcesImg,\n\tIFRAME: setSourcesIframe,\n\tVIDEO: setSourcesVideo\n};\n\nconst setSources = (element, instance) => {\n\tconst settings = instance._settings;\n\tconst tagName = element.tagName;\n\tconst setSourcesFunction = setSourcesFunctions[tagName];\n\tif (setSourcesFunction) {\n\t\tsetSourcesFunction(element, settings);\n\t\tupdateLoadingCount(instance, 1);\n\t\tinstance._elements = purgeOneElement(instance._elements, element);\n\t\treturn;\n\t}\n\tsetSourcesBgImage(element, settings);\n};\n\nconst addClass = (element, className) => {\n\tif (supportsClassList) {\n\t\telement.classList.add(className);\n\t\treturn;\n\t}\n\telement.className += (element.className ? \" \" : \"\") + className;\n};\n\nconst removeClass = (element, className) => {\n\tif (supportsClassList) {\n\t\telement.classList.remove(className);\n\t\treturn;\n\t}\n\telement.className = element.className.\n\t\treplace(new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), \" \").\n\t\treplace(/^\\s+/, \"\").\n\t\treplace(/\\s+$/, \"\");\n};\n\nconst genericLoadEventName = \"load\";\nconst mediaLoadEventName = \"loadeddata\";\nconst errorEventName = \"error\";\n\nconst addEventListener = (element, eventName, handler) => {\n\telement.addEventListener(eventName, handler);\n};\n\nconst removeEventListener = (element, eventName, handler) => {\n\telement.removeEventListener(eventName, handler);\n};\n\nconst addEventListeners = (element, loadHandler, errorHandler) => {\n\taddEventListener(element, genericLoadEventName, loadHandler);\n\taddEventListener(element, mediaLoadEventName, loadHandler);\n\taddEventListener(element, errorEventName, errorHandler);\n};\n\nconst removeEventListeners = (element, loadHandler, errorHandler) => {\n\tremoveEventListener(element, genericLoadEventName, loadHandler);\n\tremoveEventListener(element, mediaLoadEventName, loadHandler);\n\tremoveEventListener(element, errorEventName, errorHandler);\n};\n\nconst eventHandler = function(event, success, instance) {\n\tvar settings = instance._settings;\n\tconst className = success ? settings.class_loaded : settings.class_error;\n\tconst callback = success\n\t\t? settings.callback_loaded\n\t\t: settings.callback_error;\n\tconst element = event.target;\n\n\tremoveClass(element, settings.class_loading);\n\taddClass(element, className);\n\tcallbackIfSet(callback, element);\n\n\tupdateLoadingCount(instance, -1);\n};\n\nconst addOneShotEventListeners = (element, instance) => {\n\tconst loadHandler = event => {\n\t\teventHandler(event, true, instance);\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\n\t};\n\tconst errorHandler = event => {\n\t\teventHandler(event, false, instance);\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\n\t};\n\taddEventListeners(element, loadHandler, errorHandler);\n};\n\nconst managedTags = [\"IMG\", \"IFRAME\", \"VIDEO\"];\n\nconst onEnter = (element, instance) => {\n\tconst settings = instance._settings;\n\tcallbackIfSet(settings.callback_enter, element);\n\tif (!settings.load_delay) {\n\t\trevealAndUnobserve(element, instance);\n\t\treturn;\n\t}\n\tdelayLoad(element, instance);\n};\n\nconst revealAndUnobserve = (element, instance) => {\n\tvar observer = instance._observer;\n\trevealElement(element, instance);\n\tif (observer && instance._settings.auto_unobserve) {\n\t\tobserver.unobserve(element);\n\t}\n};\n\nconst onExit = (element, instance) => {\n\tconst settings = instance._settings;\n\tcallbackIfSet(settings.callback_exit, element);\n\tif (!settings.load_delay) {\n\t\treturn;\n\t}\n\tcancelDelayLoad(element);\n};\n\nconst cancelDelayLoad = element => {\n\tvar timeoutId = getTimeoutData(element);\n\tif (!timeoutId) {\n\t\treturn; // do nothing if timeout doesn't exist\n\t}\n\tclearTimeout(timeoutId);\n\tsetTimeoutData(element, null);\n};\n\nconst delayLoad = (element, instance) => {\n\tvar loadDelay = instance._settings.load_delay;\n\tvar timeoutId = getTimeoutData(element);\n\tif (timeoutId) {\n\t\treturn; // do nothing if timeout already set\n\t}\n\ttimeoutId = setTimeout(function() {\n\t\trevealAndUnobserve(element, instance);\n\t\tcancelDelayLoad(element);\n\t}, loadDelay);\n\tsetTimeoutData(element, timeoutId);\n};\n\nconst revealElement = (element, instance, force) => {\n\tvar settings = instance._settings;\n\tif (!force && getWasProcessedData(element)) {\n\t\treturn; // element has already been processed and force wasn't true\n\t}\n\tif (managedTags.indexOf(element.tagName) > -1) {\n\t\taddOneShotEventListeners(element, instance);\n\t\taddClass(element, settings.class_loading);\n\t}\n\tsetSources(element, instance);\n\tsetWasProcessedData(element);\n\tcallbackIfSet(settings.callback_reveal, element);\n\tcallbackIfSet(settings.callback_set, element);\n};\n\nconst isIntersecting = entry =>\n\tentry.isIntersecting || entry.intersectionRatio > 0;\n\nconst getObserverSettings = settings => ({\n\troot: settings.container === document ? null : settings.container,\n\trootMargin: settings.thresholds || settings.threshold + \"px\"\n});\n\nconst setObserver = instance => {\n\tif (!supportsIntersectionObserver) {\n\t\treturn false;\n\t}\n\tinstance._observer = new IntersectionObserver(entries => {\n\t\tentries.forEach(entry =>\n\t\t\tisIntersecting(entry)\n\t\t\t\t? onEnter(entry.target, instance)\n\t\t\t\t: onExit(entry.target, instance)\n\t\t);\n\t}, getObserverSettings(instance._settings));\n\treturn true;\n};\n\nconst LazyLoad = function(customSettings, elements) {\n\tthis._settings = getInstanceSettings(customSettings);\n\tthis._loadingCount = 0;\n\tsetObserver(this);\n\tthis.update(elements);\n};\n\nLazyLoad.prototype = {\n\tupdate: function(elements) {\n\t\tconst settings = this._settings;\n\t\tconst _elements =\n\t\t\telements ||\n\t\t\tsettings.container.querySelectorAll(settings.elements_selector);\n\n\t\tthis._elements = purgeProcessedElements(\n\t\t\tArray.prototype.slice.call(_elements) // NOTE: nodeset to array for IE compatibility\n\t\t);\n\n\t\tif (isBot || !this._observer) {\n\t\t\tthis.loadAll();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._elements.forEach(element => {\n\t\t\tthis._observer.observe(element);\n\t\t});\n\t},\n\n\tdestroy: function() {\n\t\tif (this._observer) {\n\t\t\tthis._elements.forEach(element => {\n\t\t\t\tthis._observer.unobserve(element);\n\t\t\t});\n\t\t\tthis._observer = null;\n\t\t}\n\t\tthis._elements = null;\n\t\tthis._settings = null;\n\t},\n\n\tload: function(element, force) {\n\t\trevealElement(element, this, force);\n\t},\n\n\tloadAll: function() {\n\t\tvar elements = this._elements;\n\t\telements.forEach(element => {\n\t\t\trevealAndUnobserve(element, this);\n\t\t});\n\t}\n};\n\n/* Automatic instances creation if required (useful for async script loading) */\nif (runningOnBrowser) {\n\tautoInitialize(LazyLoad, window.lazyLoadOptions);\n}\n\nreturn LazyLoad;\n\n})));\n"]}
composer.lock CHANGED
@@ -273,16 +273,16 @@
273
  },
274
  {
275
  "name": "wp-media/rocket-lazyload-common",
276
- "version": "v2.2.8",
277
  "source": {
278
  "type": "git",
279
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
280
- "reference": "d42f4f59227dfe6bd1e5075b44679e12507cfa4a"
281
  },
282
  "dist": {
283
  "type": "zip",
284
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/d42f4f59227dfe6bd1e5075b44679e12507cfa4a",
285
- "reference": "d42f4f59227dfe6bd1e5075b44679e12507cfa4a",
286
  "shasum": ""
287
  },
288
  "require": {
@@ -317,7 +317,7 @@
317
  }
318
  ],
319
  "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
320
- "time": "2019-03-30T12:54:54+00:00"
321
  }
322
  ],
323
  "packages-dev": [
@@ -663,16 +663,16 @@
663
  },
664
  {
665
  "name": "myclabs/deep-copy",
666
- "version": "1.8.1",
667
  "source": {
668
  "type": "git",
669
  "url": "https://github.com/myclabs/DeepCopy.git",
670
- "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
671
  },
672
  "dist": {
673
  "type": "zip",
674
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
675
- "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
676
  "shasum": ""
677
  },
678
  "require": {
@@ -707,7 +707,7 @@
707
  "object",
708
  "object graph"
709
  ],
710
- "time": "2018-06-11T23:09:50+00:00"
711
  },
712
  {
713
  "name": "phpcompatibility/php-compatibility",
@@ -1988,16 +1988,16 @@
1988
  },
1989
  {
1990
  "name": "squizlabs/php_codesniffer",
1991
- "version": "3.4.1",
1992
  "source": {
1993
  "type": "git",
1994
  "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1995
- "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa"
1996
  },
1997
  "dist": {
1998
  "type": "zip",
1999
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5b4333b4010625d29580eb4a41f1e53251be6baa",
2000
- "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa",
2001
  "shasum": ""
2002
  },
2003
  "require": {
@@ -2035,7 +2035,7 @@
2035
  "phpcs",
2036
  "standards"
2037
  ],
2038
- "time": "2019-03-19T03:22:27+00:00"
2039
  },
2040
  {
2041
  "name": "symfony/polyfill-ctype",
@@ -2097,16 +2097,16 @@
2097
  },
2098
  {
2099
  "name": "symfony/yaml",
2100
- "version": "v4.2.4",
2101
  "source": {
2102
  "type": "git",
2103
  "url": "https://github.com/symfony/yaml.git",
2104
- "reference": "761fa560a937fd7686e5274ff89dcfa87a5047df"
2105
  },
2106
  "dist": {
2107
  "type": "zip",
2108
- "url": "https://api.github.com/repos/symfony/yaml/zipball/761fa560a937fd7686e5274ff89dcfa87a5047df",
2109
- "reference": "761fa560a937fd7686e5274ff89dcfa87a5047df",
2110
  "shasum": ""
2111
  },
2112
  "require": {
@@ -2152,7 +2152,7 @@
2152
  ],
2153
  "description": "Symfony Yaml Component",
2154
  "homepage": "https://symfony.com",
2155
- "time": "2019-02-23T15:17:42+00:00"
2156
  },
2157
  {
2158
  "name": "webmozart/assert",
@@ -2207,16 +2207,16 @@
2207
  },
2208
  {
2209
  "name": "wp-coding-standards/wpcs",
2210
- "version": "2.0.0",
2211
  "source": {
2212
  "type": "git",
2213
  "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
2214
- "reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce"
2215
  },
2216
  "dist": {
2217
  "type": "zip",
2218
- "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
2219
- "reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
2220
  "shasum": ""
2221
  },
2222
  "require": {
@@ -2229,7 +2229,7 @@
2229
  "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2230
  },
2231
  "suggest": {
2232
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2233
  },
2234
  "type": "phpcodesniffer-standard",
2235
  "notification-url": "https://packagist.org/downloads/",
@@ -2248,7 +2248,7 @@
2248
  "standards",
2249
  "wordpress"
2250
  ],
2251
- "time": "2019-01-16T10:13:16+00:00"
2252
  }
2253
  ],
2254
  "aliases": [],
273
  },
274
  {
275
  "name": "wp-media/rocket-lazyload-common",
276
+ "version": "v2.3",
277
  "source": {
278
  "type": "git",
279
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
280
+ "reference": "d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943"
281
  },
282
  "dist": {
283
  "type": "zip",
284
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943",
285
+ "reference": "d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943",
286
  "shasum": ""
287
  },
288
  "require": {
317
  }
318
  ],
319
  "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
320
+ "time": "2019-04-12T12:53:14+00:00"
321
  }
322
  ],
323
  "packages-dev": [
663
  },
664
  {
665
  "name": "myclabs/deep-copy",
666
+ "version": "1.9.1",
667
  "source": {
668
  "type": "git",
669
  "url": "https://github.com/myclabs/DeepCopy.git",
670
+ "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
671
  },
672
  "dist": {
673
  "type": "zip",
674
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
675
+ "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
676
  "shasum": ""
677
  },
678
  "require": {
707
  "object",
708
  "object graph"
709
  ],
710
+ "time": "2019-04-07T13:18:21+00:00"
711
  },
712
  {
713
  "name": "phpcompatibility/php-compatibility",
1988
  },
1989
  {
1990
  "name": "squizlabs/php_codesniffer",
1991
+ "version": "3.4.2",
1992
  "source": {
1993
  "type": "git",
1994
  "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1995
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
1996
  },
1997
  "dist": {
1998
  "type": "zip",
1999
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2000
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2001
  "shasum": ""
2002
  },
2003
  "require": {
2035
  "phpcs",
2036
  "standards"
2037
  ],
2038
+ "time": "2019-04-10T23:49:02+00:00"
2039
  },
2040
  {
2041
  "name": "symfony/polyfill-ctype",
2097
  },
2098
  {
2099
  "name": "symfony/yaml",
2100
+ "version": "v4.2.5",
2101
  "source": {
2102
  "type": "git",
2103
  "url": "https://github.com/symfony/yaml.git",
2104
+ "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1"
2105
  },
2106
  "dist": {
2107
  "type": "zip",
2108
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/6712daf03ee25b53abb14e7e8e0ede1a770efdb1",
2109
+ "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1",
2110
  "shasum": ""
2111
  },
2112
  "require": {
2152
  ],
2153
  "description": "Symfony Yaml Component",
2154
  "homepage": "https://symfony.com",
2155
+ "time": "2019-03-30T15:58:42+00:00"
2156
  },
2157
  {
2158
  "name": "webmozart/assert",
2207
  },
2208
  {
2209
  "name": "wp-coding-standards/wpcs",
2210
+ "version": "2.1.0",
2211
  "source": {
2212
  "type": "git",
2213
  "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
2214
+ "reference": "8c7a2e7682de9ef5955251874b639deda51ef470"
2215
  },
2216
  "dist": {
2217
  "type": "zip",
2218
+ "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/8c7a2e7682de9ef5955251874b639deda51ef470",
2219
+ "reference": "8c7a2e7682de9ef5955251874b639deda51ef470",
2220
  "shasum": ""
2221
  },
2222
  "require": {
2229
  "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2230
  },
2231
  "suggest": {
2232
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2233
  },
2234
  "type": "phpcodesniffer-standard",
2235
  "notification-url": "https://packagist.org/downloads/",
2248
  "standards",
2249
  "wordpress"
2250
  ],
2251
+ "time": "2019-04-08T10:53:57+00:00"
2252
  }
2253
  ],
2254
  "aliases": [],
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: wp_rocket, wp_media
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar, youtube
4
  Requires at least: 4.7
5
- Tested up to: 5.2
6
  Requires PHP: 5.4
7
- Stable tag: 2.1.5
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
@@ -85,6 +85,11 @@ You can also apply it manually. The element you want to apply lazyload on must h
85
  The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
 
 
 
 
 
88
  = 2.1.5 =
89
  * Bugfix: Prevent matching with the wrong data when a data-style attribute is on a div for background images
90
  * Remove data-cfasync="false" by default
2
  Contributors: wp_rocket, wp_media
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar, youtube
4
  Requires at least: 4.7
5
+ Tested up to: 5.1
6
  Requires PHP: 5.4
7
+ Stable tag: 2.2
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
85
  The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
88
+ = 2.2 =
89
+ * Enhancement: Update lazyload script to the latest version
90
+ * Enhancement: Use the dimensions of the original image for the placeholder size when possible, to reduce content reflow
91
+ * Enhancement: Ignore images using the new loading attribute introduce by Chrome for browser-native lazyload
92
+
93
  = 2.1.5 =
94
  * Bugfix: Prevent matching with the wrong data when a data-style attribute is on a div for background images
95
  * Remove data-cfasync="false" by default
rocket-lazy-load.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
- * Version: 2.1.5
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
@@ -29,7 +29,7 @@
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
- define('ROCKET_LL_VERSION', '2.1.5');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.4');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
+ * Version: 2.2
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
+ define('ROCKET_LL_VERSION', '2.2');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.4');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
src/ServiceProvider/SubscribersServiceProvider.php CHANGED
@@ -42,16 +42,16 @@ class SubscribersServiceProvider extends AbstractServiceProvider
42
  */
43
  public function register()
44
  {
45
- $this->getContainer()->add('RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber');
46
 
47
- $this->getContainer()->add('RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber')
48
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\AdminPage'))
49
  ->withArgument($this->getContainer()->get('plugin_basename'));
50
 
51
- $this->getContainer()->add('RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber')
52
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\ImagifyNotice'));
53
 
54
- $this->getContainer()->add('RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber')
55
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
56
  ->withArgument($this->getContainer()->get('RocketLazyload\Assets'))
57
  ->withArgument($this->getContainer()->get('RocketLazyload\Image'))
42
  */
43
  public function register()
44
  {
45
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber');
46
 
47
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber')
48
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\AdminPage'))
49
  ->withArgument($this->getContainer()->get('plugin_basename'));
50
 
51
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber')
52
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\ImagifyNotice'));
53
 
54
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber')
55
  ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
56
  ->withArgument($this->getContainer()->get('RocketLazyload\Assets'))
57
  ->withArgument($this->getContainer()->get('RocketLazyload\Image'))
src/Subscriber/LazyloadSubscriber.php CHANGED
@@ -94,7 +94,7 @@ class LazyloadSubscriber implements SubscriberInterface
94
  ],
95
  'wp_head' => ['insertNoJSStyle', ROCKET_LL_INT_MAX ],
96
  'wp_enqueue_scripts' => ['insertYoutubeThumbnailStyle', ROCKET_LL_INT_MAX],
97
- 'template_redirect' => ['lazyload', ROCKET_LL_INT_MAX],
98
  'rocket_lazyload_html' => 'lazyloadResponsive',
99
  'init' => 'lazyloadSmilies',
100
  ];
@@ -141,7 +141,7 @@ class LazyloadSubscriber implements SubscriberInterface
141
  $args = [
142
  'base_url' => ROCKET_LL_FRONT_JS_URL,
143
  'threshold' => $threshold,
144
- 'version' => '11.0.3',
145
  'polyfill' => $polyfill,
146
  ];
147
 
94
  ],
95
  'wp_head' => ['insertNoJSStyle', ROCKET_LL_INT_MAX ],
96
  'wp_enqueue_scripts' => ['insertYoutubeThumbnailStyle', ROCKET_LL_INT_MAX],
97
+ 'template_redirect' => ['lazyload', 2],
98
  'rocket_lazyload_html' => 'lazyloadResponsive',
99
  'init' => 'lazyloadSmilies',
100
  ];
141
  $args = [
142
  'base_url' => ROCKET_LL_FRONT_JS_URL,
143
  'threshold' => $threshold,
144
+ 'version' => '11.0.6',
145
  'polyfill' => $polyfill,
146
  ];
147
 
vendor/composer/installed.json CHANGED
@@ -274,17 +274,17 @@
274
  },
275
  {
276
  "name": "wp-media/rocket-lazyload-common",
277
- "version": "v2.2.8",
278
- "version_normalized": "2.2.8.0",
279
  "source": {
280
  "type": "git",
281
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
- "reference": "d42f4f59227dfe6bd1e5075b44679e12507cfa4a"
283
  },
284
  "dist": {
285
  "type": "zip",
286
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/d42f4f59227dfe6bd1e5075b44679e12507cfa4a",
287
- "reference": "d42f4f59227dfe6bd1e5075b44679e12507cfa4a",
288
  "shasum": ""
289
  },
290
  "require": {
@@ -302,7 +302,7 @@
302
  "symfony/yaml": "2.8.*",
303
  "wp-coding-standards/wpcs": "^2.0.0"
304
  },
305
- "time": "2019-03-30T12:54:54+00:00",
306
  "type": "library",
307
  "installation-source": "dist",
308
  "autoload": {
274
  },
275
  {
276
  "name": "wp-media/rocket-lazyload-common",
277
+ "version": "v2.3",
278
+ "version_normalized": "2.3.0.0",
279
  "source": {
280
  "type": "git",
281
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
+ "reference": "d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943"
283
  },
284
  "dist": {
285
  "type": "zip",
286
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943",
287
+ "reference": "d2fc18e40c7dd86edb3fad2c6cb79860bd0c2943",
288
  "shasum": ""
289
  },
290
  "require": {
302
  "symfony/yaml": "2.8.*",
303
  "wp-coding-standards/wpcs": "^2.0.0"
304
  },
305
+ "time": "2019-04-12T12:53:14+00:00",
306
  "type": "library",
307
  "installation-source": "dist",
308
  "autoload": {
vendor/wp-media/rocket-lazyload-common/phpcs.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <ruleset name="Rocket Lazyload">
3
+ <description>Rocket Lazyload Coding Standards</description>
4
+
5
+ <config name="testVersion" value="5.4-" />
6
+ <rule ref="PHPCompatibilityWP">
7
+ <include-pattern>*\.php$</include-pattern>
8
+ </rule>
9
+ <rule ref="PSR2">
10
+ <exclude name="Generic.Files.LineLength.TooLong" />
11
+ </rule>
12
+ <rule ref="WordPress">
13
+ <exclude name="WordPress.Files.FileName" />
14
+ <exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
15
+ <exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
16
+ <exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" />
17
+ <exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
18
+ <exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine" />
19
+ <exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
20
+ <exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
21
+ <exclude name="PEAR.Functions.FunctionCallSignature" />
22
+ <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen" />
23
+ </rule>
24
+ </ruleset>
vendor/wp-media/rocket-lazyload-common/src/Iframe.php CHANGED
@@ -28,9 +28,7 @@ class Iframe
28
 
29
  $args = wp_parse_args($args, $defaults);
30
 
31
- preg_match_all('@<iframe(?<atts>\s.+)>.*</iframe>@iUs', $buffer, $iframes, PREG_SET_ORDER);
32
-
33
- if (empty($iframes)) {
34
  return $html;
35
  }
36
 
@@ -108,6 +106,9 @@ class Iframe
108
  'gform_ajax_frame',
109
  'data-no-lazy=',
110
  'recaptcha/api/fallback',
 
 
 
111
  ]
112
  );
113
  }
28
 
29
  $args = wp_parse_args($args, $defaults);
30
 
31
+ if (! preg_match_all('@<iframe(?<atts>\s.+)>.*</iframe>@iUs', $buffer, $iframes, PREG_SET_ORDER) ) {
 
 
32
  return $html;
33
  }
34
 
106
  'gform_ajax_frame',
107
  'data-no-lazy=',
108
  'recaptcha/api/fallback',
109
+ 'loading="eager"',
110
+ 'loading="lazy"',
111
+ 'loading="auto"',
112
  ]
113
  );
114
  }
vendor/wp-media/rocket-lazyload-common/src/Image.php CHANGED
@@ -21,26 +21,39 @@ class Image
21
  */
22
  public function lazyloadImages($html, $buffer)
23
  {
24
- preg_match_all('#<img([^>]*) src=("(?:[^"]+)"|\'(?:[^\']+)\'|(?:[^ >]+))([^>]*)>#', $buffer, $images, PREG_SET_ORDER);
25
-
26
- if (empty($images)) {
27
  return $html;
28
  }
29
 
30
  $images = array_unique($images, SORT_REGULAR);
31
 
32
  foreach ($images as $image) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  // Don't apply LazyLoad on images from WP Retina x2.
34
  if (function_exists('wr2x_picture_rewrite')) {
35
- if (wr2x_get_retina(trailingslashit(ABSPATH) . wr2x_get_pathinfo_from_image_src(trim($image[2], '"')))) {
36
  continue;
37
  }
38
  }
39
 
40
- if ($this->isExcluded($image[1] . $image[3], $this->getExcludedAttributes()) || $this->isExcluded($image[2], $this->getExcludedSrc())) {
41
- continue;
42
- }
43
-
44
  $image_lazyload = $this->replaceImage($image);
45
  $html = str_replace($image[0], $image_lazyload, $html);
46
 
@@ -218,6 +231,9 @@ class Image
218
  'class="ls-l',
219
  'class="ls-bg',
220
  'soliloquy-image',
 
 
 
221
  ]
222
  );
223
  }
@@ -254,7 +270,20 @@ class Image
254
  */
255
  private function replaceImage($image)
256
  {
257
- $image_lazyload = sprintf('<img%1$s src="%4$s" data-lazy-src=%2$s%3$s>', $image[1], $image[2], $image[3], $this->getPlaceholder());
 
 
 
 
 
 
 
 
 
 
 
 
 
258
 
259
  /**
260
  * Filter the LazyLoad HTML output
21
  */
22
  public function lazyloadImages($html, $buffer)
23
  {
24
+ if (! preg_match_all('#<img(?<atts>\s.+)\s?/?>#iUs', $buffer, $images, PREG_SET_ORDER)) {
 
 
25
  return $html;
26
  }
27
 
28
  $images = array_unique($images, SORT_REGULAR);
29
 
30
  foreach ($images as $image) {
31
+ if ($this->isExcluded($image['atts'], $this->getExcludedAttributes())) {
32
+ continue;
33
+ }
34
+
35
+ // Given the previous regex pattern, $image['atts'] starts with a whitespace character.
36
+ if (! preg_match('@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', $image['atts'], $atts)) {
37
+ continue;
38
+ }
39
+
40
+ $image['src'] = trim($atts['src']);
41
+
42
+ if ('' === $image['src']) {
43
+ continue;
44
+ }
45
+
46
+ if ($this->isExcluded($image['src'], $this->getExcludedSrc())) {
47
+ continue;
48
+ }
49
+
50
  // Don't apply LazyLoad on images from WP Retina x2.
51
  if (function_exists('wr2x_picture_rewrite')) {
52
+ if (wr2x_get_retina(trailingslashit(ABSPATH) . wr2x_get_pathinfo_from_image_src(trim($image['src'], '"')))) {
53
  continue;
54
  }
55
  }
56
 
 
 
 
 
57
  $image_lazyload = $this->replaceImage($image);
58
  $html = str_replace($image[0], $image_lazyload, $html);
59
 
231
  'class="ls-l',
232
  'class="ls-bg',
233
  'soliloquy-image',
234
+ 'loading="auto"',
235
+ 'loading="lazy"',
236
+ 'loading="eager"',
237
  ]
238
  );
239
  }
270
  */
271
  private function replaceImage($image)
272
  {
273
+ $width = 1;
274
+ $height = 1;
275
+
276
+ if (preg_match('@\swidth\s*=\s*(\'|")(?<width>.*)\1@iUs', $image['atts'], $atts)) {
277
+ $width = absint($atts['width']);
278
+ }
279
+
280
+ if (preg_match('@\sheight\s*=\s*(\'|")(?<height>.*)\1@iUs', $image['atts'], $atts)) {
281
+ $height = absint($atts['height']);
282
+ }
283
+
284
+ $placeholder_atts = preg_replace('@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', ' src=$1' . $this->getPlaceholder($width, $height) . '$1', $image['atts']);
285
+
286
+ $image_lazyload = str_replace($image['atts'], $placeholder_atts . ' data-lazy-src="' . esc_url($image['src']) . '"', $image[0]);
287
 
288
  /**
289
  * Filter the LazyLoad HTML output