From 9497bb3e5feea5f8224b2870718acd17a9f67fb0 Mon Sep 17 00:00:00 2001
From: Gael Robin
Date: Wed, 17 Jul 2024 04:08:15 +0200
Subject: [PATCH 01/13] Closes #6764: Refactor lcp beacon script
Change the structure of the beacon script to include a new class `RocketBeacon` which will contains more generic functions that could be shared with other features.
---
assets/js/lcp-beacon.min.js | 2 -
assets/js/lcp-beacon.min.js.map | 1 -
assets/js/{lcp-beacon.js => wpr-beacon.js} | 303 ++++++++++--------
assets/js/wpr-beacon.min.js | 2 +
assets/js/wpr-beacon.min.js.map | 1 +
dynamic-lists.json | 2 +-
gulpfile.js | 4 +-
.../Media/AboveTheFold/AJAX/Controller.php | 2 +-
.../AboveTheFold/Frontend/Controller.php | 6 +-
src/js/gulp/tasks/js.js | 4 +-
.../AJAX/Controller/addLcpData.php | 36 +--
.../Subscriber/HTML/output_w_beacon.html | 2 +-
.../AJAX/Controller/addLcpData.php | 2 +-
13 files changed, 194 insertions(+), 173 deletions(-)
delete mode 100644 assets/js/lcp-beacon.min.js
delete mode 100644 assets/js/lcp-beacon.min.js.map
rename assets/js/{lcp-beacon.js => wpr-beacon.js} (69%)
create mode 100644 assets/js/wpr-beacon.min.js
create mode 100644 assets/js/wpr-beacon.min.js.map
diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js
deleted file mode 100644
index 1eca46f9ff..0000000000
--- a/assets/js/lcp-beacon.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a="function"==typeof require&&require,e=0;e{this._handleInfiniteLoop()},1e4);try{var e=this._generateLcpCandidates(1/0);e&&(this._initWithFirstElementWithInfo(e),this._fillATFWithoutDuplications(e))}catch(e){this.errorCode="script_error",this._logMessage("Script Error: "+e)}this._saveFinalResultIntoDB()}else this._finalize()}async _isValidPreconditions(){return this._isNotValidScreensize()?(this._logMessage("Bailing out because screen size is not acceptable"),!1):!this._isPageCached()||!await this._isGeneratedBefore()||(this._logMessage("Bailing out because data is already available"),!1)}_isPageCached(){var e=document.documentElement.nextSibling&&document.documentElement.nextSibling.data?document.documentElement.nextSibling.data:"";return e&&e.includes("Debug: cached")}async _isGeneratedBefore(){var e=new FormData;return e.append("action","rocket_check_lcp"),e.append("rocket_lcp_nonce",this.config.nonce),e.append("url",this.config.url),e.append("is_mobile",this.config.is_mobile),(e=await fetch(this.config.ajax_url,{method:"POST",credentials:"same-origin",body:e}).then(e=>e.json())).success}_isNotValidScreensize(){var e=window.innerWidth||document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight,i=this.config.is_mobile&&(e>this.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(e{if("img"===e.nodeName.toLowerCase()&&"picture"===e.parentElement.nodeName.toLowerCase())return null;let t;if("picture"===e.nodeName.toLowerCase()){var i=e.querySelector("img");if(!i)return null;t=i.getBoundingClientRect()}else t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>null!==e).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_isIntersecting(e){return 0<=e.bottom&&0<=e.right&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)i.type="img-srcset",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if("img"===t)i.type="img",i.src=e.src,i.current_src=e.currentSrc;else if("video"===t){i.type="img";var n=e.querySelector("source");i.src=e.poster||(n?n.src:""),i.current_src=i.src}else if("svg"===t)(n=e.querySelector("image"))&&(i.type="img",i.src=n.getAttribute("href")||"",i.current_src=i.src);else if("picture"===t)i.type="picture",n=e.querySelector("img"),i.src=n?n.src:"",i.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||"",type:e.type||"",sizes:e.sizes||""}));else{if(0===(t=[window.getComputedStyle(e,null).getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")].filter(e=>"none"!==e)).length)return null;if(n=t[0],i.type="bg-img",n.includes("image-set(")&&(i.type="bg-img-set"),!n||""===n||n.includes("data:image"))return null;e=[...n.matchAll(/url\(\s*?['"]?\s*?(.+?)\s*?["']?\s*?\)/gi)],i.bg_set=e.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),i.bg_set.every(e=>""===e.src)&&(i.bg_set=e.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo))?this.performanceImages=[{...e.elementInfo,label:"lcp"}]:(this._logMessage("No LCP candidate found."),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;!this._isDuplicateImage(e)&&t&&this.performanceImages.push({...t,label:"above-the-fold"})})}_isDuplicateImage(e){const t=this._getElementInfo(e);var i;return null!==t&&(e="img"===t.type||"img-srcset"===t.type||"video"===t.type,i="bg-img"===t.type||"bg-img-set"===t.type||"picture"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_getFinalStatus(){return""!==this.errorCode?this.errorCode:10<=(new Date-this.scriptTimer)/1e3?"timeout":"success"}_saveFinalResultIntoDB(){var e=new FormData;e.append("action","rocket_lcp"),e.append("rocket_lcp_nonce",this.config.nonce),e.append("url",this.config.url),e.append("is_mobile",this.config.is_mobile),e.append("images",JSON.stringify(this.performanceImages)),e.append("status",this._getFinalStatus()),fetch(this.config.ajax_url,{method:"POST",credentials:"same-origin",body:e,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()})}_handleInfiniteLoop(){this._saveFinalResultIntoDB()}_finalize(){document.querySelector('[data-name="wpr-lcp-beacon"]').setAttribute("beacon-completed","true"),clearTimeout(this.infiniteLoopId)}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){const e=new n(window.rocket_lcp_data);"loading"!==document.readyState?setTimeout(()=>{e.init()},window.rocket_lcp_data.delay):document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{e.init()},window.rocket_lcp_data.delay)})}}}).run()},{}]},{},[1]);
-//# sourceMappingURL=lcp-beacon.min.js.map
diff --git a/assets/js/lcp-beacon.min.js.map b/assets/js/lcp-beacon.min.js.map
deleted file mode 100644
index 3db9f48fc2..0000000000
--- a/assets/js/lcp-beacon.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.min.js"],"sourcesContent":["!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i=\"function\"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{this._handleInfiniteLoop()},1e4);try{var e=this._generateLcpCandidates(1/0);e&&(this._initWithFirstElementWithInfo(e),this._fillATFWithoutDuplications(e))}catch(e){this.errorCode=\"script_error\",this._logMessage(\"Script Error: \"+e)}this._saveFinalResultIntoDB()}else this._finalize()}async _isValidPreconditions(){return this._isNotValidScreensize()?(this._logMessage(\"Bailing out because screen size is not acceptable\"),!1):!this._isPageCached()||!await this._isGeneratedBefore()||(this._logMessage(\"Bailing out because data is already available\"),!1)}_isPageCached(){var e=document.documentElement.nextSibling&&document.documentElement.nextSibling.data?document.documentElement.nextSibling.data:\"\";return e&&e.includes(\"Debug: cached\")}async _isGeneratedBefore(){var e=new FormData;return e.append(\"action\",\"rocket_check_lcp\"),e.append(\"rocket_lcp_nonce\",this.config.nonce),e.append(\"url\",this.config.url),e.append(\"is_mobile\",this.config.is_mobile),(e=await fetch(this.config.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e}).then(e=>e.json())).success}_isNotValidScreensize(){var e=window.innerWidth||document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight,i=this.config.is_mobile&&(e>this.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(e{if(\"img\"===e.nodeName.toLowerCase()&&\"picture\"===e.parentElement.nodeName.toLowerCase())return null;let t;if(\"picture\"===e.nodeName.toLowerCase()){var i=e.querySelector(\"img\");if(!i)return null;t=i.getBoundingClientRect()}else t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>null!==e).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_isIntersecting(e){return 0<=e.bottom&&0<=e.right&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)i.type=\"img-srcset\",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if(\"img\"===t)i.type=\"img\",i.src=e.src,i.current_src=e.currentSrc;else if(\"video\"===t){i.type=\"img\";var n=e.querySelector(\"source\");i.src=e.poster||(n?n.src:\"\"),i.current_src=i.src}else if(\"svg\"===t)(n=e.querySelector(\"image\"))&&(i.type=\"img\",i.src=n.getAttribute(\"href\")||\"\",i.current_src=i.src);else if(\"picture\"===t)i.type=\"picture\",n=e.querySelector(\"img\"),i.src=n?n.src:\"\",i.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\",type:e.type||\"\",sizes:e.sizes||\"\"}));else{if(0===(t=[window.getComputedStyle(e,null).getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")].filter(e=>\"none\"!==e)).length)return null;if(n=t[0],i.type=\"bg-img\",n.includes(\"image-set(\")&&(i.type=\"bg-img-set\"),!n||\"\"===n||n.includes(\"data:image\"))return null;e=[...n.matchAll(/url\\(\\s*?['\"]?\\s*?(.+?)\\s*?[\"']?\\s*?\\)/gi)],i.bg_set=e.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),i.bg_set.every(e=>\"\"===e.src)&&(i.bg_set=e.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo))?this.performanceImages=[{...e.elementInfo,label:\"lcp\"}]:(this._logMessage(\"No LCP candidate found.\"),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;!this._isDuplicateImage(e)&&t&&this.performanceImages.push({...t,label:\"above-the-fold\"})})}_isDuplicateImage(e){const t=this._getElementInfo(e);var i;return null!==t&&(e=\"img\"===t.type||\"img-srcset\"===t.type||\"video\"===t.type,i=\"bg-img\"===t.type||\"bg-img-set\"===t.type||\"picture\"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_getFinalStatus(){return\"\"!==this.errorCode?this.errorCode:10<=(new Date-this.scriptTimer)/1e3?\"timeout\":\"success\"}_saveFinalResultIntoDB(){var e=new FormData;e.append(\"action\",\"rocket_lcp\"),e.append(\"rocket_lcp_nonce\",this.config.nonce),e.append(\"url\",this.config.url),e.append(\"is_mobile\",this.config.is_mobile),e.append(\"images\",JSON.stringify(this.performanceImages)),e.append(\"status\",this._getFinalStatus()),fetch(this.config.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()})}_handleInfiniteLoop(){this._saveFinalResultIntoDB()}_finalize(){document.querySelector('[data-name=\"wpr-lcp-beacon\"]').setAttribute(\"beacon-completed\",\"true\"),clearTimeout(this.infiniteLoopId)}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){const e=new n(window.rocket_lcp_data);\"loading\"!==document.readyState?setTimeout(()=>{e.init()},window.rocket_lcp_data.delay):document.addEventListener(\"DOMContentLoaded\",()=>{setTimeout(()=>{e.init()},window.rocket_lcp_data.delay)})}}}).run()},{}]},{},[1]);"],"file":"lcp-beacon.min.js"}
\ No newline at end of file
diff --git a/assets/js/lcp-beacon.js b/assets/js/wpr-beacon.js
similarity index 69%
rename from assets/js/lcp-beacon.js
rename to assets/js/wpr-beacon.js
index 9150860ba3..2d5590a191 100644
--- a/assets/js/lcp-beacon.js
+++ b/assets/js/wpr-beacon.js
@@ -1,45 +1,39 @@
-class RocketLcpBeacon {
- constructor( config ) {
- this.config = config;
- this.performanceImages = [];
- this.errorCode = '';
- this.scriptTimer = new Date();
- this.infiniteLoopId = null;
+class RocketBeacon {
+ constructor(config) {
+ this.config = config;
+ this.lcpBeacon = null;
+ this.infiniteLoopId = null;
+ this.scriptTimer = new Date();
+ this.errorCode = '';
}
async init() {
- if ( ! await this._isValidPreconditions() ) {
+ if (!await this._isValidPreconditions()) {
this._finalize();
return;
}
- this.infiniteLoopId = setTimeout( () => {
+ this.infiniteLoopId = setTimeout(() => {
this._handleInfiniteLoop();
- }, 10000 );
+ }, 10000);
- try {
- // Use _generateLcpCandidates method to get all the elements in the viewport.
- const above_the_fold_images = this._generateLcpCandidates( Infinity );
- if ( above_the_fold_images ) {
- this._initWithFirstElementWithInfo( above_the_fold_images );
- this._fillATFWithoutDuplications( above_the_fold_images );
- }
- } catch ( err ) {
- this.errorCode = 'script_error';
- this._logMessage( 'Script Error: ' + err );
+ const isGeneratedBefore = await this._isGeneratedBefore();
+
+ if (!isGeneratedBefore.lcp) {
+ this.lcpBeacon = new RocketLcpBeacon(this.config);
+ await this.lcpBeacon.run();
}
this._saveFinalResultIntoDB();
}
async _isValidPreconditions() {
- // Check the screensize first because starting any logic.
- if ( this._isNotValidScreensize() ) {
+ if (this._isNotValidScreensize()) {
this._logMessage('Bailing out because screen size is not acceptable');
return false;
}
- if ( this._isPageCached() && await this._isGeneratedBefore() ) {
+ if (this._isPageCached() && await this._isGeneratedBefore()) {
this._logMessage('Bailing out because data is already available');
return false;
}
@@ -49,52 +43,161 @@ class RocketLcpBeacon {
_isPageCached() {
const signature = document.documentElement.nextSibling && document.documentElement.nextSibling.data ? document.documentElement.nextSibling.data : '';
-
- return signature && signature.includes( 'Debug: cached' );
+ return signature && signature.includes('Debug: cached');
}
async _isGeneratedBefore() {
- // AJAX call to check if there are any records for the current URL.
let data_check = new FormData();
data_check.append('action', 'rocket_check_lcp');
data_check.append('rocket_lcp_nonce', this.config.nonce);
data_check.append('url', this.config.url);
data_check.append('is_mobile', this.config.is_mobile);
- const lcp_data_response = await fetch(this.config.ajax_url, {
- method: "POST",
- credentials: 'same-origin',
- body: data_check
- })
- .then(data => data.json());
- return lcp_data_response.success;
+ const beacon_data_response = await fetch(this.config.ajax_url, {
+ method: "POST",
+ credentials: 'same-origin',
+ body: data_check
+ }).then(data => data.json());
+
+ return beacon_data_response.data;
}
_isNotValidScreensize() {
- // Check screen size
const screenWidth = window.innerWidth || document.documentElement.clientWidth;
- const screenHeight= window.innerHeight || document.documentElement.clientHeight;
+ const screenHeight = window.innerHeight || document.documentElement.clientHeight;
const isNotValidForMobile = this.config.is_mobile &&
- ( screenWidth > this.config.width_threshold || screenHeight > this.config.height_threshold );
+ (screenWidth > this.config.width_threshold || screenHeight > this.config.height_threshold);
const isNotValidForDesktop = !this.config.is_mobile &&
- ( screenWidth < this.config.width_threshold || screenHeight < this.config.height_threshold );
+ (screenWidth < this.config.width_threshold || screenHeight < this.config.height_threshold);
return isNotValidForMobile || isNotValidForDesktop;
}
- _generateLcpCandidates( count ) {
- const lcpElements = document.querySelectorAll( this.config.elements );
+ static _isIntersecting(rect) {
+ return (
+ rect.bottom >= 0 &&
+ rect.right >= 0 &&
+ rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
+ rect.left <= (window.innerWidth || document.documentElement.clientWidth)
+ );
+ }
+
+ _saveFinalResultIntoDB() {
+ const lcpResults = this.lcpBeacon ? this.lcpBeacon.getResults() : null;
+
+ const data = new FormData();
+ data.append('action', 'rocket_lcp');
+ data.append('rocket_lcp_nonce', this.config.nonce);
+ data.append('url', this.config.url);
+ data.append('is_mobile', this.config.is_mobile);
+ data.append('status', this._getFinalStatus());
+ data.append('lcp_images', JSON.stringify(lcpResults));
+
+ fetch(this.config.ajax_url, {
+ method: "POST",
+ credentials: 'same-origin',
+ body: data,
+ headers: {
+ 'wpr-saas-no-intercept': true
+ }
+ })
+ .then(response => response.json())
+ .then(data => {
+ this._logMessage(data);
+ })
+ .catch(error => {
+ this._logMessage(error);
+ })
+ .finally(() => {
+ this._finalize();
+ });
+ }
+
+ _getFinalStatus() {
+ if ('' !== this.errorCode) {
+ return this.errorCode;
+ }
+
+ const scriptTime = (new Date() - this.scriptTimer) / 1000;
+ if (10 <= scriptTime) {
+ return 'timeout';
+ }
+
+ return 'success';
+ }
+
+ _handleInfiniteLoop() {
+ this._saveFinalResultIntoDB();
+ }
+
+ _finalize() {
+ const beaconscript = document.querySelector('[data-name="wpr-wpr-beacon"]');
+ beaconscript.setAttribute('beacon-completed', 'true');
+ clearTimeout(this.infiniteLoopId);
+ }
+
+ _logMessage(msg) {
+ if (!this.config.debug) {
+ return;
+ }
+ console.log(msg);
+ }
+
+ static run() {
+ if (!window.rocket_lcp_data) {
+ return;
+ }
+
+ const instance = new RocketBeacon(window.rocket_lcp_data);
+
+ if (document.readyState !== 'loading') {
+ setTimeout(() => {
+ instance.init();
+ }, window.rocket_lcp_data.delay);
+ return;
+ }
+
+ document.addEventListener("DOMContentLoaded", () => {
+ setTimeout(() => {
+ instance.init();
+ }, window.rocket_lcp_data.delay);
+ });
+ }
+}
+
- if ( lcpElements.length <= 0 ) {
+class RocketLcpBeacon {
+ constructor(config) {
+ this.config = config;
+ this.performanceImages = [];
+ this.errorCode = '';
+ }
+
+ async run() {
+ try {
+ const above_the_fold_images = this._generateLcpCandidates(Infinity);
+ if (above_the_fold_images) {
+ this._initWithFirstElementWithInfo(above_the_fold_images);
+ this._fillATFWithoutDuplications(above_the_fold_images);
+ }
+ } catch (err) {
+ this.errorCode = 'script_error';
+ this._logMessage('Script Error: ' + err);
+ }
+ }
+
+ _generateLcpCandidates(count) {
+ const lcpElements = document.querySelectorAll(this.config.elements);
+
+ if (lcpElements.length <= 0) {
return [];
}
- const potentialCandidates = Array.from( lcpElements );
+ const potentialCandidates = Array.from(lcpElements);
const topCandidates = potentialCandidates.map(element => {
- // Skip if the element is an img and its parent is a picture
- if ('img' === element.nodeName.toLowerCase() && 'picture' === element.parentElement.nodeName.toLowerCase() ) {
+ if ('img' === element.nodeName.toLowerCase() && 'picture' === element.parentElement.nodeName.toLowerCase()) {
return null;
}
let rect;
@@ -114,12 +217,12 @@ class RocketLcpBeacon {
rect: rect,
};
})
- .filter(item => item !== null) // Filter out null values here
+ .filter(item => item !== null)
.filter(item => {
return (
item.rect.width > 0 &&
item.rect.height > 0 &&
- this._isIntersecting(item.rect)
+ RocketBeacon._isIntersecting(item.rect)
);
})
.map(item => ({
@@ -136,16 +239,6 @@ class RocketLcpBeacon {
}));
}
- _isIntersecting(rect) {
- // Check if any part of the image is within the viewport
- return (
- rect.bottom >= 0 &&
- rect.right >= 0 &&
- rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
- rect.left <= (window.innerWidth || document.documentElement.clientWidth)
- );
- }
-
_getElementArea(rect) {
const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left);
const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top);
@@ -170,8 +263,8 @@ class RocketLcpBeacon {
if (nodeName === "img" && element.srcset) {
element_info.type = "img-srcset";
element_info.src = element.src;
- element_info.srcset = element.srcset; // capture srcset
- element_info.sizes = element.sizes; // capture sizes
+ element_info.srcset = element.srcset;
+ element_info.sizes = element.sizes;
element_info.current_src = element.currentSrc;
} else if (nodeName === "img") {
element_info.type = "img";
@@ -215,16 +308,14 @@ class RocketLcpBeacon {
if (full_bg_prop.includes("image-set(")) {
element_info.type = "bg-img-set";
}
- if (!full_bg_prop || full_bg_prop === "" || full_bg_prop.includes( 'data:image' ) ) {
+ if (!full_bg_prop || full_bg_prop === "" || full_bg_prop.includes('data:image')) {
return null;
}
const matches = [...full_bg_prop.matchAll(css_bg_url_rgx)];
- element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {});
- // Check if bg_set array is populated with empty objects
+ element_info.bg_set = matches.map(m => m[1] ? { src: m[1].trim() + (m[2] ? " " + m[2].trim() : "") } : {});
if (element_info.bg_set.every(item => item.src === "")) {
- // If bg_set array is populated with empty objects, populate it with the URLs from the matches array
- element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim()} : {});
+ element_info.bg_set = matches.map(m => m[1] ? { src: m[1].trim() } : {});
}
if (element_info.bg_set.length > 0) {
@@ -241,7 +332,7 @@ class RocketLcpBeacon {
_initWithFirstElementWithInfo(elements) {
const firstElementWithInfo = elements.find(item => item.elementInfo !== null);
- if ( ! firstElementWithInfo ) {
+ if (!firstElementWithInfo) {
this._logMessage("No LCP candidate found.");
this.performanceImages = [];
return;
@@ -255,7 +346,7 @@ class RocketLcpBeacon {
_fillATFWithoutDuplications(elements) {
elements.forEach(({ element, elementInfo }) => {
- if ( this._isDuplicateImage(element) || !elementInfo ) {
+ if (this._isDuplicateImage(element) || !elementInfo) {
return;
}
@@ -280,90 +371,20 @@ class RocketLcpBeacon {
elementInfo.type === "bg-img-set" ||
elementInfo.type === "picture";
- return (isImageOrVideo || isBgImageOrPicture)
- &&
+ return (isImageOrVideo || isBgImageOrPicture) &&
this.performanceImages.some(item => item.src === elementInfo.src);
}
- _getFinalStatus() {
- if ( '' !== this.errorCode ) {
- return this.errorCode;
- }
-
- const scriptTime = ( new Date() - this.scriptTimer ) / 1000;
- if ( 10 <= scriptTime ) {
- return 'timeout';
- }
-
- return 'success';
- }
-
- _saveFinalResultIntoDB() {
- const data = new FormData();
- data.append('action', 'rocket_lcp');
- data.append('rocket_lcp_nonce', this.config.nonce);
- data.append('url', this.config.url);
- data.append('is_mobile', this.config.is_mobile);
- data.append('images', JSON.stringify(this.performanceImages));
- data.append('status', this._getFinalStatus());
-
- fetch(this.config.ajax_url, {
- method: "POST",
- credentials: 'same-origin',
- body: data,
- headers: {
- 'wpr-saas-no-intercept': true
- }
- })
- .then((response) => response.json())
- .then((data) => {
- this._logMessage(data);
- })
- .catch((error) => {
- this._logMessage(error);
- })
- .finally(() => {
- this._finalize();
- });
- }
-
- _handleInfiniteLoop() {
- this._saveFinalResultIntoDB();
- }
-
- _finalize() {
- const beaconscript = document.querySelector('[data-name="wpr-lcp-beacon"]');
- beaconscript.setAttribute('beacon-completed', 'true');
- clearTimeout( this.infiniteLoopId );
- }
-
- _logMessage( msg ) {
- if ( ! this.config.debug ) {
+ _logMessage(msg) {
+ if (!this.config.debug) {
return;
}
- console.log( msg );
+ console.log(msg);
}
- static run() {
- if ( !window.rocket_lcp_data ) {
- return;
- }
-
- const instance = new RocketLcpBeacon( window.rocket_lcp_data );
-
- if (document.readyState !== 'loading') {
- setTimeout(() => {
- instance.init();
- }, window.rocket_lcp_data.delay);
- return;
- }
-
- document.addEventListener("DOMContentLoaded", () => {
- setTimeout(() => {
- instance.init();
- }, window.rocket_lcp_data.delay);
- });
+ getResults() {
+ return this.performanceImages;
}
}
-RocketLcpBeacon.run();
+RocketBeacon.run();
\ No newline at end of file
diff --git a/assets/js/wpr-beacon.min.js b/assets/js/wpr-beacon.min.js
new file mode 100644
index 0000000000..763122d3d3
--- /dev/null
+++ b/assets/js/wpr-beacon.min.js
@@ -0,0 +1,2 @@
+!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a="function"==typeof require&&require,e=0;e{this._handleInfiniteLoop()},1e4),(await this._isGeneratedBefore()).lcp||(this.lcpBeacon=new r(this.config),await this.lcpBeacon.run()),this._saveFinalResultIntoDB()):this._finalize()}async _isValidPreconditions(){return this._isNotValidScreensize()?(this._logMessage("Bailing out because screen size is not acceptable"),!1):!this._isPageCached()||!await this._isGeneratedBefore()||(this._logMessage("Bailing out because data is already available"),!1)}_isPageCached(){var e=document.documentElement.nextSibling&&document.documentElement.nextSibling.data?document.documentElement.nextSibling.data:"";return e&&e.includes("Debug: cached")}async _isGeneratedBefore(){var e=new FormData,e=(e.append("action","rocket_check_lcp"),e.append("rocket_lcp_nonce",this.config.nonce),e.append("url",this.config.url),e.append("is_mobile",this.config.is_mobile),await fetch(this.config.ajax_url,{method:"POST",credentials:"same-origin",body:e}).then(e=>e.json()));return e.data}_isNotValidScreensize(){var e=window.innerWidth||document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight,i=this.config.is_mobile&&(e>this.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(ee.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()})}_getFinalStatus(){return""!==this.errorCode?this.errorCode:10<=(new Date-this.scriptTimer)/1e3?"timeout":"success"}_handleInfiniteLoop(){this._saveFinalResultIntoDB()}_finalize(){document.querySelector('[data-name="wpr-wpr-beacon"]').setAttribute("beacon-completed","true"),clearTimeout(this.infiniteLoopId)}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){let e=new n(window.rocket_lcp_data);"loading"!==document.readyState?setTimeout(()=>{e.init()},window.rocket_lcp_data.delay):document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{e.init()},window.rocket_lcp_data.delay)})}}}class r{constructor(e){this.config=e,this.performanceImages=[],this.errorCode=""}async run(){try{var e=this._generateLcpCandidates(1/0);e&&(this._initWithFirstElementWithInfo(e),this._fillATFWithoutDuplications(e))}catch(e){this.errorCode="script_error",this._logMessage("Script Error: "+e)}}_generateLcpCandidates(e){var t=document.querySelectorAll(this.config.elements);return t.length<=0?[]:Array.from(t).map(e=>{if("img"===e.nodeName.toLowerCase()&&"picture"===e.parentElement.nodeName.toLowerCase())return null;let t;if("picture"===e.nodeName.toLowerCase()){var i=e.querySelector("img");if(!i)return null;t=i.getBoundingClientRect()}else t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>null!==e).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)i.type="img-srcset",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if("img"===t)i.type="img",i.src=e.src,i.current_src=e.currentSrc;else if("video"===t){i.type="img";var n=e.querySelector("source");i.src=e.poster||(n?n.src:""),i.current_src=i.src}else if("svg"===t){n=e.querySelector("image");n&&(i.type="img",i.src=n.getAttribute("href")||"",i.current_src=i.src)}else if("picture"===t){i.type="picture";n=e.querySelector("img");i.src=n?n.src:"",i.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||"",type:e.type||"",sizes:e.sizes||""}))}else{t=[window.getComputedStyle(e,null).getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")].filter(e=>"none"!==e);if(0===t.length)return null;n=t[0];if(i.type="bg-img",n.includes("image-set(")&&(i.type="bg-img-set"),!n||""===n||n.includes("data:image"))return null;e=[...n.matchAll(/url\(\s*?['"]?\s*?(.+?)\s*?["']?\s*?\)/gi)];i.bg_set=e.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),i.bg_set.every(e=>""===e.src)&&(i.bg_set=e.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);e?this.performanceImages=[{...e.elementInfo,label:"lcp"}]:(this._logMessage("No LCP candidate found."),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;!this._isDuplicateImage(e)&&t&&this.performanceImages.push({...t,label:"above-the-fold"})})}_isDuplicateImage(e){let t=this._getElementInfo(e);var i;return null!==t&&(e="img"===t.type||"img-srcset"===t.type||"video"===t.type,i="bg-img"===t.type||"bg-img-set"===t.type||"picture"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_logMessage(e){this.config.debug&&console.log(e)}getResults(){return this.performanceImages}}n.run()},{}]},{},[1]);
+//# sourceMappingURL=wpr-beacon.min.js.map
diff --git a/assets/js/wpr-beacon.min.js.map b/assets/js/wpr-beacon.min.js.map
new file mode 100644
index 0000000000..17d8ecf9b1
--- /dev/null
+++ b/assets/js/wpr-beacon.min.js.map
@@ -0,0 +1 @@
+{"version":3,"names":[],"mappings":"","sources":["wpr-beacon.min.js"],"sourcesContent":["!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i=\"function\"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{this._handleInfiniteLoop()},1e4),(await this._isGeneratedBefore()).lcp||(this.lcpBeacon=new r(this.config),await this.lcpBeacon.run()),this._saveFinalResultIntoDB()):this._finalize()}async _isValidPreconditions(){return this._isNotValidScreensize()?(this._logMessage(\"Bailing out because screen size is not acceptable\"),!1):!this._isPageCached()||!await this._isGeneratedBefore()||(this._logMessage(\"Bailing out because data is already available\"),!1)}_isPageCached(){var e=document.documentElement.nextSibling&&document.documentElement.nextSibling.data?document.documentElement.nextSibling.data:\"\";return e&&e.includes(\"Debug: cached\")}async _isGeneratedBefore(){var e=new FormData,e=(e.append(\"action\",\"rocket_check_lcp\"),e.append(\"rocket_lcp_nonce\",this.config.nonce),e.append(\"url\",this.config.url),e.append(\"is_mobile\",this.config.is_mobile),await fetch(this.config.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e}).then(e=>e.json()));return e.data}_isNotValidScreensize(){var e=window.innerWidth||document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight,i=this.config.is_mobile&&(e>this.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(ee.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()})}_getFinalStatus(){return\"\"!==this.errorCode?this.errorCode:10<=(new Date-this.scriptTimer)/1e3?\"timeout\":\"success\"}_handleInfiniteLoop(){this._saveFinalResultIntoDB()}_finalize(){document.querySelector('[data-name=\"wpr-wpr-beacon\"]').setAttribute(\"beacon-completed\",\"true\"),clearTimeout(this.infiniteLoopId)}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){let e=new n(window.rocket_lcp_data);\"loading\"!==document.readyState?setTimeout(()=>{e.init()},window.rocket_lcp_data.delay):document.addEventListener(\"DOMContentLoaded\",()=>{setTimeout(()=>{e.init()},window.rocket_lcp_data.delay)})}}}class r{constructor(e){this.config=e,this.performanceImages=[],this.errorCode=\"\"}async run(){try{var e=this._generateLcpCandidates(1/0);e&&(this._initWithFirstElementWithInfo(e),this._fillATFWithoutDuplications(e))}catch(e){this.errorCode=\"script_error\",this._logMessage(\"Script Error: \"+e)}}_generateLcpCandidates(e){var t=document.querySelectorAll(this.config.elements);return t.length<=0?[]:Array.from(t).map(e=>{if(\"img\"===e.nodeName.toLowerCase()&&\"picture\"===e.parentElement.nodeName.toLowerCase())return null;let t;if(\"picture\"===e.nodeName.toLowerCase()){var i=e.querySelector(\"img\");if(!i)return null;t=i.getBoundingClientRect()}else t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>null!==e).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)i.type=\"img-srcset\",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if(\"img\"===t)i.type=\"img\",i.src=e.src,i.current_src=e.currentSrc;else if(\"video\"===t){i.type=\"img\";var n=e.querySelector(\"source\");i.src=e.poster||(n?n.src:\"\"),i.current_src=i.src}else if(\"svg\"===t){n=e.querySelector(\"image\");n&&(i.type=\"img\",i.src=n.getAttribute(\"href\")||\"\",i.current_src=i.src)}else if(\"picture\"===t){i.type=\"picture\";n=e.querySelector(\"img\");i.src=n?n.src:\"\",i.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\",type:e.type||\"\",sizes:e.sizes||\"\"}))}else{t=[window.getComputedStyle(e,null).getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")].filter(e=>\"none\"!==e);if(0===t.length)return null;n=t[0];if(i.type=\"bg-img\",n.includes(\"image-set(\")&&(i.type=\"bg-img-set\"),!n||\"\"===n||n.includes(\"data:image\"))return null;e=[...n.matchAll(/url\\(\\s*?['\"]?\\s*?(.+?)\\s*?[\"']?\\s*?\\)/gi)];i.bg_set=e.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),i.bg_set.every(e=>\"\"===e.src)&&(i.bg_set=e.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);e?this.performanceImages=[{...e.elementInfo,label:\"lcp\"}]:(this._logMessage(\"No LCP candidate found.\"),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;!this._isDuplicateImage(e)&&t&&this.performanceImages.push({...t,label:\"above-the-fold\"})})}_isDuplicateImage(e){let t=this._getElementInfo(e);var i;return null!==t&&(e=\"img\"===t.type||\"img-srcset\"===t.type||\"video\"===t.type,i=\"bg-img\"===t.type||\"bg-img-set\"===t.type||\"picture\"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_logMessage(e){this.config.debug&&console.log(e)}getResults(){return this.performanceImages}}n.run()},{}]},{},[1]);"],"file":"wpr-beacon.min.js"}
\ No newline at end of file
diff --git a/dynamic-lists.json b/dynamic-lists.json
index af42cd81ef..a64ab5d891 100644
--- a/dynamic-lists.json
+++ b/dynamic-lists.json
@@ -1 +1 @@
-{"rucss_inline_atts_exclusions":["rocket-lazyload-inline-css","divi-style-parent-inline-inline-css","gsf-custom-css","extra-style-inline-inline-css","woodmart-inline-css-inline-css","woodmart_shortcodes-custom-css","rs-plugin-settings-inline-css","divi-style-inline-inline-css","tcb-post-list-dynamic-style","n2-ss-","wpcf7-","siteorigin-panels-layouts-footer","xstore-inline-css-inline-css","assets.reviews.io","ezoicCSS","stk-"],"rucss_inline_content_exclusions":[".wp-container-",".wp-elements-","#wpv-expandable-",".custom-content-","#thb-",".et_pb_text_dap_","#gdlr-core-shape-divider","#ultib3-",".uvc-wrap-",".jet-listing-dynamic-post-",".vcex_",".wprm-advanced-list-",".adsslot_",".jnews_",".cp-info-bar.content-","#stockie-custom-","#ohio-custom-",".uid-","#wpfMainWrapper","#penci_","#penci-",".wpbs_s","#apcore_","#apress_","#zolo_",".extended-products-grid#style-",".preloader#style-preloader-",".thegem-heading-",".thegem-button-",".thegem-custom-",".thegem-popup-","#pattern-","#thegem-video-frame-","#thegem-",".qwery_inline_",".dcgd_submit_button",".irs-bar",".gallery-grid-",".cmplz-hidden","#sqbquizouter","#start_sqbquizouter",".flo-header--",".trx_addons_inline_",".wpp-cardview-compact",".e-loop-item-",".tiered-pricing-plain-text",".vc_cta3_content-container"],"defer_js_inline_exclusions":["DOMContentLoaded","document.write","window.lazyLoadOptions","N.N2_","rev_slider_wrapper","FB3D_CLIENT_LOCALE","ewww_webp_supported","anr_captcha_field_div","renderInvisibleReCaptcha","bookingInProgress"],"defer_js_external_exclusions":["gist.github.com","content.jwplatform.com","js.hsforms.net","www.uplaunch.com","google.com\/recaptcha","widget.reviews.co.uk","verify.authorize.net\/anetseal","lib\/admin\/assets\/lib\/webfont\/webfont.min.js","app.mailerlite.com","widget.reviews.io","simplybook.(.*)\/v2\/widget\/widget.js","\/wp-includes\/js\/dist\/i18n.min.js","\/wp-content\/plugins\/wpfront-notification-bar\/js\/wpfront-notification-bar(.*).js","\/wp-content\/plugins\/oxygen\/component-framework\/vendor\/aos\/aos.js","\/wp-content\/plugins\/ewww-image-optimizer\/includes\/check-webp(.min)?.js","static.mailerlite.com\/data\/(.*).js","cdn.voxpow.com\/static\/libs\/v1\/(.*).js","cdn.voxpow.com\/media\/trackers\/js\/(.*).js","use.typekit.net","www.idxhome.com","\/wp-includes\/js\/dist\/vendor\/lodash(.min)?.js","\/wp-includes\/js\/dist\/api-fetch(.min)?.js","\/wp-includes\/js\/dist\/i18n(.min)?.js","\/wp-includes\/js\/dist\/vendor\/wp-polyfill(.min)?.js","\/wp-includes\/js\/dist\/url(.min)?.js","\/wp-includes\/js\/dist\/hooks(.min)?.js","www.paypal.com\/sdk\/js","js-eu1.hsforms.net","yanovis.Voucher.js","\/carousel-upsells-and-related-product-for-woocommerce\/assets\/js\/glide.min.js","use.typekit.com","\/artale\/modules\/kirki\/assets\/webfont.js","\/api\/scripts\/lb_cs.js","js.hscta.net\/cta\/current.js","widget.refari.co","player.vdocipher.com","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js"],"delay_js_exclusions":["nowprocket","\/wp-includes\/js\/wp-embed.min.js","lazyLoadOptions","lazyLoadThumb","wp-rocket\/assets\/js\/lazyload\/(.*)","et_core_page_resource_fallback","window.\\$us === undefined","js-extra","fusionNavIsCollapsed","\/assets\/js\/smush-lazy-load","eio_lazy_vars","\\\/lazysizes(\\.min|-pre|-post)?\\.js","document\\.body\\.classList\\.remove\\(\"no-js\"\\)","document\\.documentElement\\.className\\.replace\\( 'no-js', 'js' \\)","et_animation_data","wpforms_settings","var nfForms","\/\/stats.wp.com","_stq.push","fluent_form_ff_form_instance_","cpLoadCSS","ninja_column_","var rbs_gallery_","var lepopup_","var billing_additional_field","var gtm4wp","var dataLayer_content","\/ewww-image-optimizer\/includes\/load[_-]webp(\\.min)?.js","\/ewww-image-optimizer\/includes\/check-webp(\\.min)?.js","ewww_webp_supported","\/dist\/js\/browser-redirect\/app.js","\/perfmatters\/js\/lazyload.min.js","lazyLoadInstance","scripts.mediavine.com\/tags\/","initCubePortfolio","simpli.fi","gforms_recaptcha_","\/jetpack-boost\/vendor\/automattic\/jetpack-lazy-images\/(.*)","jetpack-lazy-images-js-enabled","jetpack-boost-critical-css","wpformsRecaptchaCallback","booking-suedtirol-js","wpcp_css_disable_selection","\/gravityforms\/js\/conditional_logic.min.js","statcounter.com\/counter\/counter.js","var sc_project","\/jetpack\/jetpack_vendor\/automattic\/jetpack-lazy-images\/(.*)","\/themify-builder\/themify\/js\/modules\/fallback(\\.min)?.js","handlePixMessage","var corner_video","cdn.pixfuture.com\/hb_v2.js","cdn.pixfuture.com\/pbix.js","served-by.pixfuture.com\/www\/delivery\/ads.js","served-by.pixfuture.com\/www\/delivery\/headerbid_sticky_refresh.js","serv-vdo.pixfuture.com\/vpaid\/ads.js","wprRemoveCPCSS","window.jdgmSettings","\/photonic\/include\/js\/front-end\/nomodule\/photonic-baguettebox.min.js","\/photonic\/include\/ext\/baguettebox\/baguettebox.min.js","window.wsf_form_json_config","et_link_options_data","FuseboxPlayerAPIKey","js.hscta.net\/cta\/current.js","hbspt.cta.load","consent.cookiebot.com\/uc.js","\/woofilter-pro\/woofilterpro\/js\/ion.rangeSlider.min.js","barra.r7.com\/barra.js","rocket_css_lazyload_launch","#wpr-lazyload-bg","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js","rocket_lcp_data"],"js_minify_external":["html5.js","show_ads.js","histats.com\/js","ws.amazon.com\/widgets","\/ads\/","intensedebate.com","scripts.chitika.net\/","jotform.com\/","gist.github.com","forms.aweber.com","video.unrulymedia.com","stats.wp.com","stats.wordpress.com","widget.rafflecopter.com","widget-prime.rafflecopter.com","releases.flowplayer.org","c.ad6media.fr","cdn.stickyadstv.com","www.smava.de","contextual.media.net","app.getresponse.com","adserver.reklamstore.com","s0.wp.com","wprp.zemanta.com","files.bannersnack.com","smarticon.geotrust.com","js.gleam.io","ir-na.amazon-adsystem.com","web.ventunotech.com","verify.authorize.net","ads.themoneytizer.com","embed.finanzcheck.de","imagesrv.adition.com","js.juicyads.com","form.jotformeu.com","speakerdeck.com","content.jwplatform.com","ads.investingchannel.com","app.ecwid.com","www.industriejobs.de","s.gravatar.com","googlesyndication.com","a.optmstr.com","a.optmnstr.com","a.opmnstr.com","adthrive.com","mediavine.com","js.hsforms.net","googleadservices.com","f.convertkit.com","recaptcha\/api.js","mailmunch.co","apps.shareaholic.com","dsms0mj1bbhn4.cloudfront.net","nutrifox.com","code.tidio.co","www.uplaunch.com","widget.reviewability.com","embed-cdn.gettyimages.com\/widgets.js","app.mailerlite.com","ck.page","cdn.jsdelivr.net\/gh\/AmauriC\/","static.klaviyo.com\/onsite\/js\/klaviyo.js","a.omappapi.com\/app\/js\/api.min.js","static.zdassets.com","feedbackcompany.com\/widgets\/feedback-company-widget.min.js","widget.gleamjs.io","phonewagon.com","simplybook.asia\/v2\/widget\/widget.js","simplybook.it\/v2\/widget\/widget.js","simplybook.me\/v2\/widget\/widget.js","static.botsrv.com\/website\/js\/widget2.36cf1446.js","static.mailerlite.com\/data\/","cdn.voxpow.com","loader.knack.com","embed.lpcontent.net\/leadboxes\/current\/embed.js","cc.cdn.civiccomputing.com\/9\/cookieControl-9.x.min.js","cse.google.com\/cse.js","kit.fontawesome.com","cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-mml-chtml.js","static.leadpages.net\/leadbars\/current\/embed.js","booqable.com\/v2\/booqable.js","googleoptimize.com","cdna.hubpeople.com\/js\/widget_standalone_two_modes.js","s3.tradingview.com","www.vbt.io\/ext\/vbtforms.js","cdn.callrail.com","documentcloud.adobe.com\/view-sdk\/main.js","static.cleverpush.com","js.afterpay.com","cdn.enable.co.il\/licenses\/enable-","hcaptcha.com\/1\/api.js","voucher.getavo.it\/public\/js\/yanovis.Voucher.js","js-eu1.hsforms.net","statcounter.com\/counter\/counter.js","snapppt.com","use.typekit.com","secure.gravatar.com\/js\/gprofiles.js","cdn.jsdelivr.net\/npm\/hockeystack","widget.prod.faslet.net","ga.getresponse.com\/script\/ga.js","cognitoforms.com","usercentrics.eu","cdn.amcharts.com","umami","cdn.popt.in\/pixel.js","m2d.m2.ai","pubguru.net","trustindex.io","cdnjs.cloudflare.com\/ajax\/libs\/prism\/","podigee-podcast-player.js","tarteaucitron.io\/load.js","osm.klarnaservices.com\/lib.js","mein.clickskeks.at\/app.js","barra.r7.com\/barra.js","widget.refari.co","widget.reviews.co.uk","player.vdocipher.com","www.instagram.com\/embed.js","smartframe.io","challenges.cloudflare.com\/turnstile\/","script.roboassist.ai","cdn.hu-manity.co","daumcdn.net\/mapjsapi\/bundle\/postcode\/prod\/postcode.v2.js","consent.cookiebot.com\/uc.js"],"js_move_after_combine":["map_fusion_map_","ec:addProduct","ec:addImpression","clear_better_facebook_comments","vc-row-destroy-equal-heights-","dfd-icon-list-","SFM_template","WLTChangeState","wlt_star_","wlt_pop_distance_","smart_list_tip","gd-wgt-pagi-","data-rf-id=","tvc_po=","scrapeazon","startclock","it_logo_field_owl-box_","td_live_css_uid","wpvl_paramReplace","tdAjaxCount","mec_skin_","_wca","_taboola","fbq('trackCustom'","fbq('track'","data.token","sharrre","dfads_ajax_load_ads","tie_postviews","wmp_update","h5ab-print-article","gform_ajax_frame_","gform_post_render","mts_view_count","act_css_tooltip","window.SLB","wpt_view_count","var dateNow","gallery_product_",".flo-block-slideshow-","data='api-key=ct-","ip_common_function()","(\"style#gsf-custom-css\").append","a3revWCDynamicGallery_","#owl-carousel-instagram-","window.FlowFlowOpts","jQuery('.td_uid_","jQuery(\".slider-","#dfd-vcard-widget-","#sf-instagram-widget-",".woocommerce-tabs-","penci_megamenu__","vc_prepareHoverBox","wp-temp-form-div","_wswebinarsystem_already_","#views-extra-css\").text","fusetag.setTargeting","hit.uptrendsdata.com","callback:window.renderBadge","test_run_nf_conditional_logic","cb_nombre","$('.fl-node-","function($){google_maps_","$(\"#myCarousel","et_animation_data=","current_url=\"","CustomEvent.prototype=window.Event.prototype","electro-wc-product-gallery","woof_is_mobile","jQuery('.videonextup","wpp_params","us.templateDirectoryUri=",".fat-gallery-item",".ratingbox","user_rating.prototype.eraseCookie","test_run_nf_conditional","dpsp-networks-btns-wrapper","pa_woo_product_info","sharing_enabled_on_post_via_metabox","#product-search-field-","GOTMLS_login_offset","berocket_aapf_time_to_fix_products_style","window.vc_googleMapsPointer","sinceID_","#ut-background-video-ut-section","+window.comment_tab_width+","dfd-button-hover-in","wpseo-address-wrapper","platform.stumbleupon.com","#woo_pp_ec_button_mini_cart","#supercarousel","blockClass","tdbMenuItem","tdbSearchItem","best_seller_badge","jQuery('#product-top-bar","fb_desc-","FC_regenerate_captcha","wp_post_blocks_vars.listed_posts=[","captcha-hash","mapdata={",".ywpc-char-",").countdowntimer(","jQuery(\"#td_uid_","find('#td_uid_","variation_estimate_msg"],"js_excluded_inline":["document.write","google_ad","edToolbar","gtag","_gaq.push","_gaLt","GoogleAnalyticsObject","syntaxhighlighter","adsbygoogle","ci_cap_","_stq","nonce","post_id","LogHuman","idcomments_acct","ch_client","sc_online_t","_stq","bannersnack_embed","vtn_player_type","ven_video_key","ANS_customer_id","tdBlock","tdLocalCache","wpRestNonce","\"url\":","lazyLoadOptions","adthrive","loadCSS","google_tag_params","clicky_custom","clicky_site_ids","NSLPopupCenter","_paq","gtm","dataLayer","RecaptchaLoad","WPCOM_sharing_counts","jetpack_remote_comment","subscribe-field","contextly","_mmunch","gt_request_uri","doGTranslate","docTitle","bs_ajax_paginate_","bs_deferred_loading_","theChampRedirectionUrl","theChampFBCommentUrl","theChampTwitterRedirect","theChampRegRedirectionUrl","ESSB_CACHE_URL","oneall_social_login_providers_","betterads_screen_width","woocommerce_wishlist_add_to_wishlist_url","arf_conditional_logic","heateorSsHorSharingShortUrl","TL_Const","bimber_front_microshare","setAttribute(\"id\"","setAttribute( \"id\"","TribeEventsPro","peepsotimedata","wphc_data","hc_rand_id","RBL_ADD","AfsAnalyticsObject","_thriveCurrentPost","esc_login_url","fwduvpMainPlaylist","Bibblio.initRelatedContent","showUFC()","#iphorm-","#fancy-","ult-carousel-","theChampLJAuthUrl","f._fbq","Insticator","w2dc_js_objects","cherry_ajax","ad_block_","elementorFrontendConfig","zeen_","disqusIdentifier","currentAjaxUrl","geodir_event_call_calendar_","atatags-","hbspt.forms.create","function(c,h,i,m,p)","dataTable({","rankMath = {","_atrk_opts","quicklinkOptions","ct_checkjs_","WP_Statistics_http","penci_block_","omapi_localized","omapi_data","OptinMonsterApp","tminusnow","nfForms","galleries.gallery_","wcj_evt.prodID","advads_tracking_ads","advadsGATracking.postContext","woopack_config","ulp_content_id","wp-cumulus\/tagcloud.swf?r=","ctSetCookie('ct_checkjs'","woof_really_curr_tax","uLogin.customInit","i18n_no_matching_variations_text","alsp_map_markers_attrs","var inc_opt =","iworks_upprev","yith_wcevti_tickets","window.metrilo.ensure_cbuid","metrilo.event","wordpress_page_root","wcct_info","Springbot.product_id","pysWooProductData","dfd-heading","owl=$(\"#","penci_megamenu","fts_security","algoliaAutocomplete","avia_framework_globals","tabs.easyResponsiveTabs","searchlocationHeader","yithautocomplete","data-parallax-speed","currency_data=","cedexisData","function reenableButton","#wpnbio-show","e.Newsletter2GoTrackingObject","var categories_","\"+nRemaining+\"","cartsguru_cart_token","after_share_easyoptin","location_data.push","thirstyFunctions.isThirstyLink","styles: ' #custom-menu-","function svc_center_","#svc_carousel2_container_","advads.move","elementid","advads_has_ads","wpseo_map_init","mdf_current_page_url","tptn_tracker","dpsp_pin_button_data","searchwp_live_search_params","wpp_params","top.location,thispage","selection+pagelink","ic_window_resolution","PHP.wp_p_id","ShopifyBuy.UI.onReady(client)","orig_request_uri","gie.widgets.load","Adman.Flash","PHP.wp_p_id","window.broadstreetKeywords","var productId =","var flatsomeVars","wc_product_block_data","static.mailerlite.com","amzn_assoc","_bs_getParameterByName","_stq.push","h._remove","var FlowFlowOpts","var WCPFData =","var _beeketing","var _statcounter","var actions =","var current_url","var object_name","var the_ajax_script","var wc_cart_fragments_params","var woocommerce_params","var wpml_cookies","wc_add_to_cart_params","window.broadstreetKeywords","window.wc_ga_pro.available_gateways","xa.prototype","HOUZEZ_ajaxcalls_vars","w2dc_maps_objects","w2dc_controller_args_array","w2dc_map_markers_attrs","YT.Player","WPFC.data","function current_video_","var videodiv","var slider_wppasrotate","wppas_ga","var blockClass","tarteaucitron","pw_brand_product_list","tminusCountDown","pysWooSelectContentData","wpvq_ans89733","_isp_version","price_range_data","window.FeedbackCompanyWidgets","woocs_current_currency","woo_variation_swatches_options","woocommerce_price_slider_params","scriptParams","form-adv-pagination","borlabsCookiePrioritize","urls_wpwidgetpolylang","quickViewNonce","frontendscripts_params","nj-facebook-messenger","var fb_mess_position","init_particles_row_background_script","setREVStartSize","fl-node","PPAccordion","soliloquy_","wprevpublicjs_script_vars","DTGS_NONCE_FRONTEND","et_animation_data","archives-dropdown","loftloaderCache","SmartSliderSimple","var nectarLove","var incOpt","RocketBrowserCompatibilityChecker","RocketPreloadLinksConfig","placementVersionId","var useEdit","var DTGS_NONCE_FRONTEND","n2jQuery","et_core_api_spam_recaptcha","cnArgs","__CF$cv$params","trustbox_settings","aepro","cdn.jst.ai","w2dc_fields_in_categories","jetMenuPublicSettings","JetTricksSettings","aepc_pixel","avadaWooCommerceVars","var isb","fcaPcPost","csrf_token","icwp_wpsf_vars_lpantibot","wpvViewHead","ed_school_plugin","aps_comp_","guaven_woos","__lm_redirect_to","__wpdm_view_count","bookacti.booking_system","nfFrontEnd","view_quote_cart_link","__eae_decode_emails","divioverlays_ajaxurl","var _EPYT_","#ins-heading-","#ins-button-","tve_frontend_options","lb24.src","amazon_Login_accessToken","porto_infinite_scroll",".adace-loader-","adace_load_","tagGroupsAccordiontaggroupscloudaccordion","tagGroupsTabstaggroupscloudtabs","jrRelatedWidgets","UNCODE.initRow","amp_mobile_redirect_disabled","wpgdprcData","wpml_browser_redirect_params","swPreRegister","kboard_settings","ct_ultimate_gdpr_cookie","wcpv_registration_local","www.idxhome.com","arf_footer_cl_logic_call","reload_attached_coupons","var ftpp","forminatorFront","_EPYT_","edd_free_downloads_vars","edd_stripe_vars","var ASP","ecwidOriginalTitle","defaultCategoryId","translation-revision-date","google_conversion_id","hbspt","var marker_locations_","var AdmMyAjax","ifso_page_url","referrer_for_pageload","WoocommerceWidget\/woocommerceWidget.js","var ht_ctc_chat_var","spuvar","var wpilFrontend","urls_polylangREPLACETOID","e.setAttribute('unselectable',on);","try{Typekit.load","iMapsData","var wpforms_user_journey","rocket_lazyload_css_data","wcStoreApiNonceTimestamp","createNonceMiddleware","pbidHash","wcBlocksMiddlewareConfig"],"cache_ignored_parameters":["utm_source","utm_medium","utm_campaign","utm_expid","utm_term","utm_content","utm_id","utm_source_platform","utm_creative_format","utm_marketing_tactic","mtm_source","mtm_medium","mtm_campaign","mtm_keyword","mtm_cid","mtm_content","pk_source","pk_medium","pk_campaign","pk_keyword","pk_cid","pk_content","fb_action_ids","fb_action_types","fb_source","fbclid","campaignid","adgroupid","adid","gclid","age-verified","ao_noptimize","usqp","cn-reloaded","_ga","sscid","gclsrc","_gl","mc_cid","mc_eid","_bta_tid","_bta_c","trk_contact","trk_msg","trk_module","trk_sid","gdfms","gdftrk","gdffi","_ke","_kx","redirect_log_mongo_id","redirect_mongo_id","sb_referer_host","mkwid","pcrid","ef_id","s_kwcid","msclkid","dm_i","epik","pp","gbraid","wbraid","ssp_iabi","ssp_iaba","gad","vgo_ee","gad_source"],"preload_exclusions":["void\\(.*;","(.*)__trashed(.*)","\/jet-menu\/(.*)","\/jet-popup\/(.*)"],"exclude_js_files":["\/wp-includes\/js\/dist\/i18n.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/html2canvas.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/pdf.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/three.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/3d-flip-book.min.js","\/google-site-kit\/dist\/assets\/js\/(.*).js","\/wp-live-chat-support\/public\/js\/callus(.*).js","\/borlabs-cookie\/assets\/javascript\/(.*).js","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js","\/woocommerce-bookings\/dist\/frontend.js","\/plugins\/mapify(.*)\/assets\/js\/dist\/bundle.js"],"staging_domains":[".wpengine.com",".wpenginepowered.com",".pantheonsite.io",".flywheelsites.com",".flywheelstaging.com",".kinsta.com",".kinsta.cloud",".cloudwaysapps.com",".azurewebsites.net",".wpserveur.net","-liquidwebsites.com",".myftpupload.com",".dream.press",".sg-host.com",".platformsh.site",".wpstage.net",".bigscoots-staging.com",".wpsc.site",".runcloud.link",".onrocket.site",".singlestaging.com",".myraidbox.de",".instawp.xyz",".instawp.co",".instawp.link",".instawp.app",".hstgr.cloud",".myhostpoint.ch",".wpcomstaging.com"],"exclude_js_template":["type=\"module\""]}
\ No newline at end of file
+{"rucss_inline_atts_exclusions":["rocket-lazyload-inline-css","divi-style-parent-inline-inline-css","gsf-custom-css","extra-style-inline-inline-css","woodmart-inline-css-inline-css","woodmart_shortcodes-custom-css","rs-plugin-settings-inline-css","divi-style-inline-inline-css","tcb-post-list-dynamic-style","n2-ss-","wpcf7-","siteorigin-panels-layouts-footer","xstore-inline-css-inline-css","assets.reviews.io","ezoicCSS","stk-"],"rucss_inline_content_exclusions":[".wp-container-",".wp-elements-","#wpv-expandable-",".custom-content-","#thb-",".et_pb_text_dap_","#gdlr-core-shape-divider","#ultib3-",".uvc-wrap-",".jet-listing-dynamic-post-",".vcex_",".wprm-advanced-list-",".adsslot_",".jnews_",".cp-info-bar.content-","#stockie-custom-","#ohio-custom-",".uid-","#wpfMainWrapper","#penci_","#penci-",".wpbs_s","#apcore_","#apress_","#zolo_",".extended-products-grid#style-",".preloader#style-preloader-",".thegem-heading-",".thegem-button-",".thegem-custom-",".thegem-popup-","#pattern-","#thegem-video-frame-","#thegem-",".qwery_inline_",".dcgd_submit_button",".irs-bar",".gallery-grid-",".cmplz-hidden","#sqbquizouter","#start_sqbquizouter",".flo-header--",".trx_addons_inline_",".wpp-cardview-compact",".e-loop-item-",".tiered-pricing-plain-text",".vc_cta3_content-container"],"defer_js_inline_exclusions":["DOMContentLoaded","document.write","window.lazyLoadOptions","N.N2_","rev_slider_wrapper","FB3D_CLIENT_LOCALE","ewww_webp_supported","anr_captcha_field_div","renderInvisibleReCaptcha","bookingInProgress"],"defer_js_external_exclusions":["gist.github.com","content.jwplatform.com","js.hsforms.net","www.uplaunch.com","google.com\/recaptcha","widget.reviews.co.uk","verify.authorize.net\/anetseal","lib\/admin\/assets\/lib\/webfont\/webfont.min.js","app.mailerlite.com","widget.reviews.io","simplybook.(.*)\/v2\/widget\/widget.js","\/wp-includes\/js\/dist\/i18n.min.js","\/wp-content\/plugins\/wpfront-notification-bar\/js\/wpfront-notification-bar(.*).js","\/wp-content\/plugins\/oxygen\/component-framework\/vendor\/aos\/aos.js","\/wp-content\/plugins\/ewww-image-optimizer\/includes\/check-webp(.min)?.js","static.mailerlite.com\/data\/(.*).js","cdn.voxpow.com\/static\/libs\/v1\/(.*).js","cdn.voxpow.com\/media\/trackers\/js\/(.*).js","use.typekit.net","www.idxhome.com","\/wp-includes\/js\/dist\/vendor\/lodash(.min)?.js","\/wp-includes\/js\/dist\/api-fetch(.min)?.js","\/wp-includes\/js\/dist\/i18n(.min)?.js","\/wp-includes\/js\/dist\/vendor\/wp-polyfill(.min)?.js","\/wp-includes\/js\/dist\/url(.min)?.js","\/wp-includes\/js\/dist\/hooks(.min)?.js","www.paypal.com\/sdk\/js","js-eu1.hsforms.net","yanovis.Voucher.js","\/carousel-upsells-and-related-product-for-woocommerce\/assets\/js\/glide.min.js","use.typekit.com","\/artale\/modules\/kirki\/assets\/webfont.js","\/api\/scripts\/lb_cs.js","js.hscta.net\/cta\/current.js","widget.refari.co","player.vdocipher.com","\/wp-content\/plugins\/wp-rocket\/assets\/js\/wpr-beacon(.min)?.js"],"delay_js_exclusions":["nowprocket","\/wp-includes\/js\/wp-embed.min.js","lazyLoadOptions","lazyLoadThumb","wp-rocket\/assets\/js\/lazyload\/(.*)","et_core_page_resource_fallback","window.\\$us === undefined","js-extra","fusionNavIsCollapsed","\/assets\/js\/smush-lazy-load","eio_lazy_vars","\\\/lazysizes(\\.min|-pre|-post)?\\.js","document\\.body\\.classList\\.remove\\(\"no-js\"\\)","document\\.documentElement\\.className\\.replace\\( 'no-js', 'js' \\)","et_animation_data","wpforms_settings","var nfForms","\/\/stats.wp.com","_stq.push","fluent_form_ff_form_instance_","cpLoadCSS","ninja_column_","var rbs_gallery_","var lepopup_","var billing_additional_field","var gtm4wp","var dataLayer_content","\/ewww-image-optimizer\/includes\/load[_-]webp(\\.min)?.js","\/ewww-image-optimizer\/includes\/check-webp(\\.min)?.js","ewww_webp_supported","\/dist\/js\/browser-redirect\/app.js","\/perfmatters\/js\/lazyload.min.js","lazyLoadInstance","scripts.mediavine.com\/tags\/","initCubePortfolio","simpli.fi","gforms_recaptcha_","\/jetpack-boost\/vendor\/automattic\/jetpack-lazy-images\/(.*)","jetpack-lazy-images-js-enabled","jetpack-boost-critical-css","wpformsRecaptchaCallback","booking-suedtirol-js","wpcp_css_disable_selection","\/gravityforms\/js\/conditional_logic.min.js","statcounter.com\/counter\/counter.js","var sc_project","\/jetpack\/jetpack_vendor\/automattic\/jetpack-lazy-images\/(.*)","\/themify-builder\/themify\/js\/modules\/fallback(\\.min)?.js","handlePixMessage","var corner_video","cdn.pixfuture.com\/hb_v2.js","cdn.pixfuture.com\/pbix.js","served-by.pixfuture.com\/www\/delivery\/ads.js","served-by.pixfuture.com\/www\/delivery\/headerbid_sticky_refresh.js","serv-vdo.pixfuture.com\/vpaid\/ads.js","wprRemoveCPCSS","window.jdgmSettings","\/photonic\/include\/js\/front-end\/nomodule\/photonic-baguettebox.min.js","\/photonic\/include\/ext\/baguettebox\/baguettebox.min.js","window.wsf_form_json_config","et_link_options_data","FuseboxPlayerAPIKey","js.hscta.net\/cta\/current.js","hbspt.cta.load","consent.cookiebot.com\/uc.js","\/woofilter-pro\/woofilterpro\/js\/ion.rangeSlider.min.js","barra.r7.com\/barra.js","rocket_css_lazyload_launch","#wpr-lazyload-bg","\/wp-content\/plugins\/wp-rocket\/assets\/js\/wpr-beacon(.min)?.js","rocket_lcp_data"],"js_minify_external":["html5.js","show_ads.js","histats.com\/js","ws.amazon.com\/widgets","\/ads\/","intensedebate.com","scripts.chitika.net\/","jotform.com\/","gist.github.com","forms.aweber.com","video.unrulymedia.com","stats.wp.com","stats.wordpress.com","widget.rafflecopter.com","widget-prime.rafflecopter.com","releases.flowplayer.org","c.ad6media.fr","cdn.stickyadstv.com","www.smava.de","contextual.media.net","app.getresponse.com","adserver.reklamstore.com","s0.wp.com","wprp.zemanta.com","files.bannersnack.com","smarticon.geotrust.com","js.gleam.io","ir-na.amazon-adsystem.com","web.ventunotech.com","verify.authorize.net","ads.themoneytizer.com","embed.finanzcheck.de","imagesrv.adition.com","js.juicyads.com","form.jotformeu.com","speakerdeck.com","content.jwplatform.com","ads.investingchannel.com","app.ecwid.com","www.industriejobs.de","s.gravatar.com","googlesyndication.com","a.optmstr.com","a.optmnstr.com","a.opmnstr.com","adthrive.com","mediavine.com","js.hsforms.net","googleadservices.com","f.convertkit.com","recaptcha\/api.js","mailmunch.co","apps.shareaholic.com","dsms0mj1bbhn4.cloudfront.net","nutrifox.com","code.tidio.co","www.uplaunch.com","widget.reviewability.com","embed-cdn.gettyimages.com\/widgets.js","app.mailerlite.com","ck.page","cdn.jsdelivr.net\/gh\/AmauriC\/","static.klaviyo.com\/onsite\/js\/klaviyo.js","a.omappapi.com\/app\/js\/api.min.js","static.zdassets.com","feedbackcompany.com\/widgets\/feedback-company-widget.min.js","widget.gleamjs.io","phonewagon.com","simplybook.asia\/v2\/widget\/widget.js","simplybook.it\/v2\/widget\/widget.js","simplybook.me\/v2\/widget\/widget.js","static.botsrv.com\/website\/js\/widget2.36cf1446.js","static.mailerlite.com\/data\/","cdn.voxpow.com","loader.knack.com","embed.lpcontent.net\/leadboxes\/current\/embed.js","cc.cdn.civiccomputing.com\/9\/cookieControl-9.x.min.js","cse.google.com\/cse.js","kit.fontawesome.com","cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-mml-chtml.js","static.leadpages.net\/leadbars\/current\/embed.js","booqable.com\/v2\/booqable.js","googleoptimize.com","cdna.hubpeople.com\/js\/widget_standalone_two_modes.js","s3.tradingview.com","www.vbt.io\/ext\/vbtforms.js","cdn.callrail.com","documentcloud.adobe.com\/view-sdk\/main.js","static.cleverpush.com","js.afterpay.com","cdn.enable.co.il\/licenses\/enable-","hcaptcha.com\/1\/api.js","voucher.getavo.it\/public\/js\/yanovis.Voucher.js","js-eu1.hsforms.net","statcounter.com\/counter\/counter.js","snapppt.com","use.typekit.com","secure.gravatar.com\/js\/gprofiles.js","cdn.jsdelivr.net\/npm\/hockeystack","widget.prod.faslet.net","ga.getresponse.com\/script\/ga.js","cognitoforms.com","usercentrics.eu","cdn.amcharts.com","umami","cdn.popt.in\/pixel.js","m2d.m2.ai","pubguru.net","trustindex.io","cdnjs.cloudflare.com\/ajax\/libs\/prism\/","podigee-podcast-player.js","tarteaucitron.io\/load.js","osm.klarnaservices.com\/lib.js","mein.clickskeks.at\/app.js","barra.r7.com\/barra.js","widget.refari.co","widget.reviews.co.uk","player.vdocipher.com","www.instagram.com\/embed.js","smartframe.io","challenges.cloudflare.com\/turnstile\/","script.roboassist.ai","cdn.hu-manity.co","daumcdn.net\/mapjsapi\/bundle\/postcode\/prod\/postcode.v2.js","consent.cookiebot.com\/uc.js"],"js_move_after_combine":["map_fusion_map_","ec:addProduct","ec:addImpression","clear_better_facebook_comments","vc-row-destroy-equal-heights-","dfd-icon-list-","SFM_template","WLTChangeState","wlt_star_","wlt_pop_distance_","smart_list_tip","gd-wgt-pagi-","data-rf-id=","tvc_po=","scrapeazon","startclock","it_logo_field_owl-box_","td_live_css_uid","wpvl_paramReplace","tdAjaxCount","mec_skin_","_wca","_taboola","fbq('trackCustom'","fbq('track'","data.token","sharrre","dfads_ajax_load_ads","tie_postviews","wmp_update","h5ab-print-article","gform_ajax_frame_","gform_post_render","mts_view_count","act_css_tooltip","window.SLB","wpt_view_count","var dateNow","gallery_product_",".flo-block-slideshow-","data='api-key=ct-","ip_common_function()","(\"style#gsf-custom-css\").append","a3revWCDynamicGallery_","#owl-carousel-instagram-","window.FlowFlowOpts","jQuery('.td_uid_","jQuery(\".slider-","#dfd-vcard-widget-","#sf-instagram-widget-",".woocommerce-tabs-","penci_megamenu__","vc_prepareHoverBox","wp-temp-form-div","_wswebinarsystem_already_","#views-extra-css\").text","fusetag.setTargeting","hit.uptrendsdata.com","callback:window.renderBadge","test_run_nf_conditional_logic","cb_nombre","$('.fl-node-","function($){google_maps_","$(\"#myCarousel","et_animation_data=","current_url=\"","CustomEvent.prototype=window.Event.prototype","electro-wc-product-gallery","woof_is_mobile","jQuery('.videonextup","wpp_params","us.templateDirectoryUri=",".fat-gallery-item",".ratingbox","user_rating.prototype.eraseCookie","test_run_nf_conditional","dpsp-networks-btns-wrapper","pa_woo_product_info","sharing_enabled_on_post_via_metabox","#product-search-field-","GOTMLS_login_offset","berocket_aapf_time_to_fix_products_style","window.vc_googleMapsPointer","sinceID_","#ut-background-video-ut-section","+window.comment_tab_width+","dfd-button-hover-in","wpseo-address-wrapper","platform.stumbleupon.com","#woo_pp_ec_button_mini_cart","#supercarousel","blockClass","tdbMenuItem","tdbSearchItem","best_seller_badge","jQuery('#product-top-bar","fb_desc-","FC_regenerate_captcha","wp_post_blocks_vars.listed_posts=[","captcha-hash","mapdata={",".ywpc-char-",").countdowntimer(","jQuery(\"#td_uid_","find('#td_uid_","variation_estimate_msg"],"js_excluded_inline":["document.write","google_ad","edToolbar","gtag","_gaq.push","_gaLt","GoogleAnalyticsObject","syntaxhighlighter","adsbygoogle","ci_cap_","_stq","nonce","post_id","LogHuman","idcomments_acct","ch_client","sc_online_t","_stq","bannersnack_embed","vtn_player_type","ven_video_key","ANS_customer_id","tdBlock","tdLocalCache","wpRestNonce","\"url\":","lazyLoadOptions","adthrive","loadCSS","google_tag_params","clicky_custom","clicky_site_ids","NSLPopupCenter","_paq","gtm","dataLayer","RecaptchaLoad","WPCOM_sharing_counts","jetpack_remote_comment","subscribe-field","contextly","_mmunch","gt_request_uri","doGTranslate","docTitle","bs_ajax_paginate_","bs_deferred_loading_","theChampRedirectionUrl","theChampFBCommentUrl","theChampTwitterRedirect","theChampRegRedirectionUrl","ESSB_CACHE_URL","oneall_social_login_providers_","betterads_screen_width","woocommerce_wishlist_add_to_wishlist_url","arf_conditional_logic","heateorSsHorSharingShortUrl","TL_Const","bimber_front_microshare","setAttribute(\"id\"","setAttribute( \"id\"","TribeEventsPro","peepsotimedata","wphc_data","hc_rand_id","RBL_ADD","AfsAnalyticsObject","_thriveCurrentPost","esc_login_url","fwduvpMainPlaylist","Bibblio.initRelatedContent","showUFC()","#iphorm-","#fancy-","ult-carousel-","theChampLJAuthUrl","f._fbq","Insticator","w2dc_js_objects","cherry_ajax","ad_block_","elementorFrontendConfig","zeen_","disqusIdentifier","currentAjaxUrl","geodir_event_call_calendar_","atatags-","hbspt.forms.create","function(c,h,i,m,p)","dataTable({","rankMath = {","_atrk_opts","quicklinkOptions","ct_checkjs_","WP_Statistics_http","penci_block_","omapi_localized","omapi_data","OptinMonsterApp","tminusnow","nfForms","galleries.gallery_","wcj_evt.prodID","advads_tracking_ads","advadsGATracking.postContext","woopack_config","ulp_content_id","wp-cumulus\/tagcloud.swf?r=","ctSetCookie('ct_checkjs'","woof_really_curr_tax","uLogin.customInit","i18n_no_matching_variations_text","alsp_map_markers_attrs","var inc_opt =","iworks_upprev","yith_wcevti_tickets","window.metrilo.ensure_cbuid","metrilo.event","wordpress_page_root","wcct_info","Springbot.product_id","pysWooProductData","dfd-heading","owl=$(\"#","penci_megamenu","fts_security","algoliaAutocomplete","avia_framework_globals","tabs.easyResponsiveTabs","searchlocationHeader","yithautocomplete","data-parallax-speed","currency_data=","cedexisData","function reenableButton","#wpnbio-show","e.Newsletter2GoTrackingObject","var categories_","\"+nRemaining+\"","cartsguru_cart_token","after_share_easyoptin","location_data.push","thirstyFunctions.isThirstyLink","styles: ' #custom-menu-","function svc_center_","#svc_carousel2_container_","advads.move","elementid","advads_has_ads","wpseo_map_init","mdf_current_page_url","tptn_tracker","dpsp_pin_button_data","searchwp_live_search_params","wpp_params","top.location,thispage","selection+pagelink","ic_window_resolution","PHP.wp_p_id","ShopifyBuy.UI.onReady(client)","orig_request_uri","gie.widgets.load","Adman.Flash","PHP.wp_p_id","window.broadstreetKeywords","var productId =","var flatsomeVars","wc_product_block_data","static.mailerlite.com","amzn_assoc","_bs_getParameterByName","_stq.push","h._remove","var FlowFlowOpts","var WCPFData =","var _beeketing","var _statcounter","var actions =","var current_url","var object_name","var the_ajax_script","var wc_cart_fragments_params","var woocommerce_params","var wpml_cookies","wc_add_to_cart_params","window.broadstreetKeywords","window.wc_ga_pro.available_gateways","xa.prototype","HOUZEZ_ajaxcalls_vars","w2dc_maps_objects","w2dc_controller_args_array","w2dc_map_markers_attrs","YT.Player","WPFC.data","function current_video_","var videodiv","var slider_wppasrotate","wppas_ga","var blockClass","tarteaucitron","pw_brand_product_list","tminusCountDown","pysWooSelectContentData","wpvq_ans89733","_isp_version","price_range_data","window.FeedbackCompanyWidgets","woocs_current_currency","woo_variation_swatches_options","woocommerce_price_slider_params","scriptParams","form-adv-pagination","borlabsCookiePrioritize","urls_wpwidgetpolylang","quickViewNonce","frontendscripts_params","nj-facebook-messenger","var fb_mess_position","init_particles_row_background_script","setREVStartSize","fl-node","PPAccordion","soliloquy_","wprevpublicjs_script_vars","DTGS_NONCE_FRONTEND","et_animation_data","archives-dropdown","loftloaderCache","SmartSliderSimple","var nectarLove","var incOpt","RocketBrowserCompatibilityChecker","RocketPreloadLinksConfig","placementVersionId","var useEdit","var DTGS_NONCE_FRONTEND","n2jQuery","et_core_api_spam_recaptcha","cnArgs","__CF$cv$params","trustbox_settings","aepro","cdn.jst.ai","w2dc_fields_in_categories","jetMenuPublicSettings","JetTricksSettings","aepc_pixel","avadaWooCommerceVars","var isb","fcaPcPost","csrf_token","icwp_wpsf_vars_lpantibot","wpvViewHead","ed_school_plugin","aps_comp_","guaven_woos","__lm_redirect_to","__wpdm_view_count","bookacti.booking_system","nfFrontEnd","view_quote_cart_link","__eae_decode_emails","divioverlays_ajaxurl","var _EPYT_","#ins-heading-","#ins-button-","tve_frontend_options","lb24.src","amazon_Login_accessToken","porto_infinite_scroll",".adace-loader-","adace_load_","tagGroupsAccordiontaggroupscloudaccordion","tagGroupsTabstaggroupscloudtabs","jrRelatedWidgets","UNCODE.initRow","amp_mobile_redirect_disabled","wpgdprcData","wpml_browser_redirect_params","swPreRegister","kboard_settings","ct_ultimate_gdpr_cookie","wcpv_registration_local","www.idxhome.com","arf_footer_cl_logic_call","reload_attached_coupons","var ftpp","forminatorFront","_EPYT_","edd_free_downloads_vars","edd_stripe_vars","var ASP","ecwidOriginalTitle","defaultCategoryId","translation-revision-date","google_conversion_id","hbspt","var marker_locations_","var AdmMyAjax","ifso_page_url","referrer_for_pageload","WoocommerceWidget\/woocommerceWidget.js","var ht_ctc_chat_var","spuvar","var wpilFrontend","urls_polylangREPLACETOID","e.setAttribute('unselectable',on);","try{Typekit.load","iMapsData","var wpforms_user_journey","rocket_lazyload_css_data","wcStoreApiNonceTimestamp","createNonceMiddleware","pbidHash","wcBlocksMiddlewareConfig"],"cache_ignored_parameters":["utm_source","utm_medium","utm_campaign","utm_expid","utm_term","utm_content","utm_id","utm_source_platform","utm_creative_format","utm_marketing_tactic","mtm_source","mtm_medium","mtm_campaign","mtm_keyword","mtm_cid","mtm_content","pk_source","pk_medium","pk_campaign","pk_keyword","pk_cid","pk_content","fb_action_ids","fb_action_types","fb_source","fbclid","campaignid","adgroupid","adid","gclid","age-verified","ao_noptimize","usqp","cn-reloaded","_ga","sscid","gclsrc","_gl","mc_cid","mc_eid","_bta_tid","_bta_c","trk_contact","trk_msg","trk_module","trk_sid","gdfms","gdftrk","gdffi","_ke","_kx","redirect_log_mongo_id","redirect_mongo_id","sb_referer_host","mkwid","pcrid","ef_id","s_kwcid","msclkid","dm_i","epik","pp","gbraid","wbraid","ssp_iabi","ssp_iaba","gad","vgo_ee","gad_source"],"preload_exclusions":["void\\(.*;","(.*)__trashed(.*)","\/jet-menu\/(.*)","\/jet-popup\/(.*)"],"exclude_js_files":["\/wp-includes\/js\/dist\/i18n.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/html2canvas.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/pdf.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/three.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/3d-flip-book.min.js","\/google-site-kit\/dist\/assets\/js\/(.*).js","\/wp-live-chat-support\/public\/js\/callus(.*).js","\/borlabs-cookie\/assets\/javascript\/(.*).js","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js","\/woocommerce-bookings\/dist\/frontend.js","\/plugins\/mapify(.*)\/assets\/js\/dist\/bundle.js"],"staging_domains":[".wpengine.com",".wpenginepowered.com",".pantheonsite.io",".flywheelsites.com",".flywheelstaging.com",".kinsta.com",".kinsta.cloud",".cloudwaysapps.com",".azurewebsites.net",".wpserveur.net","-liquidwebsites.com",".myftpupload.com",".dream.press",".sg-host.com",".platformsh.site",".wpstage.net",".bigscoots-staging.com",".wpsc.site",".runcloud.link",".onrocket.site",".singlestaging.com",".myraidbox.de",".instawp.xyz",".instawp.co",".instawp.link",".instawp.app",".hstgr.cloud",".myhostpoint.ch",".wpcomstaging.com"],"exclude_js_template":["type=\"module\""]}
diff --git a/gulpfile.js b/gulpfile.js
index 370fd43aa4..a86e095383 100755
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -17,8 +17,8 @@ requireDir('./src/js/gulp/tasks', { recurse: true });
* gulp build:js:app:unmin => Builds admin app js file, the unminified version (wpr-admin.js)
* gulp build:js:app:min => Builds admin app js file, the minified version (wpr-admin.min.js)
* gulp build:js:lazyloadcss:min => Builds lazyload CSS js file, the minified version (lazyload-css.min.js)
-* gulp build:js:lcp:min => Builds lcp beacon script, the minified version (lcp-beacon.min.js)
-* gulp build:js:all => Builds all js files mentioned above (wpr-admin.js, wpr-admin.min.js, lazyload-css.min.js, lcp-beacon.min.js)
+* gulp build:js:lcp:min => Builds wpr beacon script, the minified version (wpr-beacon.min.js)
+* gulp build:js:all => Builds all js files mentioned above (wpr-admin.js, wpr-admin.min.js, lazyload-css.min.js, wpr-beacon.min.js)
* gulp js:watch => Watches all js files changes and build them again with any change.
*
*/
diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php
index ed5d60526c..8b44147436 100644
--- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php
+++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php
@@ -59,7 +59,7 @@ public function add_lcp_data() {
$url = isset( $_POST['url'] ) ? untrailingslashit( esc_url_raw( wp_unslash( $_POST['url'] ) ) ) : '';
$is_mobile = isset( $_POST['is_mobile'] ) ? filter_var( wp_unslash( $_POST['is_mobile'] ), FILTER_VALIDATE_BOOLEAN ) : false;
- $images = isset( $_POST['images'] ) ? json_decode( wp_unslash( $_POST['images'] ) ) : []; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+ $images = isset( $_POST['lcp_images'] ) ? json_decode( wp_unslash( $_POST['lcp_images'] ) ) : []; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$lcp = 'not found';
$viewport = [];
diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php
index 26856608f5..054705a008 100644
--- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php
+++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php
@@ -369,7 +369,7 @@ private function is_mobile(): bool {
public function inject_beacon( $html, $url, $is_mobile ): string {
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
- if ( ! $this->filesystem->exists( rocket_get_constant( 'WP_ROCKET_ASSETS_JS_PATH' ) . 'lcp-beacon' . $min . '.js' ) ) {
+ if ( ! $this->filesystem->exists( rocket_get_constant( 'WP_ROCKET_ASSETS_JS_PATH' ) . 'wpr-beacon' . $min . '.js' ) ) {
return $html;
}
@@ -433,10 +433,10 @@ public function inject_beacon( $html, $url, $is_mobile ): string {
$inline_script = '';
// Get the URL of the script.
- $script_url = rocket_get_constant( 'WP_ROCKET_ASSETS_JS_URL' ) . 'lcp-beacon' . $min . '.js';
+ $script_url = rocket_get_constant( 'WP_ROCKET_ASSETS_JS_URL' ) . 'wpr-beacon' . $min . '.js';
// Create the script tag.
- $script_tag = ""; // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
+ $script_tag = ""; // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
// Append the script tag just before the closing body tag.
return str_replace( '
-